mirror of
https://github.com/Jozufozu/Flywheel.git
synced 2025-02-05 01:34:58 +01:00
Fix shulker box rendering
This commit is contained in:
parent
e575b1c580
commit
860aee28d8
2 changed files with 3 additions and 5 deletions
|
@ -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));
|
||||||
|
|
|
@ -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();
|
||||||
|
|
Loading…
Reference in a new issue