Fix flower pots and item frames

This commit is contained in:
DoctorMacc 2020-07-05 00:03:51 -04:00
parent 8ac5d6e13d
commit 4062f1ee55
3 changed files with 6 additions and 5 deletions

View file

@ -150,7 +150,7 @@ public class ItemFrameEntity extends Entity {
updateBlockPacket.setBlockPosition(bedrockPosition); updateBlockPacket.setBlockPosition(bedrockPosition);
updateBlockPacket.setRuntimeId(0); updateBlockPacket.setRuntimeId(0);
updateBlockPacket.getFlags().add(UpdateBlockPacket.Flag.PRIORITY); updateBlockPacket.getFlags().add(UpdateBlockPacket.Flag.PRIORITY);
updateBlockPacket.getFlags().add(UpdateBlockPacket.Flag.NO_GRAPHIC); //TODO: Used to be NONE updateBlockPacket.getFlags().add(UpdateBlockPacket.Flag.NETWORK);
updateBlockPacket.getFlags().add(UpdateBlockPacket.Flag.NEIGHBORS); updateBlockPacket.getFlags().add(UpdateBlockPacket.Flag.NEIGHBORS);
session.sendUpstreamPacket(updateBlockPacket); session.sendUpstreamPacket(updateBlockPacket);
session.getItemFrameCache().remove(position, entityId); session.getItemFrameCache().remove(position, entityId);
@ -178,7 +178,7 @@ public class ItemFrameEntity extends Entity {
updateBlockPacket.setBlockPosition(bedrockPosition); updateBlockPacket.setBlockPosition(bedrockPosition);
updateBlockPacket.setRuntimeId(bedrockRuntimeId); updateBlockPacket.setRuntimeId(bedrockRuntimeId);
updateBlockPacket.getFlags().add(UpdateBlockPacket.Flag.PRIORITY); updateBlockPacket.getFlags().add(UpdateBlockPacket.Flag.PRIORITY);
updateBlockPacket.getFlags().add(UpdateBlockPacket.Flag.NO_GRAPHIC); //TODO Same updateBlockPacket.getFlags().add(UpdateBlockPacket.Flag.NETWORK);
updateBlockPacket.getFlags().add(UpdateBlockPacket.Flag.NEIGHBORS); updateBlockPacket.getFlags().add(UpdateBlockPacket.Flag.NEIGHBORS);
session.sendUpstreamPacket(updateBlockPacket); session.sendUpstreamPacket(updateBlockPacket);

View file

@ -76,7 +76,7 @@ public class BlockStateValues {
return; return;
} }
if (entry.getKey().contains("potted_")) { if (entry.getKey().contains("potted_") || entry.getKey().contains("flower_pot")) {
FLOWER_POT_VALUES.put(javaBlockState, entry.getKey().replace("potted_", "")); FLOWER_POT_VALUES.put(javaBlockState, entry.getKey().replace("potted_", ""));
return; return;
} }

View file

@ -49,10 +49,11 @@ public class FlowerPotBlockEntityTranslator implements BedrockOnlyBlockEntity, R
updateBlockPacket.setDataLayer(0); updateBlockPacket.setDataLayer(0);
updateBlockPacket.setRuntimeId(BlockTranslator.getBedrockBlockId(blockState)); updateBlockPacket.setRuntimeId(BlockTranslator.getBedrockBlockId(blockState));
updateBlockPacket.setBlockPosition(position); updateBlockPacket.setBlockPosition(position);
updateBlockPacket.getFlags().add(UpdateBlockPacket.Flag.PRIORITY);
updateBlockPacket.getFlags().add(UpdateBlockPacket.Flag.NO_GRAPHIC); //TODO: Check
updateBlockPacket.getFlags().add(UpdateBlockPacket.Flag.NEIGHBORS); updateBlockPacket.getFlags().add(UpdateBlockPacket.Flag.NEIGHBORS);
updateBlockPacket.getFlags().add(UpdateBlockPacket.Flag.NETWORK);
updateBlockPacket.getFlags().add(UpdateBlockPacket.Flag.PRIORITY);
session.sendUpstreamPacket(updateBlockPacket); session.sendUpstreamPacket(updateBlockPacket);
BlockEntityUtils.updateBlockEntity(session, getTag(blockState, position), position);
} }
/** /**