Merge branch 'development' of https://bitbucket.org/calclavia/resonant-induction into development
This commit is contained in:
commit
c2293c1d98
39 changed files with 169 additions and 137 deletions
|
@ -252,23 +252,23 @@ public class BlockCrate extends BlockTile
|
|||
|
||||
if (currentStack != null)
|
||||
{
|
||||
if (currentStack.getItem().itemID == this.blockID)
|
||||
if (currentStack.getItem().itemID == blockID)
|
||||
{
|
||||
ItemStack containedStack = ItemBlockCrate.getContainingItemStack(currentStack);
|
||||
ItemStack crateStack = tileEntity.getSampleStack();
|
||||
if (containedStack != null && (crateStack == null || (crateStack != null && containedStack.isItemEqual(crateStack))))
|
||||
|
||||
if (containedStack != null && (crateStack == null || ItemStack.areItemStacksEqual(containedStack, crateStack)))
|
||||
{
|
||||
ItemStack returned = BlockCrate.addStackToCrate(tileEntity, containedStack);
|
||||
ItemBlockCrate.setContainingItemStack(currentStack, returned);
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
if (tileEntity.getSampleStack() != null)
|
||||
{
|
||||
if (!(tileEntity.getSampleStack().isItemEqual(currentStack) || OreDictionary.getOreID(tileEntity.getSampleStack()) == OreDictionary.getOreID(currentStack)))
|
||||
if (!(tileEntity.getSampleStack().isItemEqual(currentStack) || (!OreDictionary.getOreName(OreDictionary.getOreID(tileEntity.getSampleStack())).equals("Unknown") && OreDictionary.getOreID(tileEntity.getSampleStack()) == OreDictionary.getOreID(currentStack))))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -7,10 +7,10 @@ import net.minecraft.tileentity.TileEntity;
|
|||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
import resonantinduction.core.Reference;
|
||||
import resonantinduction.core.ResonantInduction.RecipeType;
|
||||
import universalelectricity.api.vector.Vector3;
|
||||
import calclavia.api.resonantinduction.recipe.MachineRecipes;
|
||||
import calclavia.api.resonantinduction.recipe.RecipeResource;
|
||||
import calclavia.api.resonantinduction.recipe.MachineRecipes.RecipeType;
|
||||
import calclavia.api.recipe.MachineRecipes;
|
||||
import calclavia.api.recipe.RecipeResource;
|
||||
import calclavia.lib.utility.inventory.InventoryUtility;
|
||||
|
||||
public class ItemHammer extends Item
|
||||
|
@ -42,7 +42,7 @@ public class ItemHammer extends Item
|
|||
|
||||
if (oreName != null && !oreName.equals("Unknown"))
|
||||
{
|
||||
RecipeResource[] outputs = MachineRecipes.INSTANCE.getOutput(RecipeType.CRUSHER, oreName);
|
||||
RecipeResource[] outputs = MachineRecipes.INSTANCE.getOutput(RecipeType.CRUSHER.name(), oreName);
|
||||
|
||||
if (outputs.length > 0)
|
||||
{
|
||||
|
|
|
@ -13,15 +13,15 @@ import net.minecraft.world.IBlockAccess;
|
|||
import net.minecraftforge.common.ForgeDirection;
|
||||
import net.minecraftforge.fluids.IFluidHandler;
|
||||
import resonantinduction.core.ResonantInduction;
|
||||
import resonantinduction.core.ResonantInduction.RecipeType;
|
||||
import resonantinduction.core.prefab.imprint.ItemImprint;
|
||||
import resonantinduction.core.prefab.imprint.TileFilterable;
|
||||
import resonantinduction.core.resource.ResourceGenerator;
|
||||
import resonantinduction.core.resource.fluid.BlockFluidMixture;
|
||||
import universalelectricity.api.vector.Vector3;
|
||||
import calclavia.api.recipe.MachineRecipes;
|
||||
import calclavia.api.recipe.RecipeResource;
|
||||
import calclavia.api.resonantinduction.IFilterable;
|
||||
import calclavia.api.resonantinduction.recipe.MachineRecipes;
|
||||
import calclavia.api.resonantinduction.recipe.RecipeResource;
|
||||
import calclavia.api.resonantinduction.recipe.MachineRecipes.RecipeType;
|
||||
import calclavia.lib.content.module.TileRender;
|
||||
import calclavia.lib.network.Synced.SyncedInput;
|
||||
import calclavia.lib.network.Synced.SyncedOutput;
|
||||
|
@ -100,7 +100,7 @@ public class TileFilter extends TileFilterable implements IFilterable
|
|||
/**
|
||||
* Drop item from fluid.
|
||||
*/
|
||||
for (RecipeResource resoure : MachineRecipes.INSTANCE.getOutput(RecipeType.MIXER, "dust" + LanguageUtility.capitalizeFirst(ResourceGenerator.mixtureToMaterial(fluidBlock.getFluid().getName()))))
|
||||
for (RecipeResource resoure : MachineRecipes.INSTANCE.getOutput(RecipeType.MIXER.name(), "dust" + LanguageUtility.capitalizeFirst(ResourceGenerator.mixtureToMaterial(fluidBlock.getFluid().getName()))))
|
||||
{
|
||||
InventoryUtility.dropItemStack(worldObj, checkAbove.clone().add(0.5), resoure.getItemStack().copy(), 0, 0);
|
||||
}
|
||||
|
|
|
@ -26,13 +26,13 @@ import org.lwjgl.opengl.GL11;
|
|||
import resonantinduction.archaic.fluid.grate.TileGrate;
|
||||
import resonantinduction.core.Reference;
|
||||
import resonantinduction.core.ResonantInduction;
|
||||
import resonantinduction.core.ResonantInduction.RecipeType;
|
||||
import resonantinduction.core.fluid.TilePressureNode;
|
||||
import resonantinduction.core.grid.fluid.FluidPressureNode;
|
||||
import resonantinduction.core.grid.fluid.IPressureNodeProvider;
|
||||
import universalelectricity.api.vector.Vector3;
|
||||
import calclavia.api.resonantinduction.recipe.MachineRecipes;
|
||||
import calclavia.api.resonantinduction.recipe.RecipeResource;
|
||||
import calclavia.api.resonantinduction.recipe.MachineRecipes.RecipeType;
|
||||
import calclavia.api.recipe.MachineRecipes;
|
||||
import calclavia.api.recipe.RecipeResource;
|
||||
import calclavia.lib.content.module.TileRender;
|
||||
import calclavia.lib.prefab.vector.Cuboid;
|
||||
import calclavia.lib.render.FluidRenderUtility;
|
||||
|
@ -194,7 +194,7 @@ public class TileGutter extends TilePressureNode
|
|||
*/
|
||||
ItemStack itemStack = player.getCurrentEquippedItem();
|
||||
|
||||
RecipeResource[] outputs = MachineRecipes.INSTANCE.getOutput(RecipeType.MIXER, itemStack);
|
||||
RecipeResource[] outputs = MachineRecipes.INSTANCE.getOutput(RecipeType.MIXER.name(), itemStack);
|
||||
|
||||
if (outputs.length > 0)
|
||||
{
|
||||
|
|
|
@ -124,13 +124,15 @@ public class ItemBlockFluidContainer extends ItemBlock
|
|||
if (tile instanceof TileFluidDistribution)
|
||||
{
|
||||
((TileFluidDistribution) tile).setSubID(stack.getItemDamage());
|
||||
|
||||
if (stack.getTagCompound() != null && stack.getTagCompound().hasKey("fluid"))
|
||||
{
|
||||
((TileFluidDistribution) tile).fill(ForgeDirection.UNKNOWN, FluidStack.loadFluidStackFromNBT(stack.getTagCompound().getCompoundTag("fluid")), true);
|
||||
((TileFluidDistribution) tile).getInternalTank().fill(FluidStack.loadFluidStackFromNBT(stack.getTagCompound().getCompoundTag("fluid")), true);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -55,34 +55,39 @@ public class RenderTank extends TileEntitySpecialRenderer implements ISimpleItem
|
|||
{
|
||||
if (tileEntity instanceof TileTank)
|
||||
{
|
||||
byte renderSides = ((TileTank) tileEntity).renderSides;
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(x + 0.5, y + 0.5, z + 0.5);
|
||||
byte renderSides = ((TileTank) tileEntity).renderSides;
|
||||
|
||||
RenderUtility.renderBlockWithConnectedTextures(renderSides, Archaic.blockTank, null, ResonantInduction.blockMachinePart, null);
|
||||
|
||||
if (tileEntity.worldObj != null)
|
||||
if (fluid != null)
|
||||
{
|
||||
GL11.glScaled(0.99, 0.99, 0.99);
|
||||
FluidTank tank = ((TileTank) tileEntity).getInternalTank();
|
||||
double percentageFilled = (double) tank.getFluidAmount() / (double) tank.getCapacity();
|
||||
GL11.glPushMatrix();
|
||||
|
||||
double ySouthEast = FluidUtility.getAveragePercentageFilledForSides(TileTank.class, percentageFilled, tileEntity.worldObj, new Vector3(tileEntity), ForgeDirection.SOUTH, ForgeDirection.EAST);
|
||||
double yNorthEast = FluidUtility.getAveragePercentageFilledForSides(TileTank.class, percentageFilled, tileEntity.worldObj, new Vector3(tileEntity), ForgeDirection.NORTH, ForgeDirection.EAST);
|
||||
double ySouthWest = FluidUtility.getAveragePercentageFilledForSides(TileTank.class, percentageFilled, tileEntity.worldObj, new Vector3(tileEntity), ForgeDirection.SOUTH, ForgeDirection.WEST);
|
||||
double yNorthWest = FluidUtility.getAveragePercentageFilledForSides(TileTank.class, percentageFilled, tileEntity.worldObj, new Vector3(tileEntity), ForgeDirection.NORTH, ForgeDirection.WEST);
|
||||
FluidRenderUtility.renderFluidTesselation(tank, ySouthEast, yNorthEast, ySouthWest, yNorthWest);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (fluid != null)
|
||||
if (tileEntity.worldObj != null && !fluid.getFluid().isGaseous())
|
||||
{
|
||||
GL11.glScaled(0.99, 0.99, 0.99);
|
||||
FluidTank tank = ((TileTank) tileEntity).getInternalTank();
|
||||
double percentageFilled = (double) tank.getFluidAmount() / (double) tank.getCapacity();
|
||||
|
||||
double ySouthEast = FluidUtility.getAveragePercentageFilledForSides(TileTank.class, percentageFilled, tileEntity.worldObj, new Vector3(tileEntity), ForgeDirection.SOUTH, ForgeDirection.EAST);
|
||||
double yNorthEast = FluidUtility.getAveragePercentageFilledForSides(TileTank.class, percentageFilled, tileEntity.worldObj, new Vector3(tileEntity), ForgeDirection.NORTH, ForgeDirection.EAST);
|
||||
double ySouthWest = FluidUtility.getAveragePercentageFilledForSides(TileTank.class, percentageFilled, tileEntity.worldObj, new Vector3(tileEntity), ForgeDirection.SOUTH, ForgeDirection.WEST);
|
||||
double yNorthWest = FluidUtility.getAveragePercentageFilledForSides(TileTank.class, percentageFilled, tileEntity.worldObj, new Vector3(tileEntity), ForgeDirection.NORTH, ForgeDirection.WEST);
|
||||
FluidRenderUtility.renderFluidTesselation(tank, ySouthEast, yNorthEast, ySouthWest, yNorthWest);
|
||||
}
|
||||
else
|
||||
{
|
||||
GL11.glTranslated(-0.5, -0.5, -0.5);
|
||||
GL11.glScaled(0.99, 0.99, 0.99);
|
||||
int capacity = tileEntity instanceof TileTank ? ((TileTank) tileEntity).getInternalTank().getCapacity() : fluid.amount;
|
||||
double filledPercentage = (double) fluid.amount / (double) capacity;
|
||||
double renderPercentage = fluid.getFluid().isGaseous() ? 1 : filledPercentage;
|
||||
|
||||
int[] displayList = FluidRenderUtility.getFluidDisplayLists(fluid, tileEntity.worldObj, false);
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glPushAttrib(GL11.GL_ENABLE_BIT);
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
|
@ -94,13 +99,12 @@ public class RenderTank extends TileEntitySpecialRenderer implements ISimpleItem
|
|||
GL11.glColor4d(color.getRed() / 255f, color.getGreen() / 255f, color.getBlue() / 255f, fluid.getFluid().isGaseous() ? filledPercentage : 1);
|
||||
|
||||
RenderUtility.bind(FluidRenderUtility.getFluidSheet(fluid));
|
||||
// Prevent Z-fighting
|
||||
GL11.glTranslatef((float) x, (float) y + 0.001f, (float) z);
|
||||
GL11.glCallList(displayList[(int) (renderPercentage * (FluidRenderUtility.DISPLAY_STAGES - 1))]);
|
||||
RenderUtility.disableBlending();
|
||||
GL11.glPopAttrib();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
|
|
@ -11,10 +11,10 @@ import net.minecraftforge.fluids.FluidTank;
|
|||
import net.minecraftforge.fluids.FluidTankInfo;
|
||||
import net.minecraftforge.fluids.IFluidHandler;
|
||||
import resonantinduction.core.ResonantInduction;
|
||||
import resonantinduction.core.ResonantInduction.RecipeType;
|
||||
import universalelectricity.api.vector.Vector3;
|
||||
import calclavia.api.resonantinduction.recipe.MachineRecipes;
|
||||
import calclavia.api.resonantinduction.recipe.RecipeResource;
|
||||
import calclavia.api.resonantinduction.recipe.MachineRecipes.RecipeType;
|
||||
import calclavia.api.recipe.MachineRecipes;
|
||||
import calclavia.api.recipe.RecipeResource;
|
||||
import calclavia.lib.network.IPacketReceiver;
|
||||
import calclavia.lib.network.PacketHandler;
|
||||
import calclavia.lib.prefab.tile.TileExternalInventory;
|
||||
|
@ -81,7 +81,7 @@ public class TileCastingMold extends TileExternalInventory implements IFluidHand
|
|||
Vector3 checkPos = new Vector3(this).translate(0, 1, 0);
|
||||
FluidStack drainStack = FluidUtility.drainBlock(worldObj, checkPos, false);
|
||||
|
||||
if (MachineRecipes.INSTANCE.getOutput(RecipeType.SMELTER, drainStack).length > 0)
|
||||
if (MachineRecipes.INSTANCE.getOutput(RecipeType.SMELTER.name(), drainStack).length > 0)
|
||||
{
|
||||
if (drainStack.amount == tank.fill(drainStack, false))
|
||||
{
|
||||
|
@ -94,7 +94,7 @@ public class TileCastingMold extends TileExternalInventory implements IFluidHand
|
|||
*/
|
||||
while (tank.getFluidAmount() >= amountPerIngot && (getStackInSlot(0) == null || getStackInSlot(0).stackSize < getStackInSlot(0).getMaxStackSize()))
|
||||
{
|
||||
RecipeResource[] outputs = MachineRecipes.INSTANCE.getOutput(RecipeType.SMELTER, tank.getFluid());
|
||||
RecipeResource[] outputs = MachineRecipes.INSTANCE.getOutput(RecipeType.SMELTER.name(), tank.getFluid());
|
||||
|
||||
for (RecipeResource output : outputs)
|
||||
{
|
||||
|
|
|
@ -6,10 +6,10 @@ import net.minecraft.nbt.NBTTagCompound;
|
|||
import net.minecraft.network.packet.Packet;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import resonantinduction.core.ResonantInduction;
|
||||
import resonantinduction.core.ResonantInduction.RecipeType;
|
||||
import universalelectricity.api.vector.Vector3;
|
||||
import calclavia.api.resonantinduction.recipe.MachineRecipes;
|
||||
import calclavia.api.resonantinduction.recipe.RecipeResource;
|
||||
import calclavia.api.resonantinduction.recipe.MachineRecipes.RecipeType;
|
||||
import calclavia.api.recipe.MachineRecipes;
|
||||
import calclavia.api.recipe.RecipeResource;
|
||||
import calclavia.lib.network.IPacketReceiver;
|
||||
import calclavia.lib.network.PacketHandler;
|
||||
import calclavia.lib.prefab.tile.TileExternalInventory;
|
||||
|
@ -30,7 +30,7 @@ public class TileMillstone extends TileExternalInventory implements IPacketRecei
|
|||
|
||||
public void doGrind(Vector3 spawnPos)
|
||||
{
|
||||
RecipeResource[] outputs = MachineRecipes.INSTANCE.getOutput(RecipeType.GRINDER, getStackInSlot(0));
|
||||
RecipeResource[] outputs = MachineRecipes.INSTANCE.getOutput(RecipeType.GRINDER.name(), getStackInSlot(0));
|
||||
|
||||
if (outputs.length > 0)
|
||||
{
|
||||
|
@ -56,7 +56,7 @@ public class TileMillstone extends TileExternalInventory implements IPacketRecei
|
|||
@Override
|
||||
public boolean isItemValidForSlot(int i, ItemStack itemStack)
|
||||
{
|
||||
return MachineRecipes.INSTANCE.getOutput(RecipeType.GRINDER, itemStack).length > 0;
|
||||
return MachineRecipes.INSTANCE.getOutput(RecipeType.GRINDER.name(), itemStack).length > 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -200,7 +200,7 @@ public class Electrical
|
|||
|
||||
/** Generators **/
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(blockSolarPanel, "CCC", "WWW", "III", 'W', "wire", 'C', Item.coal, 'I', UniversalRecipe.PRIMARY_METAL.get()));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(blockMotor, "SRS", "SMS", "SWS", 'W', "wire", 'R', Item.redstone, 'M', UniversalRecipe.MOTOR.get(), 'S', UniversalRecipe.PRIMARY_METAL.get()));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(blockMotor, "SRS", "SMS", "SWS", 'W', "wire", 'R', Item.redstone, 'M', Block.blockIron, 'S', UniversalRecipe.PRIMARY_METAL.get()));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(blockThermopile, "ORO", "OWO", "OOO", 'W', "wire", 'O', Block.obsidian, 'R', Item.redstone));
|
||||
|
||||
/** Wire Compatiblity **/
|
||||
|
|
|
@ -2,7 +2,6 @@ package resonantinduction.electrical.armbot.task;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import calclavia.api.resonantinduction.electrical.ArmbotEntity;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityAgeable;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
@ -12,6 +11,7 @@ import net.minecraft.util.AxisAlignedBB;
|
|||
import resonantinduction.core.ArgumentData;
|
||||
import resonantinduction.electrical.armbot.IArmbot;
|
||||
import resonantinduction.electrical.armbot.TaskBaseProcess;
|
||||
import calclavia.api.resonantinduction.electrical.ArmbotEntity;
|
||||
|
||||
public class TaskGrabEntity extends TaskGrabPrefab
|
||||
{
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
package resonantinduction.electrical.armbot.task;
|
||||
|
||||
import calclavia.api.resonantinduction.mechanical.IBelt;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import resonantinduction.electrical.armbot.IArmbot;
|
||||
import resonantinduction.electrical.armbot.TaskBaseArmbot;
|
||||
import universalelectricity.api.vector.Vector2;
|
||||
import universalelectricity.api.vector.Vector3;
|
||||
import calclavia.api.resonantinduction.mechanical.IBelt;
|
||||
|
||||
/**
|
||||
* Prefab for grab based commands
|
||||
|
|
|
@ -21,7 +21,6 @@ import universalelectricity.api.electricity.IElectricalNetwork;
|
|||
import universalelectricity.api.energy.IConductor;
|
||||
import universalelectricity.api.energy.IEnergyNetwork;
|
||||
import universalelectricity.api.net.IConnector;
|
||||
import calclavia.api.atomicscience.ITemperature;
|
||||
import calclavia.api.resonantinduction.IMechanicalNode;
|
||||
import calclavia.lib.grid.INodeProvider;
|
||||
import calclavia.lib.network.IPacketReceiver;
|
||||
|
@ -311,11 +310,6 @@ public class PartMultimeter extends PartFace implements IConnector<MultimeterNet
|
|||
getNetwork().pressureGraph.queue(((IPressureNodeProvider) tileEntity).getNode(FluidPressureNode.class, receivingSide).getPressure(receivingSide));
|
||||
}
|
||||
|
||||
if (tileEntity instanceof ITemperature)
|
||||
{
|
||||
getNetwork().thermalGraph.queue(((ITemperature) tileEntity).getTemperature());
|
||||
}
|
||||
|
||||
getNetwork().energyGraph.queue(CompatibilityModule.getEnergy(tileEntity, receivingSide));
|
||||
|
||||
/**
|
||||
|
|
|
@ -8,10 +8,10 @@ import java.util.Iterator;
|
|||
import java.util.Set;
|
||||
import java.util.WeakHashMap;
|
||||
|
||||
import calclavia.api.mffs.fortron.IServerThread;
|
||||
import net.minecraft.server.ServerListenThread;
|
||||
import net.minecraft.server.ThreadMinecraftServer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import calclavia.api.mffs.fortron.IServerThread;
|
||||
|
||||
/**
|
||||
* @author Calclavia
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
package resonantinduction.quantum.gate;
|
||||
|
||||
import calclavia.api.icbm.IBlockFrequency;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.inventory.ISidedInventory;
|
||||
import net.minecraftforge.fluids.FluidTank;
|
||||
import net.minecraftforge.fluids.IFluidHandler;
|
||||
import calclavia.api.icbm.IBlockFrequency;
|
||||
|
||||
/**
|
||||
* Only TileEntities should implement this.
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package resonantinduction.quantum.gate;
|
||||
|
||||
import calclavia.api.icbm.IBlockFrequency;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
@ -9,6 +8,7 @@ import net.minecraftforge.fluids.Fluid;
|
|||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.fluids.FluidTank;
|
||||
import net.minecraftforge.fluids.FluidTankInfo;
|
||||
import calclavia.api.icbm.IBlockFrequency;
|
||||
import codechicken.multipart.TMultiPart;
|
||||
import codechicken.multipart.TileMultipart;
|
||||
|
||||
|
|
|
@ -4,14 +4,14 @@ import java.util.Collection;
|
|||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import calclavia.api.resonantinduction.IMechanicalNode;
|
||||
import calclavia.lib.grid.INodeProvider;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import resonantinduction.mechanical.Mechanical;
|
||||
import resonantinduction.mechanical.energy.grid.MechanicalNode;
|
||||
import resonantinduction.mechanical.energy.grid.PartMechanical;
|
||||
import calclavia.api.resonantinduction.IMechanicalNode;
|
||||
import calclavia.lib.grid.INodeProvider;
|
||||
import codechicken.lib.raytracer.IndexedCuboid6;
|
||||
import codechicken.lib.vec.Cuboid6;
|
||||
import codechicken.lib.vec.Vector3;
|
||||
|
|
|
@ -3,16 +3,16 @@ package resonantinduction.mechanical.energy.grid;
|
|||
import java.util.Iterator;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import calclavia.api.resonantinduction.IMechanicalNode;
|
||||
import calclavia.lib.grid.INodeProvider;
|
||||
import calclavia.lib.grid.Node;
|
||||
import calclavia.lib.grid.TickingGrid;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import resonantinduction.core.ResonantInduction;
|
||||
import universalelectricity.api.vector.Vector3;
|
||||
import calclavia.api.resonantinduction.IMechanicalNode;
|
||||
import calclavia.lib.grid.INodeProvider;
|
||||
import calclavia.lib.grid.Node;
|
||||
import calclavia.lib.grid.TickingGrid;
|
||||
import codechicken.multipart.TMultiPart;
|
||||
|
||||
/**
|
||||
|
|
|
@ -3,12 +3,12 @@ package resonantinduction.mechanical.energy.grid;
|
|||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import calclavia.lib.grid.INode;
|
||||
import calclavia.lib.grid.INodeProvider;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import calclavia.lib.grid.INode;
|
||||
import calclavia.lib.grid.INodeProvider;
|
||||
import codechicken.lib.data.MCDataInput;
|
||||
import codechicken.lib.data.MCDataOutput;
|
||||
import codechicken.multipart.JCuboidPart;
|
||||
|
|
|
@ -9,7 +9,6 @@ import net.minecraftforge.client.model.IModelCustom;
|
|||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import resonantinduction.core.Reference;
|
||||
import calclavia.lib.prefab.turbine.TileTurbine;
|
||||
import calclavia.lib.render.RenderUtility;
|
||||
import calclavia.lib.render.item.ISimpleItemRenderer;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
|
|
|
@ -2,16 +2,15 @@ package resonantinduction.mechanical.energy.turbine;
|
|||
|
||||
import java.lang.reflect.Method;
|
||||
|
||||
import calclavia.lib.grid.INodeProvider;
|
||||
import resonantinduction.mechanical.energy.grid.MechanicalNode;
|
||||
import resonantinduction.mechanical.energy.turbine.TileMechanicalTurbine.TurbineNode;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockFluid;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import resonantinduction.mechanical.energy.grid.MechanicalNode;
|
||||
import universalelectricity.api.vector.Vector3;
|
||||
import calclavia.lib.grid.INodeProvider;
|
||||
import cpw.mods.fml.relauncher.ReflectionHelper;
|
||||
|
||||
/**
|
||||
|
|
|
@ -11,6 +11,7 @@ import net.minecraft.world.biome.BiomeGenOcean;
|
|||
import net.minecraft.world.biome.BiomeGenPlains;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import universalelectricity.api.vector.Vector3;
|
||||
import calclavia.api.resonantinduction.IBoilHandler;
|
||||
import calclavia.lib.prefab.vector.Cuboid;
|
||||
import calclavia.lib.utility.inventory.InventoryUtility;
|
||||
|
||||
|
@ -21,7 +22,7 @@ import calclavia.lib.utility.inventory.InventoryUtility;
|
|||
* @author Calclavia
|
||||
*
|
||||
*/
|
||||
public class TileWindTurbine extends TileMechanicalTurbine
|
||||
public class TileWindTurbine extends TileMechanicalTurbine implements IBoilHandler
|
||||
{
|
||||
private final byte[] openBlockCache = new byte[224];
|
||||
private int checkCount = 0;
|
||||
|
|
|
@ -12,13 +12,13 @@ import org.apache.commons.lang3.ArrayUtils;
|
|||
|
||||
import resonantinduction.core.Reference;
|
||||
import resonantinduction.core.ResonantInduction;
|
||||
import resonantinduction.core.ResonantInduction.RecipeType;
|
||||
import resonantinduction.core.Timer;
|
||||
import resonantinduction.mechanical.energy.grid.TileMechanical;
|
||||
import universalelectricity.api.vector.Vector3;
|
||||
import calclavia.api.recipe.MachineRecipes;
|
||||
import calclavia.api.recipe.RecipeResource;
|
||||
import calclavia.api.resonantinduction.IMechanicalNode;
|
||||
import calclavia.api.resonantinduction.recipe.MachineRecipes;
|
||||
import calclavia.api.resonantinduction.recipe.RecipeResource;
|
||||
import calclavia.api.resonantinduction.recipe.MachineRecipes.RecipeType;
|
||||
import calclavia.lib.prefab.tile.IRotatable;
|
||||
import calclavia.lib.prefab.vector.Cuboid;
|
||||
|
||||
|
@ -201,7 +201,7 @@ public class TileGrindingWheel extends TileMechanical implements IRotatable
|
|||
public boolean canGrind(ItemStack itemStack)
|
||||
{
|
||||
// TODO: We don't have a crusher yet, so our grinder currently crushes ores.
|
||||
return MachineRecipes.INSTANCE.getOutput(RecipeType.CRUSHER, itemStack).length > 0 || MachineRecipes.INSTANCE.getOutput(RecipeType.GRINDER, itemStack).length > 0;
|
||||
return MachineRecipes.INSTANCE.getOutput(RecipeType.CRUSHER.name(), itemStack).length > 0 || MachineRecipes.INSTANCE.getOutput(RecipeType.GRINDER.name(), itemStack).length > 0;
|
||||
}
|
||||
|
||||
private boolean doGrind(EntityItem entity)
|
||||
|
@ -209,7 +209,7 @@ public class TileGrindingWheel extends TileMechanical implements IRotatable
|
|||
ItemStack itemStack = entity.getEntityItem();
|
||||
|
||||
// TODO: Remove this later on when crusher if complete.
|
||||
RecipeResource[] results = ArrayUtils.addAll(MachineRecipes.INSTANCE.getOutput(RecipeType.CRUSHER, itemStack), MachineRecipes.INSTANCE.getOutput(RecipeType.GRINDER, itemStack));
|
||||
RecipeResource[] results = ArrayUtils.addAll(MachineRecipes.INSTANCE.getOutput(RecipeType.CRUSHER.name(), itemStack), MachineRecipes.INSTANCE.getOutput(RecipeType.GRINDER.name(), itemStack));
|
||||
|
||||
for (RecipeResource resource : results)
|
||||
{
|
||||
|
|
|
@ -14,14 +14,14 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import resonantinduction.core.Reference;
|
||||
import resonantinduction.core.ResonantInduction.RecipeType;
|
||||
import resonantinduction.core.Timer;
|
||||
import resonantinduction.core.resource.ResourceGenerator;
|
||||
import resonantinduction.core.resource.fluid.BlockFluidMixture;
|
||||
import resonantinduction.mechanical.energy.grid.TileMechanical;
|
||||
import universalelectricity.api.vector.Vector3;
|
||||
import calclavia.api.recipe.MachineRecipes;
|
||||
import calclavia.api.resonantinduction.IMechanicalNode;
|
||||
import calclavia.api.resonantinduction.recipe.MachineRecipes;
|
||||
import calclavia.api.resonantinduction.recipe.MachineRecipes.RecipeType;
|
||||
import calclavia.lib.utility.inventory.InventoryUtility;
|
||||
|
||||
/**
|
||||
|
@ -100,7 +100,7 @@ public class TileMixer extends TileMechanical implements IInventory
|
|||
|
||||
if (entity instanceof EntityItem)
|
||||
{
|
||||
if (MachineRecipes.INSTANCE.getOutput(RecipeType.MIXER, ((EntityItem) entity).getEntityItem()).length > 0)
|
||||
if (MachineRecipes.INSTANCE.getOutput(RecipeType.MIXER.name(), ((EntityItem) entity).getEntityItem()).length > 0)
|
||||
{
|
||||
processItems.add((EntityItem) entity);
|
||||
}
|
||||
|
@ -256,6 +256,6 @@ public class TileMixer extends TileMechanical implements IInventory
|
|||
@Override
|
||||
public boolean isItemValidForSlot(int i, ItemStack itemstack)
|
||||
{
|
||||
return MachineRecipes.INSTANCE.getOutput(RecipeType.MIXER, itemstack).length > 0;
|
||||
return MachineRecipes.INSTANCE.getOutput(RecipeType.MIXER.name(), itemstack).length > 0;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,7 +22,6 @@ import resonantinduction.core.resource.fluid.ItemOreResourceBucket;
|
|||
import resonantinduction.core.resource.fluid.TileFluidMixture;
|
||||
import calclavia.lib.config.ConfigHandler;
|
||||
import calclavia.lib.content.ContentRegistry;
|
||||
import calclavia.lib.grid.UpdateTicker;
|
||||
import calclavia.lib.network.PacketAnnotation;
|
||||
import calclavia.lib.network.PacketHandler;
|
||||
import calclavia.lib.network.PacketTile;
|
||||
|
@ -82,6 +81,14 @@ public class ResonantInduction
|
|||
|
||||
public static final ContentRegistry contentRegistry = new ContentRegistry(Settings.CONFIGURATION, Settings.idManager, ID).setPrefix(Reference.PREFIX).setTab(TabRI.CORE);
|
||||
|
||||
/**
|
||||
* Recipe Types
|
||||
*/
|
||||
public static enum RecipeType
|
||||
{
|
||||
CRUSHER, GRINDER, MIXER, SMELTER, SAWMILL;
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void preInit(FMLPreInitializationEvent evt)
|
||||
{
|
||||
|
|
|
@ -57,6 +57,14 @@ public class Settings
|
|||
public static boolean SHINY_SILVER = true;
|
||||
@Config(key = "Max EM Contractor Path")
|
||||
public static int MAX_LEVITATOR_DISTANCE = 200;
|
||||
@Config(category = Configuration.CATEGORY_GENERAL, key = "Levitator Max Reach")
|
||||
public static int LEVITATOR_MAX_REACH = 40;
|
||||
@Config(category = Configuration.CATEGORY_GENERAL, key = "Levitator Push Delay")
|
||||
public static int LEVITATOR_PUSH_DELAY = 5;
|
||||
@Config(category = Configuration.CATEGORY_GENERAL, key = "Levitator Max Speed")
|
||||
public static double LEVITATOR_MAX_SPEED = .2;
|
||||
@Config(category = Configuration.CATEGORY_GENERAL, key = "Levitator Acceleration")
|
||||
public static double LEVITATOR_ACCELERATION = .02;
|
||||
|
||||
public static void setModMetadata(ModMetadata metadata, String id, String name)
|
||||
{
|
||||
|
@ -88,13 +96,4 @@ public class Settings
|
|||
|
||||
return false;
|
||||
}
|
||||
|
||||
@Config(category = Configuration.CATEGORY_GENERAL, key = "Levitator Max Reach")
|
||||
public static int LEVITATOR_MAX_REACH = 40;
|
||||
@Config(category = Configuration.CATEGORY_GENERAL, key = "Levitator Push Delay")
|
||||
public static int LEVITATOR_PUSH_DELAY = 5;
|
||||
@Config(category = Configuration.CATEGORY_GENERAL, key = "Levitator Max Speed")
|
||||
public static double LEVITATOR_MAX_SPEED = .2;
|
||||
@Config(category = Configuration.CATEGORY_GENERAL, key = "Levitator Acceleration")
|
||||
public static double LEVITATOR_ACCELERATION = .02;
|
||||
}
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
package resonantinduction.core.grid;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import calclavia.lib.grid.INode;
|
||||
import calclavia.lib.grid.INodeProvider;
|
||||
|
|
|
@ -3,8 +3,6 @@ package resonantinduction.core.grid.fluid;
|
|||
import java.util.Iterator;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import calclavia.lib.grid.Node;
|
||||
import calclavia.lib.grid.TickingGrid;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
|
@ -13,6 +11,8 @@ import net.minecraftforge.fluids.FluidStack;
|
|||
import net.minecraftforge.fluids.FluidTank;
|
||||
import net.minecraftforge.fluids.IFluidHandler;
|
||||
import universalelectricity.api.vector.Vector3;
|
||||
import calclavia.lib.grid.Node;
|
||||
import calclavia.lib.grid.TickingGrid;
|
||||
import codechicken.multipart.TMultiPart;
|
||||
|
||||
public class FluidPressureNode extends Node<IPressureNodeProvider, TickingGrid, Object>
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package resonantinduction.core.grid.fluid;
|
||||
|
||||
import calclavia.lib.grid.INodeProvider;
|
||||
import net.minecraftforge.fluids.FluidTank;
|
||||
import net.minecraftforge.fluids.IFluidHandler;
|
||||
import calclavia.lib.grid.INodeProvider;
|
||||
|
||||
public interface IPressureNodeProvider extends INodeProvider, IFluidHandler
|
||||
{
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package resonantinduction.core.nei;
|
||||
|
||||
import calclavia.api.resonantinduction.recipe.MachineRecipes.RecipeType;
|
||||
import resonantinduction.core.ResonantInduction.RecipeType;
|
||||
import calclavia.lib.utility.LanguageUtility;
|
||||
|
||||
public class RICrusherRecipeHandler extends RITemplateRecipeHandler
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package resonantinduction.core.nei;
|
||||
|
||||
import calclavia.api.resonantinduction.recipe.MachineRecipes.RecipeType;
|
||||
import resonantinduction.core.ResonantInduction.RecipeType;
|
||||
import calclavia.lib.utility.LanguageUtility;
|
||||
|
||||
public class RIGrinderRecipeHandler extends RITemplateRecipeHandler
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package resonantinduction.core.nei;
|
||||
|
||||
import calclavia.api.resonantinduction.recipe.MachineRecipes.RecipeType;
|
||||
import resonantinduction.core.ResonantInduction.RecipeType;
|
||||
import calclavia.lib.utility.LanguageUtility;
|
||||
|
||||
public class RIMixerRecipeHandler extends RITemplateRecipeHandler
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package resonantinduction.core.nei;
|
||||
|
||||
import calclavia.api.resonantinduction.recipe.MachineRecipes.RecipeType;
|
||||
import resonantinduction.core.ResonantInduction.RecipeType;
|
||||
import calclavia.lib.utility.LanguageUtility;
|
||||
|
||||
public class RISawmillRecipeHandler extends RITemplateRecipeHandler
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package resonantinduction.core.nei;
|
||||
|
||||
import calclavia.api.resonantinduction.recipe.MachineRecipes.RecipeType;
|
||||
import resonantinduction.core.ResonantInduction.RecipeType;
|
||||
import calclavia.lib.utility.LanguageUtility;
|
||||
|
||||
public class RISmelterRecipeHandler extends RITemplateRecipeHandler
|
||||
|
|
|
@ -13,11 +13,12 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
import resonantinduction.core.Reference;
|
||||
import calclavia.api.resonantinduction.recipe.MachineRecipes;
|
||||
import calclavia.api.resonantinduction.recipe.RecipeResource;
|
||||
import calclavia.api.resonantinduction.recipe.RecipeResource.FluidStackResource;
|
||||
import calclavia.api.resonantinduction.recipe.RecipeResource.ItemStackResource;
|
||||
import calclavia.api.resonantinduction.recipe.RecipeResource.OreDictResource;
|
||||
import resonantinduction.core.ResonantInduction.RecipeType;
|
||||
import calclavia.api.recipe.MachineRecipes;
|
||||
import calclavia.api.recipe.RecipeResource;
|
||||
import calclavia.api.recipe.RecipeResource.FluidStackResource;
|
||||
import calclavia.api.recipe.RecipeResource.ItemStackResource;
|
||||
import calclavia.api.recipe.RecipeResource.OreDictResource;
|
||||
import calclavia.lib.utility.LanguageUtility;
|
||||
import codechicken.core.gui.GuiDraw;
|
||||
import codechicken.nei.PositionedStack;
|
||||
|
@ -32,7 +33,7 @@ public abstract class RITemplateRecipeHandler extends TemplateRecipeHandler
|
|||
@Override
|
||||
public abstract String getRecipeName();
|
||||
|
||||
public abstract MachineRecipes.RecipeType getMachine();
|
||||
public abstract RecipeType getMachine();
|
||||
|
||||
@Override
|
||||
public String getOverlayIdentifier()
|
||||
|
@ -69,7 +70,7 @@ public abstract class RITemplateRecipeHandler extends TemplateRecipeHandler
|
|||
{
|
||||
if (outputId.equals(this.getOverlayIdentifier()))
|
||||
{
|
||||
for (Map.Entry<RecipeResource[], RecipeResource[]> irecipe : MachineRecipes.INSTANCE.getRecipes(getMachine()).entrySet())
|
||||
for (Map.Entry<RecipeResource[], RecipeResource[]> irecipe : MachineRecipes.INSTANCE.getRecipes(getMachine().name()).entrySet())
|
||||
{
|
||||
CachedRIRecipe recipe = new CachedRIRecipe(irecipe);
|
||||
this.arecipes.add(recipe);
|
||||
|
@ -164,7 +165,7 @@ public abstract class RITemplateRecipeHandler extends TemplateRecipeHandler
|
|||
@Override
|
||||
public void loadCraftingRecipes(ItemStack result)
|
||||
{
|
||||
for (Map.Entry<RecipeResource[], RecipeResource[]> irecipe : MachineRecipes.INSTANCE.getRecipes(getMachine()).entrySet())
|
||||
for (Map.Entry<RecipeResource[], RecipeResource[]> irecipe : MachineRecipes.INSTANCE.getRecipes(getMachine().name()).entrySet())
|
||||
{
|
||||
CachedRIRecipe recipe = new CachedRIRecipe(irecipe);
|
||||
if (recipe.canProduce(result))
|
||||
|
@ -179,7 +180,7 @@ public abstract class RITemplateRecipeHandler extends TemplateRecipeHandler
|
|||
{
|
||||
if (inputId.equals(this.getOverlayIdentifier()))
|
||||
{
|
||||
for (Map.Entry<RecipeResource[], RecipeResource[]> irecipe : MachineRecipes.INSTANCE.getRecipes(getMachine()).entrySet())
|
||||
for (Map.Entry<RecipeResource[], RecipeResource[]> irecipe : MachineRecipes.INSTANCE.getRecipes(getMachine().name()).entrySet())
|
||||
{
|
||||
CachedRIRecipe recipe = new CachedRIRecipe(irecipe);
|
||||
this.arecipes.add(recipe);
|
||||
|
@ -194,7 +195,7 @@ public abstract class RITemplateRecipeHandler extends TemplateRecipeHandler
|
|||
@Override
|
||||
public void loadUsageRecipes(ItemStack ingredient)
|
||||
{
|
||||
for (Map.Entry<RecipeResource[], RecipeResource[]> irecipe : MachineRecipes.INSTANCE.getRecipes(getMachine()).entrySet())
|
||||
for (Map.Entry<RecipeResource[], RecipeResource[]> irecipe : MachineRecipes.INSTANCE.getRecipes(getMachine().name()).entrySet())
|
||||
{
|
||||
CachedRIRecipe recipe = new CachedRIRecipe(irecipe);
|
||||
if (recipe.doesUse(ingredient))
|
||||
|
|
|
@ -4,9 +4,6 @@ import java.util.Collection;
|
|||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import calclavia.lib.grid.INode;
|
||||
import calclavia.lib.grid.INodeProvider;
|
||||
import calclavia.lib.grid.Node;
|
||||
import net.minecraft.client.particle.EffectRenderer;
|
||||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
@ -15,6 +12,9 @@ import net.minecraft.nbt.NBTTagCompound;
|
|||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import calclavia.lib.grid.INode;
|
||||
import calclavia.lib.grid.INodeProvider;
|
||||
import calclavia.lib.grid.Node;
|
||||
import codechicken.lib.data.MCDataInput;
|
||||
import codechicken.lib.data.MCDataOutput;
|
||||
import codechicken.lib.raytracer.IndexedCuboid6;
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
package resonantinduction.core.resource;
|
||||
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.Set;
|
||||
|
||||
public class OreDetectionBlackList
|
||||
{
|
||||
private static final Set<String> oreBlackList = new LinkedHashSet<String>();
|
||||
private static final Set<String> ingotBlackList = new LinkedHashSet<String>();
|
||||
|
||||
public static void addOre(String s)
|
||||
{
|
||||
oreBlackList.add(s);
|
||||
}
|
||||
|
||||
public static void addIngot(String s)
|
||||
{
|
||||
ingotBlackList.add(s);
|
||||
}
|
||||
|
||||
public static boolean isOreBlackListed(String s)
|
||||
{
|
||||
return oreBlackList.contains(s);
|
||||
}
|
||||
|
||||
public static boolean isIngotBlackListed(String s)
|
||||
{
|
||||
return ingotBlackList.contains(s);
|
||||
}
|
||||
}
|
|
@ -31,13 +31,12 @@ import net.minecraftforge.oredict.OreDictionary;
|
|||
import net.minecraftforge.oredict.OreDictionary.OreRegisterEvent;
|
||||
import resonantinduction.core.Reference;
|
||||
import resonantinduction.core.ResonantInduction;
|
||||
import resonantinduction.core.ResonantInduction.RecipeType;
|
||||
import resonantinduction.core.Settings;
|
||||
import resonantinduction.core.fluid.FluidColored;
|
||||
import resonantinduction.core.resource.fluid.BlockFluidMaterial;
|
||||
import resonantinduction.core.resource.fluid.BlockFluidMixture;
|
||||
import calclavia.api.resonantinduction.recipe.MachineRecipes;
|
||||
import calclavia.api.resonantinduction.recipe.OreDetectionBlackList;
|
||||
import calclavia.api.resonantinduction.recipe.MachineRecipes.RecipeType;
|
||||
import calclavia.api.recipe.MachineRecipes;
|
||||
import calclavia.lib.config.Config;
|
||||
import calclavia.lib.utility.LanguageUtility;
|
||||
import calclavia.lib.utility.nbt.IVirtualObject;
|
||||
|
@ -56,7 +55,7 @@ public class ResourceGenerator implements IVirtualObject
|
|||
{
|
||||
public static final ResourceGenerator INSTANCE = new ResourceGenerator();
|
||||
|
||||
@Config(comment = " Allow the Resource Generator to make ore dictionary compatible recipes?")
|
||||
@Config(comment = "Allow the Resource Generator to make ore dictionary compatible recipes?")
|
||||
private static boolean allowOreDictCompatibility = true;
|
||||
|
||||
/**
|
||||
|
@ -154,15 +153,15 @@ public class ResourceGenerator implements IVirtualObject
|
|||
OreDictionary.registerOre("rubble" + nameCaps, ResonantInduction.itemRubble.getStackFromMaterial(materialName));
|
||||
OreDictionary.registerOre("dustRefined" + nameCaps, ResonantInduction.itemRefinedDust.getStackFromMaterial(materialName));
|
||||
|
||||
MachineRecipes.INSTANCE.addRecipe(RecipeType.GRINDER, "rubble" + nameCaps, dust, dust);
|
||||
MachineRecipes.INSTANCE.addRecipe(RecipeType.MIXER, "dust" + nameCaps, refinedDust);
|
||||
MachineRecipes.INSTANCE.addRecipe(RecipeType.SMELTER, new FluidStack(fluidMolten, FluidContainerRegistry.BUCKET_VOLUME), "ingot" + nameCaps);
|
||||
MachineRecipes.INSTANCE.addRecipe(RecipeType.GRINDER.name(), "rubble" + nameCaps, dust, dust);
|
||||
MachineRecipes.INSTANCE.addRecipe(RecipeType.MIXER.name(), "dust" + nameCaps, refinedDust);
|
||||
MachineRecipes.INSTANCE.addRecipe(RecipeType.SMELTER.name(), new FluidStack(fluidMolten, FluidContainerRegistry.BUCKET_VOLUME), "ingot" + nameCaps);
|
||||
}
|
||||
else
|
||||
{
|
||||
MachineRecipes.INSTANCE.addRecipe(RecipeType.GRINDER, rubble, dust, dust);
|
||||
MachineRecipes.INSTANCE.addRecipe(RecipeType.MIXER, dust, refinedDust);
|
||||
MachineRecipes.INSTANCE.addRecipe(RecipeType.SMELTER, new FluidStack(fluidMolten, FluidContainerRegistry.BUCKET_VOLUME), "ingot" + nameCaps);
|
||||
MachineRecipes.INSTANCE.addRecipe(RecipeType.GRINDER.name(), rubble, dust, dust);
|
||||
MachineRecipes.INSTANCE.addRecipe(RecipeType.MIXER.name(), dust, refinedDust);
|
||||
MachineRecipes.INSTANCE.addRecipe(RecipeType.SMELTER.name(), new FluidStack(fluidMolten, FluidContainerRegistry.BUCKET_VOLUME), "ingot" + nameCaps);
|
||||
}
|
||||
|
||||
FurnaceRecipes.smelting().addSmelting(dust.itemID, dust.getItemDamage(), OreDictionary.getOres("ingot" + nameCaps).get(0).copy(), 0.7f);
|
||||
|
@ -171,7 +170,7 @@ public class ResourceGenerator implements IVirtualObject
|
|||
|
||||
if (OreDictionary.getOres("ore" + nameCaps).size() > 0)
|
||||
{
|
||||
MachineRecipes.INSTANCE.addRecipe(RecipeType.CRUSHER, "ore" + nameCaps, "rubble" + nameCaps);
|
||||
MachineRecipes.INSTANCE.addRecipe(RecipeType.CRUSHER.name(), "ore" + nameCaps, "rubble" + nameCaps);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -185,17 +184,17 @@ public class ResourceGenerator implements IVirtualObject
|
|||
OreDictionary.registerOre("oreLapis", Block.oreLapis);
|
||||
|
||||
// Vanilla fluid recipes
|
||||
MachineRecipes.INSTANCE.addRecipe(RecipeType.SMELTER, new FluidStack(FluidRegistry.LAVA, FluidContainerRegistry.BUCKET_VOLUME), new ItemStack(Block.stone));
|
||||
MachineRecipes.INSTANCE.addRecipe(RecipeType.SMELTER.name(), new FluidStack(FluidRegistry.LAVA, FluidContainerRegistry.BUCKET_VOLUME), new ItemStack(Block.stone));
|
||||
|
||||
// Vanilla crusher recipes
|
||||
MachineRecipes.INSTANCE.addRecipe(RecipeType.CRUSHER, Block.cobblestone, Block.gravel);
|
||||
MachineRecipes.INSTANCE.addRecipe(RecipeType.CRUSHER, Block.stone, Block.cobblestone);
|
||||
MachineRecipes.INSTANCE.addRecipe(RecipeType.CRUSHER, Block.chest, new ItemStack(Block.planks, 7, 0));
|
||||
MachineRecipes.INSTANCE.addRecipe(RecipeType.CRUSHER.name(), Block.cobblestone, Block.gravel);
|
||||
MachineRecipes.INSTANCE.addRecipe(RecipeType.CRUSHER.name(), Block.stone, Block.cobblestone);
|
||||
MachineRecipes.INSTANCE.addRecipe(RecipeType.CRUSHER.name(), Block.chest, new ItemStack(Block.planks, 7, 0));
|
||||
|
||||
// Vanilla grinder recipes
|
||||
MachineRecipes.INSTANCE.addRecipe(RecipeType.GRINDER, Block.cobblestone, Block.sand);
|
||||
MachineRecipes.INSTANCE.addRecipe(RecipeType.GRINDER, Block.gravel, Block.sand);
|
||||
MachineRecipes.INSTANCE.addRecipe(RecipeType.GRINDER, Block.glass, Block.sand);
|
||||
MachineRecipes.INSTANCE.addRecipe(RecipeType.GRINDER.name(), Block.cobblestone, Block.sand);
|
||||
MachineRecipes.INSTANCE.addRecipe(RecipeType.GRINDER.name(), Block.gravel, Block.sand);
|
||||
MachineRecipes.INSTANCE.addRecipe(RecipeType.GRINDER.name(), Block.glass, Block.sand);
|
||||
|
||||
Iterator<String> it = materials.keySet().iterator();
|
||||
while (it.hasNext())
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
package resonantinduction.core.resource.fluid;
|
||||
|
||||
import calclavia.api.resonantinduction.recipe.MachineRecipes;
|
||||
import calclavia.api.resonantinduction.recipe.MachineRecipes.RecipeType;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
@ -11,8 +9,10 @@ import net.minecraftforge.fluids.Fluid;
|
|||
import net.minecraftforge.fluids.FluidContainerRegistry;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import resonantinduction.core.Reference;
|
||||
import resonantinduction.core.ResonantInduction.RecipeType;
|
||||
import resonantinduction.core.Settings;
|
||||
import resonantinduction.core.resource.ResourceGenerator;
|
||||
import calclavia.api.recipe.MachineRecipes;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
|
@ -56,7 +56,7 @@ public class BlockFluidMixture extends BlockFluidFinite
|
|||
|
||||
public boolean mix(World world, int x, int y, int z, ItemStack stack)
|
||||
{
|
||||
if (MachineRecipes.INSTANCE.getOutput(RecipeType.MIXER, stack).length > 0 && getQuantaValue(world, x, y, z) < quantaPerBlock)
|
||||
if (MachineRecipes.INSTANCE.getOutput(RecipeType.MIXER.name(), stack).length > 0 && getQuantaValue(world, x, y, z) < quantaPerBlock)
|
||||
{
|
||||
if (getQuantaValue(world, x, y, z) < quantaPerBlock)
|
||||
{
|
||||
|
|
|
@ -3,14 +3,14 @@ package resonantinduction.core.resource.fluid;
|
|||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import calclavia.api.resonantinduction.recipe.MachineRecipes;
|
||||
import calclavia.api.resonantinduction.recipe.MachineRecipes.RecipeType;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import resonantinduction.core.ResonantInduction.RecipeType;
|
||||
import resonantinduction.core.resource.ResourceGenerator;
|
||||
import resonantinduction.core.resource.TileMaterial;
|
||||
import calclavia.api.recipe.MachineRecipes;
|
||||
|
||||
/**
|
||||
* NO-OP. Not yet properly implemented. We're not using TEs for now.
|
||||
|
@ -31,7 +31,7 @@ public class TileFluidMixture extends TileMaterial
|
|||
|
||||
public boolean mix(ItemStack itemStack)
|
||||
{
|
||||
if (MachineRecipes.INSTANCE.getOutput(RecipeType.MIXER, itemStack).length > 0 && getBlockMetadata() < 8)
|
||||
if (MachineRecipes.INSTANCE.getOutput(RecipeType.MIXER.name(), itemStack).length > 0 && getBlockMetadata() < 8)
|
||||
{
|
||||
// TODO: Maybe we need to merge the stacks?
|
||||
items.add(itemStack);
|
||||
|
|
Loading…
Add table
Reference in a new issue