fix falling not drop item

This commit is contained in:
MidnightTale 2023-04-13 12:42:40 +07:00
commit 8292131670

View file

@ -116,8 +116,8 @@ public class FoliaFlow extends JavaPlugin implements Listener {
spawnLoc.setZ(spawnLoc.getZ()+0.5); spawnLoc.setZ(spawnLoc.getZ()+0.5);
FallingBlock dummy = loc.getWorld().spawnFallingBlock(spawnLoc, ((FallingBlock) entity).getBlockData()); FallingBlock dummy = loc.getWorld().spawnFallingBlock(spawnLoc, ((FallingBlock) entity).getBlockData());
dummy.setDropItem(false); dummy.setDropItem(true);
dummy.setHurtEntities(false); dummy.setHurtEntities(true);
dummy.setGravity(true); dummy.setGravity(true);
Vector dummyVel = vel.clone(); Vector dummyVel = vel.clone();
dummyVel.setY(-dummyVel.getY()); dummyVel.setY(-dummyVel.getY());