diff --git a/src/main/java/de/teamlapen/vampirism/client/core/ModBlocksRender.java b/src/main/java/de/teamlapen/vampirism/client/core/ModBlocksRender.java index 2c346cd58..a187c472e 100755 --- a/src/main/java/de/teamlapen/vampirism/client/core/ModBlocksRender.java +++ b/src/main/java/de/teamlapen/vampirism/client/core/ModBlocksRender.java @@ -29,10 +29,6 @@ */ public class ModBlocksRender { - public static final Material[] COFFIN_TEXTURES = Arrays.stream(DyeColor.values()).sorted(Comparator.comparingInt(DyeColor::getId)).map((dye) -> { - return new Material(BLOCK_ATLAS, new ResourceLocation(REFERENCE.MODID, "block/coffin/coffin_" + dye.getName())); - }).toArray(Material[]::new); - public static void register() { registerRenderType(); } diff --git a/src/main/java/de/teamlapen/vampirism/client/renderer/blockentity/CoffinBESR.java b/src/main/java/de/teamlapen/vampirism/client/renderer/blockentity/CoffinBESR.java index 25622e597..c31d04a7a 100755 --- a/src/main/java/de/teamlapen/vampirism/client/renderer/blockentity/CoffinBESR.java +++ b/src/main/java/de/teamlapen/vampirism/client/renderer/blockentity/CoffinBESR.java @@ -45,7 +45,6 @@ public void render(@NotNull CoffinBlockEntity tile, float partialTicks, @NotNull Direction direction = state.getValue(HORIZONTAL_FACING); if (!isHeadSafe(tile.getLevel(), tile.getBlockPos())) return; - Material material = ModBlocksRender.COFFIN_TEXTURES[tile.color.getId()]; matrixStack.pushPose(); boolean vertical = state.getValue(CoffinBlock.VERTICAL); switch (direction) { @@ -85,7 +84,7 @@ public void render(@NotNull CoffinBlockEntity tile, float partialTicks, @NotNull BakedModel baseModel = Minecraft.getInstance().getModelManager().getModel(new ResourceLocation(REFERENCE.MODID, "block/coffin/coffin_bottom_" + tile.color.getName())); ModelData modelData = baseModel.getModelData(tile.getLevel(), tile.getBlockPos(), state, ModelData.EMPTY); for (RenderType renderType : baseModel.getRenderTypes(state, RandomSource.create(42), modelData)) { - Minecraft.getInstance().getBlockRenderer().getModelRenderer().renderModel(matrixStack.last(), material.buffer(iRenderTypeBuffer, RenderType::entitySolid), state, baseModel, 1, 1, 1, i, i1, modelData, renderType); + Minecraft.getInstance().getBlockRenderer().getModelRenderer().renderModel(matrixStack.last(), iRenderTypeBuffer.getBuffer(RenderTypeHelper.getEntityRenderType(renderType, false)), state, baseModel, 1, 1, 1, i, i1, modelData, renderType); } matrixStack.pushPose();