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

    Constructors
    Constructor
    Description
    CreativeBuildingStructureHandler(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos, com.ldtteam.structurize.blueprints.v1.Blueprint blueprint, com.ldtteam.structurize.util.PlacementSettings settings, 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.util.PlacementSettings settings, boolean fancyPlacement)
    The minecolonies specific creative structure placer.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    isStackFree(@Nullable net.minecraft.world.item.ItemStack itemStack)
     
    static com.ldtteam.structurize.blueprints.v1.Blueprint
    loadAndPlaceStructureWithRotation(net.minecraft.world.level.Level worldObj, @NotNull Future<com.ldtteam.structurize.blueprints.v1.Blueprint> future, @NotNull net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.Rotation rotation, @NotNull net.minecraft.world.level.block.Mirror mirror, boolean fancyPlacement, @Nullable net.minecraft.server.level.ServerPlayer player)
    Load a structure into this world and place it in the right position and rotation.
    void
     
    void
    triggerSuccess(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, getSolidBlockForPos, getStepsPerCall, hasRequiredItems, isCreative, prePlacementLogic, replaceWithSolidBlock, shouldBlocksBeConsideredEqual, triggerEntitySuccess

    Methods inherited from class com.ldtteam.structurize.placement.structure.AbstractStructureHandler

    getBluePrint, getCenterPos, getMd5, getRotationMirror, getSettings, getWorld, hasBluePrint, isReady, setBlueprint, setMd5

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods 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.util.PlacementSettings settings, 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.
      settings - 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.util.PlacementSettings settings, 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.
      settings - 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:
      triggerSuccess in interface com.ldtteam.structurize.placement.structure.IStructureHandler
      Overrides:
      triggerSuccess in class com.ldtteam.structurize.placement.structure.AbstractStructureHandler
    • isStackFree

      public boolean isStackFree(@Nullable @Nullable net.minecraft.world.item.ItemStack itemStack)
      Specified by:
      isStackFree in interface com.ldtteam.structurize.placement.structure.IStructureHandler
      Overrides:
      isStackFree in class com.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, net.minecraft.world.level.block.Rotation rotation, @NotNull @NotNull net.minecraft.world.level.block.Mirror mirror, 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.
      rotation - the rotation.
      mirror - the mirror used.
      fancyPlacement - if fancy or complete.
      player - the placing player.
      Returns:
      the placed blueprint.
    • onCompletion

      public void onCompletion()