Fix some bugs&crashes when IC2 isn't installed
Some general cleanup
This commit is contained in:
parent
ccc3c7ab12
commit
840869cd08
|
@ -62,7 +62,7 @@ repositories {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
deobfCompile 'net.industrial-craft:industrialcraft-2:2.8.+'
|
||||
compileOnly 'net.industrial-craft:industrialcraft-2:2.8.+'
|
||||
deobfCompile "blusunrize:ImmersiveEngineering:0.12-+:deobf"
|
||||
compileOnly "TechReborn:TechReborn-1.12:2.6.+:dev"
|
||||
compileOnly "RebornCore:RebornCore-1.12:3.2.+:dev"
|
||||
|
|
|
@ -68,15 +68,21 @@ public class IndustrialWires {
|
|||
public static final List<BlockIWBase> blocks = new ArrayList<>();
|
||||
public static final List<Item> items = new ArrayList<>();
|
||||
|
||||
public static BlockIC2Connector ic2conn;
|
||||
public static BlockMechanicalConverter mechConv;
|
||||
public static BlockJacobsLadder jacobsLadder;
|
||||
public static BlockPanel panel;
|
||||
@GameRegistry.ObjectHolder(MODID+":"+BlockIC2Connector.NAME)
|
||||
public static BlockIC2Connector ic2conn = null;
|
||||
@GameRegistry.ObjectHolder(MODID+":"+BlockMechanicalConverter.NAME)
|
||||
public static BlockMechanicalConverter mechConv = null;
|
||||
@GameRegistry.ObjectHolder(MODID+":"+BlockJacobsLadder.NAME)
|
||||
public static BlockJacobsLadder jacobsLadder = null;
|
||||
@GameRegistry.ObjectHolder(MODID+":"+BlockPanel.NAME)
|
||||
public static BlockPanel panel = null;
|
||||
|
||||
|
||||
public static ItemIC2Coil coil;
|
||||
public static ItemPanelComponent panelComponent;
|
||||
public static ItemKey key;
|
||||
@GameRegistry.ObjectHolder(MODID+":"+ItemIC2Coil.NAME)
|
||||
public static ItemIC2Coil coil = null;
|
||||
@GameRegistry.ObjectHolder(MODID+":"+ItemPanelComponent.NAME)
|
||||
public static ItemPanelComponent panelComponent = null;
|
||||
@GameRegistry.ObjectHolder(MODID+":"+ItemKey.ITEM_NAME)
|
||||
public static ItemKey key = null;
|
||||
public static final SimpleNetworkWrapper packetHandler = NetworkRegistry.INSTANCE.newSimpleChannel(MODID);
|
||||
|
||||
public static Logger logger;
|
||||
|
@ -86,7 +92,11 @@ public class IndustrialWires {
|
|||
|
||||
@Override
|
||||
public ItemStack getTabIconItem() {
|
||||
return new ItemStack(coil, 1, 2);
|
||||
if (coil!=null) {
|
||||
return new ItemStack(coil, 1, 2);
|
||||
} else {
|
||||
return new ItemStack(panel, 1, 3);
|
||||
}
|
||||
}
|
||||
};
|
||||
@SidedProxy(clientSide = "malte0811.industrialWires.client.ClientProxy", serverSide = "malte0811.industrialWires.CommonProxy")
|
||||
|
@ -100,21 +110,8 @@ public class IndustrialWires {
|
|||
hasTechReborn = Loader.isModLoaded("techreborn");
|
||||
logger = e.getModLog();
|
||||
new IWConfig();
|
||||
if (IWConfig.enableConversion&&hasIC2) {
|
||||
mechConv = new BlockMechanicalConverter();
|
||||
}
|
||||
if (hasIC2||hasTechReborn) {
|
||||
ic2conn = new BlockIC2Connector();
|
||||
}
|
||||
jacobsLadder = new BlockJacobsLadder();
|
||||
panel = new BlockPanel();
|
||||
|
||||
coil = new ItemIC2Coil();
|
||||
panelComponent = new ItemPanelComponent();
|
||||
key = new ItemKey();
|
||||
|
||||
if (hasIC2) {
|
||||
//TODO
|
||||
GameRegistry.registerTileEntity(TileEntityIC2ConnectorTin.class, MODID + ":ic2ConnectorTin");
|
||||
GameRegistry.registerTileEntity(TileEntityIC2ConnectorCopper.class, MODID + ":ic2ConnectorCopper");
|
||||
GameRegistry.registerTileEntity(TileEntityIC2ConnectorGold.class, MODID + ":ic2ConnectorGold");
|
||||
|
@ -144,9 +141,15 @@ public class IndustrialWires {
|
|||
|
||||
@SubscribeEvent
|
||||
public static void registerBlocks(RegistryEvent.Register<Block> event) {
|
||||
for (BlockIWBase b: blocks) {
|
||||
event.getRegistry().register(b);
|
||||
|
||||
if (IWConfig.enableConversion&&hasIC2) {
|
||||
event.getRegistry().register(new BlockMechanicalConverter());
|
||||
}
|
||||
if (hasIC2/*||hasTechReborn TODO talk to modmuss*/) {
|
||||
event.getRegistry().register(new BlockIC2Connector());
|
||||
}
|
||||
event.getRegistry().register(new BlockJacobsLadder());
|
||||
event.getRegistry().register(new BlockPanel());
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
|
@ -154,9 +157,12 @@ public class IndustrialWires {
|
|||
for (BlockIWBase b:blocks) {
|
||||
event.getRegistry().register(b.createItemBlock());
|
||||
}
|
||||
for (Item i:items) {
|
||||
event.getRegistry().register(i);
|
||||
|
||||
if (hasIC2/*||hasTechReborn TODO talk to modmuss*/) {
|
||||
event.getRegistry().register(new ItemIC2Coil());
|
||||
}
|
||||
event.getRegistry().register(new ItemPanelComponent());
|
||||
event.getRegistry().register(new ItemKey());
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
package malte0811.industrialWires.blocks;
|
||||
|
||||
import blusunrize.immersiveengineering.api.IEProperties;
|
||||
import malte0811.industrialWires.IndustrialWires;
|
||||
import malte0811.industrialWires.blocks.TileEntityJacobsLadder.LadderSize;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.properties.IProperty;
|
||||
|
@ -29,7 +28,6 @@ import net.minecraft.creativetab.CreativeTabs;
|
|||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
|
@ -44,10 +42,11 @@ import net.minecraft.world.World;
|
|||
import javax.annotation.Nonnull;
|
||||
|
||||
public class BlockJacobsLadder extends BlockIWBase implements IMetaEnum, IPlacementCheck {
|
||||
public static final String NAME = "jacobs_ladder";
|
||||
private static PropertyEnum<LadderSize> size_property = PropertyEnum.create("size", LadderSize.class);
|
||||
|
||||
public BlockJacobsLadder() {
|
||||
super(Material.IRON, "jacobs_ladder");
|
||||
super(Material.IRON, NAME);
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
|
@ -176,6 +175,6 @@ public class BlockJacobsLadder extends BlockIWBase implements IMetaEnum, IPlacem
|
|||
@Override
|
||||
public boolean rotateBlock(World world, @Nonnull BlockPos pos, @Nonnull EnumFacing axis) {
|
||||
TileEntity te = world.getTileEntity(pos);
|
||||
return te instanceof TileEntityJacobsLadder && ((TileEntityJacobsLadder) te).rotate(world, pos, axis);
|
||||
return te instanceof TileEntityJacobsLadder && ((TileEntityJacobsLadder) te).rotate(world, pos);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -49,10 +49,14 @@ import net.minecraftforge.common.MinecraftForge;
|
|||
import net.minecraftforge.common.capabilities.Capability;
|
||||
import net.minecraftforge.energy.CapabilityEnergy;
|
||||
import net.minecraftforge.energy.IEnergyStorage;
|
||||
import net.minecraftforge.fml.common.Optional;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import static malte0811.industrialWires.IndustrialWires.hasIC2;
|
||||
|
||||
@Optional.Interface(modid = "ic2", iface = "ic2.api.energy.tile.IEnergySink")
|
||||
public class TileEntityJacobsLadder extends TileEntityIEBase implements ITickable, IHasDummyBlocksIW, ISyncReceiver, IEnergySink, IBlockBoundsIW, IDirectionalTile {
|
||||
public EnumFacing facing = EnumFacing.NORTH;
|
||||
private DualEnergyStorage energy;
|
||||
|
@ -98,9 +102,8 @@ public class TileEntityJacobsLadder extends TileEntityIEBase implements ITickabl
|
|||
return;
|
||||
}
|
||||
if (!world.isRemote) {
|
||||
if (!addedToIC2Net) {
|
||||
MinecraftForge.EVENT_BUS.post(new EnergyTileLoadEvent(this));
|
||||
addedToIC2Net = true;
|
||||
if (hasIC2&&!addedToIC2Net) {
|
||||
addToIC2Net();
|
||||
}
|
||||
if ((controlControls[0][0] == null || timeTillActive == -1 || t >= 1) && energy.getEnergyStoredEU() >= 2 * consumtionEU) {
|
||||
for (int j = 0; j < size.movementPoints; j++) {
|
||||
|
@ -167,6 +170,12 @@ public class TileEntityJacobsLadder extends TileEntityIEBase implements ITickabl
|
|||
}
|
||||
}
|
||||
|
||||
@Optional.Method(modid = "ic2")
|
||||
private void addToIC2Net() {
|
||||
MinecraftForge.EVENT_BUS.post(new EnergyTileLoadEvent(this));
|
||||
addedToIC2Net = true;
|
||||
}
|
||||
|
||||
private void initArc(int delay) {
|
||||
if (controlMovement == null) {
|
||||
initControl();
|
||||
|
@ -366,7 +375,7 @@ public class TileEntityJacobsLadder extends TileEntityIEBase implements ITickabl
|
|||
return false;
|
||||
}
|
||||
|
||||
public boolean rotate(World world, BlockPos pos, EnumFacing axis) {
|
||||
public boolean rotate(World world, BlockPos pos) {
|
||||
if (isActive()) {
|
||||
return false;
|
||||
}
|
||||
|
@ -392,21 +401,25 @@ public class TileEntityJacobsLadder extends TileEntityIEBase implements ITickabl
|
|||
|
||||
//ENERGY
|
||||
@Override
|
||||
@Optional.Method(modid = "ic2")
|
||||
public double getDemandedEnergy() {
|
||||
return energy.getEURequested();
|
||||
}
|
||||
|
||||
@Override
|
||||
@Optional.Method(modid = "ic2")
|
||||
public int getSinkTier() {
|
||||
return 4;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Optional.Method(modid = "ic2")
|
||||
public double injectEnergy(EnumFacing dir, double amount, double voltage) {
|
||||
return amount - energy.insertEU(amount, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Optional.Method(modid = "ic2")
|
||||
public boolean acceptsEnergyFrom(IEnergyEmitter iEnergyEmitter, EnumFacing enumFacing) {
|
||||
return !isDummy() && enumFacing == facing;
|
||||
}
|
||||
|
@ -429,17 +442,18 @@ public class TileEntityJacobsLadder extends TileEntityIEBase implements ITickabl
|
|||
|
||||
@Override
|
||||
public void onChunkUnload() {
|
||||
if (!world.isRemote && addedToIC2Net)
|
||||
MinecraftForge.EVENT_BUS.post(new EnergyTileUnloadEvent(this));
|
||||
if (hasIC2) {
|
||||
removeFromIC2Net();
|
||||
}
|
||||
addedToIC2Net = false;
|
||||
super.onChunkUnload();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void invalidate() {
|
||||
if (!world.isRemote && addedToIC2Net) {
|
||||
MinecraftForge.EVENT_BUS.post(new EnergyTileUnloadEvent(this));
|
||||
} else if (world.isRemote) {
|
||||
if (hasIC2)
|
||||
removeFromIC2Net();
|
||||
if (world.isRemote) {
|
||||
//stop sound
|
||||
IndustrialWires.proxy.playJacobsLadderSound(this, -1, soundPos);
|
||||
}
|
||||
|
@ -447,6 +461,14 @@ public class TileEntityJacobsLadder extends TileEntityIEBase implements ITickabl
|
|||
super.invalidate();
|
||||
}
|
||||
|
||||
@Optional.Method(modid = "ic2")
|
||||
private void removeFromIC2Net() {
|
||||
if (!world.isRemote && addedToIC2Net) {
|
||||
MinecraftForge.EVENT_BUS.post(new EnergyTileUnloadEvent(this));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public AxisAlignedBB getRenderBoundingBox() {
|
||||
|
|
|
@ -54,9 +54,10 @@ import java.util.List;
|
|||
|
||||
public class BlockPanel extends BlockIWBase implements IMetaEnum {
|
||||
public static final PropertyEnum<BlockTypes_Panel> type = PropertyEnum.create("type", BlockTypes_Panel.class);
|
||||
public static final String NAME = "control_panel";
|
||||
|
||||
public BlockPanel() {
|
||||
super(Material.IRON, "control_panel");
|
||||
super(Material.IRON, NAME);
|
||||
lightOpacity = 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -41,10 +41,11 @@ import net.minecraft.world.World;
|
|||
import javax.annotation.Nonnull;
|
||||
|
||||
public class BlockMechanicalConverter extends BlockIWBase implements IMetaEnum {
|
||||
public static final String NAME = "mechanical_converter";
|
||||
private static PropertyEnum<MechanicalBlockType> type = PropertyEnum.create("type", MechanicalBlockType.class);
|
||||
|
||||
public BlockMechanicalConverter() {
|
||||
super(Material.IRON, "mechanical_converter");
|
||||
super(Material.IRON, NAME);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -47,10 +47,11 @@ import java.util.Arrays;
|
|||
import java.util.List;
|
||||
|
||||
public class BlockIC2Connector extends BlockIWBase implements IMetaEnum {
|
||||
private static PropertyEnum<BlockTypes_IC2_Connector> type = PropertyEnum.create("type", BlockTypes_IC2_Connector.class);
|
||||
private static final PropertyEnum<BlockTypes_IC2_Connector> type = PropertyEnum.create("type", BlockTypes_IC2_Connector.class);
|
||||
public static final String NAME = "ic2_connector";
|
||||
|
||||
public BlockIC2Connector() {
|
||||
super(Material.IRON, "ic2_connector");
|
||||
super(Material.IRON, NAME);
|
||||
setHardness(3.0F);
|
||||
setResistance(15.0F);
|
||||
lightOpacity = 0;
|
||||
|
|
|
@ -21,6 +21,7 @@ import blusunrize.immersiveengineering.api.Lib;
|
|||
import blusunrize.immersiveengineering.client.ClientUtils;
|
||||
import blusunrize.immersiveengineering.common.util.ItemNBTHelper;
|
||||
import malte0811.industrialWires.IndustrialWires;
|
||||
import malte0811.industrialWires.blocks.BlockIWBase;
|
||||
import malte0811.industrialWires.blocks.IMetaEnum;
|
||||
import malte0811.industrialWires.blocks.controlpanel.TileEntityPanel;
|
||||
import malte0811.industrialWires.client.panelmodel.PanelModel;
|
||||
|
@ -116,10 +117,12 @@ public class ClientEventHandler {
|
|||
}
|
||||
@SubscribeEvent
|
||||
public static void registerModels(ModelRegistryEvent evt) {
|
||||
for (int meta = 0; meta < ItemIC2Coil.subNames.length; meta++) {
|
||||
ResourceLocation loc = new ResourceLocation(IndustrialWires.MODID, "ic2_wire_coil/" + ItemIC2Coil.subNames[meta]);
|
||||
ModelBakery.registerItemVariants(IndustrialWires.coil, loc);
|
||||
ModelLoader.setCustomModelResourceLocation(IndustrialWires.coil, meta, new ModelResourceLocation(loc, "inventory"));
|
||||
if (IndustrialWires.coil!=null) {
|
||||
for (int meta = 0; meta < ItemIC2Coil.subNames.length; meta++) {
|
||||
ResourceLocation loc = new ResourceLocation(IndustrialWires.MODID, "ic2_wire_coil/" + ItemIC2Coil.subNames[meta]);
|
||||
ModelBakery.registerItemVariants(IndustrialWires.coil, loc);
|
||||
ModelLoader.setCustomModelResourceLocation(IndustrialWires.coil, meta, new ModelResourceLocation(loc, "inventory"));
|
||||
}
|
||||
}
|
||||
for (int meta = 0; meta < ItemPanelComponent.types.length; meta++) {
|
||||
ResourceLocation loc = new ResourceLocation(IndustrialWires.MODID, "panel_component/" + ItemPanelComponent.types[meta]);
|
||||
|
@ -131,23 +134,19 @@ public class ClientEventHandler {
|
|||
ModelBakery.registerItemVariants(IndustrialWires.key, loc);
|
||||
ModelLoader.setCustomModelResourceLocation(IndustrialWires.key, meta, new ModelResourceLocation(loc, "inventory"));
|
||||
}
|
||||
|
||||
Block[] blocks = {IndustrialWires.ic2conn, IndustrialWires.mechConv, IndustrialWires.jacobsLadder, IndustrialWires.panel};
|
||||
for (Block b : blocks) {
|
||||
if (b != null) {
|
||||
Item blockItem = Item.getItemFromBlock(b);
|
||||
final ResourceLocation loc = b.getRegistryName();
|
||||
assert loc != null;
|
||||
ModelLoader.setCustomMeshDefinition(blockItem, stack -> new ModelResourceLocation(loc, "inventory"));
|
||||
Object[] v = ((IMetaEnum) b).getValues();
|
||||
for (int meta = 0; meta < v.length; meta++) {
|
||||
String location = loc.toString();
|
||||
String prop = "inventory,type=" + v[meta].toString().toLowerCase(Locale.US);
|
||||
try {
|
||||
ModelLoader.setCustomModelResourceLocation(blockItem, meta, new ModelResourceLocation(location, prop));
|
||||
} catch (NullPointerException npe) {
|
||||
throw new RuntimeException(b + " lacks an item!", npe);
|
||||
}
|
||||
for (BlockIWBase b : IndustrialWires.blocks) {
|
||||
Item blockItem = Item.getItemFromBlock(b);
|
||||
final ResourceLocation loc = b.getRegistryName();
|
||||
assert loc != null;
|
||||
ModelLoader.setCustomMeshDefinition(blockItem, stack -> new ModelResourceLocation(loc, "inventory"));
|
||||
Object[] v = ((IMetaEnum) b).getValues();
|
||||
for (int meta = 0; meta < v.length; meta++) {
|
||||
String location = loc.toString();
|
||||
String prop = "inventory,type=" + v[meta].toString().toLowerCase(Locale.US);
|
||||
try {
|
||||
ModelLoader.setCustomModelResourceLocation(blockItem, meta, new ModelResourceLocation(location, prop));
|
||||
} catch (NullPointerException npe) {
|
||||
throw new RuntimeException(b + " lacks an item!", npe);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package malte0811.industrialWires.crafting;
|
||||
|
||||
import blusunrize.immersiveengineering.api.ApiUtils;
|
||||
import blusunrize.immersiveengineering.common.IEContent;
|
||||
import ic2.api.item.IC2Items;
|
||||
import malte0811.industrialWires.IndustrialWires;
|
||||
|
@ -17,21 +18,24 @@ import java.util.Set;
|
|||
public final class IC2TRHelper {
|
||||
public static Ingredient getStack(String type, String variant) {
|
||||
Set<ItemStack> stacks = new HashSet<>();
|
||||
if (type.equals("crafting")&&variant.equals("rubber")) {
|
||||
if (ApiUtils.isExistingOreName("itemRubber")) {
|
||||
return new OreIngredient("itemRubber");
|
||||
}
|
||||
}
|
||||
if (IndustrialWires.hasIC2) {
|
||||
stacks.add(IC2Items.getItem(type, variant));
|
||||
}
|
||||
if (Loader.isModLoaded("techreborn")) {
|
||||
if (IndustrialWires.hasTechReborn) {
|
||||
switch (type) {
|
||||
case "cable":
|
||||
stacks.add(getTRCable(variant));
|
||||
break;
|
||||
case "crafting":
|
||||
switch (variant) {
|
||||
case "coil":
|
||||
stacks.add(new ItemStack(IEContent.blockMetalDecoration0));
|
||||
break;
|
||||
case "alloy":
|
||||
stacks.add(TechRebornAPI.subItemRetriever.getPlateByName("advanced_alloy"));
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case "te":
|
||||
|
@ -47,10 +51,17 @@ public final class IC2TRHelper {
|
|||
return getIECable(variant.substring("type:".length(), variant.indexOf(',')));
|
||||
case "crafting":
|
||||
switch (variant) {
|
||||
case "coil":
|
||||
stacks.add(new ItemStack(IEContent.blockMetalDecoration0));
|
||||
break;
|
||||
case "alloy":
|
||||
return new OreIngredient("plateConstantan");
|
||||
case "electric_motor":
|
||||
stacks.add(new ItemStack(IEContent.itemMaterial, 1, 27));
|
||||
break;
|
||||
case "rubber":
|
||||
stacks.add(new ItemStack(IEContent.itemMaterial, 1, 13));
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case "te":
|
||||
|
@ -59,6 +70,9 @@ public final class IC2TRHelper {
|
|||
}
|
||||
}
|
||||
}
|
||||
if (stacks.size()==0) {
|
||||
IndustrialWires.logger.info("No ingredient found for "+type+", "+variant);
|
||||
}
|
||||
return Ingredient.fromStacks(stacks.toArray(new ItemStack[stacks.size()]));
|
||||
}
|
||||
|
||||
|
|
|
@ -55,13 +55,14 @@ import java.util.Set;
|
|||
public class ItemIC2Coil extends Item implements IWireCoil {
|
||||
public final static String[] subNames = {"tin", "copper", "gold", "hv", "glass"};
|
||||
public final static String lengthKey = "wireLength";
|
||||
public final static String NAME = "ic2_wire_coil";
|
||||
|
||||
public ItemIC2Coil() {
|
||||
setUnlocalizedName(IndustrialWires.MODID + ".ic2_wire_coil");
|
||||
setUnlocalizedName(IndustrialWires.MODID + "."+NAME);
|
||||
setHasSubtypes(true);
|
||||
this.setCreativeTab(IndustrialWires.creativeTab);
|
||||
setMaxStackSize(64);
|
||||
setRegistryName(new ResourceLocation(IndustrialWires.MODID, "ic2_wire_coil"));
|
||||
setRegistryName(new ResourceLocation(IndustrialWires.MODID, NAME));
|
||||
IndustrialWires.items.add(this);
|
||||
}
|
||||
|
||||
|
|
|
@ -42,13 +42,14 @@ public class ItemKey extends Item implements INetGUIItem {
|
|||
public static final String RING_KEYS = "ringkeys";
|
||||
public static final String NAME = "name";
|
||||
public static final String[] types = {"blank_key", "key", "key_ring"};
|
||||
public static final String ITEM_NAME = "key";
|
||||
|
||||
public ItemKey() {
|
||||
setUnlocalizedName(IndustrialWires.MODID + ".key");
|
||||
setUnlocalizedName(IndustrialWires.MODID + "."+ITEM_NAME);
|
||||
setHasSubtypes(true);
|
||||
this.setCreativeTab(IndustrialWires.creativeTab);
|
||||
setMaxStackSize(64);
|
||||
setRegistryName(new ResourceLocation(IndustrialWires.MODID, "key"));
|
||||
setRegistryName(new ResourceLocation(IndustrialWires.MODID, ITEM_NAME));
|
||||
IndustrialWires.items.add(this);
|
||||
}
|
||||
|
||||
|
|
|
@ -60,13 +60,14 @@ public class ItemPanelComponent extends Item implements INetGUIItem {
|
|||
public static final String TYPE = "type";
|
||||
public static final String ID = "cfgId";
|
||||
public static final String VALUE = "value";
|
||||
public static final String NAME = "panel_component";
|
||||
|
||||
public ItemPanelComponent() {
|
||||
setUnlocalizedName(IndustrialWires.MODID + ".panel_component");
|
||||
setUnlocalizedName(IndustrialWires.MODID + "."+NAME);
|
||||
setHasSubtypes(true);
|
||||
this.setCreativeTab(IndustrialWires.creativeTab);
|
||||
setMaxStackSize(64);
|
||||
setRegistryName(new ResourceLocation(IndustrialWires.MODID, "panel_component"));
|
||||
setRegistryName(new ResourceLocation(IndustrialWires.MODID, NAME));
|
||||
IndustrialWires.items.add(this);
|
||||
}
|
||||
|
||||
|
|
|
@ -11,7 +11,9 @@
|
|||
"type": "forge:ore_shaped",
|
||||
"key": {
|
||||
"r": {
|
||||
"type": "forge:ore_dict", "ore": "itemRubber"
|
||||
"type": "industrialwires:ic2_item",
|
||||
"name": "crafting",
|
||||
"variant": "rubber"
|
||||
},
|
||||
"c": {
|
||||
"type": "industrialwires:ic2_item",
|
||||
|
|
Loading…
Reference in a new issue