More models

This commit is contained in:
Ben Spiers committed 2016-04-29 16:42:29 +01:00
1 parent 8e3d08dfd3
commit fc7fa7492e
6 files changed
+59 -4

No files matched your search

@@ -148,6 +148,22 @@ public abstract class BlockBasic extends Block//TODO? implements IBlockCTM, ICus
BlockStateBasic.BasicBlockType type = state.getValue(getProperty());
return type.meta;
}
@Override
public IBlockState getActualState(IBlockState state, IBlockAccess worldIn, BlockPos pos)
{
TileEntity tile = worldIn.getTileEntity(pos);
if(tile instanceof TileEntityBasicBlock && ((TileEntityBasicBlock)tile).facing != null)
{
state = state.withProperty(BlockStateBasic.facingProperty, ((TileEntityBasicBlock)tile).facing);
}
if(tile instanceof IActiveState)
{
state = state.withProperty(BlockStateBasic.activeProperty, ((IActiveState)tile).getActive());
}
return state;
}
/*
@Override
public IIcon getIcon(ItemStack stack, int side)
@@ -809,7 +825,7 @@ public abstract class BlockBasic extends Block//TODO? implements IBlockCTM, ICus
}
else if(getBasicBlock() == BasicBlock.BASIC_BLOCK_2)
{
if(metadata == 5)
if(metadata == 5 && tileEntity instanceof TileEntitySuperheatingElement)
{
TileEntitySuperheatingElement element = (TileEntitySuperheatingElement)tileEntity;
@@ -92,7 +92,7 @@ public class BlockStateBasic extends BlockStateFacing
DYNAMIC_VALVE(BasicBlock.BASIC_BLOCK_1, 11, "DynamicValve", TileEntityDynamicValve.class, false, Predicates.<EnumFacing>alwaysFalse(), false),
COPPER_BLOCK(BasicBlock.BASIC_BLOCK_1, 12, "CopperBlock", null, false, Predicates.<EnumFacing>alwaysFalse(), false),
TIN_BLOCK(BasicBlock.BASIC_BLOCK_1, 13, "TinBlock", null, false, Predicates.<EnumFacing>alwaysFalse(), false),
THERMAL_EVAPORATION_CONTROLLER(BasicBlock.BASIC_BLOCK_1, 14, "ThermalEvaporationController", TileEntityThermalEvaporationController.class, false, Plane.HORIZONTAL, false),
THERMAL_EVAPORATION_CONTROLLER(BasicBlock.BASIC_BLOCK_1, 14, "ThermalEvaporationController", TileEntityThermalEvaporationController.class, false, Plane.HORIZONTAL, true),
THERMAL_EVAPORATION_VALVE(BasicBlock.BASIC_BLOCK_1, 15, "ThermalEvaporationValve", TileEntityThermalEvaporationValve.class, false, Predicates.<EnumFacing>alwaysFalse(), false),
THERMAL_EVAPORATION_BLOCK(BasicBlock.BASIC_BLOCK_2, 0, "ThermalEvaporationBlock", TileEntityThermalEvaporationBlock.class, false, Predicates.<EnumFacing>alwaysFalse(), false),
INDUCTION_CASING(BasicBlock.BASIC_BLOCK_2, 1, "InductionCasing", TileEntityInductionCasing.class, false, Predicates.<EnumFacing>alwaysFalse(), false),
@@ -0,0 +1,15 @@
{
"forge_marker": 1,
"defaults": {
"model": "cube_all"
},
"variants": {
"type": {
"osmium": {"textures": {"all": "mekanism:blocks/OsmiumOre"}},
"copper": {"textures": {"all": "mekanism:blocks/CopperOre"}},
"tin": {"textures": {"all": "mekanism:blocks/TinOre"}}
},
"inventory": [{}]
}
}
@@ -3,7 +3,7 @@
"defaults": {
"model": "cube_all",
"textures": {
"all": "mekanism:blocks/SolarEvaporationBlock"
"all": "mekanism:blocks/SalinationBlock"
}
},
"variants": {
@@ -0,0 +1,24 @@
{
"forge_marker": 1,
"defaults": {
"model": "mekanism:machine",
"textures": {
"sides": "mekanism:blocks/SalinationBlock",
"front": "mekanism:blocks/SalinationController"
}
},
"variants": {
"facing": {
"north": {},
"south": {"y": 180},
"east": {"y": 90},
"west": {"y": -90}
},
"active": {
"true": {"textures": {"front": "mekanism:blocks/SalinationControllerOn"}},
"false": {}
},
"inventory": [{}]
}
}
@@ -3,7 +3,7 @@
"defaults": {
"model": "cube_all",
"textures": {
"all": "mekanism:blocks/SolarEvaporationValve"
"all": "mekanism:blocks/SalinationValve"
}
},
"variants": {