Immersive Paintings [Fabric/Forge]

Immersive Paintings [Fabric/Forge]

8M Downloads

desync if painting has nbt

chengzi-sc opened this issue ยท 0 comments

commented

forge 1.20.1

https://github.com/Luke100000/ImmersivePaintings/blob/1.20.1/common/src/main/java/immersive_paintings/item/ImmersivePaintingItem.java#L27

this.getWorld().isSpaceEmpty(this) will always be true in client side,if painting has nbt and lager than one block,it will cause desync

can be fix like this
if (paintingEntity.canStayAttached()) {
if (!world.isClientSide) {
paintingEntity.onPlace();
world.gameEvent(playerEntity, GameEvent.ENTITY_PLACE, blockPos);
world.addFreshEntity(paintingEntity);
itemStack.shrink(1);
}
return InteractionResult.sidedSuccess(world.isClientSide);
}

https://github.com/Luke100000/ImmersivePaintings/blob/1.20.1/common/src/main/java/immersive_paintings/entity/AbstractImmersiveDecorationEntity.java#L117
if (Config.getInstance().testIfSpaceEmpty) {
if(level.isClientSide()) return true;
return level.noCollision(self);
}