More error correction

This commit is contained in:
DarkGuardsman 2014-01-09 01:15:16 -05:00
parent c0e93e23b3
commit 363ce7ad11
65 changed files with 214 additions and 723 deletions

View file

@ -6,6 +6,7 @@ import net.minecraft.util.Icon;
import net.minecraftforge.common.Configuration; import net.minecraftforge.common.Configuration;
import net.minecraftforge.fluids.BlockFluidFinite; import net.minecraftforge.fluids.BlockFluidFinite;
import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.Fluid;
import resonantinduction.core.Settings;
import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly; import cpw.mods.fml.relauncher.SideOnly;
@ -18,7 +19,7 @@ public class BlockFluid extends BlockFluidFinite
public BlockFluid(String prefix, Fluid fluid, Configuration config) public BlockFluid(String prefix, Fluid fluid, Configuration config)
{ {
this(prefix, DarkCore.getNextID(), fluid, config); this(prefix, Settings.getNextBlockID(), fluid, config);
} }
public BlockFluid(String prefix, int id, Fluid fluid, Configuration config) public BlockFluid(String prefix, int id, Fluid fluid, Configuration config)

View file

@ -3,7 +3,6 @@ package com.builtbroken.minecraft.prefab;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import resonatninduction.tilenetwork.prefab.NetworkTileEntities;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.Container; import net.minecraft.inventory.Container;
import net.minecraft.inventory.ISidedInventory; import net.minecraft.inventory.ISidedInventory;
@ -11,6 +10,7 @@ import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList; import net.minecraft.nbt.NBTTagList;
import net.minecraftforge.common.ForgeDirection; import net.minecraftforge.common.ForgeDirection;
import resonatninduction.tilenetwork.prefab.NetworkTileEntities;
import universalelectricity.api.vector.Vector3; import universalelectricity.api.vector.Vector3;
import calclavia.lib.access.AccessGroup; import calclavia.lib.access.AccessGroup;
import calclavia.lib.access.AccessUser; import calclavia.lib.access.AccessUser;

View file

@ -23,8 +23,6 @@ import cpw.mods.fml.common.network.Player;
public abstract class TileEntityMachine extends TileEntityInv implements ISidedInventory, IExternalInv, ISimplePacketReceiver, IExtraTileEntityInfo public abstract class TileEntityMachine extends TileEntityInv implements ISidedInventory, IExternalInv, ISimplePacketReceiver, IExtraTileEntityInfo
{ {
/** Tick by which this machine stops working */
protected int disabledTicks = 0;
/** Number of players with the machine's gui container open */ /** Number of players with the machine's gui container open */
protected int playersUsingMachine = 0; protected int playersUsingMachine = 0;
/** Is the machine functioning normally */ /** Is the machine functioning normally */
@ -81,12 +79,6 @@ public abstract class TileEntityMachine extends TileEntityInv implements ISidedI
} }
this.sendGUIPacket(); this.sendGUIPacket();
} }
if (this.disabledTicks > 0)
{
this.disabledTicks--;
this.whileDisable();
}
} }
/** Can this tile function, or run threw normal processes */ /** Can this tile function, or run threw normal processes */
@ -157,20 +149,6 @@ public abstract class TileEntityMachine extends TileEntityInv implements ISidedI
} }
} }
@Override
public void readFromNBT(NBTTagCompound nbt)
{
super.readFromNBT(nbt);
this.disabledTicks = nbt.getInteger("disabledTicks");
}
@Override
public void writeToNBT(NBTTagCompound nbt)
{
super.writeToNBT(nbt);
nbt.setInteger("disabledTicks", this.disabledTicks);
}
@Override @Override
public boolean simplePacket(String id, ByteArrayDataInput dis, Player player) public boolean simplePacket(String id, ByteArrayDataInput dis, Player player)
{ {

View file

@ -6,6 +6,7 @@ import net.minecraft.util.ResourceLocation;
import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL11;
import resonantinduction.Reference;
import cpw.mods.fml.client.FMLClientHandler; import cpw.mods.fml.client.FMLClientHandler;
import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly; import cpw.mods.fml.relauncher.SideOnly;
@ -13,7 +14,7 @@ import cpw.mods.fml.relauncher.SideOnly;
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public class GuiButtonImage extends GuiButton public class GuiButtonImage extends GuiButton
{ {
public static final ResourceLocation TEXTURE = new ResourceLocation(DarkCore.DOMAIN, DarkCore.GUI_DIRECTORY + "gui_button.png"); public static final ResourceLocation TEXTURE = new ResourceLocation(Reference.DOMAIN, Reference.GUI_DIRECTORY + "gui_button.png");
private ButtonIcon buttonIcon = ButtonIcon.BLANK; private ButtonIcon buttonIcon = ButtonIcon.BLANK;

View file

@ -12,6 +12,8 @@ import net.minecraft.util.ResourceLocation;
import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12; import org.lwjgl.opengl.GL12;
import resonantinduction.Reference;
import com.builtbroken.minecraft.prefab.TileEntityMachine; import com.builtbroken.minecraft.prefab.TileEntityMachine;
import com.builtbroken.minecraft.prefab.invgui.GuiButtonImage.ButtonIcon; import com.builtbroken.minecraft.prefab.invgui.GuiButtonImage.ButtonIcon;
@ -31,7 +33,7 @@ public abstract class GuiMachineContainer extends GuiContainer
guiIcon3 = ButtonIcon.BLANK; guiIcon3 = ButtonIcon.BLANK;
protected String invName = "Home", invName2 = "2", invName3 = "3"; protected String invName = "Home", invName2 = "2", invName3 = "3";
public ResourceLocation TEXTURE = new ResourceLocation(DarkCore.DOMAIN, DarkCore.GUI_DIRECTORY + "gui_grey.png"); public ResourceLocation TEXTURE = new ResourceLocation(Reference.DOMAIN, Reference.GUI_DIRECTORY + "gui_grey.png");
protected int containerWidth; protected int containerWidth;
protected int containerHeight; protected int containerHeight;

View file

@ -5,12 +5,13 @@ import net.minecraft.util.ResourceLocation;
import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL11;
import resonantinduction.Reference;
import cpw.mods.fml.client.FMLClientHandler; import cpw.mods.fml.client.FMLClientHandler;
import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.common.FMLCommonHandler;
public class GuiMessageBox extends GuiBase public class GuiMessageBox extends GuiBase
{ {
public static final ResourceLocation TEXTURE = new ResourceLocation(DarkCore.DOMAIN, DarkCore.GUI_DIRECTORY + "gui_message_box.png"); public static final ResourceLocation TEXTURE = new ResourceLocation(Reference.DOMAIN, Reference.GUI_DIRECTORY + "gui_message_box.png");
GuiBase returnGuiYes, returnGuiNo; GuiBase returnGuiYes, returnGuiNo;
int id; int id;

View file

@ -2,12 +2,12 @@ package com.builtbroken.minecraft.recipes;
import java.util.Random; import java.util.Random;
import resonantinduction.api.IProcessable;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.item.ItemArmor; import net.minecraft.item.ItemArmor;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.item.ItemTool; import net.minecraft.item.ItemTool;
import resonantinduction.api.IProcessable;
import calclavia.lib.utility.AutoCraftingManager; import calclavia.lib.utility.AutoCraftingManager;
import com.builtbroken.common.Pair; import com.builtbroken.common.Pair;

View file

@ -1,9 +1,9 @@
package resonantinduction.api; package resonantinduction.api;
import com.builtbroken.minecraft.recipes.ProcessorType;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import com.builtbroken.minecraft.recipes.ProcessorType;
/** /**
* Simple interface that allows an item to control how its salvaged, processed, or refined by a * Simple interface that allows an item to control how its salvaged, processed, or refined by a
* processor. This is 100% optional as the processor by default can break down most items. The only * processor. This is 100% optional as the processor by default can break down most items. The only

View file

@ -1,10 +1,10 @@
package resonantinduction.api.fluid; package resonantinduction.api.fluid;
import resonatninduction.tilenetwork.INetworkPart;
import net.minecraftforge.common.ForgeDirection; import net.minecraftforge.common.ForgeDirection;
import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.FluidTankInfo; import net.minecraftforge.fluids.FluidTankInfo;
import net.minecraftforge.fluids.IFluidHandler; import net.minecraftforge.fluids.IFluidHandler;
import resonatninduction.tilenetwork.INetworkPart;
/** /**
* Interface used by part that are members of a fluid tile network. Parts in the network will act as * Interface used by part that are members of a fluid tile network. Parts in the network will act as

View file

@ -0,0 +1,6 @@
package resonantinduction.archaic;
public class ArcClientProxy extends ArcCommonProxy
{
}

View file

@ -0,0 +1,35 @@
package resonantinduction.archaic;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.world.World;
import cpw.mods.fml.common.network.IGuiHandler;
public class ArcCommonProxy implements IGuiHandler
{
public void preInit()
{
};
public void init()
{
};
public void postInit()
{
};
@Override
public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z)
{
// TODO Auto-generated method stub
return null;
}
@Override
public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z)
{
// TODO Auto-generated method stub
return null;
}
}

View file

@ -0,0 +1,54 @@
package resonantinduction.archaic;
import java.util.Arrays;
import java.util.logging.Logger;
import resonantinduction.Reference;
import resonantinduction.core.ResonantInduction;
import calclavia.lib.utility.LanguageUtility;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.Mod.Instance;
import cpw.mods.fml.common.ModMetadata;
import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.network.NetworkRegistry;
@Mod(modid = ArchaicTier.ID, name = Reference.NAME + " Archaic Tier", version = Reference.VERSION, dependencies = "required-after:" + ResonantInduction.ID)
public class ArchaicTier
{
/** Mod Information */
public static final String ID = "ResonantInduction|Archaic";
@Instance(ID)
public static ResonantInduction INSTANCE;
@SidedProxy(clientSide = "resonantinduction.archaic.ArcClientProxy", serverSide = "resonantinduction.archaic.ArcCommonProxy")
public static ArcCommonProxy proxy;
@Mod.Metadata(ID)
public static ModMetadata metadata;
public static final Logger LOGGER = Logger.getLogger(Reference.NAME);
@EventHandler
public void preInit(FMLPreInitializationEvent evt)
{
NetworkRegistry.instance().registerGuiHandler(this, proxy);
}
@EventHandler
public void init(FMLInitializationEvent evt)
{
metadata.modId = ID;
metadata.name = Reference.NAME + " Archaic Tier";
metadata.description = LanguageUtility.getLocal("meta.resonantinduction.archaic.description");
metadata.url = "http://calclavia.com/resonant-induction";
metadata.logoFile = "ri_logo.png";
metadata.version = Reference.VERSION + "." + Reference.BUILD_VERSION;
metadata.authorList = Arrays.asList(new String[] { "Calclavia", "DarkCow" });
metadata.credits = LanguageUtility.getLocal("meta.resonantinduction.credits");
metadata.autogenerated = false;
}
}

View file

@ -20,7 +20,6 @@ import net.minecraftforge.fluids.Fluid;
import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.IFluidBlock; import net.minecraftforge.fluids.IFluidBlock;
import resonantinduction.Reference; import resonantinduction.Reference;
import resonantinduction.core.ResonantInductionTabs;
import resonantinduction.core.Settings; import resonantinduction.core.Settings;
import resonantinduction.transport.fluid.EnumGas; import resonantinduction.transport.fluid.EnumGas;
import universalelectricity.api.vector.Vector3; import universalelectricity.api.vector.Vector3;
@ -43,8 +42,7 @@ public class BlockGasOre extends Block implements IFluidBlock
public BlockGasOre() public BlockGasOre()
{ {
super(Settings.CONFIGURATION.getBlock("GasBlock", Settings.getNextBlockID()).getInt(), gas); super(Settings.CONFIGURATION.getBlock("GasBlock", Settings.getNextBlockID()).getInt(), gas);
this.setUnlocalizedName("DMBlockGas"); this.setUnlocalizedName("BlockGas");
this.setCreativeTab(ResonantInductionTabs.tabIndustrial());
this.setTickRandomly(true); this.setTickRandomly(true);
} }

View file

@ -7,8 +7,6 @@ import net.minecraft.item.Item;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.client.MinecraftForgeClient; import net.minecraftforge.client.MinecraftForgeClient;
import net.minecraftforge.common.MinecraftForge;
import resonantinduction.client.gui.GuiBatteryBox;
import resonantinduction.client.gui.GuiEncoderCoder; import resonantinduction.client.gui.GuiEncoderCoder;
import resonantinduction.client.gui.GuiEncoderHelp; import resonantinduction.client.gui.GuiEncoderHelp;
import resonantinduction.client.gui.GuiEncoderInventory; import resonantinduction.client.gui.GuiEncoderInventory;
@ -30,7 +28,6 @@ import resonantinduction.client.render.RenderTurkey;
import resonantinduction.core.misc.EntityFarmEgg; import resonantinduction.core.misc.EntityFarmEgg;
import resonantinduction.core.misc.EntityTurkey; import resonantinduction.core.misc.EntityTurkey;
import resonantinduction.core.recipe.RecipeLoader; import resonantinduction.core.recipe.RecipeLoader;
import resonantinduction.energy.battery.TileBatteryBox;
import resonantinduction.mechanics.CommonProxy; import resonantinduction.mechanics.CommonProxy;
import resonantinduction.mechanics.processor.TileEntityProcessor; import resonantinduction.mechanics.processor.TileEntityProcessor;
import resonantinduction.transport.encoder.TileEntityEncoder; import resonantinduction.transport.encoder.TileEntityEncoder;

View file

@ -1,21 +1,29 @@
package resonantinduction.client.gui; package resonantinduction.client.gui;
/** /** Used to reference icons in the gui coder sheet
* Used to reference icons in the gui coder sheet
* *
* @author DarkGuardsman * @author DarkGuardsman */
*/
public enum EnumTaskIcon public enum EnumTaskIcon
{ {
VERT_LINE(0, 0), HORT_LINE(20, 0), ARROW_UP(40, 0), ARROW_RIGHT(60, 0), ARROW_DOWN(80, 0), VERT_LINE(0, 0),
ARROW_LEFT(100, 0), VERT_LINE_DOT(120, 0), HORT_LINE_DOT(140, 0), LEFT_UP_BEND(160, 0), HORT_LINE(20, 0),
LEFT_DOWN_BEND(180, 0), RIGHT_UP_BEND(200, 0), RIGHT_DOWN_BEND(220, 0); ARROW_UP(40, 0),
ARROW_RIGHT(60, 0),
ARROW_DOWN(80, 0),
ARROW_LEFT(100, 0),
VERT_LINE_DOT(120, 0),
HORT_LINE_DOT(140, 0),
LEFT_UP_BEND(160, 0),
LEFT_DOWN_BEND(180, 0),
RIGHT_UP_BEND(200, 0),
RIGHT_DOWN_BEND(220, 0);
int uu, vv; int uu, vv;
int sizeX = 20, sizeY = 20; int sizeX = 20, sizeY = 20;
private EnumTaskIcon(int uu, int vv) private EnumTaskIcon(int uu, int vv)
{ {
this.uu = uu;
this.vv = vv;
} }
} }

View file

@ -1,64 +0,0 @@
package resonantinduction.client.gui;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.StatCollector;
import org.lwjgl.opengl.GL11;
import resonantinduction.Reference;
import resonantinduction.energy.battery.ContainerBatteryBox;
import resonantinduction.energy.battery.TileBatteryBox;
import universalelectricity.api.energy.UnitDisplay;
import universalelectricity.api.energy.UnitDisplay.Unit;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@SideOnly(Side.CLIENT)
public class GuiBatteryBox extends GuiContainer
{
private static final ResourceLocation TEXTURE = new ResourceLocation(Reference.DOMAIN, Reference.GUI_DIRECTORY + "battery_box.png");
private TileBatteryBox tileEntity;
private int containerWidth;
private int containerHeight;
public GuiBatteryBox(InventoryPlayer par1InventoryPlayer, TileBatteryBox batteryBox)
{
super(new ContainerBatteryBox(par1InventoryPlayer, batteryBox));
this.tileEntity = batteryBox;
}
/** Draw the foreground layer for the GuiContainer (everything in front of the items) */
@Override
protected void drawGuiContainerForegroundLayer(int par1, int par2)
{
this.fontRenderer.drawString(this.tileEntity.getInvName(), 65, 6, 4210752);
String displayJoules = UnitDisplay.getDisplayShort(tileEntity.getEnergyStored(), Unit.JOULES) + " of";
String displayMaxJoules = UnitDisplay.getDisplayShort(tileEntity.getMaxEnergyStored(), Unit.JOULES);
String displayVoltage = "Voltage: " + (int) (this.tileEntity.getVoltage() * 1000);
this.fontRenderer.drawString(displayJoules, 122 - this.fontRenderer.getStringWidth(displayJoules) / 2, 30, 4210752);
this.fontRenderer.drawString(displayMaxJoules, 122 - this.fontRenderer.getStringWidth(displayMaxJoules) / 2, 40, 4210752);
this.fontRenderer.drawString(displayVoltage, 122 - this.fontRenderer.getStringWidth(displayVoltage) / 2, 60, 4210752);
this.fontRenderer.drawString(StatCollector.translateToLocal("container.inventory"), 8, this.ySize - 96 + 2, 4210752);
}
/** Draw the background layer for the GuiContainer (everything behind the items) */
@Override
protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3)
{
this.mc.renderEngine.bindTexture(TEXTURE);
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
this.containerWidth = (this.width - this.xSize) / 2;
this.containerHeight = (this.height - this.ySize) / 2;
// Background energy bar
this.drawTexturedModalRect(containerWidth, containerHeight, 0, 0, this.xSize, this.ySize);
// Foreground energy bar
int scale = (int) ((this.tileEntity.getEnergyStored() / this.tileEntity.getMaxEnergyStored()) * 72);
this.drawTexturedModalRect(containerWidth + 87, containerHeight + 52, 176, 0, scale, 20);
}
}

View file

@ -9,6 +9,7 @@ import org.lwjgl.opengl.GL11;
import resonantinduction.Reference; import resonantinduction.Reference;
import resonantinduction.transport.imprinter.ContainerImprinter; import resonantinduction.transport.imprinter.ContainerImprinter;
import resonantinduction.transport.imprinter.TileEntityImprinter; import resonantinduction.transport.imprinter.TileEntityImprinter;
import calclavia.lib.utility.LanguageUtility;
import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly; import cpw.mods.fml.relauncher.SideOnly;
@ -32,7 +33,7 @@ public class GuiImprinter extends GuiContainer
{ {
this.fontRenderer.drawString("Use Inventories:", 70, 58, 4210752); this.fontRenderer.drawString("Use Inventories:", 70, 58, 4210752);
this.fontRenderer.drawString("" + this.tileEntity.searchInventories, 105, 67, 4210752); this.fontRenderer.drawString("" + this.tileEntity.searchInventories, 105, 67, 4210752);
this.fontRenderer.drawString(TranslationHelper.getLocal("tile.imprinter.name"), 68, 6, 4210752); this.fontRenderer.drawString(LanguageUtility.getLocal("tile.imprinter.name"), 68, 6, 4210752);
} }
/** Draw the background layer for the GuiContainer (everything behind the items) */ /** Draw the background layer for the GuiContainer (everything behind the items) */

View file

@ -5,7 +5,6 @@ package resonantinduction.core.base;
import net.minecraftforge.common.Configuration; import net.minecraftforge.common.Configuration;
import resonantinduction.Reference; import resonantinduction.Reference;
import resonantinduction.core.ResonantInduction;
import resonantinduction.core.ResonantInductionTabs; import resonantinduction.core.ResonantInductionTabs;
import resonantinduction.core.Settings; import resonantinduction.core.Settings;
import universalelectricity.api.UniversalElectricity; import universalelectricity.api.UniversalElectricity;

View file

@ -3,7 +3,6 @@ package resonantinduction.core.base;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraftforge.common.Configuration; import net.minecraftforge.common.Configuration;
import resonantinduction.Reference; import resonantinduction.Reference;
import resonantinduction.core.ResonantInduction;
import resonantinduction.core.ResonantInductionTabs; import resonantinduction.core.ResonantInductionTabs;
import resonantinduction.core.Settings; import resonantinduction.core.Settings;

View file

@ -10,7 +10,6 @@ import net.minecraftforge.common.Configuration;
import net.minecraftforge.oredict.OreDictionary; import net.minecraftforge.oredict.OreDictionary;
import net.minecraftforge.oredict.ShapedOreRecipe; import net.minecraftforge.oredict.ShapedOreRecipe;
import net.minecraftforge.oredict.ShapelessOreRecipe; import net.minecraftforge.oredict.ShapelessOreRecipe;
import resonantinduction.blocks.BlockBasalt;
import resonantinduction.core.misc.EnumTool; import resonantinduction.core.misc.EnumTool;
import resonantinduction.core.resource.ItemOreDirv; import resonantinduction.core.resource.ItemOreDirv;
import resonantinduction.core.resource.ItemParts.Parts; import resonantinduction.core.resource.ItemParts.Parts;

View file

@ -2,8 +2,8 @@ package resonantinduction.core.resource;
import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import resonantinduction.Reference;
import resonantinduction.blocks.BlockOre.OreData; import resonantinduction.blocks.BlockOre.OreData;
import resonantinduction.transport.ResonantInductionTransport;
public class ItemBlockOre extends ItemBlock public class ItemBlockOre extends ItemBlock
{ {
@ -26,7 +26,7 @@ public class ItemBlockOre extends ItemBlock
{ {
if (par1ItemStack != null && par1ItemStack.getItemDamage() < OreData.values().length) if (par1ItemStack != null && par1ItemStack.getItemDamage() < OreData.values().length)
{ {
return "tile." + ResonantInductionTransport.PREFIX + OreData.values()[par1ItemStack.getItemDamage()].name + "Ore"; return "tile." + Reference.PREFIX + OreData.values()[par1ItemStack.getItemDamage()].name + "Ore";
} }
return super.getUnlocalizedName(); return super.getUnlocalizedName();
} }

View file

@ -11,8 +11,10 @@ import net.minecraftforge.common.Configuration;
import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.ForgeSubscribe; import net.minecraftforge.event.ForgeSubscribe;
import net.minecraftforge.oredict.OreDictionary; import net.minecraftforge.oredict.OreDictionary;
import resonantinduction.Reference;
import resonantinduction.api.events.LaserEvent; import resonantinduction.api.events.LaserEvent;
import resonantinduction.transport.ResonantInductionTransport; import resonantinduction.core.Settings;
import resonantinduction.core.base.ItemBase;
import com.builtbroken.minecraft.EnumMaterial; import com.builtbroken.minecraft.EnumMaterial;
import com.builtbroken.minecraft.EnumOrePart; import com.builtbroken.minecraft.EnumOrePart;
@ -26,11 +28,11 @@ import cpw.mods.fml.relauncher.SideOnly;
* *
* @author DarkGuardsman * @author DarkGuardsman
*/ */
public class ItemOreDirv extends ItemBasic implements IExtraItemInfo public class ItemOreDirv extends ItemBase implements IExtraItemInfo
{ {
public ItemOreDirv() public ItemOreDirv()
{ {
super(DarkCore.getNextItemId(), "Metal_Parts", ResonantInductionTransport.CONFIGURATION); super("Metal_Parts", Settings.getNextItemID());
this.setHasSubtypes(true); this.setHasSubtypes(true);
this.setCreativeTab(CreativeTabs.tabMaterials); this.setCreativeTab(CreativeTabs.tabMaterials);
MinecraftForge.EVENT_BUS.register(this); MinecraftForge.EVENT_BUS.register(this);
@ -41,7 +43,7 @@ public class ItemOreDirv extends ItemBasic implements IExtraItemInfo
{ {
if (itemStack != null) if (itemStack != null)
{ {
return "item." + ResonantInductionTransport.PREFIX + EnumOrePart.getFullName(itemStack.getItemDamage()); return "item." + Reference.PREFIX + EnumOrePart.getFullName(itemStack.getItemDamage());
} }
else else
{ {
@ -66,7 +68,7 @@ public class ItemOreDirv extends ItemBasic implements IExtraItemInfo
{ {
if (mat.shouldCreateItem(part)) if (mat.shouldCreateItem(part))
{ {
mat.itemIcons[part.ordinal()] = iconRegister.registerIcon(ResonantInductionTransport.PREFIX + mat.simpleName + part.simpleName); mat.itemIcons[part.ordinal()] = iconRegister.registerIcon(Reference.PREFIX + mat.simpleName + part.simpleName);
} }
} }
} }

View file

@ -8,7 +8,9 @@ import net.minecraft.item.ItemStack;
import net.minecraft.util.Icon; import net.minecraft.util.Icon;
import net.minecraftforge.common.Configuration; import net.minecraftforge.common.Configuration;
import net.minecraftforge.oredict.OreDictionary; import net.minecraftforge.oredict.OreDictionary;
import resonantinduction.transport.ResonantInductionTransport; import resonantinduction.Reference;
import resonantinduction.core.Settings;
import resonantinduction.core.base.ItemBase;
import com.builtbroken.minecraft.IExtraInfo.IExtraItemInfo; import com.builtbroken.minecraft.IExtraInfo.IExtraItemInfo;
@ -21,11 +23,11 @@ import cpw.mods.fml.relauncher.SideOnly;
* *
* @author DarkGuardsman * @author DarkGuardsman
*/ */
public class ItemParts extends ItemBasic implements IExtraItemInfo public class ItemParts extends ItemBase implements IExtraItemInfo
{ {
public ItemParts() public ItemParts()
{ {
super(DarkCore.getNextItemId(), "DMParts", ResonantInductionTransport.CONFIGURATION); super("DMParts", Settings.getNextItemID());
this.setHasSubtypes(true); this.setHasSubtypes(true);
this.setMaxDamage(0); this.setMaxDamage(0);
this.setMaxStackSize(64); this.setMaxStackSize(64);
@ -60,7 +62,7 @@ public class ItemParts extends ItemBasic implements IExtraItemInfo
super.registerIcons(iconRegister); super.registerIcons(iconRegister);
for (Parts part : Parts.values()) for (Parts part : Parts.values())
{ {
part.icon = iconRegister.registerIcon(ResonantInductionTransport.PREFIX + "part." + part.name); part.icon = iconRegister.registerIcon(Reference.PREFIX + "part." + part.name);
} }
} }

View file

@ -1,143 +0,0 @@
package resonantinduction.energy.battery;
import java.util.List;
import java.util.Set;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.Icon;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.common.ForgeDirection;
import resonantinduction.core.ResonantInductionTabs;
import resonantinduction.core.Settings;
import resonantinduction.energy.ResonantInductionEnergy;
import universalelectricity.api.UniversalElectricity;
import universalelectricity.api.energy.IConductor;
import universalelectricity.api.vector.Vector3;
import calclavia.lib.utility.HelperMethods;
import com.builtbroken.common.Pair;
import com.builtbroken.minecraft.prefab.BlockMachine;
/**
* Block for energy storage devices
*
* @author Rseifert
*/
public class BlockBatteryBox extends BlockMachine
{
public BlockBatteryBox()
{
super(Settings.CONFIGURATION, "DMEnergyStorage", UniversalElectricity.machine);
this.setCreativeTab(ResonantInductionTabs.CORE);
}
@Override
public Icon getBlockTexture(IBlockAccess world, int x, int y, int z, int side)
{
Vector3 vec = new Vector3(x, y, z);
int meta = vec.getBlockMetadata(world);
if (side == (meta))
{
return this.iconOutput;
}
return vec.clone().modifyPositionFromSide(ForgeDirection.getOrientation(side)).getTileEntity(world) instanceof IConductor ? this.iconInput : this.blockIcon;
}
@Override
public boolean onMachineActivated(World par1World, int x, int y, int z, EntityPlayer par5EntityPlayer, int side, float hitX, float hitY, float hitZ)
{
int metadata = par1World.getBlockMetadata(x, y, z);
if (!par1World.isRemote)
{
par5EntityPlayer.openGui(ResonantInductionEnergy.INSTANCE, 0, par1World, x, y, z);
}
return true;
}
@Override
public boolean onUseWrench(World world, int x, int y, int z, EntityPlayer entityPlayer, int side, float hitX, float hitY, float hitZ)
{
if (!world.isRemote)
{
int metadata = world.getBlockMetadata(x, y, z);
if (metadata >= 5)
{
world.setBlockMetadataWithNotify(x, y, z, 0, 3);
}
else
{
world.setBlockMetadataWithNotify(x, y, z, metadata + 1, 3);
}
}
return true;
}
@Override
public boolean onSneakUseWrench(World world, int x, int y, int z, EntityPlayer entityPlayer, int side, float hitX, float hitY, float hitZ)
{
if (!world.isRemote)
{
world.setBlockMetadataWithNotify(x, y, z, side, 3);
}
return true;
}
@Override
public boolean onSneakMachineActivated(World world, int x, int y, int z, EntityPlayer entityPlayer, int side, float hitX, float hitY, float hitZ)
{
if (!world.isRemote)
{
ItemStack batBoxStack = ItemBlockEnergyStorage.getWrenchedBatteryBox(world, new Vector3(x, y, z));
if (entityPlayer.getHeldItem() == null)
{
entityPlayer.inventory.setInventorySlotContents(entityPlayer.inventory.currentItem, batBoxStack);
}
else
{
HelperMethods.dropItemStack(world, new Vector3(x, y, z), batBoxStack, false);
}
world.setBlockToAir(x, y, z);
}
return true;
}
@Override
public void getTileEntities(int blockID, Set<Pair<String, Class<? extends TileEntity>>> list)
{
list.add(new Pair<String, Class<? extends TileEntity>>("DCTileBatBox", TileBatteryBox.class));
}
@Override
public TileEntity createTileEntity(World world, int metadata)
{
return new TileBatteryBox();
}
@Override
public void getSubBlocks(int par1, CreativeTabs par2CreativeTabs, List par3List)
{
par3List.add(new ItemStack(par1, 1, 0));
}
@Override
public int damageDropped(int metadata)
{
return 0;
}
@Override
public ItemStack getPickBlock(MovingObjectPosition target, World world, int x, int y, int z)
{
return new ItemStack(this, 1, 0);
}
}

View file

@ -1,106 +0,0 @@
package resonantinduction.energy.battery;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.Container;
import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack;
import universalelectricity.api.item.IEnergyItem;
import com.builtbroken.minecraft.prefab.invgui.SlotSpecific;
public class ContainerBatteryBox extends Container
{
private TileBatteryBox tileEntity;
public ContainerBatteryBox(InventoryPlayer par1InventoryPlayer, TileBatteryBox batteryBox)
{
this.tileEntity = batteryBox;
// Top slot for battery output
this.addSlotToContainer(new SlotSpecific(batteryBox, 0, 33, 24, IEnergyItem.class));
// Bottom slot for batter input
this.addSlotToContainer(new SlotSpecific(batteryBox, 1, 33, 48, IEnergyItem.class));
int var3;
for (var3 = 0; var3 < 3; ++var3)
{
for (int var4 = 0; var4 < 9; ++var4)
{
this.addSlotToContainer(new Slot(par1InventoryPlayer, var4 + var3 * 9 + 9, 8 + var4 * 18, 84 + var3 * 18));
}
}
for (var3 = 0; var3 < 9; ++var3)
{
this.addSlotToContainer(new Slot(par1InventoryPlayer, var3, 8 + var3 * 18, 142));
}
}
@Override
public boolean canInteractWith(EntityPlayer par1EntityPlayer)
{
return this.tileEntity.isUseableByPlayer(par1EntityPlayer);
}
/** Called to transfer a stack from one inventory to the other eg. when shift clicking. */
@Override
public ItemStack transferStackInSlot(EntityPlayer par1EntityPlayer, int slotID)
{
ItemStack returnStack = null;
Slot slot = (Slot) this.inventorySlots.get(slotID);
if (slot != null && slot.getHasStack())
{
ItemStack itemStack = slot.getStack();
returnStack = itemStack.copy();
if (slotID != 0 && slotID != 1)
{
if (this.getSlot(0).isItemValid(itemStack))
{
if (((IEnergyItem) itemStack.getItem()).getEnergy(itemStack) > 0)
{
if (!this.mergeItemStack(itemStack, 1, 2, false))
{
return null;
}
}
else
{
if (!this.mergeItemStack(itemStack, 0, 1, false))
{
return null;
}
}
}
else if (slotID >= 30 && slotID < 38 && !this.mergeItemStack(itemStack, 3, 30, false))
{
return null;
}
}
else if (!this.mergeItemStack(itemStack, 3, 38, false))
{
return null;
}
if (itemStack.stackSize == 0)
{
slot.putStack((ItemStack) null);
}
else
{
slot.onSlotChanged();
}
if (itemStack.stackSize == returnStack.stackSize)
{
return null;
}
slot.onPickupFromSlot(par1EntityPlayer, itemStack);
}
return returnStack;
}
}

View file

@ -1,124 +0,0 @@
package resonantinduction.energy.battery;
import java.util.List;
import net.minecraft.block.Block;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTBase;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagFloat;
import net.minecraft.nbt.NBTTagLong;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import net.minecraftforge.common.ForgeDirection;
import resonantinduction.core.recipe.RecipeLoader;
import universalelectricity.api.vector.Vector3;
/**
* Item version of the enrgy storage block
*
* @author Darkguardsman
*/
public class ItemBlockEnergyStorage extends ItemBlock
{
public ItemBlockEnergyStorage(int id)
{
super(id);
this.setMaxDamage(0);
this.setHasSubtypes(true);
}
@Override
public int getMetadata(int damage)
{
return damage;
}
@Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean par4)
{
if (stack.getTagCompound() != null && stack.getTagCompound().hasKey("wrenched"))
{
NBTBase energy = stack.getTagCompound().getTag("energy");
if (energy instanceof NBTTagFloat)
{
list.add("Energy: " + (long) (stack.getTagCompound().getFloat("energy") * 1000));
}
else if (energy instanceof NBTTagLong)
{
list.add("Energy: " + stack.getTagCompound().getLong("energy"));
}
}
}
@Override
public String getUnlocalizedName(ItemStack itemStack)
{
return Block.blocksList[this.getBlockID()].getUnlocalizedName() + "." + itemStack.getItemDamage();
}
@Override
public boolean placeBlockAt(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ, int metadata)
{
if (!world.setBlock(x, y, z, this.getBlockID(), side, 3))
{
return false;
}
if (world.getBlockId(x, y, z) == this.getBlockID())
{
Block.blocksList[this.getBlockID()].onBlockPlacedBy(world, x, y, z, player, stack);
Block.blocksList[this.getBlockID()].onPostBlockPlaced(world, x, y, z, metadata);
if (stack.getTagCompound() != null && stack.getTagCompound().hasKey("wrenched"))
{
TileEntity entity = world.getBlockTileEntity(x, y, z);
if (entity instanceof TileBatteryBox)
{
((TileBatteryBox) entity).getInventory().loadInv(stack.getTagCompound());
NBTBase energy = stack.getTagCompound().getTag("energy");
if (energy instanceof NBTTagFloat)
{
((TileBatteryBox) entity).setEnergy(ForgeDirection.UNKNOWN, (long) (stack.getTagCompound().getFloat("energy") * 1000));
}
else if (energy instanceof NBTTagLong)
{
((TileBatteryBox) entity).setEnergy(ForgeDirection.UNKNOWN, stack.getTagCompound().getLong("energy"));
}
}
}
}
return true;
}
public static ItemStack getWrenchedBatteryBox(World world, Vector3 vec)
{
ItemStack itemStack = new ItemStack(RecipeLoader.blockBatBox);
TileEntity entity = vec.getTileEntity(world);
if (entity instanceof TileBatteryBox)
{
if (itemStack.getTagCompound() == null)
{
itemStack.setTagCompound(new NBTTagCompound());
}
itemStack.getTagCompound().setBoolean("wrenched", true);
itemStack.getTagCompound().setFloat("energy", ((TileBatteryBox) entity).getEnergyStored());
((TileBatteryBox) entity).getInventory().saveInv(itemStack.getTagCompound());
((TileBatteryBox) entity).getInventory().clear();
}
return itemStack;
}
@Override
public int getItemStackLimit(ItemStack stack)
{
if (stack.getTagCompound() != null && stack.getTagCompound().hasKey("wrenched"))
{
return 1;
}
return this.getItemStackLimit();
}
}

View file

@ -1,145 +0,0 @@
package resonantinduction.energy.battery;
import java.util.EnumSet;
import net.minecraft.inventory.Container;
import net.minecraft.network.packet.Packet;
import net.minecraftforge.common.ForgeDirection;
import universalelectricity.api.CompatibilityModule;
import calclavia.lib.network.PacketHandler;
import com.builtbroken.minecraft.prefab.TileEntityEnergyMachine;
import com.google.common.io.ByteArrayDataInput;
import cpw.mods.fml.common.network.Player;
import cpw.mods.fml.common.registry.LanguageRegistry;
/**
* Simple in out battery box
*
* @author DarkGuardsman
*/
public class TileBatteryBox extends TileEntityEnergyMachine
{
public TileBatteryBox()
{
super(10000, 5000000);
this.invSlots = 2;
this.hasGUI = true;
}
@Override
public void updateEntity()
{
super.updateEntity();
if (!this.worldObj.isRemote && this.enabled)
{
/** Recharges electric item. */
this.setEnergy(ForgeDirection.UNKNOWN, this.getEnergy(ForgeDirection.UNKNOWN) - CompatibilityModule.chargeItem(this.getStackInSlot(0), Math.min(10000, this.getEnergyStored()), true));
/** Decharge electric item. */
this.setEnergy(ForgeDirection.UNKNOWN, this.getEnergy(ForgeDirection.UNKNOWN) + CompatibilityModule.dischargeItem(this.getStackInSlot(1), Math.min(10000, this.getEnergyCapacity(ForgeDirection.UNKNOWN) - this.getEnergyStored()), true));
/** Output to network, or connected machines */
this.produce();
}
}
@Override
protected boolean consumePower(long watts, boolean doDrain)
{
return true;
}
@Override
public boolean canConnect(ForgeDirection direction)
{
return true;
}
@Override
public EnumSet<ForgeDirection> getOutputDirections()
{
return EnumSet.of(ForgeDirection.getOrientation(this.getBlockMetadata()));
}
/**
* The electrical input direction.
*
* @return The direction that electricity is entered into the tile. Return null for no input. By
* default you can accept power from all sides.
*/
@Override
public EnumSet<ForgeDirection> getInputDirections()
{
EnumSet<ForgeDirection> et = EnumSet.allOf(ForgeDirection.class);
et.remove(ForgeDirection.getOrientation(this.getBlockMetadata()));
et.remove(ForgeDirection.UNKNOWN);
return et;
}
@Override
public boolean simplePacket(String id, ByteArrayDataInput dis, Player player)
{
boolean r = super.simplePacket(id, dis, player);
try
{
if (this.worldObj.isRemote && !r)
{
if (id.equalsIgnoreCase("desc"))
{
this.setEnergy(ForgeDirection.UNKNOWN, dis.readLong());
this.setMaxEnergyStored(dis.readLong());
return true;
}
}
}
catch (Exception e)
{
e.printStackTrace();
}
return r;
}
@Override
public Packet getDescriptionPacket()
{
return PacketHandler.instance().getTilePacket(this.getChannel(), "desc", this, this.getEnergyStored(), this.getMaxEnergyStored());
}
@Override
public Packet getGUIPacket()
{
return this.getDescriptionPacket();
}
@Override
public Class<? extends Container> getContainer()
{
return ContainerBatteryBox.class;
}
@Override
public String getInvName()
{
return LanguageRegistry.instance().getStringLocalization("tile.batterybox.name");
}
@Override
public int getInventoryStackLimit()
{
return 1;
}
@Override
public boolean isInvNameLocalized()
{
return true;
}
@Override
public int[] getAccessibleSlotsFromSide(int slotID)
{
return new int[] { 0, 1 };
}
}

View file

@ -14,8 +14,8 @@ import net.minecraftforge.common.ForgeDirection;
import org.lwjgl.input.Keyboard; import org.lwjgl.input.Keyboard;
import resonantinduction.Reference; import resonantinduction.Reference;
import resonantinduction.core.ResonantInduction;
import resonantinduction.core.ResonantInductionTabs; import resonantinduction.core.ResonantInductionTabs;
import resonantinduction.core.Settings;
import resonantinduction.core.Utility; import resonantinduction.core.Utility;
import resonantinduction.energy.wire.flat.PartFlatWire; import resonantinduction.energy.wire.flat.PartFlatWire;
import resonantinduction.energy.wire.flat.RenderFlatWire; import resonantinduction.energy.wire.flat.RenderFlatWire;
@ -40,7 +40,7 @@ public class ItemWire extends JItemMultiPart
public ItemWire(int id) public ItemWire(int id)
{ {
super(ResonantInduction.CONFIGURATION.get(Configuration.CATEGORY_ITEM, "wire", id).getInt(id)); super(Settings.CONFIGURATION.get(Configuration.CATEGORY_ITEM, "wire", id).getInt(id));
this.setUnlocalizedName(Reference.PREFIX + "wire"); this.setUnlocalizedName(Reference.PREFIX + "wire");
this.setCreativeTab(ResonantInductionTabs.CORE); this.setCreativeTab(ResonantInductionTabs.CORE);
this.setHasSubtypes(true); this.setHasSubtypes(true);
@ -128,7 +128,7 @@ public class ItemWire extends JItemMultiPart
RenderFlatWire.flatWireTexture = register.registerIcon(Reference.PREFIX + "models/flatWire"); RenderFlatWire.flatWireTexture = register.registerIcon(Reference.PREFIX + "models/flatWire");
RenderPartWire.wireIcon = register.registerIcon(Reference.PREFIX + "models/wire"); RenderPartWire.wireIcon = register.registerIcon(Reference.PREFIX + "models/wire");
RenderPartWire.insulationIcon = register.registerIcon(Reference.PREFIX + "models/insulation" + (ResonantInduction.LO_FI_INSULATION ? "tiny" : "")); RenderPartWire.insulationIcon = register.registerIcon(Reference.PREFIX + "models/insulation" + (Settings.LO_FI_INSULATION ? "tiny" : ""));
} }
@Override @Override

View file

@ -10,24 +10,23 @@ import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.MovingObjectPosition; import net.minecraft.util.MovingObjectPosition;
import net.minecraft.world.World; import net.minecraft.world.World;
import resonantinduction.blocks.BlockAssembly;
import resonantinduction.client.render.BlockRenderingHandler; import resonantinduction.client.render.BlockRenderingHandler;
import resonantinduction.client.render.RenderArmbot; import resonantinduction.client.render.RenderArmbot;
import resonantinduction.transport.ResonantInductionTransport; import resonantinduction.core.Settings;
import universalelectricity.api.UniversalElectricity; import universalelectricity.api.UniversalElectricity;
import calclavia.lib.multiblock.link.IMultiBlock; import calclavia.lib.multiblock.link.IMultiBlock;
import com.builtbroken.common.Pair; import com.builtbroken.common.Pair;
import com.builtbroken.minecraft.prefab.BlockMachine;
import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly; import cpw.mods.fml.relauncher.SideOnly;
public class BlockArmbot extends BlockAssembly public class BlockArmbot extends BlockMachine
{ {
public BlockArmbot() public BlockArmbot()
{ {
super("armbot", UniversalElectricity.machine); super(Settings.CONFIGURATION,"armbot", UniversalElectricity.machine);
DarkCore.requestMultiBlock(ResonantInductionTransport.MOD_ID);
} }
@Override @Override

View file

@ -13,6 +13,7 @@ import resonantinduction.api.coding.IProgrammableMachine;
import resonantinduction.api.coding.ITask; import resonantinduction.api.coding.ITask;
import resonantinduction.api.coding.TaskRegistry; import resonantinduction.api.coding.TaskRegistry;
import universalelectricity.api.vector.Vector2; import universalelectricity.api.vector.Vector2;
import calclavia.lib.utility.NBTUtility;
public class Program implements IProgram public class Program implements IProgram
{ {
@ -282,7 +283,7 @@ public class Program implements IProgram
taskList = new NBTTagList(); taskList = new NBTTagList();
for (Entry<String, Object> var : this.varables.entrySet()) for (Entry<String, Object> var : this.varables.entrySet())
{ {
taskList.appendTag(NBTFileHelper.saveObject(var.getKey(), var.getValue())); taskList.appendTag(NBTUtility.saveObject(var.getKey(), var.getValue()));
} }
nbt.setTag("vars", taskList); nbt.setTag("vars", taskList);
return nbt; return nbt;
@ -332,7 +333,7 @@ public class Program implements IProgram
for (int s = 0; s < taskList.tagCount(); ++s) for (int s = 0; s < taskList.tagCount(); ++s)
{ {
NBTTagCompound tag = (NBTTagCompound) taskList.tagAt(s); NBTTagCompound tag = (NBTTagCompound) taskList.tagAt(s);
this.varables.put(tag.getName(), NBTFileHelper.loadObject(tag, tag.getName())); this.varables.put(tag.getName(), NBTUtility.loadObject(tag, tag.getName()));
} }
} }

View file

@ -10,6 +10,7 @@ import resonantinduction.api.coding.IProgrammableMachine;
import resonantinduction.api.coding.ITask; import resonantinduction.api.coding.ITask;
import resonantinduction.api.coding.args.ArgumentData; import resonantinduction.api.coding.args.ArgumentData;
import universalelectricity.api.vector.Vector2; import universalelectricity.api.vector.Vector2;
import calclavia.lib.utility.NBTUtility;
/** @author DarkGuardsman */ /** @author DarkGuardsman */
public abstract class TaskBase implements ITask public abstract class TaskBase implements ITask
@ -137,7 +138,7 @@ public abstract class TaskBase implements ITask
NBTTagCompound parms = nbt.getCompoundTag("args"); NBTTagCompound parms = nbt.getCompoundTag("args");
for (ArgumentData arg : this.getArgs()) for (ArgumentData arg : this.getArgs())
{ {
Object obj = NBTFileHelper.loadObject(parms, arg.getName()); Object obj = NBTUtility.loadObject(parms, arg.getName());
if (arg.isValid(obj)) if (arg.isValid(obj))
{ {
arg.setData(obj); arg.setData(obj);
@ -154,7 +155,7 @@ public abstract class TaskBase implements ITask
NBTTagCompound parms = new NBTTagCompound(); NBTTagCompound parms = new NBTTagCompound();
for (ArgumentData arg : this.getArgs()) for (ArgumentData arg : this.getArgs())
{ {
NBTFileHelper.saveObject(parms, arg.getName(), arg.getData()); NBTUtility.saveObject(parms, arg.getName(), arg.getData());
} }
nbt.setCompoundTag("args", parms); nbt.setCompoundTag("args", parms);
} }

View file

@ -12,6 +12,7 @@ import net.minecraftforge.common.ForgeDirection;
import resonantinduction.api.IArmbot; import resonantinduction.api.IArmbot;
import resonantinduction.api.coding.IProgram; import resonantinduction.api.coding.IProgram;
import resonantinduction.api.coding.ProgramHelper; import resonantinduction.api.coding.ProgramHelper;
import resonantinduction.core.ResonantInduction;
import resonantinduction.core.recipe.RecipeLoader; import resonantinduction.core.recipe.RecipeLoader;
import resonantinduction.mechanics.armbot.command.TaskDrop; import resonantinduction.mechanics.armbot.command.TaskDrop;
import resonantinduction.mechanics.armbot.command.TaskGOTO; import resonantinduction.mechanics.armbot.command.TaskGOTO;
@ -23,19 +24,21 @@ import resonantinduction.transport.TileEntityAssembly;
import resonantinduction.transport.encoder.ItemDisk; import resonantinduction.transport.encoder.ItemDisk;
import universalelectricity.api.vector.Vector2; import universalelectricity.api.vector.Vector2;
import universalelectricity.api.vector.Vector3; import universalelectricity.api.vector.Vector3;
import calclavia.lib.multiblock.link.IBlockActivate;
import calclavia.lib.multiblock.link.IMultiBlock; import calclavia.lib.multiblock.link.IMultiBlock;
import calclavia.lib.network.PacketHandler; import calclavia.lib.network.PacketHandler;
import calclavia.lib.utility.HelperMethods;
import calclavia.lib.utility.LanguageUtility;
import calclavia.lib.utility.MathHelper;
import com.builtbroken.common.Pair; import com.builtbroken.common.Pair;
import com.builtbroken.minecraft.helpers.HelperMethods;
import com.builtbroken.minecraft.helpers.MathHelper;
import com.google.common.io.ByteArrayDataInput; import com.google.common.io.ByteArrayDataInput;
import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.network.Player; import cpw.mods.fml.common.network.Player;
import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.Side;
public class TileEntityArmbot extends TileEntityAssembly implements IMultiBlock, IArmbot, IBlockActivated public class TileEntityArmbot extends TileEntityAssembly implements IMultiBlock, IArmbot, IBlockActivate
{ {
protected int ROTATION_SPEED = 6; protected int ROTATION_SPEED = 6;
@ -194,7 +197,7 @@ public class TileEntityArmbot extends TileEntityAssembly implements IMultiBlock,
@Override @Override
public String getInvName() public String getInvName()
{ {
return TranslationHelper.getLocal("tile.armbot.name"); return LanguageUtility.getLocal("tile.armbot.name");
} }
public String getCommandDisplayText() public String getCommandDisplayText()
@ -298,7 +301,7 @@ public class TileEntityArmbot extends TileEntityAssembly implements IMultiBlock,
@Override @Override
public Packet getDescriptionPacket() public Packet getDescriptionPacket()
{ {
return ResonantInductionTransport.getTilePacket().getPacket(this, "armbot", this.functioning, this.targetYaw, this.targetPitch, this.actualYaw, this.actualPitch); return ResonantInduction.getTilePacket().getPacket(this, "armbot", this.functioning, this.targetYaw, this.targetPitch, this.actualYaw, this.actualPitch);
} }
public void sendGrabItemToClient() public void sendGrabItemToClient()

View file

@ -12,9 +12,9 @@ import resonantinduction.api.coding.ITask;
import resonantinduction.mechanics.armbot.TaskBaseArmbot; import resonantinduction.mechanics.armbot.TaskBaseArmbot;
import resonantinduction.mechanics.armbot.TaskBaseProcess; import resonantinduction.mechanics.armbot.TaskBaseProcess;
import universalelectricity.api.vector.Vector3; import universalelectricity.api.vector.Vector3;
import calclavia.lib.utility.HelperMethods;
import com.builtbroken.common.Pair; import com.builtbroken.common.Pair;
import com.builtbroken.minecraft.helpers.HelperMethods;
/** /**
* Used by arms to break a specific block in a position. * Used by arms to break a specific block in a position.

View file

@ -18,7 +18,6 @@ import universalelectricity.api.vector.Vector3;
import calclavia.lib.utility.InvInteractionHelper; import calclavia.lib.utility.InvInteractionHelper;
import com.builtbroken.common.science.units.UnitHelper; import com.builtbroken.common.science.units.UnitHelper;
import com.builtbroken.minecraft.helpers.MathHelper;
public class TaskGive extends TaskBaseArmbot public class TaskGive extends TaskBaseArmbot
{ {

View file

@ -10,7 +10,6 @@ import resonantinduction.mechanics.armbot.TaskBaseProcess;
import universalelectricity.api.vector.Vector2; import universalelectricity.api.vector.Vector2;
import com.builtbroken.common.science.units.UnitHelper; import com.builtbroken.common.science.units.UnitHelper;
import com.builtbroken.minecraft.helpers.MathHelper;
/** /**
* Rotates an armbot by a set amount * Rotates an armbot by a set amount

View file

@ -10,7 +10,6 @@ import resonantinduction.mechanics.armbot.TaskBaseProcess;
import universalelectricity.api.vector.Vector2; import universalelectricity.api.vector.Vector2;
import com.builtbroken.common.science.units.UnitHelper; import com.builtbroken.common.science.units.UnitHelper;
import com.builtbroken.minecraft.helpers.MathHelper;
/** /**
* Rotates the armbot to a specific direction. * Rotates the armbot to a specific direction.

View file

@ -17,7 +17,6 @@ import universalelectricity.api.vector.Vector3;
import calclavia.lib.utility.InvInteractionHelper; import calclavia.lib.utility.InvInteractionHelper;
import com.builtbroken.common.science.units.UnitHelper; import com.builtbroken.common.science.units.UnitHelper;
import com.builtbroken.minecraft.helpers.MathHelper;
public class TaskTake extends TaskBaseArmbot public class TaskTake extends TaskBaseArmbot
{ {

View file

@ -2,13 +2,13 @@ package resonantinduction.mechanics.machine.mining;
import java.awt.Color; import java.awt.Color;
import resonantinduction.api.events.LaserEvent;
import net.minecraft.network.packet.Packet; import net.minecraft.network.packet.Packet;
import net.minecraft.util.DamageSource; import net.minecraft.util.DamageSource;
import net.minecraft.util.EnumMovingObjectType; import net.minecraft.util.EnumMovingObjectType;
import net.minecraft.util.MovingObjectPosition; import net.minecraft.util.MovingObjectPosition;
import net.minecraftforge.common.ForgeDirection; import net.minecraftforge.common.ForgeDirection;
import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.common.MinecraftForge;
import resonantinduction.api.events.LaserEvent;
import universalelectricity.api.vector.Vector3; import universalelectricity.api.vector.Vector3;
import calclavia.lib.network.PacketHandler; import calclavia.lib.network.PacketHandler;
import calclavia.lib.utility.RayTraceHelper; import calclavia.lib.utility.RayTraceHelper;

View file

@ -2,13 +2,13 @@ package resonantinduction.mechanics.machine.mining;
import java.awt.Color; import java.awt.Color;
import resonantinduction.api.events.LaserEvent;
import net.minecraft.network.packet.Packet; import net.minecraft.network.packet.Packet;
import net.minecraft.util.DamageSource; import net.minecraft.util.DamageSource;
import net.minecraft.util.EnumMovingObjectType; import net.minecraft.util.EnumMovingObjectType;
import net.minecraft.util.MovingObjectPosition; import net.minecraft.util.MovingObjectPosition;
import net.minecraftforge.common.ForgeDirection; import net.minecraftforge.common.ForgeDirection;
import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.common.MinecraftForge;
import resonantinduction.api.events.LaserEvent;
import universalelectricity.api.vector.Vector3; import universalelectricity.api.vector.Vector3;
import calclavia.lib.network.PacketHandler; import calclavia.lib.network.PacketHandler;
import calclavia.lib.utility.RayTraceHelper; import calclavia.lib.utility.RayTraceHelper;

View file

@ -13,7 +13,6 @@ import net.minecraft.util.Icon;
import net.minecraft.util.MathHelper; import net.minecraft.util.MathHelper;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.common.ForgeDirection; import net.minecraftforge.common.ForgeDirection;
import resonantinduction.blocks.BlockAssembly;
import universalelectricity.api.vector.Vector3; import universalelectricity.api.vector.Vector3;
import com.builtbroken.minecraft.interfaces.IRotatable; import com.builtbroken.minecraft.interfaces.IRotatable;

View file

@ -9,8 +9,6 @@ import java.util.zip.ZipInputStream;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World; import net.minecraft.world.World;
import resonantinduction.energy.battery.ContainerBatteryBox;
import resonantinduction.energy.battery.TileBatteryBox;
import resonantinduction.mechanics.generator.steam.TileEntitySteamGen; import resonantinduction.mechanics.generator.steam.TileEntitySteamGen;
import resonantinduction.mechanics.processor.ContainerProcessor; import resonantinduction.mechanics.processor.ContainerProcessor;
import resonantinduction.mechanics.processor.TileEntityProcessor; import resonantinduction.mechanics.processor.TileEntityProcessor;

View file

@ -16,7 +16,6 @@ import net.minecraftforge.oredict.OreDictionary;
import org.modstats.Modstats; import org.modstats.Modstats;
import resonantinduction.api.coding.TaskRegistry; import resonantinduction.api.coding.TaskRegistry;
import resonantinduction.blocks.BlockBasalt;
import resonantinduction.blocks.BlockColorGlass; import resonantinduction.blocks.BlockColorGlass;
import resonantinduction.blocks.BlockColorGlowGlass; import resonantinduction.blocks.BlockColorGlowGlass;
import resonantinduction.blocks.BlockColorSand; import resonantinduction.blocks.BlockColorSand;
@ -41,8 +40,6 @@ import resonantinduction.core.resource.ItemBlockOre;
import resonantinduction.core.resource.ItemOreDirv; import resonantinduction.core.resource.ItemOreDirv;
import resonantinduction.core.resource.ItemParts; import resonantinduction.core.resource.ItemParts;
import resonantinduction.core.resource.ItemParts.Parts; import resonantinduction.core.resource.ItemParts.Parts;
import resonantinduction.energy.battery.BlockBatteryBox;
import resonantinduction.energy.battery.ItemBlockEnergyStorage;
import resonantinduction.mechanics.armbot.BlockArmbot; import resonantinduction.mechanics.armbot.BlockArmbot;
import resonantinduction.mechanics.armbot.command.TaskBreak; import resonantinduction.mechanics.armbot.command.TaskBreak;
import resonantinduction.mechanics.armbot.command.TaskDrop; import resonantinduction.mechanics.armbot.command.TaskDrop;

View file

@ -4,12 +4,12 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Random; import java.util.Random;
import resonatninduction.tilenetwork.INetworkEnergyPart;
import resonatninduction.tilenetwork.ITileNetwork;
import resonatninduction.tilenetwork.prefab.NetworkSharedPower;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.AxisAlignedBB;
import net.minecraftforge.common.ForgeDirection; import net.minecraftforge.common.ForgeDirection;
import resonatninduction.tilenetwork.INetworkEnergyPart;
import resonatninduction.tilenetwork.ITileNetwork;
import resonatninduction.tilenetwork.prefab.NetworkSharedPower;
import universalelectricity.api.vector.Vector3; import universalelectricity.api.vector.Vector3;
import com.builtbroken.minecraft.prefab.TileEntityEnergyMachine; import com.builtbroken.minecraft.prefab.TileEntityEnergyMachine;

View file

@ -10,7 +10,6 @@ import net.minecraft.util.Icon;
import net.minecraft.world.IBlockAccess; import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World; import net.minecraft.world.World;
import resonantinduction.Reference; import resonantinduction.Reference;
import resonantinduction.blocks.BlockAssembly;
import resonantinduction.core.Settings; import resonantinduction.core.Settings;
import resonantinduction.transport.ResonantInductionTransport; import resonantinduction.transport.ResonantInductionTransport;

View file

@ -11,7 +11,6 @@ import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList; import net.minecraft.nbt.NBTTagList;
import resonantinduction.Reference; import resonantinduction.Reference;
import resonantinduction.core.ResonantInductionTabs; import resonantinduction.core.ResonantInductionTabs;
import resonantinduction.transport.ResonantInductionTransport;
import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly; import cpw.mods.fml.relauncher.SideOnly;
@ -21,7 +20,7 @@ public class ItemDisk extends Item
{ {
super(id); super(id);
this.setUnlocalizedName("disk"); this.setUnlocalizedName("disk");
this.setCreativeTab(ResonantInductionTabs.tabAutomation()); this.setCreativeTab(ResonantInductionTabs.CORE);
this.setHasSubtypes(true); this.setHasSubtypes(true);
} }

View file

@ -123,7 +123,7 @@ public class TileEntityEncoder extends TileEntityMachine implements ISidedInvent
if (dis.readBoolean()) if (dis.readBoolean())
{ {
Program program = new Program(); Program program = new Program();
program.load(PacketHandler.instance().readNBTTagCompound(dis)); program.load(PacketHandler.readNBTTagCompound(dis));
this.program = program; this.program = program;
} }
else else
@ -139,7 +139,7 @@ public class TileEntityEncoder extends TileEntityMachine implements ISidedInvent
{ {
ITask task = TaskRegistry.getCommand(dis.readUTF()); ITask task = TaskRegistry.getCommand(dis.readUTF());
task.setPosition(dis.readInt(), dis.readInt()); task.setPosition(dis.readInt(), dis.readInt());
task.load(PacketHandler.instance().readNBTTagCompound(dis)); task.load(PacketHandler.readNBTTagCompound(dis));
this.getProgram().setTaskAt(task.getCol(), task.getRow(), task); this.getProgram().setTaskAt(task.getCol(), task.getRow(), task);
this.sendGUIPacket(); this.sendGUIPacket();
return true; return true;
@ -148,7 +148,7 @@ public class TileEntityEncoder extends TileEntityMachine implements ISidedInvent
{ {
ITask task = TaskRegistry.getCommand(dis.readUTF()); ITask task = TaskRegistry.getCommand(dis.readUTF());
task.setPosition(dis.readInt(), dis.readInt()); task.setPosition(dis.readInt(), dis.readInt());
task.load(PacketHandler.instance().readNBTTagCompound(dis)); task.load(PacketHandler.readNBTTagCompound(dis));
this.getProgram().insertTask(task.getCol(), task.getRow(), task); this.getProgram().insertTask(task.getCol(), task.getRow(), task);
this.sendGUIPacket(); this.sendGUIPacket();
return true; return true;

View file

@ -10,7 +10,6 @@ import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.MathHelper; import net.minecraft.util.MathHelper;
import net.minecraft.util.MovingObjectPosition; import net.minecraft.util.MovingObjectPosition;
import net.minecraft.world.World; import net.minecraft.world.World;
import resonantinduction.blocks.BlockHydraulic;
import resonantinduction.client.render.BlockRenderHelper; import resonantinduction.client.render.BlockRenderHelper;
import resonantinduction.core.Settings; import resonantinduction.core.Settings;
import calclavia.lib.utility.FluidHelper; import calclavia.lib.utility.FluidHelper;

View file

@ -8,7 +8,6 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.MathHelper; import net.minecraft.util.MathHelper;
import net.minecraft.world.World; import net.minecraft.world.World;
import resonantinduction.blocks.BlockHydraulic;
import resonantinduction.core.Settings; import resonantinduction.core.Settings;
import resonantinduction.mechanics.generator.steam.TileEntitySteamPiston; import resonantinduction.mechanics.generator.steam.TileEntitySteamPiston;

View file

@ -10,8 +10,8 @@ import resonantinduction.api.fluid.INetworkPipe;
import resonantinduction.transport.fluid.network.NetworkPipes; import resonantinduction.transport.fluid.network.NetworkPipes;
import resonantinduction.transport.fluid.prefab.TileEntityFluidDevice; import resonantinduction.transport.fluid.prefab.TileEntityFluidDevice;
import resonatninduction.tilenetwork.ITileConnector; import resonatninduction.tilenetwork.ITileConnector;
import calclavia.lib.utility.HelperMethods;
import com.builtbroken.minecraft.helpers.HelperMethods;
import com.builtbroken.minecraft.interfaces.IReadOut; import com.builtbroken.minecraft.interfaces.IReadOut;
public class TileEntityReleaseValve extends TileEntityFluidDevice implements ITileConnector, IReadOut public class TileEntityReleaseValve extends TileEntityFluidDevice implements ITileConnector, IReadOut

View file

@ -2,10 +2,10 @@ package resonantinduction.transport.fluid.prefab;
import java.util.Random; import java.util.Random;
import resonatninduction.tilenetwork.ITileConnector;
import resonatninduction.tilenetwork.prefab.NetworkTileEntities;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraftforge.common.ForgeDirection; import net.minecraftforge.common.ForgeDirection;
import resonatninduction.tilenetwork.ITileConnector;
import resonatninduction.tilenetwork.prefab.NetworkTileEntities;
import calclavia.lib.prefab.tile.TileAdvanced; import calclavia.lib.prefab.tile.TileAdvanced;
import com.builtbroken.minecraft.interfaces.IReadOut; import com.builtbroken.minecraft.interfaces.IReadOut;

View file

@ -13,10 +13,10 @@ import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.MathHelper; import net.minecraft.util.MathHelper;
import net.minecraft.util.MovingObjectPosition; import net.minecraft.util.MovingObjectPosition;
import net.minecraft.world.World; import net.minecraft.world.World;
import resonantinduction.Reference;
import resonantinduction.client.render.BlockRenderHelper; import resonantinduction.client.render.BlockRenderHelper;
import resonantinduction.core.Settings; import resonantinduction.core.Settings;
import resonantinduction.core.recipe.RecipeLoader; import resonantinduction.core.recipe.RecipeLoader;
import resonantinduction.transport.ResonantInductionTransport;
import resonatninduction.tilenetwork.prefab.NetworkTileEntities; import resonatninduction.tilenetwork.prefab.NetworkTileEntities;
import com.builtbroken.common.Pair; import com.builtbroken.common.Pair;
@ -40,7 +40,7 @@ public class BlockConstructionPump extends BlockMachine
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public void registerIcons(IconRegister par1IconRegister) public void registerIcons(IconRegister par1IconRegister)
{ {
this.blockIcon = par1IconRegister.registerIcon(ResonantInductionTransport.PREFIX + "ironMachineSide"); this.blockIcon = par1IconRegister.registerIcon(Reference.PREFIX + "ironMachineSide");
} }
@Override @Override

View file

@ -14,8 +14,8 @@ import net.minecraft.util.MathHelper;
import net.minecraft.world.IBlockAccess; import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.common.ForgeDirection; import net.minecraftforge.common.ForgeDirection;
import resonantinduction.Reference;
import resonantinduction.core.Settings; import resonantinduction.core.Settings;
import resonantinduction.transport.ResonantInductionTransport;
import com.builtbroken.common.Pair; import com.builtbroken.common.Pair;
import com.builtbroken.minecraft.prefab.BlockMachine; import com.builtbroken.minecraft.prefab.BlockMachine;
@ -40,9 +40,9 @@ public class BlockDrain extends BlockMachine
@Override @Override
public void registerIcons(IconRegister par1IconRegister) public void registerIcons(IconRegister par1IconRegister)
{ {
this.blockIcon = par1IconRegister.registerIcon(ResonantInductionTransport.PREFIX + "ironMachineSide"); this.blockIcon = par1IconRegister.registerIcon(Reference.PREFIX + "ironMachineSide");
this.drainIcon = par1IconRegister.registerIcon(ResonantInductionTransport.PREFIX + "drain"); this.drainIcon = par1IconRegister.registerIcon(Reference.PREFIX + "drain");
this.fillIcon = par1IconRegister.registerIcon(ResonantInductionTransport.PREFIX + "drain2"); this.fillIcon = par1IconRegister.registerIcon(Reference.PREFIX + "drain2");
} }
@Override @Override

View file

@ -6,6 +6,7 @@ import java.util.Set;
import net.minecraft.block.material.Material; import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.AxisAlignedBB;
@ -14,7 +15,6 @@ import net.minecraft.util.Icon;
import net.minecraft.world.IBlockAccess; import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World; import net.minecraft.world.World;
import resonantinduction.client.render.RenderAdvancedHopper; import resonantinduction.client.render.RenderAdvancedHopper;
import resonantinduction.core.ResonantInductionTabs;
import resonantinduction.core.Settings; import resonantinduction.core.Settings;
import com.builtbroken.common.Pair; import com.builtbroken.common.Pair;
@ -40,7 +40,7 @@ public class BlockAdvancedHopper extends BlockMachine
public BlockAdvancedHopper() public BlockAdvancedHopper()
{ {
super(Settings.CONFIGURATION, "DMHopper", Material.iron); super(Settings.CONFIGURATION, "DMHopper", Material.iron);
this.setCreativeTab(ResonantInductionTabs.tabAutomation()); this.setCreativeTab(CreativeTabs.tabRedstone);
this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F); this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
} }

View file

@ -9,10 +9,9 @@ import net.minecraftforge.common.ForgeDirection;
import resonantinduction.transport.imprinter.ItemImprinter; import resonantinduction.transport.imprinter.ItemImprinter;
import resonantinduction.transport.imprinter.TileEntityFilterable; import resonantinduction.transport.imprinter.TileEntityFilterable;
import universalelectricity.api.vector.Vector3; import universalelectricity.api.vector.Vector3;
import calclavia.lib.utility.HelperMethods;
import calclavia.lib.utility.InvInteractionHelper; import calclavia.lib.utility.InvInteractionHelper;
import com.builtbroken.minecraft.helpers.HelperMethods;
/** /**
* Advanced version of the hopper with features such as redstone control, sorting, filtering, and * Advanced version of the hopper with features such as redstone control, sorting, filtering, and
* crate version. * crate version.

View file

@ -13,6 +13,7 @@ import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.Icon; import net.minecraft.util.Icon;
import net.minecraft.world.IBlockAccess; import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World; import net.minecraft.world.World;
import resonantinduction.Reference;
import resonantinduction.core.Settings; import resonantinduction.core.Settings;
import resonantinduction.mechanics.CommonProxy; import resonantinduction.mechanics.CommonProxy;
import resonantinduction.transport.ResonantInductionTransport; import resonantinduction.transport.ResonantInductionTransport;
@ -38,9 +39,9 @@ public class BlockImprinter extends BlockMachine
@Override @Override
public void registerIcons(IconRegister iconReg) public void registerIcons(IconRegister iconReg)
{ {
this.imprinter_side = iconReg.registerIcon(ResonantInductionTransport.PREFIX + "imprinter_side"); this.imprinter_side = iconReg.registerIcon(Reference.PREFIX + "imprinter_side");
this.imprinter_top = iconReg.registerIcon(ResonantInductionTransport.PREFIX + "imprinter_top"); this.imprinter_top = iconReg.registerIcon(Reference.PREFIX + "imprinter_top");
this.imprinter_bottom = iconReg.registerIcon(ResonantInductionTransport.PREFIX + "imprinter_bottom"); this.imprinter_bottom = iconReg.registerIcon(Reference.PREFIX + "imprinter_bottom");
} }
@Override @Override

View file

@ -13,9 +13,9 @@ import net.minecraft.item.Item;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList; import net.minecraft.nbt.NBTTagList;
import resonantinduction.Reference;
import resonantinduction.core.ResonantInductionTabs; import resonantinduction.core.ResonantInductionTabs;
import resonantinduction.core.Settings; import resonantinduction.core.Settings;
import resonantinduction.transport.ResonantInductionTransport;
import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly; import cpw.mods.fml.relauncher.SideOnly;
@ -25,7 +25,7 @@ public class ItemImprinter extends Item
{ {
super(Settings.CONFIGURATION.getItem("imprint", id).getInt()); super(Settings.CONFIGURATION.getItem("imprint", id).getInt());
this.setUnlocalizedName("imprint"); this.setUnlocalizedName("imprint");
this.setCreativeTab(ResonantInductionTabs.tabAutomation()); this.setCreativeTab(ResonantInductionTabs.CORE);
this.setHasSubtypes(true); this.setHasSubtypes(true);
this.maxStackSize = 1; this.maxStackSize = 1;
} }
@ -34,7 +34,7 @@ public class ItemImprinter extends Item
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public void registerIcons(IconRegister par1IconRegister) public void registerIcons(IconRegister par1IconRegister)
{ {
this.itemIcon = par1IconRegister.registerIcon(ResonantInductionTransport.PREFIX + "imprint"); this.itemIcon = par1IconRegister.registerIcon(Reference.PREFIX + "imprint");
} }
@Override @Override

View file

@ -18,6 +18,7 @@ import universalelectricity.api.vector.Vector3;
import calclavia.lib.prefab.tile.TileAdvanced; import calclavia.lib.prefab.tile.TileAdvanced;
import calclavia.lib.utility.AutoCraftingManager; import calclavia.lib.utility.AutoCraftingManager;
import calclavia.lib.utility.AutoCraftingManager.IAutoCrafter; import calclavia.lib.utility.AutoCraftingManager.IAutoCrafter;
import calclavia.lib.utility.LanguageUtility;
import com.builtbroken.common.Pair; import com.builtbroken.common.Pair;
import com.builtbroken.minecraft.prefab.invgui.ISlotPickResult; import com.builtbroken.minecraft.prefab.invgui.ISlotPickResult;
@ -167,7 +168,7 @@ public class TileEntityImprinter extends TileAdvanced implements ISidedInventory
@Override @Override
public String getInvName() public String getInvName()
{ {
return TranslationUtility.getLocal("tile.imprinter.name"); return LanguageUtility.getLocal("tile.imprinter.name");
} }
@Override @Override

View file

@ -14,8 +14,8 @@ import net.minecraft.util.MathHelper;
import net.minecraft.world.IBlockAccess; import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.common.ForgeDirection; import net.minecraftforge.common.ForgeDirection;
import resonantinduction.Reference;
import resonantinduction.client.render.RenderDetector; import resonantinduction.client.render.RenderDetector;
import resonantinduction.transport.ResonantInductionTransport;
import resonantinduction.transport.imprinter.BlockImprintable; import resonantinduction.transport.imprinter.BlockImprintable;
import universalelectricity.api.UniversalElectricity; import universalelectricity.api.UniversalElectricity;
@ -74,8 +74,8 @@ public class BlockDetector extends BlockImprintable
public void registerIcons(IconRegister iconReg) public void registerIcons(IconRegister iconReg)
{ {
super.registerIcons(iconReg); super.registerIcons(iconReg);
this.eye_green = iconReg.registerIcon(ResonantInductionTransport.PREFIX + "detector_green"); this.eye_green = iconReg.registerIcon(Reference.PREFIX + "detector_green");
this.eye_red = iconReg.registerIcon(ResonantInductionTransport.PREFIX + "detector_red"); this.eye_red = iconReg.registerIcon(Reference.PREFIX + "detector_red");
} }
@Override @Override

View file

@ -8,9 +8,9 @@ import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.Icon; import net.minecraft.util.Icon;
import net.minecraft.world.World; import net.minecraft.world.World;
import resonantinduction.Reference;
import resonantinduction.client.render.BlockRenderingHandler; import resonantinduction.client.render.BlockRenderingHandler;
import resonantinduction.client.render.RenderRejector; import resonantinduction.client.render.RenderRejector;
import resonantinduction.transport.ResonantInductionTransport;
import resonantinduction.transport.imprinter.BlockImprintable; import resonantinduction.transport.imprinter.BlockImprintable;
import universalelectricity.api.UniversalElectricity; import universalelectricity.api.UniversalElectricity;
@ -59,8 +59,8 @@ public class BlockRejector extends BlockImprintable
@Override @Override
public void registerIcons(IconRegister par1IconRegister) public void registerIcons(IconRegister par1IconRegister)
{ {
this.blockIcon = par1IconRegister.registerIcon(ResonantInductionTransport.PREFIX + "imprinter_bottom"); this.blockIcon = par1IconRegister.registerIcon(Reference.PREFIX + "imprinter_bottom");
this.front = par1IconRegister.registerIcon(ResonantInductionTransport.PREFIX + "disk_tray"); this.front = par1IconRegister.registerIcon(Reference.PREFIX + "disk_tray");
} }
@Override @Override

View file

@ -76,7 +76,7 @@ public class TileEntityDetector extends TileEntityFilterable
} }
} }
PacketHandler.instance().sendPacketToClients(getDescriptionPacket()); PacketHandler.sendPacketToClients(getDescriptionPacket());
} }
} }
} }

View file

@ -12,7 +12,7 @@ import net.minecraft.util.EnumMovingObjectType;
import net.minecraft.util.MovingObjectPosition; import net.minecraft.util.MovingObjectPosition;
import net.minecraft.util.Vec3; import net.minecraft.util.Vec3;
import net.minecraft.world.World; import net.minecraft.world.World;
import resonantinduction.core.ResonantInductionTabs; import resonantinduction.core.Settings;
/** /**
* Basic item used to spawn a vehicle * Basic item used to spawn a vehicle
@ -23,9 +23,8 @@ public class ItemVehicleSpawn extends Item
{ {
public ItemVehicleSpawn() public ItemVehicleSpawn()
{ {
super(DarkCore.getNextItemId()); super(Settings.CONFIGURATION.getItem("ItemCar",Settings.getNextItemID()).getInt());
this.setUnlocalizedName("Vehicle"); this.setUnlocalizedName("Vehicle");
this.setCreativeTab(ResonantInductionTabs.tabIndustrial());
} }
@Override @Override

View file

@ -3,9 +3,9 @@ package resonatninduction.tilenetwork.prefab;
import java.util.HashSet; import java.util.HashSet;
import java.util.Set; import java.util.Set;
import resonatninduction.tilenetwork.INetworkPart;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World; import net.minecraft.world.World;
import resonatninduction.tilenetwork.INetworkPart;
import universalelectricity.api.vector.Vector3; import universalelectricity.api.vector.Vector3;
import calclavia.lib.path.IPathCallBack; import calclavia.lib.path.IPathCallBack;
import calclavia.lib.path.Pathfinder; import calclavia.lib.path.Pathfinder;

View file

@ -3,9 +3,9 @@ package resonatninduction.tilenetwork.prefab;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import resonatninduction.tilenetwork.INetworkPart;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.common.ForgeDirection; import net.minecraftforge.common.ForgeDirection;
import resonatninduction.tilenetwork.INetworkPart;
/** /**
* Network that supplies resources to tiles that demand a set resource * Network that supplies resources to tiles that demand a set resource

View file

@ -1,8 +1,8 @@
package resonatninduction.tilenetwork.prefab; package resonatninduction.tilenetwork.prefab;
import net.minecraft.tileentity.TileEntity;
import resonatninduction.tilenetwork.INetworkEnergyPart; import resonatninduction.tilenetwork.INetworkEnergyPart;
import resonatninduction.tilenetwork.INetworkPart; import resonatninduction.tilenetwork.INetworkPart;
import net.minecraft.tileentity.TileEntity;
import com.builtbroken.minecraft.interfaces.IPowerLess; import com.builtbroken.minecraft.interfaces.IPowerLess;

View file

@ -5,10 +5,10 @@ import java.util.Iterator;
import java.util.List; import java.util.List;
import java.util.Set; import java.util.Set;
import resonatninduction.tilenetwork.INetworkPart;
import resonatninduction.tilenetwork.ITileNetwork;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.common.ForgeDirection; import net.minecraftforge.common.ForgeDirection;
import resonatninduction.tilenetwork.INetworkPart;
import resonatninduction.tilenetwork.ITileNetwork;
import universalelectricity.api.vector.Vector3; import universalelectricity.api.vector.Vector3;
import universalelectricity.api.vector.VectorHelper; import universalelectricity.api.vector.VectorHelper;
import calclavia.lib.path.Pathfinder; import calclavia.lib.path.Pathfinder;