mirror of
https://github.com/GTNewHorizons/Electro-Magic-Tools.git
synced 2026-11-20 03:59:36 +00:00
Commit for version 1.1.1. Last version before the BIG rewrite that will include RF support, and more!
This commit is contained in:
1 parent
1986c7a08f
commit
bfdc4d5f9c
348 files changed
+9602
-8919
No files matched your search
Binary file not shown.
@@ -54,11 +54,23 @@ public enum Direction {
|
||||
* @param tileEntity tile entity to check
|
||||
* @return Adjacent tile entity or null if none exists
|
||||
*/
|
||||
public TileEntity applyToTileEntity(TileEntity tileEntity) {
|
||||
int coords[] = { tileEntity.xCoord, tileEntity.yCoord, tileEntity.zCoord };
|
||||
public TileEntity applyToTileEntity(TileEntity te) {
|
||||
return applyTo(te.getWorldObj(), te.xCoord, te.yCoord, te.zCoord);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the tile entity next to a position following this direction.
|
||||
*
|
||||
* @param world World to check
|
||||
* @param x X coordinate to check from
|
||||
* @param y Y coordinate to check from
|
||||
* @param z Z coordinate to check from
|
||||
* @return Adjacent tile entity or null if none exists
|
||||
*/
|
||||
public TileEntity applyTo(World world, int x, int y, int z) {
|
||||
int coords[] = { x, y, z };
|
||||
|
||||
coords[dir/2] += getSign();
|
||||
World world = tileEntity.getWorldObj();
|
||||
|
||||
if (world != null && world.blockExists(coords[0], coords[1], coords[2])) {
|
||||
try {
|
||||
@@ -67,6 +79,7 @@ public enum Direction {
|
||||
throw new RuntimeException("error getting TileEntity at dim "+world.provider.dimensionId+" "+coords[0]+"/"+coords[1]+"/"+coords[2]);
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,4 @@
|
||||
@API(apiVersion="1.0", owner="IC2", provides="IC2API")
|
||||
package ic2.api.crops;
|
||||
import cpw.mods.fml.common.API;
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,4 @@
|
||||
@API(apiVersion="1.0", owner="IC2", provides="IC2API")
|
||||
package ic2.api.energy.event;
|
||||
import cpw.mods.fml.common.API;
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,4 @@
|
||||
@API(apiVersion="1.0", owner="IC2", provides="IC2API")
|
||||
package ic2.api.energy;
|
||||
import cpw.mods.fml.common.API;
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,4 @@
|
||||
@API(apiVersion="1.0", owner="IC2", provides="IC2API")
|
||||
package ic2.api.energy.prefab;
|
||||
import cpw.mods.fml.common.API;
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,24 @@
|
||||
package ic2.api.energy.tile;
|
||||
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public interface IHeatSource {
|
||||
|
||||
/*
|
||||
* Return max heat transmission peer Tick (only theoretical bandwidth not available amount)
|
||||
*/
|
||||
int maxrequestHeatTick(ForgeDirection directionFrom);
|
||||
|
||||
/*
|
||||
* @param requested amount of heat to transfer
|
||||
*
|
||||
* @return transmitted amount of heat
|
||||
*
|
||||
* example: You Request 100 units of heat but the Source have only 50 units left
|
||||
*
|
||||
* requestHeat(100) : return 50 : so 50 units of heat remove from HeatSource
|
||||
*/
|
||||
|
||||
int requestHeat(ForgeDirection directionFrom,int requestheat);
|
||||
|
||||
}
|
||||
Binary file not shown.
@@ -0,0 +1,4 @@
|
||||
@API(apiVersion="1.0", owner="IC2", provides="IC2API")
|
||||
package ic2.api.energy.tile;
|
||||
import cpw.mods.fml.common.API;
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,4 @@
|
||||
@API(apiVersion="1.0", owner="IC2", provides="IC2API")
|
||||
package ic2.api.event;
|
||||
import cpw.mods.fml.common.API;
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,4 @@
|
||||
@API(apiVersion="1.0", owner="IC2", provides="IC2API")
|
||||
package ic2.api.info;
|
||||
import cpw.mods.fml.common.API;
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,4 @@
|
||||
@API(apiVersion="1.0", owner="IC2", provides="IC2API")
|
||||
package ic2.api.item;
|
||||
import cpw.mods.fml.common.API;
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,4 @@
|
||||
@API(apiVersion="1.0", owner="IC2", provides="IC2API")
|
||||
package ic2.api.network;
|
||||
import cpw.mods.fml.common.API;
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,4 @@
|
||||
@API(apiVersion="1.0", owner="IC2", provides="IC2API")
|
||||
package ic2.api;
|
||||
import cpw.mods.fml.common.API;
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,4 @@
|
||||
@API(apiVersion="1.0", owner="IC2", provides="IC2API")
|
||||
package ic2.api.reactor;
|
||||
import cpw.mods.fml.common.API;
|
||||
|
||||
Binary file not shown.
@@ -1,5 +1,6 @@
|
||||
package ic2.api.recipe;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -26,6 +27,7 @@ public class RecipeInputOreDict implements IRecipeInput {
|
||||
List<ItemStack> inputs = OreDictionary.getOres(input);
|
||||
|
||||
for (ItemStack input1 : inputs) {
|
||||
if (input1.getItem() == null) continue; // ignore invalid
|
||||
int metaRequired = meta == null ? input1.getItemDamage() : meta;
|
||||
|
||||
if (subject.getItem() == input1.getItem() &&
|
||||
@@ -44,7 +46,14 @@ public class RecipeInputOreDict implements IRecipeInput {
|
||||
|
||||
@Override
|
||||
public List<ItemStack> getInputs() {
|
||||
return OreDictionary.getOres(input);
|
||||
List<ItemStack> ores = OreDictionary.getOres(input);
|
||||
List<ItemStack> ret = new ArrayList<ItemStack>(ores.size());
|
||||
|
||||
for (ItemStack stack : ores) {
|
||||
if (stack.getItem() != null) ret.add(stack); // ignore invalid
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,4 @@
|
||||
@API(apiVersion="1.0", owner="IC2", provides="IC2API")
|
||||
package ic2.api.recipe;
|
||||
import cpw.mods.fml.common.API;
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,4 @@
|
||||
@API(apiVersion="1.0", owner="IC2", provides="IC2API")
|
||||
package ic2.api.tile;
|
||||
import cpw.mods.fml.common.API;
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,4 @@
|
||||
@API(apiVersion="1.0", owner="IC2", provides="IC2API")
|
||||
package ic2.api.util;
|
||||
import cpw.mods.fml.common.API;
|
||||
|
||||
Reference in new issue
Block a user