aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/mixins/hooks
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/mixins/hooks')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/mixins/hooks/render/BlockRendererDispatcherHook.kt50
1 files changed, 25 insertions, 25 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/mixins/hooks/render/BlockRendererDispatcherHook.kt b/src/main/java/at/hannibal2/skyhanni/mixins/hooks/render/BlockRendererDispatcherHook.kt
index d04e248ea..4f951a887 100644
--- a/src/main/java/at/hannibal2/skyhanni/mixins/hooks/render/BlockRendererDispatcherHook.kt
+++ b/src/main/java/at/hannibal2/skyhanni/mixins/hooks/render/BlockRendererDispatcherHook.kt
@@ -1,25 +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<IBakedModel>
-//) {
-// (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
+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<IBakedModel>
+) {
+ (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