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);
|
||||
|
|
|
@ -3,24 +3,28 @@
|
|||
"defaults": {
|
||||
"textures": {},
|
||||
"transform": "forge:default-block",
|
||||
"model": "techreborn:machine_casing_standard"
|
||||
"model": "cube_all"
|
||||
},
|
||||
"variants": {
|
||||
"inventory": [
|
||||
{}
|
||||
],
|
||||
"type": {
|
||||
"standard":
|
||||
{
|
||||
"model": "techreborn:machine_casing_standard"
|
||||
},
|
||||
"reinforced": [
|
||||
{
|
||||
"model": "techreborn:machine_casing_standard"
|
||||
"0": {
|
||||
"textures": {
|
||||
"all": "techreborn:blocks/machines/structure/tier1_casing"
|
||||
}
|
||||
],
|
||||
"advanced": [
|
||||
{
|
||||
"model": "techreborn:machine_casing_standard"
|
||||
},
|
||||
"1": {
|
||||
"textures": {
|
||||
"all": "techreborn:blocks/machines/structure/tier2_casing"
|
||||
}
|
||||
]
|
||||
},
|
||||
"2": {
|
||||
"textures": {
|
||||
"all": "techreborn:blocks/machines/structure/tier3_casing"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
"forge_marker": 1,
|
||||
"defaults": {
|
||||
"textures": {},
|
||||
"transform": "forge:default-block",
|
||||
"model": "techreborn:machine_casing_standard"
|
||||
},
|
||||
"variants": {
|
||||
"type": {
|
||||
"standard":
|
||||
{
|
||||
"model": "techreborn:machine_casing_standard"
|
||||
},
|
||||
"reinforced": [
|
||||
{
|
||||
"model": "techreborn:machine_casing_standard"
|
||||
}
|
||||
],
|
||||
"advanced": [
|
||||
{
|
||||
"model": "techreborn:machine_casing_standard"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue