|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface TravelAgent
The Travel Agent handles the creation and the research of Nether and End portals when Entities try to use one.
It is used in EntityPortalEvent
and in
PlayerPortalEvent
to help developers
reproduce and/or modify Vanilla behaviour.
Method Summary | |
---|---|
boolean |
createPortal(Location location)
Attempt to create a portal near the given location. |
Location |
findOrCreate(Location location)
Attempt to find a portal near the given location, if a portal is not found it will attempt to create one. |
Location |
findPortal(Location location)
Attempt to find a portal near the given location. |
boolean |
getCanCreatePortal()
Returns whether the TravelAgent will attempt to create a destination portal or not. |
int |
getCreationRadius()
Gets the maximum radius from the given location to create a portal. |
int |
getSearchRadius()
Gets the search radius value for finding an available portal. |
void |
setCanCreatePortal(boolean create)
Sets whether the TravelAgent should attempt to create a destination portal or not. |
TravelAgent |
setCreationRadius(int radius)
Sets the maximum radius from the given location to create a portal. |
TravelAgent |
setSearchRadius(int radius)
Set the Block radius to search in for available portals. |
Method Detail |
---|
TravelAgent setSearchRadius(int radius)
radius
- the radius in which to search for a portal from the
location
int getSearchRadius()
TravelAgent setCreationRadius(int radius)
radius
- the radius in which to create a portal from the location
int getCreationRadius()
boolean getCanCreatePortal()
void setCanCreatePortal(boolean create)
create
- Sets whether the TravelAgent should create a destination
portal or notLocation findOrCreate(Location location)
location
- the location where the search for a portal should begin
createPortal(Location)
Location findPortal(Location location)
location
- the desired location of the portal
boolean createPortal(Location location)
In the case of a Nether portal teleportation, this will attempt to create a Nether portal.
In the case of an Ender portal teleportation, this will (re-)create the obsidian platform and clean blocks above it.
location
- the desired location of the portal
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |