Interface ISurvivalConstructable
- All Superinterfaces:
IConstructable
An extension to
IConstructable. Tile Entities (or delegates returned by
IConstructableProvider.getConstructable() should implement this interface to allow third party tools and
StructureLib builtin constructable tools to trigger autoplace in survival mode.
While not originally planned, a creative player can also use this interface to trigger autoplace by using an
IItemSource with every possible items in the game.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final booleanEnd player might want to disable this hack if it turns out to be too crashy -
Method Summary
Modifier and TypeMethodDescriptionstatic EntityPlayerDeprecated.default intsurvivalConstruct(ItemStack stackSize, int elementBudget, IItemSource source, EntityPlayerMP actor) Deprecated.default intsurvivalConstruct(ItemStack stackSize, int elementBudget, ISurvivalBuildEnvironment env) Methods inherited from interface com.gtnewhorizon.structurelib.alignment.constructable.IConstructable
construct, getStructureDefinition, getStructureDescription
-
Field Details
-
DISABLE_HACKY_MIGRATION_CODE
static final boolean DISABLE_HACKY_MIGRATION_CODEEnd player might want to disable this hack if it turns out to be too crashy
-
-
Method Details
-
survivalConstruct
@Deprecated default int survivalConstruct(ItemStack stackSize, int elementBudget, IItemSource source, EntityPlayerMP actor) Deprecated.Construct the structure usingIStructureElement.survivalPlaceBlock(Object, World, int, int, int, ItemStack, IItemSource, EntityPlayerMP, java.util.function.Consumer)orIStructureDefinition.survivalBuild(Object, ItemStack, String, World, ExtendedFacing, int, int, int, int, int, int, int, IItemSource, EntityPlayerMP, boolean)- Parameters:
elementBudget- The server configured element budget. The implementor can choose to tune this up a bit if the structure is too big, but generally should not be a 4 digits number to not overwhelm the server- Returns:
- -1 if done, otherwise number of elements placed this round
-
survivalConstruct
default int survivalConstruct(ItemStack stackSize, int elementBudget, ISurvivalBuildEnvironment env) Construct the structure usingIStructureElement.survivalPlaceBlock(Object, World, int, int, int, ItemStack, AutoPlaceEnvironment)orIStructureDefinition.survivalBuild(Object, ItemStack, String, World, ExtendedFacing, int, int, int, int, int, int, int, ISurvivalBuildEnvironment, boolean)- Parameters:
elementBudget- The server configured element budget. The implementor can choose to tune this up a bit if the structure is too big, but generally should not be a 4 digits number to not overwhelm the server- Returns:
- -1 if done, -2 if not supported (e.g. due to an incompatible change in the API of env, otherwise number of elements placed this round
-
__get_player
Deprecated.Internal hack. Do not use.
-