Fixed mixer and piston not connecting to gears

This commit is contained in:
Robert S 2014-08-30 09:41:49 -04:00
parent b83a350891
commit 0f10158583
3 changed files with 10 additions and 72 deletions

View file

@ -290,4 +290,10 @@ public class MechanicalNode extends MultipartNode implements IMechanicalNode, IS
} }
return false; return false;
} }
@Override
public boolean isValidConnection(Object object)
{
return true;
}
} }

View file

@ -1,11 +1,14 @@
package resonantinduction.mechanical.process.mixer; package resonantinduction.mechanical.process.mixer;
import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.common.util.ForgeDirection;
import resonantinduction.core.interfaces.IMechanicalNode; import resonantinduction.core.interfaces.IMechanicalNode;
import resonantinduction.mechanical.energy.grid.MechanicalNode; import resonantinduction.mechanical.energy.grid.MechanicalNode;
import universalelectricity.api.core.grid.INode; import universalelectricity.api.core.grid.INode;
import universalelectricity.api.core.grid.INodeProvider; import universalelectricity.api.core.grid.INodeProvider;
import java.util.WeakHashMap;
public class MixerNode extends MechanicalNode public class MixerNode extends MechanicalNode
{ {

View file

@ -30,9 +30,8 @@ import universalelectricity.core.transform.vector.Vector3;
/** /**
* @author Calclavia * @author Calclavia
*/ */
public class TileMixer extends TileMechanical implements IInventory public class TileMixer extends TileMechanical
{ {
public static final long POWER = 500000;
public static final int PROCESS_TIME = 12 * 20; public static final int PROCESS_TIME = 12 * 20;
public static final Timer<EntityItem> timer = new Timer<EntityItem>(); public static final Timer<EntityItem> timer = new Timer<EntityItem>();
@ -209,74 +208,4 @@ public class TileMixer extends TileMechanical implements IInventory
return false; return false;
} }
@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).add(ForgeDirection.getOrientation(worldObj.rand.nextInt(4) + 2)).add(0.5);
InventoryUtility.dropItemStack(worldObj, spawnVector, itemstack, 20, 0);
}
}
@Override
public String getInventoryName() {
return "Mixer";
}
@Override
public boolean hasCustomInventoryName() {
return true;
}
@Override
public int getInventoryStackLimit() {
return 64;
}
@Override
public boolean isUseableByPlayer(EntityPlayer p_70300_1_) {
return false;
}
@Override
public void openInventory() {
}
@Override
public void closeInventory() {
}
@Override
public boolean isItemValidForSlot(int i, ItemStack itemstack)
{
return MachineRecipes.INSTANCE.getOutput(RecipeType.MIXER.name(), itemstack).length > 0;
}
} }