Class BlockHutTownHall
java.lang.Object
net.minecraft.world.level.block.state.BlockBehaviour
net.minecraft.world.level.block.Block
com.minecolonies.api.blocks.AbstractBlockMinecolonies<B>
com.minecolonies.api.blocks.AbstractColonyBlock<B>
com.minecolonies.api.blocks.AbstractBlockHut<BlockHutTownHall>
com.minecolonies.core.blocks.huts.BlockHutTownHall
- 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
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.BlockStatePairKeyNested 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
FieldsFields inherited from class com.minecolonies.api.blocks.AbstractColonyBlock
FACING, HARDNESS, RESISTANCEFields 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_DROPSFields inherited from class net.minecraft.world.level.block.state.BlockBehaviour
drops, dynamicShape, explosionResistance, friction, hasCollision, isRandomlyTicking, jumpFactor, properties, requiredFeatures, soundType, speedFactor, UPDATE_SHAPE_ORDERFields inherited from interface net.minecraft.world.flag.FeatureElement
FILTERED_REGISTRIES -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancanPlaceAt(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.floatgetDestroyProgress(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 StringMethod 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) booleanGetter for the Block's state to breakable.@NotNull net.minecraft.world.InteractionResultuse(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/deletionMethods inherited from class com.minecolonies.api.blocks.AbstractBlockHut
areRequirementsMet, canRightClickWithoutPermissions, getBlueprintDisplayName, getBlueprintName, getDesc, getLevel, getStructureHandler, isVisible, onBlockPlacedByBuildTool, registerBlockItem, setupMethods inherited from class com.minecolonies.api.blocks.AbstractColonyBlock
createBlockStateDefinition, getRegistryName, getShape, getStateForPlacement, newBlockEntity, onRemove, registerBlock, rotate, setPlacedByMethods 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, withPropertiesOfMethods 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, useShapeForLightOcclusionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.world.level.block.EntityBlock
getListenerMethods inherited from interface net.minecraft.world.flag.FeatureElement
isEnabledMethods inherited from interface com.minecolonies.api.blocks.interfaces.IBuildingBrowsableBlock
shouldBrowseBuildingsMethods 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, supportsExternalFaceHidingMethods inherited from interface com.minecolonies.api.blocks.interfaces.ITickableBlockMinecolonies
getTicker
-
Field Details
-
timeout
public static long timeoutInteraction 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:
getDestroyProgressin classAbstractColonyBlock<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:
getRequirementsin interfacecom.ldtteam.structurize.blocks.interfaces.IRequirementsBlueprintAnchorBlock- Overrides:
getRequirementsin classAbstractBlockHut<BlockHutTownHall>
-
getValidBreak
public boolean getValidBreak()Getter for the Block's state to breakable.- Returns:
- True if the block is eligible for destruction
-
getHutName
Description copied from class:AbstractColonyBlockMethod to return the name of the block.- Specified by:
getHutNamein classAbstractColonyBlock<BlockHutTownHall>- Returns:
- Name of the block.
-
getBuildingEntry
Description copied from class:AbstractColonyBlockMethod to get the building registry entry.- Specified by:
getBuildingEntryin classAbstractColonyBlock<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:
usein classAbstractColonyBlock<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:
canPlaceAtin classAbstractBlockHut<BlockHutTownHall>- Parameters:
pos- the position to check.player- the player trying to place the block.- Returns:
- true if the block can be placed.
-