Fix Machine Casing Model
This commit is contained in:
parent
2fdce5405b
commit
c661f6b278
5 changed files with 60 additions and 25 deletions
|
@ -86,15 +86,4 @@ public class BlockMachineCasing extends BlockMultiblockBase {
|
|||
return new TileMachineCasing();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldSideBeRendered(IBlockState blockState, IBlockAccess worldIn, BlockPos pos, EnumFacing side) {
|
||||
Block b = worldIn.getBlockState(pos).getBlock();
|
||||
return b != this && super.shouldSideBeRendered(blockState, worldIn, pos, side);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canRenderInLayer(IBlockState state, BlockRenderLayer layer) {
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -185,7 +185,11 @@ public class ModBlocks {
|
|||
machineCasing = new BlockMachineCasing(Material.ROCK);
|
||||
registerBlock(machineCasing, ItemBlockMachineCasing.class, "machinecasing");
|
||||
GameRegistry.registerTileEntity(TileMachineCasing.class, "TileMachineCasingTR");
|
||||
Core.proxy.registerCustomBlockStateLocation(machineCasing, "machines/structure/machine_casing");
|
||||
if(Core.proxy.isCTMAvailable()){
|
||||
Core.proxy.registerCustomBlockStateLocation(machineCasing, "machines/structure/machine_casing_ctm");
|
||||
} else {
|
||||
Core.proxy.registerCustomBlockStateLocation(machineCasing, "machines/structure/machine_casing");
|
||||
}
|
||||
|
||||
|
||||
ore = new BlockOre(Material.ROCK);
|
||||
|
|
|
@ -22,6 +22,8 @@ import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
|
|||
import reborncore.RebornCore;
|
||||
import reborncore.client.multiblock.MultiblockRenderEvent;
|
||||
import reborncore.common.blocks.BlockMachineBase;
|
||||
import techreborn.Core;
|
||||
import techreborn.blocks.BlockMachineCasing;
|
||||
import techreborn.blocks.BlockRubberLeaves;
|
||||
import techreborn.client.ClientMultiBlocks;
|
||||
import techreborn.client.IconSupplier;
|
||||
|
@ -65,10 +67,20 @@ public class ClientProxy extends CommonProxy {
|
|||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < BlockMachineCasing.types.length; i++) {
|
||||
Core.proxy.registerSubBlockInventoryLocation(ModBlocks.machineCasing, i, "techreborn:machines/structure/machine_casing", "type=" + i);
|
||||
}
|
||||
|
||||
ModelDynamicCell.init();
|
||||
RegisterItemJsons.registerModels();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerSubItemInventoryLocation(Item item, int meta, String location, String name) {
|
||||
ModelResourceLocation resourceLocation = new ModelResourceLocation(location, name);
|
||||
ModelLoader.setCustomModelResourceLocation(item, meta, resourceLocation);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init(FMLInitializationEvent event) {
|
||||
super.init(event);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue