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 != null)
|
||||||
{
|
{
|
||||||
if (currentStack.getItem().itemID == this.blockID)
|
if (currentStack.getItem().itemID == blockID)
|
||||||
{
|
{
|
||||||
ItemStack containedStack = ItemBlockCrate.getContainingItemStack(currentStack);
|
ItemStack containedStack = ItemBlockCrate.getContainingItemStack(currentStack);
|
||||||
ItemStack crateStack = tileEntity.getSampleStack();
|
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);
|
ItemStack returned = BlockCrate.addStackToCrate(tileEntity, containedStack);
|
||||||
ItemBlockCrate.setContainingItemStack(currentStack, returned);
|
ItemBlockCrate.setContainingItemStack(currentStack, returned);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (tileEntity.getSampleStack() != null)
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,10 +7,10 @@ import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraftforge.oredict.OreDictionary;
|
import net.minecraftforge.oredict.OreDictionary;
|
||||||
import resonantinduction.core.Reference;
|
import resonantinduction.core.Reference;
|
||||||
|
import resonantinduction.core.ResonantInduction.RecipeType;
|
||||||
import universalelectricity.api.vector.Vector3;
|
import universalelectricity.api.vector.Vector3;
|
||||||
import calclavia.api.resonantinduction.recipe.MachineRecipes;
|
import calclavia.api.recipe.MachineRecipes;
|
||||||
import calclavia.api.resonantinduction.recipe.RecipeResource;
|
import calclavia.api.recipe.RecipeResource;
|
||||||
import calclavia.api.resonantinduction.recipe.MachineRecipes.RecipeType;
|
|
||||||
import calclavia.lib.utility.inventory.InventoryUtility;
|
import calclavia.lib.utility.inventory.InventoryUtility;
|
||||||
|
|
||||||
public class ItemHammer extends Item
|
public class ItemHammer extends Item
|
||||||
|
@ -42,7 +42,7 @@ public class ItemHammer extends Item
|
||||||
|
|
||||||
if (oreName != null && !oreName.equals("Unknown"))
|
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)
|
if (outputs.length > 0)
|
||||||
{
|
{
|
||||||
|
|
|
@ -13,15 +13,15 @@ import net.minecraft.world.IBlockAccess;
|
||||||
import net.minecraftforge.common.ForgeDirection;
|
import net.minecraftforge.common.ForgeDirection;
|
||||||
import net.minecraftforge.fluids.IFluidHandler;
|
import net.minecraftforge.fluids.IFluidHandler;
|
||||||
import resonantinduction.core.ResonantInduction;
|
import resonantinduction.core.ResonantInduction;
|
||||||
|
import resonantinduction.core.ResonantInduction.RecipeType;
|
||||||
import resonantinduction.core.prefab.imprint.ItemImprint;
|
import resonantinduction.core.prefab.imprint.ItemImprint;
|
||||||
import resonantinduction.core.prefab.imprint.TileFilterable;
|
import resonantinduction.core.prefab.imprint.TileFilterable;
|
||||||
import resonantinduction.core.resource.ResourceGenerator;
|
import resonantinduction.core.resource.ResourceGenerator;
|
||||||
import resonantinduction.core.resource.fluid.BlockFluidMixture;
|
import resonantinduction.core.resource.fluid.BlockFluidMixture;
|
||||||
import universalelectricity.api.vector.Vector3;
|
import universalelectricity.api.vector.Vector3;
|
||||||
|
import calclavia.api.recipe.MachineRecipes;
|
||||||
|
import calclavia.api.recipe.RecipeResource;
|
||||||
import calclavia.api.resonantinduction.IFilterable;
|
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.content.module.TileRender;
|
||||||
import calclavia.lib.network.Synced.SyncedInput;
|
import calclavia.lib.network.Synced.SyncedInput;
|
||||||
import calclavia.lib.network.Synced.SyncedOutput;
|
import calclavia.lib.network.Synced.SyncedOutput;
|
||||||
|
@ -100,7 +100,7 @@ public class TileFilter extends TileFilterable implements IFilterable
|
||||||
/**
|
/**
|
||||||
* Drop item from fluid.
|
* 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);
|
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.archaic.fluid.grate.TileGrate;
|
||||||
import resonantinduction.core.Reference;
|
import resonantinduction.core.Reference;
|
||||||
import resonantinduction.core.ResonantInduction;
|
import resonantinduction.core.ResonantInduction;
|
||||||
|
import resonantinduction.core.ResonantInduction.RecipeType;
|
||||||
import resonantinduction.core.fluid.TilePressureNode;
|
import resonantinduction.core.fluid.TilePressureNode;
|
||||||
import resonantinduction.core.grid.fluid.FluidPressureNode;
|
import resonantinduction.core.grid.fluid.FluidPressureNode;
|
||||||
import resonantinduction.core.grid.fluid.IPressureNodeProvider;
|
import resonantinduction.core.grid.fluid.IPressureNodeProvider;
|
||||||
import universalelectricity.api.vector.Vector3;
|
import universalelectricity.api.vector.Vector3;
|
||||||
import calclavia.api.resonantinduction.recipe.MachineRecipes;
|
import calclavia.api.recipe.MachineRecipes;
|
||||||
import calclavia.api.resonantinduction.recipe.RecipeResource;
|
import calclavia.api.recipe.RecipeResource;
|
||||||
import calclavia.api.resonantinduction.recipe.MachineRecipes.RecipeType;
|
|
||||||
import calclavia.lib.content.module.TileRender;
|
import calclavia.lib.content.module.TileRender;
|
||||||
import calclavia.lib.prefab.vector.Cuboid;
|
import calclavia.lib.prefab.vector.Cuboid;
|
||||||
import calclavia.lib.render.FluidRenderUtility;
|
import calclavia.lib.render.FluidRenderUtility;
|
||||||
|
@ -194,7 +194,7 @@ public class TileGutter extends TilePressureNode
|
||||||
*/
|
*/
|
||||||
ItemStack itemStack = player.getCurrentEquippedItem();
|
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)
|
if (outputs.length > 0)
|
||||||
{
|
{
|
||||||
|
|
|
@ -124,13 +124,15 @@ public class ItemBlockFluidContainer extends ItemBlock
|
||||||
if (tile instanceof TileFluidDistribution)
|
if (tile instanceof TileFluidDistribution)
|
||||||
{
|
{
|
||||||
((TileFluidDistribution) tile).setSubID(stack.getItemDamage());
|
((TileFluidDistribution) tile).setSubID(stack.getItemDamage());
|
||||||
|
|
||||||
if (stack.getTagCompound() != null && stack.getTagCompound().hasKey("fluid"))
|
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 true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,13 +55,18 @@ public class RenderTank extends TileEntitySpecialRenderer implements ISimpleItem
|
||||||
{
|
{
|
||||||
if (tileEntity instanceof TileTank)
|
if (tileEntity instanceof TileTank)
|
||||||
{
|
{
|
||||||
byte renderSides = ((TileTank) tileEntity).renderSides;
|
|
||||||
|
|
||||||
GL11.glPushMatrix();
|
GL11.glPushMatrix();
|
||||||
GL11.glTranslated(x + 0.5, y + 0.5, z + 0.5);
|
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);
|
RenderUtility.renderBlockWithConnectedTextures(renderSides, Archaic.blockTank, null, ResonantInduction.blockMachinePart, null);
|
||||||
|
|
||||||
if (tileEntity.worldObj != null)
|
if (fluid != null)
|
||||||
|
{
|
||||||
|
GL11.glPushMatrix();
|
||||||
|
|
||||||
|
if (tileEntity.worldObj != null && !fluid.getFluid().isGaseous())
|
||||||
{
|
{
|
||||||
GL11.glScaled(0.99, 0.99, 0.99);
|
GL11.glScaled(0.99, 0.99, 0.99);
|
||||||
FluidTank tank = ((TileTank) tileEntity).getInternalTank();
|
FluidTank tank = ((TileTank) tileEntity).getInternalTank();
|
||||||
|
@ -75,14 +80,14 @@ public class RenderTank extends TileEntitySpecialRenderer implements ISimpleItem
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (fluid != null)
|
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;
|
int capacity = tileEntity instanceof TileTank ? ((TileTank) tileEntity).getInternalTank().getCapacity() : fluid.amount;
|
||||||
double filledPercentage = (double) fluid.amount / (double) capacity;
|
double filledPercentage = (double) fluid.amount / (double) capacity;
|
||||||
double renderPercentage = fluid.getFluid().isGaseous() ? 1 : filledPercentage;
|
double renderPercentage = fluid.getFluid().isGaseous() ? 1 : filledPercentage;
|
||||||
|
|
||||||
int[] displayList = FluidRenderUtility.getFluidDisplayLists(fluid, tileEntity.worldObj, false);
|
int[] displayList = FluidRenderUtility.getFluidDisplayLists(fluid, tileEntity.worldObj, false);
|
||||||
|
|
||||||
GL11.glPushMatrix();
|
|
||||||
GL11.glPushAttrib(GL11.GL_ENABLE_BIT);
|
GL11.glPushAttrib(GL11.GL_ENABLE_BIT);
|
||||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||||
GL11.glDisable(GL11.GL_LIGHTING);
|
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);
|
GL11.glColor4d(color.getRed() / 255f, color.getGreen() / 255f, color.getBlue() / 255f, fluid.getFluid().isGaseous() ? filledPercentage : 1);
|
||||||
|
|
||||||
RenderUtility.bind(FluidRenderUtility.getFluidSheet(fluid));
|
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))]);
|
GL11.glCallList(displayList[(int) (renderPercentage * (FluidRenderUtility.DISPLAY_STAGES - 1))]);
|
||||||
RenderUtility.disableBlending();
|
RenderUtility.disableBlending();
|
||||||
GL11.glPopAttrib();
|
GL11.glPopAttrib();
|
||||||
GL11.glPopMatrix();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GL11.glPopMatrix();
|
||||||
}
|
}
|
||||||
|
|
||||||
GL11.glPopMatrix();
|
GL11.glPopMatrix();
|
||||||
|
|
|
@ -11,10 +11,10 @@ import net.minecraftforge.fluids.FluidTank;
|
||||||
import net.minecraftforge.fluids.FluidTankInfo;
|
import net.minecraftforge.fluids.FluidTankInfo;
|
||||||
import net.minecraftforge.fluids.IFluidHandler;
|
import net.minecraftforge.fluids.IFluidHandler;
|
||||||
import resonantinduction.core.ResonantInduction;
|
import resonantinduction.core.ResonantInduction;
|
||||||
|
import resonantinduction.core.ResonantInduction.RecipeType;
|
||||||
import universalelectricity.api.vector.Vector3;
|
import universalelectricity.api.vector.Vector3;
|
||||||
import calclavia.api.resonantinduction.recipe.MachineRecipes;
|
import calclavia.api.recipe.MachineRecipes;
|
||||||
import calclavia.api.resonantinduction.recipe.RecipeResource;
|
import calclavia.api.recipe.RecipeResource;
|
||||||
import calclavia.api.resonantinduction.recipe.MachineRecipes.RecipeType;
|
|
||||||
import calclavia.lib.network.IPacketReceiver;
|
import calclavia.lib.network.IPacketReceiver;
|
||||||
import calclavia.lib.network.PacketHandler;
|
import calclavia.lib.network.PacketHandler;
|
||||||
import calclavia.lib.prefab.tile.TileExternalInventory;
|
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);
|
Vector3 checkPos = new Vector3(this).translate(0, 1, 0);
|
||||||
FluidStack drainStack = FluidUtility.drainBlock(worldObj, checkPos, false);
|
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))
|
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()))
|
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)
|
for (RecipeResource output : outputs)
|
||||||
{
|
{
|
||||||
|
|
|
@ -6,10 +6,10 @@ import net.minecraft.nbt.NBTTagCompound;
|
||||||
import net.minecraft.network.packet.Packet;
|
import net.minecraft.network.packet.Packet;
|
||||||
import net.minecraftforge.common.ForgeDirection;
|
import net.minecraftforge.common.ForgeDirection;
|
||||||
import resonantinduction.core.ResonantInduction;
|
import resonantinduction.core.ResonantInduction;
|
||||||
|
import resonantinduction.core.ResonantInduction.RecipeType;
|
||||||
import universalelectricity.api.vector.Vector3;
|
import universalelectricity.api.vector.Vector3;
|
||||||
import calclavia.api.resonantinduction.recipe.MachineRecipes;
|
import calclavia.api.recipe.MachineRecipes;
|
||||||
import calclavia.api.resonantinduction.recipe.RecipeResource;
|
import calclavia.api.recipe.RecipeResource;
|
||||||
import calclavia.api.resonantinduction.recipe.MachineRecipes.RecipeType;
|
|
||||||
import calclavia.lib.network.IPacketReceiver;
|
import calclavia.lib.network.IPacketReceiver;
|
||||||
import calclavia.lib.network.PacketHandler;
|
import calclavia.lib.network.PacketHandler;
|
||||||
import calclavia.lib.prefab.tile.TileExternalInventory;
|
import calclavia.lib.prefab.tile.TileExternalInventory;
|
||||||
|
@ -30,7 +30,7 @@ public class TileMillstone extends TileExternalInventory implements IPacketRecei
|
||||||
|
|
||||||
public void doGrind(Vector3 spawnPos)
|
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)
|
if (outputs.length > 0)
|
||||||
{
|
{
|
||||||
|
@ -56,7 +56,7 @@ public class TileMillstone extends TileExternalInventory implements IPacketRecei
|
||||||
@Override
|
@Override
|
||||||
public boolean isItemValidForSlot(int i, ItemStack itemStack)
|
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
|
@Override
|
||||||
|
|
|
@ -200,7 +200,7 @@ public class Electrical
|
||||||
|
|
||||||
/** Generators **/
|
/** Generators **/
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(blockSolarPanel, "CCC", "WWW", "III", 'W', "wire", 'C', Item.coal, 'I', UniversalRecipe.PRIMARY_METAL.get()));
|
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));
|
GameRegistry.addRecipe(new ShapedOreRecipe(blockThermopile, "ORO", "OWO", "OOO", 'W', "wire", 'O', Block.obsidian, 'R', Item.redstone));
|
||||||
|
|
||||||
/** Wire Compatiblity **/
|
/** Wire Compatiblity **/
|
||||||
|
|
|
@ -2,7 +2,6 @@ package resonantinduction.electrical.armbot.task;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import calclavia.api.resonantinduction.electrical.ArmbotEntity;
|
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.entity.EntityAgeable;
|
import net.minecraft.entity.EntityAgeable;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
@ -12,6 +11,7 @@ import net.minecraft.util.AxisAlignedBB;
|
||||||
import resonantinduction.core.ArgumentData;
|
import resonantinduction.core.ArgumentData;
|
||||||
import resonantinduction.electrical.armbot.IArmbot;
|
import resonantinduction.electrical.armbot.IArmbot;
|
||||||
import resonantinduction.electrical.armbot.TaskBaseProcess;
|
import resonantinduction.electrical.armbot.TaskBaseProcess;
|
||||||
|
import calclavia.api.resonantinduction.electrical.ArmbotEntity;
|
||||||
|
|
||||||
public class TaskGrabEntity extends TaskGrabPrefab
|
public class TaskGrabEntity extends TaskGrabPrefab
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
package resonantinduction.electrical.armbot.task;
|
package resonantinduction.electrical.armbot.task;
|
||||||
|
|
||||||
import calclavia.api.resonantinduction.mechanical.IBelt;
|
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraftforge.common.ForgeDirection;
|
import net.minecraftforge.common.ForgeDirection;
|
||||||
import resonantinduction.electrical.armbot.IArmbot;
|
import resonantinduction.electrical.armbot.IArmbot;
|
||||||
import resonantinduction.electrical.armbot.TaskBaseArmbot;
|
import resonantinduction.electrical.armbot.TaskBaseArmbot;
|
||||||
import universalelectricity.api.vector.Vector2;
|
import universalelectricity.api.vector.Vector2;
|
||||||
import universalelectricity.api.vector.Vector3;
|
import universalelectricity.api.vector.Vector3;
|
||||||
|
import calclavia.api.resonantinduction.mechanical.IBelt;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Prefab for grab based commands
|
* Prefab for grab based commands
|
||||||
|
|
|
@ -21,7 +21,6 @@ import universalelectricity.api.electricity.IElectricalNetwork;
|
||||||
import universalelectricity.api.energy.IConductor;
|
import universalelectricity.api.energy.IConductor;
|
||||||
import universalelectricity.api.energy.IEnergyNetwork;
|
import universalelectricity.api.energy.IEnergyNetwork;
|
||||||
import universalelectricity.api.net.IConnector;
|
import universalelectricity.api.net.IConnector;
|
||||||
import calclavia.api.atomicscience.ITemperature;
|
|
||||||
import calclavia.api.resonantinduction.IMechanicalNode;
|
import calclavia.api.resonantinduction.IMechanicalNode;
|
||||||
import calclavia.lib.grid.INodeProvider;
|
import calclavia.lib.grid.INodeProvider;
|
||||||
import calclavia.lib.network.IPacketReceiver;
|
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));
|
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));
|
getNetwork().energyGraph.queue(CompatibilityModule.getEnergy(tileEntity, receivingSide));
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -8,10 +8,10 @@ import java.util.Iterator;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.WeakHashMap;
|
import java.util.WeakHashMap;
|
||||||
|
|
||||||
import calclavia.api.mffs.fortron.IServerThread;
|
|
||||||
import net.minecraft.server.ServerListenThread;
|
import net.minecraft.server.ServerListenThread;
|
||||||
import net.minecraft.server.ThreadMinecraftServer;
|
import net.minecraft.server.ThreadMinecraftServer;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
import calclavia.api.mffs.fortron.IServerThread;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Calclavia
|
* @author Calclavia
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
package resonantinduction.quantum.gate;
|
package resonantinduction.quantum.gate;
|
||||||
|
|
||||||
import calclavia.api.icbm.IBlockFrequency;
|
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.inventory.ISidedInventory;
|
import net.minecraft.inventory.ISidedInventory;
|
||||||
import net.minecraftforge.fluids.FluidTank;
|
import net.minecraftforge.fluids.FluidTank;
|
||||||
import net.minecraftforge.fluids.IFluidHandler;
|
import net.minecraftforge.fluids.IFluidHandler;
|
||||||
|
import calclavia.api.icbm.IBlockFrequency;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Only TileEntities should implement this.
|
* Only TileEntities should implement this.
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
package resonantinduction.quantum.gate;
|
package resonantinduction.quantum.gate;
|
||||||
|
|
||||||
import calclavia.api.icbm.IBlockFrequency;
|
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
@ -9,6 +8,7 @@ import net.minecraftforge.fluids.Fluid;
|
||||||
import net.minecraftforge.fluids.FluidStack;
|
import net.minecraftforge.fluids.FluidStack;
|
||||||
import net.minecraftforge.fluids.FluidTank;
|
import net.minecraftforge.fluids.FluidTank;
|
||||||
import net.minecraftforge.fluids.FluidTankInfo;
|
import net.minecraftforge.fluids.FluidTankInfo;
|
||||||
|
import calclavia.api.icbm.IBlockFrequency;
|
||||||
import codechicken.multipart.TMultiPart;
|
import codechicken.multipart.TMultiPart;
|
||||||
import codechicken.multipart.TileMultipart;
|
import codechicken.multipart.TileMultipart;
|
||||||
|
|
||||||
|
|
|
@ -4,14 +4,14 @@ import java.util.Collection;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import calclavia.api.resonantinduction.IMechanicalNode;
|
|
||||||
import calclavia.lib.grid.INodeProvider;
|
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraftforge.common.ForgeDirection;
|
import net.minecraftforge.common.ForgeDirection;
|
||||||
import resonantinduction.mechanical.Mechanical;
|
import resonantinduction.mechanical.Mechanical;
|
||||||
import resonantinduction.mechanical.energy.grid.MechanicalNode;
|
import resonantinduction.mechanical.energy.grid.MechanicalNode;
|
||||||
import resonantinduction.mechanical.energy.grid.PartMechanical;
|
import resonantinduction.mechanical.energy.grid.PartMechanical;
|
||||||
|
import calclavia.api.resonantinduction.IMechanicalNode;
|
||||||
|
import calclavia.lib.grid.INodeProvider;
|
||||||
import codechicken.lib.raytracer.IndexedCuboid6;
|
import codechicken.lib.raytracer.IndexedCuboid6;
|
||||||
import codechicken.lib.vec.Cuboid6;
|
import codechicken.lib.vec.Cuboid6;
|
||||||
import codechicken.lib.vec.Vector3;
|
import codechicken.lib.vec.Vector3;
|
||||||
|
|
|
@ -3,16 +3,16 @@ package resonantinduction.mechanical.energy.grid;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.Map.Entry;
|
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.nbt.NBTTagCompound;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraftforge.common.ForgeDirection;
|
import net.minecraftforge.common.ForgeDirection;
|
||||||
import resonantinduction.core.ResonantInduction;
|
import resonantinduction.core.ResonantInduction;
|
||||||
import universalelectricity.api.vector.Vector3;
|
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;
|
import codechicken.multipart.TMultiPart;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -3,12 +3,12 @@ package resonantinduction.mechanical.energy.grid;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import calclavia.lib.grid.INode;
|
|
||||||
import calclavia.lib.grid.INodeProvider;
|
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
import net.minecraft.util.MovingObjectPosition;
|
import net.minecraft.util.MovingObjectPosition;
|
||||||
import net.minecraftforge.common.ForgeDirection;
|
import net.minecraftforge.common.ForgeDirection;
|
||||||
|
import calclavia.lib.grid.INode;
|
||||||
|
import calclavia.lib.grid.INodeProvider;
|
||||||
import codechicken.lib.data.MCDataInput;
|
import codechicken.lib.data.MCDataInput;
|
||||||
import codechicken.lib.data.MCDataOutput;
|
import codechicken.lib.data.MCDataOutput;
|
||||||
import codechicken.multipart.JCuboidPart;
|
import codechicken.multipart.JCuboidPart;
|
||||||
|
|
|
@ -9,7 +9,6 @@ import net.minecraftforge.client.model.IModelCustom;
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
import resonantinduction.core.Reference;
|
import resonantinduction.core.Reference;
|
||||||
import calclavia.lib.prefab.turbine.TileTurbine;
|
|
||||||
import calclavia.lib.render.RenderUtility;
|
import calclavia.lib.render.RenderUtility;
|
||||||
import calclavia.lib.render.item.ISimpleItemRenderer;
|
import calclavia.lib.render.item.ISimpleItemRenderer;
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
|
|
@ -2,16 +2,15 @@ package resonantinduction.mechanical.energy.turbine;
|
||||||
|
|
||||||
import java.lang.reflect.Method;
|
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.Block;
|
||||||
import net.minecraft.block.BlockFluid;
|
import net.minecraft.block.BlockFluid;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.util.Vec3;
|
import net.minecraft.util.Vec3;
|
||||||
import net.minecraft.world.IBlockAccess;
|
import net.minecraft.world.IBlockAccess;
|
||||||
import net.minecraftforge.common.ForgeDirection;
|
import net.minecraftforge.common.ForgeDirection;
|
||||||
|
import resonantinduction.mechanical.energy.grid.MechanicalNode;
|
||||||
import universalelectricity.api.vector.Vector3;
|
import universalelectricity.api.vector.Vector3;
|
||||||
|
import calclavia.lib.grid.INodeProvider;
|
||||||
import cpw.mods.fml.relauncher.ReflectionHelper;
|
import cpw.mods.fml.relauncher.ReflectionHelper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -11,6 +11,7 @@ import net.minecraft.world.biome.BiomeGenOcean;
|
||||||
import net.minecraft.world.biome.BiomeGenPlains;
|
import net.minecraft.world.biome.BiomeGenPlains;
|
||||||
import net.minecraftforge.common.ForgeDirection;
|
import net.minecraftforge.common.ForgeDirection;
|
||||||
import universalelectricity.api.vector.Vector3;
|
import universalelectricity.api.vector.Vector3;
|
||||||
|
import calclavia.api.resonantinduction.IBoilHandler;
|
||||||
import calclavia.lib.prefab.vector.Cuboid;
|
import calclavia.lib.prefab.vector.Cuboid;
|
||||||
import calclavia.lib.utility.inventory.InventoryUtility;
|
import calclavia.lib.utility.inventory.InventoryUtility;
|
||||||
|
|
||||||
|
@ -21,7 +22,7 @@ import calclavia.lib.utility.inventory.InventoryUtility;
|
||||||
* @author Calclavia
|
* @author Calclavia
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class TileWindTurbine extends TileMechanicalTurbine
|
public class TileWindTurbine extends TileMechanicalTurbine implements IBoilHandler
|
||||||
{
|
{
|
||||||
private final byte[] openBlockCache = new byte[224];
|
private final byte[] openBlockCache = new byte[224];
|
||||||
private int checkCount = 0;
|
private int checkCount = 0;
|
||||||
|
|
|
@ -12,13 +12,13 @@ import org.apache.commons.lang3.ArrayUtils;
|
||||||
|
|
||||||
import resonantinduction.core.Reference;
|
import resonantinduction.core.Reference;
|
||||||
import resonantinduction.core.ResonantInduction;
|
import resonantinduction.core.ResonantInduction;
|
||||||
|
import resonantinduction.core.ResonantInduction.RecipeType;
|
||||||
import resonantinduction.core.Timer;
|
import resonantinduction.core.Timer;
|
||||||
import resonantinduction.mechanical.energy.grid.TileMechanical;
|
import resonantinduction.mechanical.energy.grid.TileMechanical;
|
||||||
import universalelectricity.api.vector.Vector3;
|
import universalelectricity.api.vector.Vector3;
|
||||||
|
import calclavia.api.recipe.MachineRecipes;
|
||||||
|
import calclavia.api.recipe.RecipeResource;
|
||||||
import calclavia.api.resonantinduction.IMechanicalNode;
|
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.tile.IRotatable;
|
||||||
import calclavia.lib.prefab.vector.Cuboid;
|
import calclavia.lib.prefab.vector.Cuboid;
|
||||||
|
|
||||||
|
@ -201,7 +201,7 @@ public class TileGrindingWheel extends TileMechanical implements IRotatable
|
||||||
public boolean canGrind(ItemStack itemStack)
|
public boolean canGrind(ItemStack itemStack)
|
||||||
{
|
{
|
||||||
// TODO: We don't have a crusher yet, so our grinder currently crushes ores.
|
// 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)
|
private boolean doGrind(EntityItem entity)
|
||||||
|
@ -209,7 +209,7 @@ public class TileGrindingWheel extends TileMechanical implements IRotatable
|
||||||
ItemStack itemStack = entity.getEntityItem();
|
ItemStack itemStack = entity.getEntityItem();
|
||||||
|
|
||||||
// TODO: Remove this later on when crusher if complete.
|
// 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)
|
for (RecipeResource resource : results)
|
||||||
{
|
{
|
||||||
|
|
|
@ -14,14 +14,14 @@ import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.util.AxisAlignedBB;
|
import net.minecraft.util.AxisAlignedBB;
|
||||||
import net.minecraftforge.common.ForgeDirection;
|
import net.minecraftforge.common.ForgeDirection;
|
||||||
import resonantinduction.core.Reference;
|
import resonantinduction.core.Reference;
|
||||||
|
import resonantinduction.core.ResonantInduction.RecipeType;
|
||||||
import resonantinduction.core.Timer;
|
import resonantinduction.core.Timer;
|
||||||
import resonantinduction.core.resource.ResourceGenerator;
|
import resonantinduction.core.resource.ResourceGenerator;
|
||||||
import resonantinduction.core.resource.fluid.BlockFluidMixture;
|
import resonantinduction.core.resource.fluid.BlockFluidMixture;
|
||||||
import resonantinduction.mechanical.energy.grid.TileMechanical;
|
import resonantinduction.mechanical.energy.grid.TileMechanical;
|
||||||
import universalelectricity.api.vector.Vector3;
|
import universalelectricity.api.vector.Vector3;
|
||||||
|
import calclavia.api.recipe.MachineRecipes;
|
||||||
import calclavia.api.resonantinduction.IMechanicalNode;
|
import calclavia.api.resonantinduction.IMechanicalNode;
|
||||||
import calclavia.api.resonantinduction.recipe.MachineRecipes;
|
|
||||||
import calclavia.api.resonantinduction.recipe.MachineRecipes.RecipeType;
|
|
||||||
import calclavia.lib.utility.inventory.InventoryUtility;
|
import calclavia.lib.utility.inventory.InventoryUtility;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -100,7 +100,7 @@ public class TileMixer extends TileMechanical implements IInventory
|
||||||
|
|
||||||
if (entity instanceof EntityItem)
|
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);
|
processItems.add((EntityItem) entity);
|
||||||
}
|
}
|
||||||
|
@ -256,6 +256,6 @@ public class TileMixer extends TileMechanical implements IInventory
|
||||||
@Override
|
@Override
|
||||||
public boolean isItemValidForSlot(int i, ItemStack itemstack)
|
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 resonantinduction.core.resource.fluid.TileFluidMixture;
|
||||||
import calclavia.lib.config.ConfigHandler;
|
import calclavia.lib.config.ConfigHandler;
|
||||||
import calclavia.lib.content.ContentRegistry;
|
import calclavia.lib.content.ContentRegistry;
|
||||||
import calclavia.lib.grid.UpdateTicker;
|
|
||||||
import calclavia.lib.network.PacketAnnotation;
|
import calclavia.lib.network.PacketAnnotation;
|
||||||
import calclavia.lib.network.PacketHandler;
|
import calclavia.lib.network.PacketHandler;
|
||||||
import calclavia.lib.network.PacketTile;
|
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);
|
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
|
@EventHandler
|
||||||
public void preInit(FMLPreInitializationEvent evt)
|
public void preInit(FMLPreInitializationEvent evt)
|
||||||
{
|
{
|
||||||
|
|
|
@ -57,6 +57,14 @@ public class Settings
|
||||||
public static boolean SHINY_SILVER = true;
|
public static boolean SHINY_SILVER = true;
|
||||||
@Config(key = "Max EM Contractor Path")
|
@Config(key = "Max EM Contractor Path")
|
||||||
public static int MAX_LEVITATOR_DISTANCE = 200;
|
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)
|
public static void setModMetadata(ModMetadata metadata, String id, String name)
|
||||||
{
|
{
|
||||||
|
@ -88,13 +96,4 @@ public class Settings
|
||||||
|
|
||||||
return false;
|
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;
|
package resonantinduction.core.grid;
|
||||||
|
|
||||||
import java.util.HashSet;
|
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
import net.minecraftforge.common.ForgeDirection;
|
import net.minecraftforge.common.ForgeDirection;
|
||||||
import calclavia.lib.grid.INode;
|
import calclavia.lib.grid.INode;
|
||||||
import calclavia.lib.grid.INodeProvider;
|
import calclavia.lib.grid.INodeProvider;
|
||||||
|
|
|
@ -3,8 +3,6 @@ package resonantinduction.core.grid.fluid;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
|
|
||||||
import calclavia.lib.grid.Node;
|
|
||||||
import calclavia.lib.grid.TickingGrid;
|
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
@ -13,6 +11,8 @@ import net.minecraftforge.fluids.FluidStack;
|
||||||
import net.minecraftforge.fluids.FluidTank;
|
import net.minecraftforge.fluids.FluidTank;
|
||||||
import net.minecraftforge.fluids.IFluidHandler;
|
import net.minecraftforge.fluids.IFluidHandler;
|
||||||
import universalelectricity.api.vector.Vector3;
|
import universalelectricity.api.vector.Vector3;
|
||||||
|
import calclavia.lib.grid.Node;
|
||||||
|
import calclavia.lib.grid.TickingGrid;
|
||||||
import codechicken.multipart.TMultiPart;
|
import codechicken.multipart.TMultiPart;
|
||||||
|
|
||||||
public class FluidPressureNode extends Node<IPressureNodeProvider, TickingGrid, Object>
|
public class FluidPressureNode extends Node<IPressureNodeProvider, TickingGrid, Object>
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
package resonantinduction.core.grid.fluid;
|
package resonantinduction.core.grid.fluid;
|
||||||
|
|
||||||
import calclavia.lib.grid.INodeProvider;
|
|
||||||
import net.minecraftforge.fluids.FluidTank;
|
import net.minecraftforge.fluids.FluidTank;
|
||||||
import net.minecraftforge.fluids.IFluidHandler;
|
import net.minecraftforge.fluids.IFluidHandler;
|
||||||
|
import calclavia.lib.grid.INodeProvider;
|
||||||
|
|
||||||
public interface IPressureNodeProvider extends INodeProvider, IFluidHandler
|
public interface IPressureNodeProvider extends INodeProvider, IFluidHandler
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package resonantinduction.core.nei;
|
package resonantinduction.core.nei;
|
||||||
|
|
||||||
import calclavia.api.resonantinduction.recipe.MachineRecipes.RecipeType;
|
import resonantinduction.core.ResonantInduction.RecipeType;
|
||||||
import calclavia.lib.utility.LanguageUtility;
|
import calclavia.lib.utility.LanguageUtility;
|
||||||
|
|
||||||
public class RICrusherRecipeHandler extends RITemplateRecipeHandler
|
public class RICrusherRecipeHandler extends RITemplateRecipeHandler
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package resonantinduction.core.nei;
|
package resonantinduction.core.nei;
|
||||||
|
|
||||||
import calclavia.api.resonantinduction.recipe.MachineRecipes.RecipeType;
|
import resonantinduction.core.ResonantInduction.RecipeType;
|
||||||
import calclavia.lib.utility.LanguageUtility;
|
import calclavia.lib.utility.LanguageUtility;
|
||||||
|
|
||||||
public class RIGrinderRecipeHandler extends RITemplateRecipeHandler
|
public class RIGrinderRecipeHandler extends RITemplateRecipeHandler
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package resonantinduction.core.nei;
|
package resonantinduction.core.nei;
|
||||||
|
|
||||||
import calclavia.api.resonantinduction.recipe.MachineRecipes.RecipeType;
|
import resonantinduction.core.ResonantInduction.RecipeType;
|
||||||
import calclavia.lib.utility.LanguageUtility;
|
import calclavia.lib.utility.LanguageUtility;
|
||||||
|
|
||||||
public class RIMixerRecipeHandler extends RITemplateRecipeHandler
|
public class RIMixerRecipeHandler extends RITemplateRecipeHandler
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package resonantinduction.core.nei;
|
package resonantinduction.core.nei;
|
||||||
|
|
||||||
import calclavia.api.resonantinduction.recipe.MachineRecipes.RecipeType;
|
import resonantinduction.core.ResonantInduction.RecipeType;
|
||||||
import calclavia.lib.utility.LanguageUtility;
|
import calclavia.lib.utility.LanguageUtility;
|
||||||
|
|
||||||
public class RISawmillRecipeHandler extends RITemplateRecipeHandler
|
public class RISawmillRecipeHandler extends RITemplateRecipeHandler
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package resonantinduction.core.nei;
|
package resonantinduction.core.nei;
|
||||||
|
|
||||||
import calclavia.api.resonantinduction.recipe.MachineRecipes.RecipeType;
|
import resonantinduction.core.ResonantInduction.RecipeType;
|
||||||
import calclavia.lib.utility.LanguageUtility;
|
import calclavia.lib.utility.LanguageUtility;
|
||||||
|
|
||||||
public class RISmelterRecipeHandler extends RITemplateRecipeHandler
|
public class RISmelterRecipeHandler extends RITemplateRecipeHandler
|
||||||
|
|
|
@ -13,11 +13,12 @@ import net.minecraft.item.ItemStack;
|
||||||
import net.minecraftforge.fluids.FluidStack;
|
import net.minecraftforge.fluids.FluidStack;
|
||||||
import net.minecraftforge.oredict.OreDictionary;
|
import net.minecraftforge.oredict.OreDictionary;
|
||||||
import resonantinduction.core.Reference;
|
import resonantinduction.core.Reference;
|
||||||
import calclavia.api.resonantinduction.recipe.MachineRecipes;
|
import resonantinduction.core.ResonantInduction.RecipeType;
|
||||||
import calclavia.api.resonantinduction.recipe.RecipeResource;
|
import calclavia.api.recipe.MachineRecipes;
|
||||||
import calclavia.api.resonantinduction.recipe.RecipeResource.FluidStackResource;
|
import calclavia.api.recipe.RecipeResource;
|
||||||
import calclavia.api.resonantinduction.recipe.RecipeResource.ItemStackResource;
|
import calclavia.api.recipe.RecipeResource.FluidStackResource;
|
||||||
import calclavia.api.resonantinduction.recipe.RecipeResource.OreDictResource;
|
import calclavia.api.recipe.RecipeResource.ItemStackResource;
|
||||||
|
import calclavia.api.recipe.RecipeResource.OreDictResource;
|
||||||
import calclavia.lib.utility.LanguageUtility;
|
import calclavia.lib.utility.LanguageUtility;
|
||||||
import codechicken.core.gui.GuiDraw;
|
import codechicken.core.gui.GuiDraw;
|
||||||
import codechicken.nei.PositionedStack;
|
import codechicken.nei.PositionedStack;
|
||||||
|
@ -32,7 +33,7 @@ public abstract class RITemplateRecipeHandler extends TemplateRecipeHandler
|
||||||
@Override
|
@Override
|
||||||
public abstract String getRecipeName();
|
public abstract String getRecipeName();
|
||||||
|
|
||||||
public abstract MachineRecipes.RecipeType getMachine();
|
public abstract RecipeType getMachine();
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getOverlayIdentifier()
|
public String getOverlayIdentifier()
|
||||||
|
@ -69,7 +70,7 @@ public abstract class RITemplateRecipeHandler extends TemplateRecipeHandler
|
||||||
{
|
{
|
||||||
if (outputId.equals(this.getOverlayIdentifier()))
|
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);
|
CachedRIRecipe recipe = new CachedRIRecipe(irecipe);
|
||||||
this.arecipes.add(recipe);
|
this.arecipes.add(recipe);
|
||||||
|
@ -164,7 +165,7 @@ public abstract class RITemplateRecipeHandler extends TemplateRecipeHandler
|
||||||
@Override
|
@Override
|
||||||
public void loadCraftingRecipes(ItemStack result)
|
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);
|
CachedRIRecipe recipe = new CachedRIRecipe(irecipe);
|
||||||
if (recipe.canProduce(result))
|
if (recipe.canProduce(result))
|
||||||
|
@ -179,7 +180,7 @@ public abstract class RITemplateRecipeHandler extends TemplateRecipeHandler
|
||||||
{
|
{
|
||||||
if (inputId.equals(this.getOverlayIdentifier()))
|
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);
|
CachedRIRecipe recipe = new CachedRIRecipe(irecipe);
|
||||||
this.arecipes.add(recipe);
|
this.arecipes.add(recipe);
|
||||||
|
@ -194,7 +195,7 @@ public abstract class RITemplateRecipeHandler extends TemplateRecipeHandler
|
||||||
@Override
|
@Override
|
||||||
public void loadUsageRecipes(ItemStack ingredient)
|
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);
|
CachedRIRecipe recipe = new CachedRIRecipe(irecipe);
|
||||||
if (recipe.doesUse(ingredient))
|
if (recipe.doesUse(ingredient))
|
||||||
|
|
|
@ -4,9 +4,6 @@ import java.util.Collection;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.Set;
|
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.particle.EffectRenderer;
|
||||||
import net.minecraft.client.renderer.RenderBlocks;
|
import net.minecraft.client.renderer.RenderBlocks;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
@ -15,6 +12,9 @@ import net.minecraft.nbt.NBTTagCompound;
|
||||||
import net.minecraft.util.Icon;
|
import net.minecraft.util.Icon;
|
||||||
import net.minecraft.util.MovingObjectPosition;
|
import net.minecraft.util.MovingObjectPosition;
|
||||||
import net.minecraftforge.common.ForgeDirection;
|
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.MCDataInput;
|
||||||
import codechicken.lib.data.MCDataOutput;
|
import codechicken.lib.data.MCDataOutput;
|
||||||
import codechicken.lib.raytracer.IndexedCuboid6;
|
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 net.minecraftforge.oredict.OreDictionary.OreRegisterEvent;
|
||||||
import resonantinduction.core.Reference;
|
import resonantinduction.core.Reference;
|
||||||
import resonantinduction.core.ResonantInduction;
|
import resonantinduction.core.ResonantInduction;
|
||||||
|
import resonantinduction.core.ResonantInduction.RecipeType;
|
||||||
import resonantinduction.core.Settings;
|
import resonantinduction.core.Settings;
|
||||||
import resonantinduction.core.fluid.FluidColored;
|
import resonantinduction.core.fluid.FluidColored;
|
||||||
import resonantinduction.core.resource.fluid.BlockFluidMaterial;
|
import resonantinduction.core.resource.fluid.BlockFluidMaterial;
|
||||||
import resonantinduction.core.resource.fluid.BlockFluidMixture;
|
import resonantinduction.core.resource.fluid.BlockFluidMixture;
|
||||||
import calclavia.api.resonantinduction.recipe.MachineRecipes;
|
import calclavia.api.recipe.MachineRecipes;
|
||||||
import calclavia.api.resonantinduction.recipe.OreDetectionBlackList;
|
|
||||||
import calclavia.api.resonantinduction.recipe.MachineRecipes.RecipeType;
|
|
||||||
import calclavia.lib.config.Config;
|
import calclavia.lib.config.Config;
|
||||||
import calclavia.lib.utility.LanguageUtility;
|
import calclavia.lib.utility.LanguageUtility;
|
||||||
import calclavia.lib.utility.nbt.IVirtualObject;
|
import calclavia.lib.utility.nbt.IVirtualObject;
|
||||||
|
@ -154,15 +153,15 @@ public class ResourceGenerator implements IVirtualObject
|
||||||
OreDictionary.registerOre("rubble" + nameCaps, ResonantInduction.itemRubble.getStackFromMaterial(materialName));
|
OreDictionary.registerOre("rubble" + nameCaps, ResonantInduction.itemRubble.getStackFromMaterial(materialName));
|
||||||
OreDictionary.registerOre("dustRefined" + nameCaps, ResonantInduction.itemRefinedDust.getStackFromMaterial(materialName));
|
OreDictionary.registerOre("dustRefined" + nameCaps, ResonantInduction.itemRefinedDust.getStackFromMaterial(materialName));
|
||||||
|
|
||||||
MachineRecipes.INSTANCE.addRecipe(RecipeType.GRINDER, "rubble" + nameCaps, dust, dust);
|
MachineRecipes.INSTANCE.addRecipe(RecipeType.GRINDER.name(), "rubble" + nameCaps, dust, dust);
|
||||||
MachineRecipes.INSTANCE.addRecipe(RecipeType.MIXER, "dust" + nameCaps, refinedDust);
|
MachineRecipes.INSTANCE.addRecipe(RecipeType.MIXER.name(), "dust" + nameCaps, refinedDust);
|
||||||
MachineRecipes.INSTANCE.addRecipe(RecipeType.SMELTER, new FluidStack(fluidMolten, FluidContainerRegistry.BUCKET_VOLUME), "ingot" + nameCaps);
|
MachineRecipes.INSTANCE.addRecipe(RecipeType.SMELTER.name(), new FluidStack(fluidMolten, FluidContainerRegistry.BUCKET_VOLUME), "ingot" + nameCaps);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
MachineRecipes.INSTANCE.addRecipe(RecipeType.GRINDER, rubble, dust, dust);
|
MachineRecipes.INSTANCE.addRecipe(RecipeType.GRINDER.name(), rubble, dust, dust);
|
||||||
MachineRecipes.INSTANCE.addRecipe(RecipeType.MIXER, dust, refinedDust);
|
MachineRecipes.INSTANCE.addRecipe(RecipeType.MIXER.name(), dust, refinedDust);
|
||||||
MachineRecipes.INSTANCE.addRecipe(RecipeType.SMELTER, new FluidStack(fluidMolten, FluidContainerRegistry.BUCKET_VOLUME), "ingot" + nameCaps);
|
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);
|
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)
|
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);
|
OreDictionary.registerOre("oreLapis", Block.oreLapis);
|
||||||
|
|
||||||
// Vanilla fluid recipes
|
// 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
|
// Vanilla crusher recipes
|
||||||
MachineRecipes.INSTANCE.addRecipe(RecipeType.CRUSHER, Block.cobblestone, Block.gravel);
|
MachineRecipes.INSTANCE.addRecipe(RecipeType.CRUSHER.name(), Block.cobblestone, Block.gravel);
|
||||||
MachineRecipes.INSTANCE.addRecipe(RecipeType.CRUSHER, Block.stone, Block.cobblestone);
|
MachineRecipes.INSTANCE.addRecipe(RecipeType.CRUSHER.name(), Block.stone, Block.cobblestone);
|
||||||
MachineRecipes.INSTANCE.addRecipe(RecipeType.CRUSHER, Block.chest, new ItemStack(Block.planks, 7, 0));
|
MachineRecipes.INSTANCE.addRecipe(RecipeType.CRUSHER.name(), Block.chest, new ItemStack(Block.planks, 7, 0));
|
||||||
|
|
||||||
// Vanilla grinder recipes
|
// Vanilla grinder recipes
|
||||||
MachineRecipes.INSTANCE.addRecipe(RecipeType.GRINDER, Block.cobblestone, Block.sand);
|
MachineRecipes.INSTANCE.addRecipe(RecipeType.GRINDER.name(), Block.cobblestone, Block.sand);
|
||||||
MachineRecipes.INSTANCE.addRecipe(RecipeType.GRINDER, Block.gravel, Block.sand);
|
MachineRecipes.INSTANCE.addRecipe(RecipeType.GRINDER.name(), Block.gravel, Block.sand);
|
||||||
MachineRecipes.INSTANCE.addRecipe(RecipeType.GRINDER, Block.glass, Block.sand);
|
MachineRecipes.INSTANCE.addRecipe(RecipeType.GRINDER.name(), Block.glass, Block.sand);
|
||||||
|
|
||||||
Iterator<String> it = materials.keySet().iterator();
|
Iterator<String> it = materials.keySet().iterator();
|
||||||
while (it.hasNext())
|
while (it.hasNext())
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package resonantinduction.core.resource.fluid;
|
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.block.material.Material;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.world.IBlockAccess;
|
import net.minecraft.world.IBlockAccess;
|
||||||
|
@ -11,8 +9,10 @@ import net.minecraftforge.fluids.Fluid;
|
||||||
import net.minecraftforge.fluids.FluidContainerRegistry;
|
import net.minecraftforge.fluids.FluidContainerRegistry;
|
||||||
import net.minecraftforge.fluids.FluidStack;
|
import net.minecraftforge.fluids.FluidStack;
|
||||||
import resonantinduction.core.Reference;
|
import resonantinduction.core.Reference;
|
||||||
|
import resonantinduction.core.ResonantInduction.RecipeType;
|
||||||
import resonantinduction.core.Settings;
|
import resonantinduction.core.Settings;
|
||||||
import resonantinduction.core.resource.ResourceGenerator;
|
import resonantinduction.core.resource.ResourceGenerator;
|
||||||
|
import calclavia.api.recipe.MachineRecipes;
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
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)
|
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)
|
if (getQuantaValue(world, x, y, z) < quantaPerBlock)
|
||||||
{
|
{
|
||||||
|
|
|
@ -3,14 +3,14 @@ package resonantinduction.core.resource.fluid;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.Set;
|
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.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.fluids.FluidStack;
|
import net.minecraftforge.fluids.FluidStack;
|
||||||
|
import resonantinduction.core.ResonantInduction.RecipeType;
|
||||||
import resonantinduction.core.resource.ResourceGenerator;
|
import resonantinduction.core.resource.ResourceGenerator;
|
||||||
import resonantinduction.core.resource.TileMaterial;
|
import resonantinduction.core.resource.TileMaterial;
|
||||||
|
import calclavia.api.recipe.MachineRecipes;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* NO-OP. Not yet properly implemented. We're not using TEs for now.
|
* 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)
|
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?
|
// TODO: Maybe we need to merge the stacks?
|
||||||
items.add(itemStack);
|
items.add(itemStack);
|
||||||
|
|
Loading…
Reference in a new issue