Fixed multiblock creation

This commit is contained in:
Aidan C. Brady 2015-03-24 07:58:45 -04:00
parent f6f75e6ea1
commit 96ccdb8f58

View file

@ -194,12 +194,15 @@ public abstract class UpdateProtocol<T extends SynchronizedData<T>>
structure.minLocation = Coord4D.get(tile).translate(xmin, ymin, zmin); structure.minLocation = Coord4D.get(tile).translate(xmin, ymin, zmin);
structure.maxLocation = Coord4D.get(tile).translate(xmax, ymax, zmax); structure.maxLocation = Coord4D.get(tile).translate(xmax, ymax, zmax);
onStructureCreated(structure, origX, origY, origZ, xmin, xmax, ymin, ymax, zmin, zmax); if(structure.volLength >= 3 && structure.volHeight >= 3 && structure.volWidth >= 3)
if(structure.locations.contains(Coord4D.get(pointer)) && isCorrectCorner(Coord4D.get(tile), origX+xmin, origY+ymin, origZ+zmin))
{ {
structureFound = structure; onStructureCreated(structure, origX, origY, origZ, xmin, xmax, ymin, ymax, zmin, zmax);
return;
if(structure.locations.contains(Coord4D.get(pointer)) && isCorrectCorner(Coord4D.get(tile), origX+xmin, origY+ymin, origZ+zmin))
{
structureFound = structure;
return;
}
} }
} }
} }