public class AutoPlaceEnvironment extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
AutoPlaceEnvironment.APILevel
Defines the various API level an
AutoPlaceEnvironment has implemented. |
| Modifier | Constructor and Description |
|---|---|
protected |
AutoPlaceEnvironment(AutoPlaceEnvironment parent) |
| Modifier and Type | Method and Description |
|---|---|
static AutoPlaceEnvironment |
fromLegacy(IItemSource source,
EntityPlayer actor,
Consumer<IChatComponent> chatter) |
EntityPlayer |
getActor()
The initiator of actions.
|
AutoPlaceEnvironment.APILevel |
getAPILevel() |
Consumer<IChatComponent> |
getChatter()
send error messages here.
|
ExtendedFacing |
getFacing() |
IItemSource |
getSource()
From where survival autoplace will drain resources.
|
boolean |
isContainedInPiece(int offsetA,
int offsetB,
int offsetC)
Test if given location is contained within the current piece.
|
AutoPlaceEnvironment |
withActor(EntityPlayer actor)
Return a new instance with actor modified to given value.
|
AutoPlaceEnvironment |
withChatter(Consumer<IChatComponent> chatter)
Return a new instance with chatter modified to given value.
|
AutoPlaceEnvironment |
withSource(IItemSource source)
Return a new instance with source modified to given value.
|
protected AutoPlaceEnvironment(AutoPlaceEnvironment parent)
public static AutoPlaceEnvironment fromLegacy(IItemSource source, EntityPlayer actor, Consumer<IChatComponent> chatter)
public AutoPlaceEnvironment.APILevel getAPILevel()
public IItemSource getSource()
public EntityPlayer getActor()
getChatter() might have. You might want to use
StructureLibAPI.addThrottledChat(Object, EntityPlayer, IChatComponent, short)
to help reduce spam.public Consumer<IChatComponent> getChatter()
public boolean isContainedInPiece(int offsetA,
int offsetB,
int offsetC)
offsetA - offset in A direction relative to current elementoffsetB - offset in B direction relative to current elementoffsetC - offset in C direction relative to current elementpublic ExtendedFacing getFacing()
public AutoPlaceEnvironment withSource(IItemSource source)
source - new sourcepublic AutoPlaceEnvironment withActor(EntityPlayer actor)
actor - new actorpublic AutoPlaceEnvironment withChatter(Consumer<IChatComponent> chatter)
chatter - new chatter