diff --git a/CHANGELOG.md b/CHANGELOG.md index 8731a395..919ce02f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 3.0.2 + +- Fixed incorrect moobloom texture layer + ## 3.0.1 - Fixed villager trades not being specific to the beekeeper villager profession diff --git a/common/src/main/java/com/faboslav/friendsandfoes/common/client/render/entity/feature/MoobloomFlowerFeatureRenderer.java b/common/src/main/java/com/faboslav/friendsandfoes/common/client/render/entity/feature/MoobloomFlowerFeatureRenderer.java index a92ab655..79ede4d3 100644 --- a/common/src/main/java/com/faboslav/friendsandfoes/common/client/render/entity/feature/MoobloomFlowerFeatureRenderer.java +++ b/common/src/main/java/com/faboslav/friendsandfoes/common/client/render/entity/feature/MoobloomFlowerFeatureRenderer.java @@ -22,10 +22,13 @@ @Environment(EnvType.CLIENT) public final class MoobloomFlowerFeatureRenderer extends FeatureRenderer> { + private final BlockRenderManager blockRenderManager; + public MoobloomFlowerFeatureRenderer( FeatureRendererContext> featureRendererContext ) { super(featureRendererContext); + this.blockRenderManager = MinecraftClient.getInstance().getBlockRenderManager(); } public void render( @@ -41,8 +44,6 @@ public void render( float l ) { if (!moobloomEntity.isBaby() && !moobloomEntity.isInvisible()) { - BlockRenderManager blockRenderManager = MinecraftClient.getInstance().getBlockRenderManager(); - PlantBlock flower = moobloomEntity.getVariant().getFlower(); BlockState blockState = moobloomEntity.getVariant().getFlower().getDefaultState(); @@ -61,7 +62,7 @@ public void render( MinecraftClient minecraftClient = MinecraftClient.getInstance(); boolean renderAsModel = minecraftClient.hasOutline(moobloomEntity) && moobloomEntity.isInvisible(); - BakedModel bakedModel = blockRenderManager.getModel(blockState); + BakedModel bakedModel = this.blockRenderManager.getModel(blockState); // Head matrixStack.push(); @@ -69,7 +70,7 @@ public void render( matrixStack.translate(0.09D, -0.6D, -0.185D); matrixStack.scale(-scaleFactor, -scaleFactor, scaleFactor); matrixStack.translate(-0.5D, yOffset, -0.5D); - this.renderFlower(matrixStack, vertexConsumerProvider, light, renderAsModel, blockRenderManager, blockState, overlay, bakedModel); + this.renderFlower(matrixStack, vertexConsumerProvider, light, renderAsModel, blockState, overlay, bakedModel); matrixStack.pop(); // Body @@ -77,21 +78,21 @@ public void render( matrixStack.translate(0.22D, -0.28D, -0.06D); matrixStack.scale(-scaleFactor, -scaleFactor, scaleFactor); matrixStack.translate(-0.5D, yOffset, -0.5D); - this.renderFlower(matrixStack, vertexConsumerProvider, light, renderAsModel, blockRenderManager, blockState, overlay, bakedModel); + this.renderFlower(matrixStack, vertexConsumerProvider, light, renderAsModel, blockState, overlay, bakedModel); matrixStack.pop(); matrixStack.push(); matrixStack.translate(-0.2D, -0.22D, 0.01D); matrixStack.scale(-scaleFactor, -scaleFactor, scaleFactor); matrixStack.translate(-0.5D, yOffset, -0.5D); - this.renderFlower(matrixStack, vertexConsumerProvider, light, renderAsModel, blockRenderManager, blockState, overlay, bakedModel); + this.renderFlower(matrixStack, vertexConsumerProvider, light, renderAsModel, blockState, overlay, bakedModel); matrixStack.pop(); matrixStack.push(); matrixStack.translate(0.03D, -0.28D, 0.47D); matrixStack.scale(-scaleFactor, -scaleFactor, scaleFactor); matrixStack.translate(-0.5D, yOffset, -0.5D); - this.renderFlower(matrixStack, vertexConsumerProvider, light, renderAsModel, blockRenderManager, blockState, overlay, bakedModel); + this.renderFlower(matrixStack, vertexConsumerProvider, light, renderAsModel, blockState, overlay, bakedModel); matrixStack.pop(); } } @@ -101,15 +102,14 @@ private void renderFlower( VertexConsumerProvider vertexConsumers, int light, boolean renderAsModel, - BlockRenderManager blockRenderManager, BlockState moobloomState, int overlay, BakedModel moobloomModel ) { if (renderAsModel) { - blockRenderManager.getModelRenderer().render(matrices.peek(), vertexConsumers.getBuffer(RenderLayer.getOutline(PlayerScreenHandler.BLOCK_ATLAS_TEXTURE)), moobloomState, moobloomModel, 0.0F, 0.0F, 0.0F, light, overlay); + this.blockRenderManager.getModelRenderer().render(matrices.peek(), vertexConsumers.getBuffer(RenderLayer.getOutline(PlayerScreenHandler.BLOCK_ATLAS_TEXTURE)), moobloomState, moobloomModel, 0.0F, 0.0F, 0.0F, light, overlay); } else { - blockRenderManager.renderBlockAsEntity(moobloomState, matrices, vertexConsumers, light, overlay); + this.blockRenderManager.renderBlockAsEntity(moobloomState, matrices, vertexConsumers, light, overlay); } } diff --git a/common/src/main/java/com/faboslav/friendsandfoes/common/client/render/entity/renderer/MoobloomEntityRenderer.java b/common/src/main/java/com/faboslav/friendsandfoes/common/client/render/entity/renderer/MoobloomEntityRenderer.java index 89330c52..3751f7c3 100644 --- a/common/src/main/java/com/faboslav/friendsandfoes/common/client/render/entity/renderer/MoobloomEntityRenderer.java +++ b/common/src/main/java/com/faboslav/friendsandfoes/common/client/render/entity/renderer/MoobloomEntityRenderer.java @@ -3,6 +3,7 @@ import com.faboslav.friendsandfoes.common.FriendsAndFoes; import com.faboslav.friendsandfoes.common.client.render.entity.feature.MoobloomFlowerFeatureRenderer; import com.faboslav.friendsandfoes.common.entity.MoobloomEntity; +import com.faboslav.friendsandfoes.common.init.FriendsAndFoesEntityModelLayers; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.client.render.entity.EntityRendererFactory; @@ -16,7 +17,7 @@ public final class MoobloomEntityRenderer extends MobEntityRenderer> { public MoobloomEntityRenderer(EntityRendererFactory.Context context) { - super(context, new CowEntityModel(context.getPart(EntityModelLayers.MOOSHROOM)), 0.7F); + super(context, new CowEntityModel(context.getPart(FriendsAndFoesEntityModelLayers.MOOBLOOM_LAYER)), 0.7F); this.addFeature(new MoobloomFlowerFeatureRenderer(this)); } diff --git a/common/src/main/java/com/faboslav/friendsandfoes/common/init/FriendsAndFoesEntityModelLayers.java b/common/src/main/java/com/faboslav/friendsandfoes/common/init/FriendsAndFoesEntityModelLayers.java index da81bdeb..b77c7f98 100644 --- a/common/src/main/java/com/faboslav/friendsandfoes/common/init/FriendsAndFoesEntityModelLayers.java +++ b/common/src/main/java/com/faboslav/friendsandfoes/common/init/FriendsAndFoesEntityModelLayers.java @@ -19,6 +19,7 @@ public final class FriendsAndFoesEntityModelLayers public static final EntityModelLayer GLARE_LAYER = new EntityModelLayer(FriendsAndFoes.makeID("glare"), "main"); public static final EntityModelLayer ICEOLOGER_ICE_CHUNK_LAYER = new EntityModelLayer(FriendsAndFoes.makeID("iceologer_ice_chunk"), "main"); public static final EntityModelLayer MAULER_LAYER = new EntityModelLayer(FriendsAndFoes.makeID("mauler"), "main"); + public static final EntityModelLayer MOOBLOOM_LAYER = new EntityModelLayer(FriendsAndFoes.makeID("moobloom"), "main"); public static final EntityModelLayer RASCAL_LAYER = new EntityModelLayer(FriendsAndFoes.makeID("rascal"), "main"); public static final EntityModelLayer TUFF_GOLEM_LAYER = new EntityModelLayer(FriendsAndFoes.makeID("tuff_golem"), "main"); public static final EntityModelLayer WILDFIRE_LAYER = new EntityModelLayer(FriendsAndFoes.makeID("wildfire"), "main"); diff --git a/gradle.properties b/gradle.properties index 886850c5..13c7a555 100644 --- a/gradle.properties +++ b/gradle.properties @@ -7,7 +7,7 @@ org.gradle.caching=false mod_java_version=17 mod_name=Friends & Foes mod_id=friendsandfoes -mod_version=3.0.1 +mod_version=3.0.2 mod_author=Faboslav mod_description=Adds outvoted and forgotten mobs from the mob vote, expanding on their original concepts and introducing new vanilla-like features. maven_group=com.faboslav.friendsandfoes