diff --git a/gradle.properties b/gradle.properties index 085cce08..4d11c542 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,7 +3,7 @@ org.gradle.daemon=false mod_id=sophisticatedbackpacks mod_group_id=sophisticatedbackpacks -mod_version=3.22.1 +mod_version=3.22.2 sonar_project_key=sophisticatedbackpacks:SophisticatedBackpacks github_package_url=https://maven.pkg.github.com/P3pp3rF1y/SophisticatedBackpacks diff --git a/src/main/java/net/p3pp3rf1y/sophisticatedbackpacks/client/render/BackpackItemStackRenderer.java b/src/main/java/net/p3pp3rf1y/sophisticatedbackpacks/client/render/BackpackItemStackRenderer.java index 05508e05..1abfc46e 100644 --- a/src/main/java/net/p3pp3rf1y/sophisticatedbackpacks/client/render/BackpackItemStackRenderer.java +++ b/src/main/java/net/p3pp3rf1y/sophisticatedbackpacks/client/render/BackpackItemStackRenderer.java @@ -14,7 +14,6 @@ import net.minecraft.client.resources.model.BakedModel; import net.minecraft.world.item.ItemDisplayContext; import net.minecraft.world.item.ItemStack; -import net.minecraftforge.client.ForgeHooksClient; import net.p3pp3rf1y.sophisticatedbackpacks.api.CapabilityBackpackWrapper; public class BackpackItemStackRenderer extends BlockEntityWithoutLevelRenderer { @@ -26,16 +25,8 @@ public BackpackItemStackRenderer(BlockEntityRenderDispatcher blockEntityRenderDi @Override public void renderByItem(ItemStack stack, ItemDisplayContext transformType, PoseStack matrixStack, MultiBufferSource buffer, int combinedLight, int combinedOverlay) { - //ItemRenderer.render does transformations that would need to be transformed against in complicated way so rather pop the pose here and push the new one with the same transforms - // applied in the correct order with the getModel - matrixStack.popPose(); - matrixStack.pushPose(); ItemRenderer itemRenderer = minecraft.getItemRenderer(); BakedModel model = itemRenderer.getModel(stack, null, minecraft.player, 0); - - boolean leftHand = minecraft.player != null && minecraft.player.getOffhandItem() == stack; - model = ForgeHooksClient.handleCameraTransforms(matrixStack, model, transformType, leftHand); - matrixStack.translate(-0.5D, -0.5D, -0.5D); RenderType rendertype = ItemBlockRenderTypes.getRenderType(stack, true); VertexConsumer ivertexbuilder = ItemRenderer.getFoilBufferDirect(buffer, rendertype, true, stack.hasFoil()); itemRenderer.renderModelLists(model, stack, combinedLight, combinedOverlay, matrixStack, ivertexbuilder);