3
0
Mirror von https://github.com/GeyserMC/Geyser.git synchronisiert 2024-12-26 16:12:46 +01:00

Merge pull request #57 from AJ-Ferguson/remapper

Also fix digging acknowledgement block update
Dieser Commit ist enthalten in:
Redned 2019-10-09 20:44:43 -05:00 committet von GitHub
Commit c4c1765f95
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23

Datei anzeigen

@ -41,9 +41,16 @@ public class JavaPlayerActionAckTranslator extends PacketTranslator<ServerPlayer
switch (packet.getAction()) { switch (packet.getAction()) {
case FINISH_DIGGING: case FINISH_DIGGING:
UpdateBlockPacket updateBlockPacket = new UpdateBlockPacket(); UpdateBlockPacket updateBlockPacket = new UpdateBlockPacket();
BlockEntry bedrockItem = TranslatorsInit.getBlockTranslator().getBedrockBlock(packet.getNewState()); updateBlockPacket.setDataLayer(0);
updateBlockPacket.setBlockPosition(Vector3i.from(packet.getPosition().getX(), packet.getPosition().getY(), packet.getPosition().getZ())); updateBlockPacket.setBlockPosition(new Vector3i(
updateBlockPacket.setRuntimeId(GlobalBlockPalette.getOrCreateRuntimeId(bedrockItem.hashCode())); packet.getPosition().getX(),
packet.getPosition().getY(),
packet.getPosition().getZ()));
BlockEntry itemEntry = TranslatorsInit.getBlockTranslator().getBedrockBlock(packet.getNewState());
updateBlockPacket.setRuntimeId(GlobalBlockPalette.getOrCreateRuntimeId(itemEntry.getBedrockId() << 4 | itemEntry.getBedrockData()));
updateBlockPacket.getFlags().add(UpdateBlockPacket.Flag.NEIGHBORS);
session.getUpstream().sendPacket(updateBlockPacket); session.getUpstream().sendPacket(updateBlockPacket);
break; break;
} }