Fixed Metallurgic Infuser slots, added new helper UpdateProtocol methods

This commit is contained in:
aidancbrady 2016-01-16 11:29:37 -05:00
parent 7f21516841
commit c1c15ae707
2 changed files with 13 additions and 4 deletions

View file

@ -75,7 +75,7 @@ public class ContainerMetallurgicInfuser extends Container
{ {
if(InfuseRegistry.getObject(slotStack) != null && (tileEntity.infuseStored.type == null || tileEntity.infuseStored.type == InfuseRegistry.getObject(slotStack).type)) if(InfuseRegistry.getObject(slotStack) != null && (tileEntity.infuseStored.type == null || tileEntity.infuseStored.type == InfuseRegistry.getObject(slotStack).type))
{ {
if(!mergeItemStack(slotStack, 1, 2, false)) if(!mergeItemStack(slotStack, 0, 1, false))
{ {
return null; return null;
} }
@ -89,7 +89,7 @@ public class ContainerMetallurgicInfuser extends Container
} }
else if(isInputItem(slotStack)) else if(isInputItem(slotStack))
{ {
if(!mergeItemStack(slotStack, 2, 3, false)) if(!mergeItemStack(slotStack, 1, 2, false))
{ {
return null; return null;
} }

View file

@ -199,6 +199,8 @@ public abstract class UpdateProtocol<T extends SynchronizedData<T>>
onStructureCreated(structure, origX, origY, origZ, xmin, xmax, ymin, ymax, zmin, zmax); onStructureCreated(structure, origX, origY, origZ, xmin, xmax, ymin, ymax, zmin, zmax);
if(structure.locations.contains(Coord4D.get(pointer)) && isCorrectCorner(Coord4D.get(tile), origX+xmin, origY+ymin, origZ+zmin)) if(structure.locations.contains(Coord4D.get(pointer)) && isCorrectCorner(Coord4D.get(tile), origX+xmin, origY+ymin, origZ+zmin))
{
if(isInteriorValid(structure))
{ {
structureFound = structure; structureFound = structure;
return; return;
@ -206,7 +208,9 @@ public abstract class UpdateProtocol<T extends SynchronizedData<T>>
} }
} }
} }
}
innerNodes.clear();
iteratedNodes.add(tile); iteratedNodes.add(tile);
for(ForgeDirection side : ForgeDirection.VALID_DIRECTIONS) for(ForgeDirection side : ForgeDirection.VALID_DIRECTIONS)
@ -223,6 +227,11 @@ public abstract class UpdateProtocol<T extends SynchronizedData<T>>
} }
} }
public boolean isInteriorValid(T structure)
{
return true;
}
public ForgeDirection getSide(Coord4D obj, int xmin, int xmax, int ymin, int ymax, int zmin, int zmax) public ForgeDirection getSide(Coord4D obj, int xmin, int xmax, int ymin, int ymax, int zmin, int zmax)
{ {
if(obj.xCoord == xmin) if(obj.xCoord == xmin)