Skip to content

Commit 4734309

Browse files
committed
Improved Voxelized item hooks
Fixes items not rendering properly in Storage Drawers, both hooks are needed. In particular, hooks are needed for item physic mod AND storage drawers compat.
1 parent d9ce014 commit 4734309

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

src/main/java/com/falsepattern/falsetweaks/mixin/mixins/client/voxelizer/RenderItemMixin.java

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,20 +30,35 @@
3030

3131
import net.minecraft.client.renderer.entity.RenderItem;
3232
import net.minecraft.entity.Entity;
33+
import net.minecraft.entity.item.EntityItem;
3334

3435
@Mixin(RenderItem.class)
3536
public abstract class RenderItemMixin {
3637
@Inject(method = "doRender(Lnet/minecraft/entity/Entity;DDDFF)V",
3738
at = @At("HEAD"),
3839
require = 1)
39-
private void startManagedMode(Entity p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_, float p_76986_9_, CallbackInfo ci) {
40+
private void startManagedMode1(Entity p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_, float p_76986_9_, CallbackInfo ci) {
4041
Data.setManagedMode(true);
4142
}
4243

4344
@Inject(method = "doRender(Lnet/minecraft/entity/Entity;DDDFF)V",
4445
at = @At("RETURN"),
4546
require = 1)
46-
private void endManagedMode(Entity p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_, float p_76986_9_, CallbackInfo ci) {
47+
private void endManagedMode1(Entity p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_, float p_76986_9_, CallbackInfo ci) {
48+
Data.setManagedMode(false);
49+
}
50+
51+
@Inject(method = "doRender(Lnet/minecraft/entity/item/EntityItem;DDDFF)V",
52+
at = @At("HEAD"),
53+
require = 1)
54+
private void startManagedMode2(EntityItem entity, double x, double y, double z, float entityYaw, float partialTicks, CallbackInfo ci) {
55+
Data.setManagedMode(true);
56+
}
57+
58+
@Inject(method = "doRender(Lnet/minecraft/entity/item/EntityItem;DDDFF)V",
59+
at = @At("RETURN"),
60+
require = 1)
61+
private void endManagedMode2(EntityItem entity, double x, double y, double z, float entityYaw, float partialTicks, CallbackInfo ci) {
4762
Data.setManagedMode(false);
4863
}
4964
}

0 commit comments

Comments
 (0)