diff --git a/src/main/java/net/brokenmoon/afloydwiremod/api/AbstractWireTile.java b/src/main/java/net/brokenmoon/afloydwiremod/api/AbstractWireTile.java index 0be15e6..476aa66 100644 --- a/src/main/java/net/brokenmoon/afloydwiremod/api/AbstractWireTile.java +++ b/src/main/java/net/brokenmoon/afloydwiremod/api/AbstractWireTile.java @@ -54,8 +54,4 @@ public abstract class AbstractWireTile extends BlockContainer { //Singleplayer ((IEntityPlayer)player).displayGuiSettings(chip); } - @Override - public int getRenderType(){ - return 28; - } } diff --git a/src/main/java/net/brokenmoon/afloydwiremod/api/AbstractWireTileSided.java b/src/main/java/net/brokenmoon/afloydwiremod/api/AbstractWireTileSided.java index 3869de6..759f552 100644 --- a/src/main/java/net/brokenmoon/afloydwiremod/api/AbstractWireTileSided.java +++ b/src/main/java/net/brokenmoon/afloydwiremod/api/AbstractWireTileSided.java @@ -135,4 +135,9 @@ public abstract class AbstractWireTileSided extends AbstractWireTile{ public boolean renderAsNormalBlock() { return false; } + + @Override + public int getRenderType(){ + return 28; + } } diff --git a/src/main/java/net/brokenmoon/afloydwiremod/mixin/MixinBlockRenderer.java b/src/main/java/net/brokenmoon/afloydwiremod/mixin/MixinBlockRenderer.java index b494d71..8d80ae5 100644 --- a/src/main/java/net/brokenmoon/afloydwiremod/mixin/MixinBlockRenderer.java +++ b/src/main/java/net/brokenmoon/afloydwiremod/mixin/MixinBlockRenderer.java @@ -26,12 +26,7 @@ public class MixinBlockRenderer { @Inject(method = "Lnet/minecraft/src/RenderBlocks;renderBlockByRenderType(Lnet/minecraft/src/Block;III)Z", at = @At("HEAD"), cancellable = true) public void injectMethod(Block block, int i, int j, int k, CallbackInfoReturnable cir){ if(block.getRenderType() == 28){ - if(block instanceof AbstractWireTileSided) { - this.renderSidedBlock(block, i, j, k); - } else { - this.renderStandardBlock(block, i, j, k); - } - cir.setReturnValue(true); + cir.setReturnValue(this.renderSidedBlock(block, i, j, k)); } }