diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2022-12-29 03:42:18 +0100 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2022-12-29 03:42:18 +0100 |
commit | e645055ab82b2f6f5d8173a72db0ef7088e25f9a (patch) | |
tree | 06e9b125cb1e95ac402c3957a89d1224e7a87b6b /src/main/java/at | |
parent | 17acdec98dc6af6558a11f94ccd825901e9594b6 (diff) | |
download | skyhanni-e645055ab82b2f6f5d8173a72db0ef7088e25f9a.tar.gz skyhanni-e645055ab82b2f6f5d8173a72db0ef7088e25f9a.tar.bz2 skyhanni-e645055ab82b2f6f5d8173a72db0ef7088e25f9a.zip |
disabled BlockRendererDispatcher
Diffstat (limited to 'src/main/java/at')
2 files changed, 29 insertions, 37 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 8b6fce6b3..7a2a778e3 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.mixins.hooks.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.mixins.hooks.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 diff --git a/src/main/java/at/hannibal2/skyhanni/mixins/transformers/renderer/MixinBlockRendererDispatcher.java b/src/main/java/at/hannibal2/skyhanni/mixins/transformers/renderer/MixinBlockRendererDispatcher.java index 32324ce7f..0714a6c2f 100644 --- a/src/main/java/at/hannibal2/skyhanni/mixins/transformers/renderer/MixinBlockRendererDispatcher.java +++ b/src/main/java/at/hannibal2/skyhanni/mixins/transformers/renderer/MixinBlockRendererDispatcher.java @@ -1,21 +1,13 @@ package at.hannibal2.skyhanni.mixins.transformers.renderer; -import at.hannibal2.skyhanni.mixins.hooks.render.BlockRendererDispatcherHookKt; -import net.minecraft.block.state.IBlockState; import net.minecraft.client.renderer.BlockRendererDispatcher; import net.minecraft.client.resources.IResourceManagerReloadListener; -import net.minecraft.client.resources.model.IBakedModel; -import net.minecraft.util.BlockPos; -import net.minecraft.world.IBlockAccess; import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; @Mixin(BlockRendererDispatcher.class) public abstract class MixinBlockRendererDispatcher implements IResourceManagerReloadListener { - @Inject(method = "getModelFromBlockState", at = @At("RETURN"), cancellable = true) - private void modifyGetModelFromBlockState(IBlockState state, IBlockAccess worldIn, BlockPos pos, CallbackInfoReturnable<IBakedModel> cir) { - BlockRendererDispatcherHookKt.modifyGetModelFromBlockState(this, state, worldIn, pos, cir); - } +// @Inject(method = "getModelFromBlockState", at = @At("RETURN"), cancellable = true) +// private void modifyGetModelFromBlockState(IBlockState state, IBlockAccess worldIn, BlockPos pos, CallbackInfoReturnable<IBakedModel> cir) { +//// BlockRendererDispatcherHookKt.modifyGetModelFromBlockState(this, state, worldIn, pos, cir); +// } } |