PedestalBlockEntity sync fix
This commit is contained in:
parent
de6100f9be
commit
14a6803c88
4 changed files with 24 additions and 22 deletions
|
@ -37,12 +37,13 @@ public class PedestalItemRenderer<T extends PedestalBlockEntity> extends BlockEn
|
|||
VertexConsumerProvider vertexConsumers, int light, int overlay) {
|
||||
|
||||
World world = blockEntity.getWorld();
|
||||
if (blockEntity.isEmpty() || world == null) return;
|
||||
if (world == null || blockEntity.isEmpty()) return;
|
||||
|
||||
BlockState state = world.getBlockState(blockEntity.getPos());
|
||||
if (!(state.getBlock() instanceof PedestalBlock)) return;
|
||||
|
||||
ItemStack activeItem = blockEntity.getStack(0);
|
||||
|
||||
matrices.push();
|
||||
MinecraftClient minecraft = MinecraftClient.getInstance();
|
||||
BakedModel model = minecraft.getItemRenderer().getHeldItemModel(activeItem, world, null);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue