Fixed casing model with CTM enabled

This commit is contained in:
drcrazy 2017-11-10 01:29:08 +03:00
parent 41dd0468e6
commit 29d1176861

View file

@ -42,7 +42,6 @@ import prospector.shootingstar.model.ModelCompound;
import reborncore.common.blocks.PropertyString;
import reborncore.common.multiblock.BlockMultiblockBase;
import reborncore.common.util.ArrayUtils;
import techreborn.Core;
import techreborn.client.TechRebornCreativeTab;
import techreborn.init.ModBlocks;
import techreborn.lib.ModInfo;
@ -64,13 +63,9 @@ public class BlockMachineCasing extends BlockMultiblockBase {
setHardness(2F);
this.setDefaultState(this.getDefaultState().withProperty(TYPE, "standard"));
for (int i = 0; i < types.length; i++) {
if (Core.proxy.isCTMAvailable()) {
ShootingStar.registerModel(new ModelCompound(ModInfo.MOD_ID, this, i, "machines/structure/ctm").setInvVariant("type=" + types[i]));
} else {
ShootingStar.registerModel(new ModelCompound(ModInfo.MOD_ID, this, i, "machines/structure").setInvVariant("type=" + types[i]));
}
}
}
public static ItemStack getStackByName(String name, int count) {
name = CaseFormat.LOWER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL, name);
@ -99,10 +94,16 @@ public class BlockMachineCasing extends BlockMultiblockBase {
return typesList.indexOf(state.getValue(TYPE));
}
@Override
protected BlockStateContainer createBlockState() {
return new BlockStateContainer(this, TYPE);
}
/**
* Provides heat info per casing for Industrial Blast Furnace
* @param state Machine casing type
* @return Integer Heat value for casing
*/
public int getHeatFromState(IBlockState state) {
switch (getMetaFromState(state)) {
case 0: