Interface ISurvivalConstructable
-
- All Superinterfaces:
IConstructable
public interface ISurvivalConstructable extends IConstructable
An extension toIConstructable. Tile Entities (or delegates returned byIConstructableProvider.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
IItemSourcewith every possible items in the game.
-
-
Field Summary
Fields Modifier and Type Field Description static booleanDISABLE_HACKY_MIGRATION_CODEEnd player might want to disable this hack if it turns out to be too crashy
-
Method Summary
All Methods Static Methods Instance Methods Default Methods Deprecated Methods Modifier and Type Method Description static EntityPlayer__get_player()Deprecated.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
-
-
-
-
Method Detail
-
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 static EntityPlayer __get_player()
Deprecated.Internal hack. Do not use.
-
-