How do I remove falling of item entity? I tried it with data flags, but it's not working PHP: $entity->setDataFlag($entity::DATA_FLAGS, 16, true); PHP: $entity->setDataFlag($entity::DATA_FLAGS, $entity::DATA_FLAG_AFFECTED_BY_GRAVITY, false);
To disable client-sided simulation: PHP: $entity->setGenericFlag(Entity::DATA_FLAG_NO_AI); Removing server-side gravity is a bit more tricky, because the server doesn't respect those flags yet. You'd have to register a custom Item class extending \pocketmine\item\Item and override `applyGravity()` with an empty function - or you could set the protected $gravity field to zero.
I overriden gravity field and set it to 0, but item still fall PHP: <?phpnamespace BedWars\game\entity;use pocketmine\entity\Item;/*** Created by PhpStorm.* User: Honza* Date: 11.02.2018* Time: 14:27*/class DroppedItem extends Item{ protected $gravity = 0;}