Hello! How do I stop sand and gravel from falling when no blocks are under? I want them to float. Is there somekind of plugin for it? Thanks in advance!
What you would do is setImmobile() on your entity. If you want it whenever an Falling Block entity spawns, you could make a task, loop trough all entities an check if FallingBlock and if not immobile set immobile (not the best way but still working)
Correction: i checked and theres an event, the way of doing could be (not tested): PHP: //In your listener classpublic function onEntitySpawn(EntitySpawnEvent $e){ if($e->getType() === Entity::FALLING_BLOCK) { $e->setImmobile(true); }}
Well he wanted to stop sand/gravel to fall. So i just made a code that automatically stops gravel/sand from falling when it appears
setImmobile() is like cancelling playermoveevent. It prevents an entity from moving or falling. Tho you can still pass trhough the entity