From 972bdfb318d0ba2a2c483bc63eadb4225e5f528b Mon Sep 17 00:00:00 2001 From: Lorenz Date: Thu, 21 Jul 2022 21:04:07 +0200 Subject: commit bunch of stuff needed more testig idk idc --- .../render/BlockRendererDispatcherHook.kt | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 src/main/java/at/hannibal2/skyhanni/mixinhooks/render/BlockRendererDispatcherHook.kt (limited to 'src/main/java/at/hannibal2/skyhanni/mixinhooks/render') diff --git a/src/main/java/at/hannibal2/skyhanni/mixinhooks/render/BlockRendererDispatcherHook.kt b/src/main/java/at/hannibal2/skyhanni/mixinhooks/render/BlockRendererDispatcherHook.kt new file mode 100644 index 000000000..d04e248ea --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/mixinhooks/render/BlockRendererDispatcherHook.kt @@ -0,0 +1,25 @@ +//package at.hannibal2.skyhanni.mixinhooks.render +// +//import at.hannibal2.skyhanni.events.RenderBlockInWorldEvent +//import net.minecraft.block.state.IBlockState +//import net.minecraft.client.renderer.BlockRendererDispatcher +//import net.minecraft.client.resources.model.IBakedModel +//import net.minecraft.util.BlockPos +//import net.minecraft.world.IBlockAccess +//import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable +// +//fun modifyGetModelFromBlockState( +// blockRendererDispatcher: Any, +// state: IBlockState?, +// worldIn: IBlockAccess, +// pos: BlockPos?, +// cir: CallbackInfoReturnable +//) { +// (blockRendererDispatcher as BlockRendererDispatcher).apply { +// val event = RenderBlockInWorldEvent(state, worldIn, pos) +// event.postAndCatch() +// if (event.state !== state) { +// cir.returnValue = blockModelShapes.getModelForState(event.state) +// } +// } +//} \ No newline at end of file -- cgit