Merge branch 'master' of https://github.com/calclavia/Resonant-Induction
This commit is contained in:
commit
23b939d7aa
5 changed files with 21 additions and 10 deletions
|
@ -9,6 +9,7 @@ import net.minecraft.item.Item;
|
|||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.common.Configuration;
|
||||
import net.minecraftforge.oredict.ShapedOreRecipe;
|
||||
import resonantinduction.api.IBattery;
|
||||
import resonantinduction.battery.BlockBattery;
|
||||
import resonantinduction.battery.ItemCapacitor;
|
||||
import resonantinduction.battery.TileEntityBattery;
|
||||
|
@ -192,26 +193,29 @@ public class ResonantInduction
|
|||
/**
|
||||
* Recipes
|
||||
*/
|
||||
ItemStack emptyCapacitor = new ItemStack(itemCapacitor);
|
||||
((IBattery) itemCapacitor).setEnergyStored(emptyCapacitor, 0);
|
||||
|
||||
/** Capacitor **/
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(itemCapacitor, "RRR", "RIR", "RRR", 'R', Item.redstone, 'I', Item.ingotIron));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(emptyCapacitor, "RRR", "RIR", "RRR", 'R', Item.redstone, 'I', Item.ingotIron));
|
||||
|
||||
/** Linker **/
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(itemLinker, " E ", "GCG", " E ", 'E', Item.eyeOfEnder, 'C', itemCapacitor, 'G', Item.ingotGold));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(itemLinker, " E ", "GCG", " E ", 'E', Item.eyeOfEnder, 'C', emptyCapacitor, 'G', Item.ingotGold));
|
||||
|
||||
/** Quantum Entangler **/
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(itemQuantumEntangler, "EEE", "ILI", "EEE", 'E', Item.eyeOfEnder, 'L', itemLinker, 'I', Item.ingotIron));
|
||||
|
||||
/** Tesla - by Jyzarc */
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(blockTesla, "EEE", " C ", " I ", 'E', Item.eyeOfEnder, 'C', itemCapacitor, 'I', Block.blockIron));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(blockTesla, "EEE", " C ", " I ", 'E', Item.eyeOfEnder, 'C', emptyCapacitor, 'I', Block.blockIron));
|
||||
|
||||
/** Multimeter */
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(blockMultimeter, "RRR", "ICI", "III", 'R', Item.redstone, 'C', itemCapacitor, 'I', Item.ingotIron));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(blockMultimeter, "RRR", "ICI", "III", 'R', Item.redstone, 'C', emptyCapacitor, 'I', Item.ingotIron));
|
||||
|
||||
/** Multimeter */
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(blockBattery, "III", "IRI", "III", 'R', Block.blockRedstone, 'I', Item.ingotIron));
|
||||
|
||||
/** EM Contractor */
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(blockEMContractor, " I ", "GCG", "WWW", 'W', Block.wood, 'C', itemCapacitor, 'G', Item.ingotGold, 'I', Item.ingotIron));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(blockEMContractor, " I ", "GCG", "WWW", 'W', Block.wood, 'C', emptyCapacitor, 'G', Item.ingotGold, 'I', Item.ingotIron));
|
||||
}
|
||||
|
||||
public static int loadLanguages(String languagePath, String[] languageSupported)
|
||||
|
|
|
@ -58,7 +58,7 @@ public class BlockEMContractor extends BlockBase implements ITileEntityProvider
|
|||
{
|
||||
contractor.setLink((TileEntityEMContractor) linkVec.getTileEntity(world), true);
|
||||
|
||||
if (!world.isRemote)
|
||||
if (world.isRemote)
|
||||
{
|
||||
entityPlayer.addChatMessage("Linked " + this.getLocalizedName() + " with " + " [" + (int) linkVec.x + ", " + (int) linkVec.y + ", " + (int) linkVec.z + "]");
|
||||
}
|
||||
|
|
|
@ -124,12 +124,12 @@ public class TileEntityEMContractor extends TileEntityBase implements IPacketRec
|
|||
}
|
||||
}
|
||||
|
||||
if (this.linked != null && !this.linked.isInvalid())
|
||||
if (!this.suck)
|
||||
{
|
||||
ResonantInduction.proxy.renderElectricShock(this.worldObj, new Vector3(this).translate(0.5), new Vector3(this).translate(new Vector3(this.getDirection())).translate(0.5), TileEntityTesla.dyeColors[dyeID]);
|
||||
|
||||
if (!this.suck)
|
||||
if (this.linked != null && !this.linked.isInvalid())
|
||||
{
|
||||
ResonantInduction.proxy.renderElectricShock(this.worldObj, new Vector3(this).translate(0.5), new Vector3(this).translate(new Vector3(this.getDirection())).translate(0.5), TileEntityTesla.dyeColors[dyeID]);
|
||||
|
||||
if (this.pathfinder != null)
|
||||
{
|
||||
for (int i = 0; i < this.pathfinder.results.size(); i++)
|
||||
|
@ -167,6 +167,11 @@ public class TileEntityEMContractor extends TileEntityBase implements IPacketRec
|
|||
}
|
||||
else
|
||||
{
|
||||
if (this.linked != null && !this.linked.isInvalid())
|
||||
{
|
||||
ResonantInduction.proxy.renderElectricShock(this.worldObj, new Vector3(this).translate(0.5), new Vector3(this).translate(new Vector3(this.getDirection())).translate(0.5), TileEntityTesla.dyeColors[dyeID]);
|
||||
}
|
||||
|
||||
this.pathfinder = null;
|
||||
|
||||
if (operationBounds != null)
|
||||
|
|
|
@ -22,6 +22,7 @@ public abstract class ItemCoordLink extends ItemBase
|
|||
public ItemCoordLink(String name, int id)
|
||||
{
|
||||
super(name, id);
|
||||
this.setMaxStackSize(1);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -114,6 +114,7 @@ public class TileEntityMultimeter extends TileEntityBase implements IPacketRecei
|
|||
this.toggleMode();
|
||||
break;
|
||||
case 3:
|
||||
System.out.println(this.energyLimit);
|
||||
this.energyLimit = input.readFloat();
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue