Fix shulker box rendering

This commit is contained in:
Jozufozu 2021-12-08 12:48:18 -08:00
parent 9fe0bae2ad
commit 47b110c48c
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());
lid = lidInstance();
if (block instanceof AbstractChestBlock) {
if (block instanceof AbstractChestBlock<?> chestBlock) {
float horizontalAngle = blockState.getValue(ChestBlock.FACING).toYRot();
@ -61,8 +61,6 @@ public class ChestInstance<T extends BlockEntity & LidBlockEntity> extends TileE
body.setRotation(baseRotation);
AbstractChestBlock<?> chestBlock = (AbstractChestBlock<?>) block;
DoubleBlockCombiner.NeighborCombineResult<? extends ChestBlockEntity> wrapper = chestBlock.combine(blockState, world, getWorldPosition(), true);
this.lidProgress = wrapper.apply(ChestBlock.opennessCombiner(tile));

View file

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