Package com.minecolonies.api.util
Class CreativeBuildingStructureHandler
java.lang.Object
com.ldtteam.structurize.placement.structure.AbstractStructureHandler
com.ldtteam.structurize.placement.structure.CreativeStructureHandler
com.minecolonies.api.util.CreativeBuildingStructureHandler
- All Implemented Interfaces:
com.ldtteam.structurize.placement.IPlacementContext,com.ldtteam.structurize.placement.structure.IStructureHandler
public final class CreativeBuildingStructureHandler
extends com.ldtteam.structurize.placement.structure.CreativeStructureHandler
Minecolonies specific creative structure handler. Main difference related to registering blocks to colonies.
-
Field Summary
Fields inherited from class com.ldtteam.structurize.placement.structure.CreativeStructureHandler
fancyPlacement -
Constructor Summary
ConstructorsConstructorDescriptionCreativeBuildingStructureHandler(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos, com.ldtteam.structurize.blueprints.v1.Blueprint blueprint, com.ldtteam.structurize.api.RotationMirror rotMir, boolean fancyPlacement) The minecolonies specific creative structure placer.CreativeBuildingStructureHandler(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos, Future<com.ldtteam.structurize.blueprints.v1.Blueprint> blueprint, com.ldtteam.structurize.api.RotationMirror rotMir, boolean fancyPlacement) The minecolonies specific creative structure placer. -
Method Summary
Modifier and TypeMethodDescriptionbooleanisStackFree(@Nullable net.minecraft.world.item.ItemStack itemStack) static com.ldtteam.structurize.blueprints.v1.BlueprintloadAndPlaceStructureWithRotation(net.minecraft.world.level.Level worldObj, @NotNull Future<com.ldtteam.structurize.blueprints.v1.Blueprint> future, @NotNull net.minecraft.core.BlockPos pos, com.ldtteam.structurize.api.RotationMirror rotMir, boolean fancyPlacement, @Nullable net.minecraft.server.level.ServerPlayer player) Load a structure into this world and place it in the right position and rotation.voidvoidtriggerSuccess(net.minecraft.core.BlockPos pos, List<net.minecraft.world.item.ItemStack> list, boolean placement) Methods inherited from class com.ldtteam.structurize.placement.structure.CreativeStructureHandler
allowReplace, fancyPlacement, getHeldItem, getInventory, getMaxBlocksCheckedPerCall, getSolidBlockForPos, getStepsPerCall, hasRequiredItems, isCreative, prePlacementLogic, replaceWithSolidBlock, shouldBlocksBeConsideredEqual, triggerEntitySuccessMethods inherited from class com.ldtteam.structurize.placement.structure.AbstractStructureHandler
getBluePrint, getCenterPos, getMd5, getRotationMirror, getWorld, hasBluePrint, isReady, setBlueprint, setMd5Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.ldtteam.structurize.placement.structure.IStructureHandler
consume, getProgressPosInWorld, getStructurePosFromWorld, isCorrectMD5
-
Constructor Details
-
CreativeBuildingStructureHandler
public CreativeBuildingStructureHandler(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos, com.ldtteam.structurize.blueprints.v1.Blueprint blueprint, com.ldtteam.structurize.api.RotationMirror rotMir, boolean fancyPlacement) The minecolonies specific creative structure placer.- Parameters:
world- the world.pos- the pos it is placed at.blueprint- the blueprint of the structure.rotMir- the placement settings.fancyPlacement- if fancy or complete.
-
CreativeBuildingStructureHandler
public CreativeBuildingStructureHandler(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos, Future<com.ldtteam.structurize.blueprints.v1.Blueprint> blueprint, com.ldtteam.structurize.api.RotationMirror rotMir, boolean fancyPlacement) The minecolonies specific creative structure placer.- Parameters:
world- the world.pos- the pos it is placed at.blueprint- the blueprint of the structure.rotMir- the placement settings.fancyPlacement- if fancy or complete.
-
-
Method Details
-
triggerSuccess
public void triggerSuccess(net.minecraft.core.BlockPos pos, List<net.minecraft.world.item.ItemStack> list, boolean placement) - Specified by:
triggerSuccessin interfacecom.ldtteam.structurize.placement.structure.IStructureHandler- Overrides:
triggerSuccessin classcom.ldtteam.structurize.placement.structure.AbstractStructureHandler
-
isStackFree
public boolean isStackFree(@Nullable @Nullable net.minecraft.world.item.ItemStack itemStack) - Specified by:
isStackFreein interfacecom.ldtteam.structurize.placement.structure.IStructureHandler- Overrides:
isStackFreein classcom.ldtteam.structurize.placement.structure.CreativeStructureHandler
-
loadAndPlaceStructureWithRotation
public static com.ldtteam.structurize.blueprints.v1.Blueprint loadAndPlaceStructureWithRotation(net.minecraft.world.level.Level worldObj, @NotNull @NotNull Future<com.ldtteam.structurize.blueprints.v1.Blueprint> future, @NotNull @NotNull net.minecraft.core.BlockPos pos, com.ldtteam.structurize.api.RotationMirror rotMir, boolean fancyPlacement, @Nullable @Nullable net.minecraft.server.level.ServerPlayer player) Load a structure into this world and place it in the right position and rotation.- Parameters:
worldObj- the world to load it in.future- the structures blueprint future.pos- coordinates.rotMir- the rotation and mirror used.fancyPlacement- if fancy or complete.player- the placing player.- Returns:
- the placed blueprint.
-
onCompletion
public void onCompletion()
-