From 5a609c48b9d0ebb89c19627cd6dbbff21fc8324a Mon Sep 17 00:00:00 2001 From: Lorenz Date: Fri, 8 Jul 2022 23:34:20 +0200 Subject: add hide exp bottles support --- .../at/lorenz/mod/mixinhooks/RenderManagerHook.kt | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 src/main/java/at/lorenz/mod/mixinhooks/RenderManagerHook.kt (limited to 'src/main/java/at/lorenz/mod/mixinhooks') diff --git a/src/main/java/at/lorenz/mod/mixinhooks/RenderManagerHook.kt b/src/main/java/at/lorenz/mod/mixinhooks/RenderManagerHook.kt new file mode 100644 index 000000000..69242d651 --- /dev/null +++ b/src/main/java/at/lorenz/mod/mixinhooks/RenderManagerHook.kt @@ -0,0 +1,25 @@ +package at.lorenz.mod.mixinhooks + +import at.lorenz.mod.events.CheckRenderEntityEvent +import net.minecraft.client.renderer.culling.ICamera +import net.minecraft.entity.Entity +import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable + +fun shouldRender( + entityIn: Entity, + camera: ICamera, + camX: Double, + camY: Double, + camZ: Double, + cir: CallbackInfoReturnable +) { + if ( + CheckRenderEntityEvent( + entityIn, + camera, + camX, + camY, + camZ + ).postAndCatch() + ) cir.returnValue = false +} \ No newline at end of file -- cgit