use of ValkyrienWarfareBase.Relocation.SpatialDetector in project Valkyrien-Warfare-Revamped by ValkyrienWarfare.
the class PhysicsObject method processChunkClaims.
/*
* Generates the new chunks
*/
public void processChunkClaims(EntityPlayer player) {
BlockPos centerInWorld = new BlockPos(wrapper.posX, wrapper.posY, wrapper.posZ);
SpatialDetector detector = DetectorManager.getDetectorFor(detectorID, centerInWorld, worldObj, ValkyrienWarfareMod.maxShipSize + 1, true);
if (detector.foundSet.size() > ValkyrienWarfareMod.maxShipSize || detector.cleanHouse) {
if (player != null) {
player.addChatComponentMessage(new TextComponentString("Ship construction canceled because its exceeding the ship size limit (Raise with /physSettings maxShipSize <number>) ; Or because it's attatched to bedrock)"));
}
wrapper.setDead();
return;
}
assembleShip(player, detector, centerInWorld);
}
Aggregations