Mixer now accepts hopper/pipe input from top
This commit is contained in:
parent
c6ac81c6a6
commit
8f0f38beb2
4 changed files with 82 additions and 4 deletions
|
@ -53,7 +53,7 @@ public class TileFilter extends TileFilterable implements IFilterable
|
|||
*/
|
||||
for (RecipeResource resoure : MachineRecipes.INSTANCE.getOutput(RecipeType.MIXER, "dust" + LanguageUtility.capitalizeFirst(ResourceGenerator.mixtureToMaterial(fluidBlock.getFluid().getName()))))
|
||||
{
|
||||
InventoryUtility.dropItemStack(worldObj, checkAbove.clone().add(0.5), resoure.getItemStack().copy());
|
||||
InventoryUtility.dropItemStack(worldObj, checkAbove.clone().add(0.5), resoure.getItemStack().copy(), 0, false);
|
||||
}
|
||||
|
||||
// TODO: Check if this is correct?
|
||||
|
|
|
@ -41,7 +41,7 @@ public class TankNetwork extends FluidDistributionetwork
|
|||
@Override
|
||||
public int compare(Object a, Object b)
|
||||
{
|
||||
if (networkTankFluid.getFluid().isGaseous())
|
||||
if (networkTankFluid != null && networkTankFluid.getFluid().isGaseous())
|
||||
return 0;
|
||||
|
||||
TileEntity wa = (TileEntity) a;
|
||||
|
|
|
@ -75,7 +75,6 @@ public class TileWaterTurbine extends TileMechanicalTurbine
|
|||
|
||||
if (blockID == Block.waterMoving.blockID || blockID == Block.waterStill.blockID)
|
||||
{
|
||||
|
||||
try
|
||||
{
|
||||
Method m = ReflectionHelper.findMethod(BlockFluid.class, null, new String[] { "getFlowVector", "func_72202_i" }, IBlockAccess.class, Integer.TYPE, Integer.TYPE, Integer.TYPE);
|
||||
|
|
|
@ -7,6 +7,8 @@ import java.util.Set;
|
|||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
|
@ -19,12 +21,13 @@ import resonantinduction.core.resource.ResourceGenerator;
|
|||
import resonantinduction.core.resource.fluid.BlockFluidMixture;
|
||||
import resonantinduction.mechanical.energy.network.TileMechanical;
|
||||
import universalelectricity.api.vector.Vector3;
|
||||
import calclavia.lib.utility.inventory.InventoryUtility;
|
||||
|
||||
/**
|
||||
* @author Calclavia
|
||||
*
|
||||
*/
|
||||
public class TileMixer extends TileMechanical
|
||||
public class TileMixer extends TileMechanical implements IInventory
|
||||
{
|
||||
public static final long POWER = 500000;
|
||||
public static final int PROCESS_TIME = 5 * 20;
|
||||
|
@ -167,7 +170,83 @@ public class TileMixer extends TileMechanical
|
|||
|
||||
@Override
|
||||
public boolean inverseRotation(ForgeDirection dir, IMechanical with)
|
||||
{
|
||||
return dir == ForgeDirection.DOWN;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getSizeInventory()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getStackInSlot(int i)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack decrStackSize(int i, int j)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getStackInSlotOnClosing(int i)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setInventorySlotContents(int i, ItemStack itemstack)
|
||||
{
|
||||
if (!worldObj.isRemote)
|
||||
{
|
||||
Vector3 spawnVector = new Vector3(this).translate(ForgeDirection.getOrientation(worldObj.rand.nextInt(4) + 2)).translate(0.5);
|
||||
InventoryUtility.dropItemStack(worldObj, spawnVector, itemstack, 20, false);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getInvName()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isInvNameLocalized()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getInventoryStackLimit()
|
||||
{
|
||||
return 64;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isUseableByPlayer(EntityPlayer entityplayer)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void openChest()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void closeChest()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isItemValidForSlot(int i, ItemStack itemstack)
|
||||
{
|
||||
return MachineRecipes.INSTANCE.getOutput(RecipeType.MIXER, itemstack).length > 0;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue