Rendering

main
astoria 2 years ago
parent 1127fca76d
commit 441d8113ef

@ -54,8 +54,4 @@ public abstract class AbstractWireTile extends BlockContainer {
//Singleplayer
((IEntityPlayer)player).displayGuiSettings(chip);
}
@Override
public int getRenderType(){
return 28;
}
}

@ -135,4 +135,9 @@ public abstract class AbstractWireTileSided extends AbstractWireTile{
public boolean renderAsNormalBlock() {
return false;
}
@Override
public int getRenderType(){
return 28;
}
}

@ -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<Boolean> 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));
}
}

Loading…
Cancel
Save