Class BlockHutTownHall

java.lang.Object
net.minecraft.world.level.block.state.BlockBehaviour
All Implemented Interfaces:
com.ldtteam.structurize.blocks.interfaces.IAnchorBlock, com.ldtteam.structurize.blocks.interfaces.IInvisibleBlueprintAnchorBlock, com.ldtteam.structurize.blocks.interfaces.ILeveledBlueprintAnchorBlock, com.ldtteam.structurize.blocks.interfaces.INamedBlueprintAnchorBlock, com.ldtteam.structurize.blocks.interfaces.IRequirementsBlueprintAnchorBlock, com.ldtteam.structurize.blocks.interfaces.ISpecialCreativeHandlerAnchorBlock, IBlockMinecolonies<BlockHutTownHall>, IBuildingBrowsableBlock, ITickableBlockMinecolonies, IBuilderUndestroyable, net.minecraft.world.flag.FeatureElement, net.minecraft.world.level.block.EntityBlock, net.minecraft.world.level.ItemLike, net.minecraftforge.common.extensions.IForgeBlock

public class BlockHutTownHall extends AbstractBlockHut<BlockHutTownHall>
Hut for the town hall. Sets the working range for the town hall in the constructor
  • Nested Class Summary

    Nested classes/interfaces inherited from class net.minecraft.world.level.block.Block

    net.minecraft.world.level.block.Block.BlockStatePairKey

    Nested classes/interfaces inherited from class net.minecraft.world.level.block.state.BlockBehaviour

    net.minecraft.world.level.block.state.BlockBehaviour.BlockStateBase, net.minecraft.world.level.block.state.BlockBehaviour.OffsetFunction, net.minecraft.world.level.block.state.BlockBehaviour.OffsetType, net.minecraft.world.level.block.state.BlockBehaviour.Properties, net.minecraft.world.level.block.state.BlockBehaviour.StateArgumentPredicate<A extends Object>, net.minecraft.world.level.block.state.BlockBehaviour.StatePredicate
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static long
    Interaction timeout.

    Fields inherited from class com.minecolonies.api.blocks.AbstractColonyBlock

    FACING, HARDNESS, RESISTANCE

    Fields inherited from class net.minecraft.world.level.block.Block

    BLOCK_STATE_REGISTRY, INDESTRUCTIBLE, INSTANT, stateDefinition, UPDATE_ALL, UPDATE_ALL_IMMEDIATE, UPDATE_CLIENTS, UPDATE_IMMEDIATE, UPDATE_INVISIBLE, UPDATE_KNOWN_SHAPE, UPDATE_LIMIT, UPDATE_MOVE_BY_PISTON, UPDATE_NEIGHBORS, UPDATE_NONE, UPDATE_SUPPRESS_DROPS

    Fields inherited from class net.minecraft.world.level.block.state.BlockBehaviour

    drops, dynamicShape, explosionResistance, friction, hasCollision, isRandomlyTicking, jumpFactor, properties, requiredFeatures, soundType, speedFactor, UPDATE_SHAPE_ORDER

    Fields inherited from interface net.minecraft.world.flag.FeatureElement

    FILTERED_REGISTRIES
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    canPlaceAt(net.minecraft.core.BlockPos pos, net.minecraft.world.entity.player.Player player)
    Check if the block can be placed at the given position by the player.
    Method to get the building registry entry.
    float
    getDestroyProgress(net.minecraft.world.level.block.state.BlockState state, @NotNull net.minecraft.world.entity.player.Player player, @NotNull net.minecraft.world.level.BlockGetter blockReader, @NotNull net.minecraft.core.BlockPos pos)
     
    @NotNull String
    Method to return the name of the block.
    List<net.minecraft.network.chat.MutableComponent>
    getRequirements(net.minecraft.client.multiplayer.ClientLevel level, net.minecraft.core.BlockPos pos, net.minecraft.client.player.LocalPlayer player)
     
    boolean
    Getter for the Block's state to breakable.
    @NotNull net.minecraft.world.InteractionResult
    use(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.Level worldIn, net.minecraft.core.BlockPos pos, net.minecraft.world.entity.player.Player player, net.minecraft.world.InteractionHand hand, net.minecraft.world.phys.BlockHitResult ray)
    Choose a different gui when no colony view, for colony overview and creation/deletion

    Methods inherited from class net.minecraft.world.level.block.Block

    animateTick, appendHoverText, asBlock, asItem, box, builtInRegistryHolder, byItem, canSupportCenter, canSupportRigidBlock, canSustainPlant, defaultBlockState, destroy, dropFromExplosion, dropResources, dropResources, dropResources, dropResources, fallOn, getCloneItemStack, getDescriptionId, getDrops, getDrops, getExplosionResistance, getFriction, getId, getJumpFactor, getName, getRenderPropertiesInternal, getShapeForEachState, getSoundType, getSpeedFactor, getStateDefinition, handlePrecipitation, hasDynamicShape, initializeClient, isExceptionForConnection, isFaceFull, isPossibleToRespawnInThis, isRandomlyTicking, isShapeFullBlock, playerDestroy, playerWillDestroy, popExperience, popResource, popResourceFromFace, propagatesSkylightDown, pushEntitiesUp, registerDefaultState, shouldRenderFace, spawnDestroyParticles, stateById, stepOn, toString, tryDropExperience, updateEntityAfterFallOn, updateFromNeighbourShapes, updateOrDestroy, updateOrDestroy, wasExploded, withPropertiesOf

    Methods inherited from class net.minecraft.world.level.block.state.BlockBehaviour

    attack, canBeReplaced, canBeReplaced, canSurvive, defaultDestroyTime, defaultMapColor, entityInside, getAnalogOutputSignal, getBlockSupportShape, getCollisionShape, getDirectSignal, getDrops, getFluidState, getInteractionShape, getLightBlock, getLootTable, getMaxHorizontalOffset, getMaxVerticalOffset, getMenuProvider, getOcclusionShape, getRenderShape, getSeed, getShadeBrightness, getSignal, getVisualShape, hasAnalogOutputSignal, isAir, isCollisionShapeFullBlock, isOcclusionShapeFullBlock, isPathfindable, isSignalSource, mirror, neighborChanged, onPlace, onProjectileHit, randomTick, requiredFeatures, skipRendering, spawnAfterBreak, tick, triggerEvent, updateIndirectNeighbourShapes, updateShape, useShapeForLightOcclusion

    Methods inherited from class java.lang.Object

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

    Methods inherited from interface net.minecraft.world.level.block.EntityBlock

    getListener

    Methods inherited from interface net.minecraft.world.flag.FeatureElement

    isEnabled

    Methods inherited from interface com.minecolonies.api.blocks.interfaces.IBuildingBrowsableBlock

    shouldBrowseBuildings

    Methods inherited from interface net.minecraftforge.common.extensions.IForgeBlock

    addLandingEffects, addRunningEffects, canBeHydrated, canConnectRedstone, canDropFromExplosion, canEntityDestroy, canHarvestBlock, canStickTo, collisionExtendsVertically, getAdjacentBlockPathType, getAppearance, getBeaconColorMultiplier, getBedDirection, getBlockPathType, getCloneItemStack, getEnchantPowerBonus, getExpDrop, getExplosionResistance, getFireSpreadSpeed, getFlammability, getFriction, getLightEmission, getMapColor, getPistonPushReaction, getRespawnPosition, getSoundType, getStateAtViewpoint, getToolModifiedState, getWeakChanges, hidesNeighborFace, isBed, isBurning, isConduitFrame, isFertile, isFireSource, isFlammable, isLadder, isPortalFrame, isScaffolding, isSlimeBlock, isStickyBlock, isValidSpawn, makesOpenTrapdoorAboveClimbable, onBlockExploded, onBlockStateChange, onCaughtFire, onDestroyedByPlayer, onNeighborChange, onTreeGrow, rotate, setBedOccupied, shouldCheckWeakPower, shouldDisplayFluidOverlay, supportsExternalFaceHiding

    Methods inherited from interface com.minecolonies.api.blocks.interfaces.ITickableBlockMinecolonies

    getTicker
  • Field Details

    • timeout

      public static long timeout
      Interaction timeout.
  • Constructor Details

    • BlockHutTownHall

      public BlockHutTownHall()
  • Method Details

    • getDestroyProgress

      public float getDestroyProgress(net.minecraft.world.level.block.state.BlockState state, @NotNull @NotNull net.minecraft.world.entity.player.Player player, @NotNull @NotNull net.minecraft.world.level.BlockGetter blockReader, @NotNull @NotNull net.minecraft.core.BlockPos pos)
      Overrides:
      getDestroyProgress in class AbstractColonyBlock<BlockHutTownHall>
    • getRequirements

      public List<net.minecraft.network.chat.MutableComponent> getRequirements(net.minecraft.client.multiplayer.ClientLevel level, net.minecraft.core.BlockPos pos, net.minecraft.client.player.LocalPlayer player)
      Specified by:
      getRequirements in interface com.ldtteam.structurize.blocks.interfaces.IRequirementsBlueprintAnchorBlock
      Overrides:
      getRequirements in class AbstractBlockHut<BlockHutTownHall>
    • getValidBreak

      public boolean getValidBreak()
      Getter for the Block's state to breakable.
      Returns:
      True if the block is eligible for destruction
    • getHutName

      @NotNull public @NotNull String getHutName()
      Description copied from class: AbstractColonyBlock
      Method to return the name of the block.
      Specified by:
      getHutName in class AbstractColonyBlock<BlockHutTownHall>
      Returns:
      Name of the block.
    • getBuildingEntry

      public BuildingEntry getBuildingEntry()
      Description copied from class: AbstractColonyBlock
      Method to get the building registry entry.
      Specified by:
      getBuildingEntry in class AbstractColonyBlock<BlockHutTownHall>
      Returns:
      The building entry.
    • use

      @NotNull public @NotNull net.minecraft.world.InteractionResult use(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.Level worldIn, net.minecraft.core.BlockPos pos, net.minecraft.world.entity.player.Player player, net.minecraft.world.InteractionHand hand, net.minecraft.world.phys.BlockHitResult ray)
      Choose a different gui when no colony view, for colony overview and creation/deletion
      Overrides:
      use in class AbstractColonyBlock<BlockHutTownHall>
      Parameters:
      state - the blockstate.
      worldIn - the world.
      pos - the position.
      player - the player.
      hand - the hand.
      ray - the raytraceresult.
      Returns:
      the result type.
    • canPlaceAt

      public boolean canPlaceAt(net.minecraft.core.BlockPos pos, net.minecraft.world.entity.player.Player player)
      Check if the block can be placed at the given position by the player.
      Overrides:
      canPlaceAt in class AbstractBlockHut<BlockHutTownHall>
      Parameters:
      pos - the position to check.
      player - the player trying to place the block.
      Returns:
      true if the block can be placed.