Plex-FAWE/src/main/java/com/sk89q/worldedit/extent/Extent.java

79 lines
2.3 KiB
Java
Raw Normal View History

2014-03-30 04:05:09 +00:00
/*
* WorldEdit, a Minecraft world manipulation toolkit
* Copyright (C) sk89q <http://www.sk89q.com>
* Copyright (C) WorldEdit team and contributors
*
2014-04-04 22:03:18 +00:00
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by the
* Free Software Foundation, either version 3 of the License, or
2014-03-30 04:05:09 +00:00
* (at your option) any later version.
*
2014-04-04 22:03:18 +00:00
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
* for more details.
2014-03-30 04:05:09 +00:00
*
2014-04-04 22:03:18 +00:00
* You should have received a copy of the GNU Lesser General Public License
2014-03-30 04:05:09 +00:00
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
2014-03-30 19:03:12 +00:00
package com.sk89q.worldedit.extent;
2014-03-30 04:05:09 +00:00
import com.sk89q.worldedit.Vector;
import com.sk89q.worldedit.entity.BaseEntity;
import com.sk89q.worldedit.entity.Entity;
import javax.annotation.Nullable;
import java.util.List;
2014-03-30 04:05:09 +00:00
/**
* A world, portion of a world, clipboard, or other object that can have blocks
* set or entities placed.
*
* @see InputExtent the get____() portion
* @see OutputExtent the set____() portion
2014-03-30 04:05:09 +00:00
*/
public interface Extent extends InputExtent, OutputExtent {
/**
* Get the minimum point in the extent.
* </p>
* If the extent is unbounded, then a large (negative) value may
* be returned.
*
* @return the minimum point
*/
Vector getMinimumPoint();
/**
* Get the maximum point in the extent.
* </p>
* If the extent is unbounded, then a large (positive) value may
* be returned.
*
* @return the maximum point
*/
Vector getMaximumPoint();
/**
* Get a list of all entities.
* </p>
* If the extent is not wholly loaded (i.e. a world being simulated in the
* game will not have every chunk loaded), then this list may not be
* incomplete.
*
* @return a list of entities
*/
List<Entity> getEntities();
/**
* Create an entity at the given location.
*
* @param position the position
* @param entity the entity
* @return a reference to the created entity, or null if the entity could not be created
*/
@Nullable Entity createEntity(Vector position, BaseEntity entity);
2014-03-30 04:05:09 +00:00
}