Fix Machine Casings

This commit is contained in:
modmuss50 2016-12-05 10:17:39 +00:00
parent c661f6b278
commit 8379115c97
4 changed files with 11 additions and 16 deletions

View file

@ -18,7 +18,7 @@ import techreborn.init.ModBlocks;
import java.security.InvalidParameterException;
public class BlockMachineFrame extends BaseBlock implements ITexturedBlock {
public class BlockMachineFrame extends BaseBlock {
public static final String[] types = new String[] { "machine", "advancedMachine", "highlyAdvancedMachine" };
public static final PropertyInteger METADATA = PropertyInteger.create("type", 0, types.length - 1);
@ -52,16 +52,6 @@ public class BlockMachineFrame extends BaseBlock implements ITexturedBlock {
return getMetaFromState(state);
}
@Override
public String getTextureNameFromState(IBlockState blockState, EnumFacing facing) {
return "techreborn:blocks/machine/machine_blocks/" + types[getMetaFromState(blockState)] + "_machine_block";
}
@Override
public int amountOfStates() {
return types.length;
}
@Override
public int getMetaFromState(IBlockState state) {
return state.getValue(METADATA);

View file

@ -327,6 +327,7 @@ public class ModBlocks {
machineframe = new BlockMachineFrame(Material.IRON);
registerBlock(machineframe, ItemBlockMachineFrame.class, "techreborn.machineFrame");
Core.proxy.registerCustomBlockStateLocation(machineframe, "machines/storage/machine_blocks");
grinder = new BlockGrinder(Material.IRON);
registerBlock(grinder, "techreborn.grinder");

View file

@ -24,6 +24,7 @@ import reborncore.client.multiblock.MultiblockRenderEvent;
import reborncore.common.blocks.BlockMachineBase;
import techreborn.Core;
import techreborn.blocks.BlockMachineCasing;
import techreborn.blocks.BlockMachineFrame;
import techreborn.blocks.BlockRubberLeaves;
import techreborn.client.ClientMultiBlocks;
import techreborn.client.IconSupplier;
@ -70,6 +71,9 @@ 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);
}
for (int i = 0; i < BlockMachineFrame.types.length; i++) {
Core.proxy.registerSubBlockInventoryLocation(ModBlocks.machineframe, i, "techreborn:machines/storage/machine_blocks", "type=" + i);
}
ModelDynamicCell.init();
RegisterItemJsons.registerModels();

View file

@ -9,22 +9,22 @@
"inventory": [
{}
],
"tier1": {
"galena": {
"type": {
"0": {
"textures": {
"all": "techreborn:blocks/machines/structure/tier1_machine_block"
}
},
"tier2": {
"1": {
"textures": {
"all": "techreborn:blocks/machines/structure/tier2_machine_block"
}
},
"tier3": {
"2": {
"textures": {
"all": "techreborn:blocks/machines/structure/tier3_machine_block"
}
}
}
}
}
}