Fix shulker box rendering

This commit is contained in:
Jozufozu 2021-12-08 12:48:18 -08:00
parent e575b1c580
commit 860aee28d8
2 changed files with 3 additions and 5 deletions

View file

@ -53,7 +53,7 @@ public class ChestInstance<T extends BlockEntity & LidBlockEntity> extends TileE
.setPosition(getInstancePosition()); .setPosition(getInstancePosition());
lid = lidInstance(); lid = lidInstance();
if (block instanceof AbstractChestBlock) { if (block instanceof AbstractChestBlock<?> chestBlock) {
float horizontalAngle = blockState.getValue(ChestBlock.FACING).toYRot(); float horizontalAngle = blockState.getValue(ChestBlock.FACING).toYRot();
@ -61,8 +61,6 @@ public class ChestInstance<T extends BlockEntity & LidBlockEntity> extends TileE
body.setRotation(baseRotation); body.setRotation(baseRotation);
AbstractChestBlock<?> chestBlock = (AbstractChestBlock<?>) block;
DoubleBlockCombiner.NeighborCombineResult<? extends ChestBlockEntity> wrapper = chestBlock.combine(blockState, world, getWorldPosition(), true); DoubleBlockCombiner.NeighborCombineResult<? extends ChestBlockEntity> wrapper = chestBlock.combine(blockState, world, getWorldPosition(), true);
this.lidProgress = wrapper.apply(ChestBlock.opennessCombiner(tile)); this.lidProgress = wrapper.apply(ChestBlock.opennessCombiner(tile));

View file

@ -86,14 +86,14 @@ public class ShulkerBoxInstance extends TileEntityInstance<ShulkerBoxBlockEntity
} }
private ModelData makeBaseInstance() { private ModelData makeBaseInstance() {
return materialManager.cutout(RenderType.entityCutout(Sheets.SHULKER_SHEET)) return materialManager.cutout(RenderType.entityCutoutNoCull(Sheets.SHULKER_SHEET))
.material(Materials.TRANSFORMED) .material(Materials.TRANSFORMED)
.model("base_" + texture.getName(), this::makeBaseModel) .model("base_" + texture.getName(), this::makeBaseModel)
.createInstance(); .createInstance();
} }
private ModelData makeLidInstance() { private ModelData makeLidInstance() {
return materialManager.cutout(RenderType.entityCutout(Sheets.SHULKER_SHEET)) return materialManager.cutout(RenderType.entityCutoutNoCull(Sheets.SHULKER_SHEET))
.material(Materials.TRANSFORMED) .material(Materials.TRANSFORMED)
.model("lid_" + texture.getName(), this::makeLidModel) .model("lid_" + texture.getName(), this::makeLidModel)
.createInstance(); .createInstance();