Revert some block changes
This commit is contained in:
parent
1dfc470de2
commit
e6e92a4df2
7 changed files with 86 additions and 46 deletions
|
@ -506,7 +506,7 @@ public enum ItemList implements IItemContainer {
|
|||
|
||||
Transformer_LV_ULV, Transformer_MV_LV, Transformer_HV_MV, Transformer_EV_HV, Transformer_IV_EV, Transformer_LuV_IV, Transformer_ZPM_LuV, Transformer_UV_ZPM, Transformer_MAX_UV,
|
||||
|
||||
Casing_ULV, Casing_LV, Casing_MV, Casing_HV, Casing_EV, Casing_IV, Casing_LuV, Casing_ZPM, Casing_UV, Casing_MAX, Casing_BronzePlatedBricks, Casing_HeatProof, Casing_Coil_Superconductor,
|
||||
Casing_ULV, Casing_LV, Casing_MV, Casing_HV, Casing_EV, Casing_IV, Casing_LuV, Casing_ZPM, Casing_UV, Casing_MAX, Casing_BronzePlatedBricks, Casing_HeatProof, Casing_Coil_Cupronickel_Deprecated, Casing_Coil_Kanthal_Deprecated, Casing_Coil_Nichrome_Deprecated, Casing_Coil_Superconductor,
|
||||
Casing_SolidSteel, Casing_FrostProof, Casing_Gearbox_Bronze, Casing_Gearbox_Steel, Casing_Gearbox_Titanium, Casing_Gearbox_TungstenSteel, Casing_Processor, Casing_DataDrive, Casing_ContainmentField, Casing_Assembler, Casing_Pump, Casing_Motor, Casing_Pipe_Bronze, Casing_Pipe_Steel, Casing_Pipe_Titanium, Casing_Pipe_TungstenSteel,
|
||||
Casing_Stripes_A, Casing_Stripes_B, Casing_RadioactiveHazard, Casing_BioHazard, Casing_ExplosionHazard, Casing_FireHazard, Casing_AcidHazard, Casing_MagicHazard, Casing_FrostHazard, Casing_NoiseHazard, Casing_Grate, Casing_Vent, Casing_RadiationProof, Casing_Firebox_Bronze, Casing_Firebox_Steel, Casing_Firebox_TungstenSteel,
|
||||
Casing_RobustTungstenSteel, Casing_CleanStainlessSteel, Casing_StableTitanium, Casing_Firebox_Titanium,
|
||||
|
|
|
@ -2,8 +2,11 @@ package gregtech.api.items;
|
|||
|
||||
import codechicken.lib.render.particle.CustomParticleHandler;
|
||||
import codechicken.lib.vec.Cuboid6;
|
||||
import com.google.common.collect.ObjectArrays;
|
||||
import gregtech.api.GregTech_API;
|
||||
import gregtech.api.enums.Textures;
|
||||
import gregtech.api.util.GT_LanguageManager;
|
||||
import gregtech.api.util.GT_Log;
|
||||
import gregtech.common.render.RenderBlocks;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
|
@ -27,12 +30,15 @@ import net.minecraft.util.math.RayTraceResult;
|
|||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.WorldServer;
|
||||
import net.minecraftforge.fml.common.LoaderException;
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import javax.annotation.ParametersAreNullableByDefault;
|
||||
import java.lang.reflect.Constructor;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.util.Arrays;
|
||||
|
||||
import static gregtech.api.enums.GT_Values.W;
|
||||
|
@ -41,8 +47,22 @@ public abstract class GT_Generic_Block extends Block {
|
|||
|
||||
protected GT_Generic_Block(String aName, @Nullable Class<? extends ItemBlock> aItemClass, Material aMaterial) {
|
||||
super(aMaterial);
|
||||
this.setUnlocalizedName("gt." + aName);
|
||||
GameRegistry.registerBlock(this, aItemClass, getUnlocalizedName());
|
||||
|
||||
setUnlocalizedName("gt." + aName);
|
||||
setRegistryName(aName);
|
||||
GameRegistry.register(this);
|
||||
|
||||
if (aItemClass != null) {
|
||||
ItemBlock itemBlock = null;
|
||||
try {
|
||||
itemBlock = aItemClass.getConstructor(Block.class).newInstance(this);
|
||||
} catch(ReflectiveOperationException e){
|
||||
e.printStackTrace(GT_Log.err);
|
||||
throw new LoaderException(e);
|
||||
}
|
||||
GameRegistry.register(itemBlock, getRegistryName());
|
||||
}
|
||||
|
||||
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + "." + W + ".name", "Unnamed");
|
||||
}
|
||||
|
||||
|
|
|
@ -39,6 +39,12 @@ public class GT_Block_Casings1 extends GT_Block_Casings_Abstract {
|
|||
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".7.name", "ZPM Machine Casing");
|
||||
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".8.name", "UV Machine Casing");
|
||||
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".9.name", "MAX Machine Casing");
|
||||
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".10.name", "Bronze Plated Bricks");
|
||||
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".11.name", "Heat Proof Machine Casing");
|
||||
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".12.name", "Cupronickel Coil Block (Deprecated)");// not used
|
||||
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".13.name", "Kanthal Coil Block (Deprecated)");// not used
|
||||
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".14.name", "Nichrome Coil Block (Deprecated)");// not used
|
||||
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".15.name", "Superconducting Coil Block");
|
||||
|
||||
ItemList.Casing_ULV.set(new ItemStack(this, 1, 0));
|
||||
ItemList.Casing_LV.set(new ItemStack(this, 1, 1));
|
||||
|
@ -50,6 +56,13 @@ public class GT_Block_Casings1 extends GT_Block_Casings_Abstract {
|
|||
ItemList.Casing_ZPM.set(new ItemStack(this, 1, 7));
|
||||
ItemList.Casing_UV.set(new ItemStack(this, 1, 8));
|
||||
ItemList.Casing_MAX.set(new ItemStack(this, 1, 9));
|
||||
ItemList.Casing_BronzePlatedBricks.set(new ItemStack(this, 1, 10));
|
||||
ItemList.Casing_HeatProof.set(new ItemStack(this, 1, 11));
|
||||
ItemList.Casing_Coil_Cupronickel_Deprecated.set(new ItemStack(this, 1, 12));
|
||||
ItemList.Casing_Coil_Kanthal_Deprecated.set(new ItemStack(this, 1, 13));
|
||||
ItemList.Casing_Coil_Nichrome_Deprecated.set(new ItemStack(this, 1, 14));
|
||||
ItemList.Casing_Coil_Superconductor.set(new ItemStack(this, 1, 15));
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -80,7 +93,21 @@ public class GT_Block_Casings1 extends GT_Block_Casings_Abstract {
|
|||
}
|
||||
|
||||
public static IIconContainer getIconContainer(EnumFacing aSide, int aMeta) {
|
||||
if ((aMeta >= 0) && (aMeta < 10)) {
|
||||
if ((aMeta >= 0) && (aMeta < 16)) {
|
||||
switch (aMeta) {
|
||||
case 10:
|
||||
return Textures.BlockIcons.MACHINE_BRONZEPLATEDBRICKS;
|
||||
case 11:
|
||||
return Textures.BlockIcons.MACHINE_HEATPROOFCASING;
|
||||
case 12:
|
||||
return Textures.BlockIcons.RENDERING_ERROR;
|
||||
case 13:
|
||||
return Textures.BlockIcons.RENDERING_ERROR;
|
||||
case 14:
|
||||
return Textures.BlockIcons.RENDERING_ERROR;
|
||||
case 15:
|
||||
return Textures.BlockIcons.MACHINE_COIL_SUPERCONDUCTOR;
|
||||
}
|
||||
if (aSide == EnumFacing.DOWN) {
|
||||
return Textures.BlockIcons.MACHINECASINGS_BOTTOM[aMeta];
|
||||
}
|
||||
|
@ -94,7 +121,8 @@ public class GT_Block_Casings1 extends GT_Block_Casings_Abstract {
|
|||
|
||||
@Override
|
||||
public int getColorMultiplier(IBlockAccess worldIn, BlockPos pos, IBlockState state) {
|
||||
return Dyes.MACHINE_METAL.getRGBAInt();
|
||||
int metadata = state.getValue(CASING_VARIANT).getMetadata();
|
||||
return metadata > 9 ? Dyes._NULL.getRGBAInt() : Dyes.MACHINE_METAL.getRGBAInt();
|
||||
}
|
||||
|
||||
public static enum EnumCasingVariant implements IStringSerializable {
|
||||
|
@ -107,7 +135,13 @@ public class GT_Block_Casings1 extends GT_Block_Casings_Abstract {
|
|||
LUV("luv"),
|
||||
ZPM("zpm"),
|
||||
UV("uv"),
|
||||
MAX("max");
|
||||
MAX("max"),
|
||||
BRONZE_PLATED_BRICKS("bplated_bricks"),
|
||||
HEAT_PROOF("heat_proof"),
|
||||
_DEPR_CASING("depr"),// TODO delete not used metas
|
||||
__DEPR_CASING("depr2"),// TODO delete not used metas
|
||||
___DEPR_CASING("depr3"),// TODO delete not used metas
|
||||
SUPERCONDUCTING("superconducting");
|
||||
|
||||
private final int meta = ordinal();
|
||||
private final String name;
|
||||
|
|
|
@ -38,7 +38,7 @@ public class GT_Block_Casings3 extends GT_Block_Casings_Abstract {
|
|||
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".9.name", "Noise Hazard Sign Block");
|
||||
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".10.name", "Grate Casing");
|
||||
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".11.name", "Vent Casing");
|
||||
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".12.name", "Radiation Proof Casing");
|
||||
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".12.name", "Radiation Proof Casing");// does not have a recipe
|
||||
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".13.name", "Bronze Firebox Casing");
|
||||
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".14.name", "Steel Firebox Casing");
|
||||
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".15.name", "Tungstensteel Firebox Casing");
|
||||
|
|
|
@ -31,7 +31,6 @@ public class GT_Block_Casings4 extends GT_Block_Casings_Abstract {
|
|||
public GT_Block_Casings4() {
|
||||
super("blockcasings4", GT_Item_Casings4.class, GT_Material_Casings.INSTANCE);
|
||||
|
||||
|
||||
this.setDefaultState(this.blockState.getBaseState()
|
||||
.withProperty(CASING_VARIANT, EnumCasingVariant.ROBUST_TSTEEL));
|
||||
|
||||
|
@ -39,31 +38,29 @@ public class GT_Block_Casings4 extends GT_Block_Casings_Abstract {
|
|||
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".1.name", "Clean Stainless Steel Casing");
|
||||
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".2.name", "Stable Titanium Casing");
|
||||
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".3.name", "Titanium Firebox Casing");
|
||||
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".4.name", "Fusion Coil");
|
||||
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".5.name", "Fusion Casing");
|
||||
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".6.name", "Fusion Casing MK II");
|
||||
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".7.name", "Turbine Casing");
|
||||
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".8.name", "Stainless Steel Turbine Casing");
|
||||
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".9.name", "Titanium Turbine Casing");
|
||||
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".10.name", "Tungstensteel Turbine Casing");
|
||||
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".11.name", "Engine Intake Casing");
|
||||
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".12.name", "Bronze Plated Bricks");
|
||||
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".13.name", "Heat Proof Machine Casing");
|
||||
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".4.name", "Fusion Casing");
|
||||
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".5.name", "Fusion Casing");// not used
|
||||
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".6.name", "Fusion Casing");// not used
|
||||
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".7.name", "Fusion Coil");
|
||||
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".8.name", "Fusion Casing MK II");
|
||||
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".9.name", "Turbine Casing");
|
||||
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".10.name", "Stainless Steel Turbine Casing");
|
||||
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".11.name", "Titanium Turbine Casing");
|
||||
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".12.name", "Tungstensteel Turbine Casing");
|
||||
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".13.name", "Engine Intake Casing");
|
||||
|
||||
ItemList.Casing_RobustTungstenSteel.set(new ItemStack(this, 1, 0));
|
||||
ItemList.Casing_CleanStainlessSteel.set(new ItemStack(this, 1, 1));
|
||||
ItemList.Casing_StableTitanium.set(new ItemStack(this, 1, 2));
|
||||
ItemList.Casing_Firebox_Titanium.set(new ItemStack(this, 1, 3));
|
||||
ItemList.Casing_Fusion_Coil.set(new ItemStack(this, 1, 4));
|
||||
ItemList.Casing_Fusion.set(new ItemStack(this, 1, 5));
|
||||
ItemList.Casing_Fusion2.set(new ItemStack(this, 1, 6));
|
||||
ItemList.Casing_Turbine.set(new ItemStack(this, 1, 7));
|
||||
ItemList.Casing_Turbine1.set(new ItemStack(this, 1, 8));
|
||||
ItemList.Casing_Turbine2.set(new ItemStack(this, 1, 9));
|
||||
ItemList.Casing_Turbine3.set(new ItemStack(this, 1, 10));
|
||||
ItemList.Casing_EngineIntake.set(new ItemStack(this, 1, 11));
|
||||
ItemList.Casing_BronzePlatedBricks.set(new ItemStack(this, 1, 12));
|
||||
ItemList.Casing_HeatProof.set(new ItemStack(this, 1, 13));
|
||||
ItemList.Casing_Fusion.set(new ItemStack(this, 1, 6));
|
||||
ItemList.Casing_Fusion_Coil.set(new ItemStack(this, 1, 7));
|
||||
ItemList.Casing_Fusion2.set(new ItemStack(this, 1, 8));
|
||||
ItemList.Casing_Turbine.set(new ItemStack(this, 1, 9));
|
||||
ItemList.Casing_Turbine1.set(new ItemStack(this, 1, 10));
|
||||
ItemList.Casing_Turbine2.set(new ItemStack(this, 1, 11));
|
||||
ItemList.Casing_Turbine3.set(new ItemStack(this, 1, 12));
|
||||
ItemList.Casing_EngineIntake.set(new ItemStack(this, 1, 13));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -124,9 +121,9 @@ public class GT_Block_Casings4 extends GT_Block_Casings_Abstract {
|
|||
case 13:
|
||||
return Textures.BlockIcons.MACHINE_CASING_ENGINE_INTAKE;
|
||||
case 14:
|
||||
return Textures.BlockIcons.MACHINE_BRONZEPLATEDBRICKS;
|
||||
return Textures.BlockIcons.MACHINE_CASING_ROBUST_TUNGSTENSTEEL;
|
||||
case 15:
|
||||
return Textures.BlockIcons.MACHINE_HEATPROOFCASING;
|
||||
return Textures.BlockIcons.MACHINE_CASING_ROBUST_TUNGSTENSTEEL;
|
||||
}
|
||||
return Textures.BlockIcons.MACHINE_CASING_SOLID_STEEL;
|
||||
}
|
||||
|
@ -538,16 +535,16 @@ public class GT_Block_Casings4 extends GT_Block_Casings_Abstract {
|
|||
CLEAN_SSTEEL("clean_ssteel"),
|
||||
STABLE_TITANIUM("stable_titanium"),
|
||||
FIREBOX_TITANIUM("titanium_firebox"),
|
||||
FUSION_COIL("fusion_coil"),
|
||||
FUSION("fusion_casing"),
|
||||
_FUSION("fusion_casing"),// TODO delete not used metas
|
||||
__FUSION("fusion_casing"),// TODO delete not used metas
|
||||
FUSION_COIL("fusion_coil"),
|
||||
FUSION2("fusion_casing_mk2"),
|
||||
TURBINE("turbine"),
|
||||
TURBINE1("ssteel_turbine"),
|
||||
TURBINE2("titanium_turbine"),
|
||||
TURBINE3("tsteel_turbine"),
|
||||
ENGINE_INTAKE("engine_intake"),
|
||||
BRONZE_PLATED_BRICKS("bplated_bricks"),
|
||||
HEAT_PROOF("heat_proof");
|
||||
ENGINE_INTAKE("engine_intake");
|
||||
|
||||
private final int meta = ordinal();
|
||||
private final String name;
|
||||
|
|
|
@ -33,7 +33,6 @@ public class GT_Block_Casings5 extends GT_Block_Casings_Abstract {
|
|||
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".4.name", "HSS-G Coil Block");
|
||||
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".5.name", "Naquadah Coil Block");
|
||||
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".6.name", "Naquadah Alloy Coil Block");
|
||||
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".7.name", "Superconducting Coil Block");
|
||||
|
||||
ItemList.Casing_Coil_Cupronickel.set(new ItemStack(this, 1, 0));
|
||||
ItemList.Casing_Coil_Kanthal.set(new ItemStack(this, 1, 1));
|
||||
|
@ -42,8 +41,6 @@ public class GT_Block_Casings5 extends GT_Block_Casings_Abstract {
|
|||
ItemList.Casing_Coil_HSSG.set(new ItemStack(this, 1, 4));
|
||||
ItemList.Casing_Coil_Naquadah.set(new ItemStack(this, 1, 5));
|
||||
ItemList.Casing_Coil_NaquadahAlloy.set(new ItemStack(this, 1, 6));
|
||||
ItemList.Casing_Coil_Superconductor.set(new ItemStack(this, 1, 7));
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -90,8 +87,6 @@ public class GT_Block_Casings5 extends GT_Block_Casings_Abstract {
|
|||
return Textures.BlockIcons.MACHINE_COIL_NAQUADAH;
|
||||
case 6:
|
||||
return Textures.BlockIcons.MACHINE_COIL_NAQUADAHALLOY;
|
||||
case 7:
|
||||
return Textures.BlockIcons.MACHINE_COIL_SUPERCONDUCTOR;
|
||||
}
|
||||
return Textures.BlockIcons.MACHINE_COIL_CUPRONICKEL;
|
||||
}
|
||||
|
@ -103,8 +98,7 @@ public class GT_Block_Casings5 extends GT_Block_Casings_Abstract {
|
|||
TUNGSTENSTEEL("tungstensteel"),
|
||||
HSSG("hssg"),
|
||||
NAQUADAH("naquadah"),
|
||||
NAQUADAH_ALLOY("naquadah_alloy"),
|
||||
SUPERCONDUCTING("superconducting");
|
||||
NAQUADAH_ALLOY("naquadah_alloy");
|
||||
|
||||
private final int meta = ordinal();
|
||||
private final String name;
|
||||
|
|
|
@ -37,11 +37,6 @@ public abstract class GT_Block_Casings_Abstract extends GT_Generic_Block {
|
|||
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + "." + GT_Values.W + ".name", "Any Sub Block of this");
|
||||
}
|
||||
|
||||
@Override
|
||||
public int damageDropped(IBlockState state) {
|
||||
return super.damageDropped(state); //TODO
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getHarvestTool(IBlockState state) {
|
||||
return "wrench";
|
||||
|
|
Loading…
Reference in a new issue