mirror of
https://github.com/GeyserMC/Geyser.git
synced 2024-08-14 23:57:35 +00:00
add way to summon a item on drop
This commit is contained in:
parent
835a44b12f
commit
16f9886873
1 changed files with 3 additions and 0 deletions
|
|
@ -79,6 +79,9 @@ public class BedrockActionTranslator extends PacketTranslator<PlayerActionPacket
|
|||
case DROP_ITEM:
|
||||
ClientPlayerActionPacket dropItemPacket = new ClientPlayerActionPacket(PlayerAction.DROP_ITEM, position, BlockFace.values()[packet.getFace()]);
|
||||
session.getDownstream().getSession().send(dropItemPacket);
|
||||
|
||||
ItemEntity itemEntity = new ItemEntity(packet.getRuntimeEntityId(), packet.getRuntimeEntityId(), packet.getBlockPosition().toFloat());
|
||||
session.getEntityCache().spawnEntity(itemEntity);
|
||||
break;
|
||||
case STOP_SLEEP:
|
||||
ClientPlayerStatePacket stopSleepingPacket = new ClientPlayerStatePacket((int) entity.getEntityId(), PlayerState.LEAVE_BED);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue