Search in sources :

Example 1 with SpatialDetector

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);
}
Also used : MutableBlockPos(net.minecraft.util.math.BlockPos.MutableBlockPos) BlockPos(net.minecraft.util.math.BlockPos) SpatialDetector(ValkyrienWarfareBase.Relocation.SpatialDetector) TextComponentString(net.minecraft.util.text.TextComponentString)

Aggregations

SpatialDetector (ValkyrienWarfareBase.Relocation.SpatialDetector)1 BlockPos (net.minecraft.util.math.BlockPos)1 MutableBlockPos (net.minecraft.util.math.BlockPos.MutableBlockPos)1 TextComponentString (net.minecraft.util.text.TextComponentString)1