public interface IStructureElement<T>
| Modifier and Type | Interface and Description |
|---|---|
static class |
IStructureElement.PlaceResult |
| Modifier and Type | Method and Description |
|---|---|
boolean |
check(T t,
World world,
int x,
int y,
int z) |
default int |
getStepA() |
default int |
getStepB() |
default int |
getStepC() |
default boolean |
isNavigating() |
default IStructureElementNoPlacement<T> |
noPlacement()
Forget the messed up class dependency graph for now.
|
boolean |
placeBlock(T t,
World world,
int x,
int y,
int z,
ItemStack trigger) |
default boolean |
resetA() |
default boolean |
resetB() |
default boolean |
resetC() |
boolean |
spawnHint(T t,
World world,
int x,
int y,
int z,
ItemStack trigger) |
default IStructureElement.PlaceResult |
survivalPlaceBlock(T t,
World world,
int x,
int y,
int z,
ItemStack trigger,
IItemSource s,
EntityPlayerMP actor,
Consumer<IChatComponent> chatter)
Try place the block by taking resource from given IItemSource.
|
default IStructureElement.PlaceResult survivalPlaceBlock(T t, World world, int x, int y, int z, ItemStack trigger, IItemSource s, EntityPlayerMP actor, Consumer<IChatComponent> chatter)
You might want to use StructureUtility.survivalPlaceBlock(Block, int, World, int, int, int, IItemSource, EntityPlayerMP)
or its overloads to implement this.
trigger - trigger items - drain resources from this placeactor - source of action. for very critical errors you can also just send the error messages here, bypassing
any filter that chatter might have.chatter - send error messages here. Caller will choose an appropriate way to forward it to player if the
other fallbacks also fails.default IStructureElementNoPlacement<T> noPlacement()
default int getStepA()
default int getStepB()
default int getStepC()
default boolean resetA()
default boolean resetB()
default boolean resetC()
default boolean isNavigating()