java.lang.Object
net.minecraft.world.level.block.state.BlockBehaviour
net.minecraft.world.level.block.Block
tech.anonymoushacker1279.immersiveweapons.block.BearTrapBlock
All Implemented Interfaces:
net.minecraft.world.flag.FeatureElement, net.minecraft.world.level.block.BucketPickup, net.minecraft.world.level.block.EntityBlock, net.minecraft.world.level.block.LiquidBlockContainer, net.minecraft.world.level.block.SimpleWaterloggedBlock, net.minecraft.world.level.ItemLike, net.minecraftforge.common.extensions.IForgeBlock, net.minecraftforge.common.extensions.IForgeBucketPickup

public class BearTrapBlock extends net.minecraft.world.level.block.Block implements net.minecraft.world.level.block.SimpleWaterloggedBlock, net.minecraft.world.level.block.EntityBlock
  • 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 final net.minecraft.world.level.block.state.properties.BooleanProperty
     
    static final net.minecraft.world.level.block.state.properties.BooleanProperty
     
    static final net.minecraft.world.level.block.state.properties.BooleanProperty
     

    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
    BearTrapBlock(net.minecraft.world.level.block.state.BlockBehaviour.Properties properties)
    Constructor for BearTrapBlock.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    canSurvive(net.minecraft.world.level.block.state.BlockState pState, net.minecraft.world.level.LevelReader pLevel, net.minecraft.core.BlockPos pPos)
     
    protected void
    createBlockStateDefinition(net.minecraft.world.level.block.state.StateDefinition.Builder<net.minecraft.world.level.block.Block,net.minecraft.world.level.block.state.BlockState> builder)
    Create the BlockState definition.
    void
    entityInside(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.entity.Entity entity)
    Runs when an entity is inside the block's collision area.
    int
    getAnalogOutputSignal(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos)
    Set the block's analog output signal strength.
    net.minecraft.world.phys.shapes.VoxelShape
    getCollisionShape(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.BlockGetter getter, net.minecraft.core.BlockPos pos, net.minecraft.world.phys.shapes.CollisionContext collisionContext)
    Get the collision shape of the block.
    net.minecraft.world.level.material.FluidState
    getFluidState(net.minecraft.world.level.block.state.BlockState state)
    Set FluidState properties.
    net.minecraft.world.phys.shapes.VoxelShape
    getShape(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.BlockGetter getter, net.minecraft.core.BlockPos pos, net.minecraft.world.phys.shapes.CollisionContext collisionContext)
    Set the shape of the block.
    int
    getSignal(net.minecraft.world.level.block.state.BlockState blockState, net.minecraft.world.level.BlockGetter getter, net.minecraft.core.BlockPos pos, net.minecraft.core.Direction side)
    Get the signal of the block.
    net.minecraft.world.level.block.state.BlockState
    getStateForPlacement(net.minecraft.world.item.context.BlockPlaceContext context)
    Set placement properties.
    <T extends net.minecraft.world.level.block.entity.BlockEntity>
    net.minecraft.world.level.block.entity.BlockEntityTicker<T>
    getTicker(net.minecraft.world.level.Level level, net.minecraft.world.level.block.state.BlockState blockState, net.minecraft.world.level.block.entity.BlockEntityType<T> blockEntityType)
    Get the ticker for the block.
    boolean
    hasAnalogOutputSignal(net.minecraft.world.level.block.state.BlockState state)
    Set the block's analog output signal.
    boolean
    isSignalSource(net.minecraft.world.level.block.state.BlockState state)
    Set the block's signal source.
    net.minecraft.world.level.block.entity.BlockEntity
    newBlockEntity(net.minecraft.core.BlockPos blockPos, net.minecraft.world.level.block.state.BlockState blockState)
    Create a block entity for the block.
    net.minecraft.world.level.block.state.BlockState
    updateShape(net.minecraft.world.level.block.state.BlockState pState, net.minecraft.core.Direction pDirection, net.minecraft.world.level.block.state.BlockState pNeighborState, net.minecraft.world.level.LevelAccessor pLevel, net.minecraft.core.BlockPos pPos, net.minecraft.core.BlockPos pNeighborPos)
     
    net.minecraft.world.InteractionResult
    use(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.entity.player.Player player, net.minecraft.world.InteractionHand hand, net.minecraft.world.phys.BlockHitResult hitResult)
    Runs when the block is activated.

    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, setPlacedBy, 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, defaultDestroyTime, defaultMapColor, getBlockSupportShape, getDestroyProgress, getDirectSignal, getDrops, getInteractionShape, getLightBlock, getLootTable, getMaxHorizontalOffset, getMaxVerticalOffset, getMenuProvider, getOcclusionShape, getRenderShape, getSeed, getShadeBrightness, getVisualShape, isAir, isCollisionShapeFullBlock, isOcclusionShapeFullBlock, isPathfindable, mirror, neighborChanged, onPlace, onProjectileHit, onRemove, randomTick, requiredFeatures, rotate, skipRendering, spawnAfterBreak, tick, triggerEvent, updateIndirectNeighbourShapes, 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 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 net.minecraftforge.common.extensions.IForgeBucketPickup

    getPickupSound

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

    canPlaceLiquid, getPickupSound, pickupBlock, placeLiquid
  • Field Details

    • WATERLOGGED

      public static final net.minecraft.world.level.block.state.properties.BooleanProperty WATERLOGGED
    • TRIGGERED

      public static final net.minecraft.world.level.block.state.properties.BooleanProperty TRIGGERED
    • VINES

      public static final net.minecraft.world.level.block.state.properties.BooleanProperty VINES
  • Constructor Details

    • BearTrapBlock

      public BearTrapBlock(net.minecraft.world.level.block.state.BlockBehaviour.Properties properties)
      Constructor for BearTrapBlock.
      Parameters:
      properties - the Properties of the block
  • Method Details

    • use

      public net.minecraft.world.InteractionResult use(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.entity.player.Player player, net.minecraft.world.InteractionHand hand, net.minecraft.world.phys.BlockHitResult hitResult)
      Runs when the block is activated. Allows the block to respond to user interaction.
      Overrides:
      use in class net.minecraft.world.level.block.state.BlockBehaviour
      Parameters:
      state - the BlockState of the block
      level - the Level the block is in
      pos - the BlockPos the block is at
      player - the PlayerEntity interacting with the block
      hand - the Hand the PlayerEntity used
      hitResult - the BlockHitResult of the interaction
      Returns:
      InteractionResult
    • getShape

      public net.minecraft.world.phys.shapes.VoxelShape getShape(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.BlockGetter getter, net.minecraft.core.BlockPos pos, net.minecraft.world.phys.shapes.CollisionContext collisionContext)
      Set the shape of the block.
      Overrides:
      getShape in class net.minecraft.world.level.block.state.BlockBehaviour
      Parameters:
      state - the BlockState of the block
      getter - the BlockGetter for the block
      pos - the BlockPos the block is at
      collisionContext - the CollisionContext of the block
      Returns:
      VoxelShape
    • getCollisionShape

      public net.minecraft.world.phys.shapes.VoxelShape getCollisionShape(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.BlockGetter getter, net.minecraft.core.BlockPos pos, net.minecraft.world.phys.shapes.CollisionContext collisionContext)
      Get the collision shape of the block.
      Overrides:
      getCollisionShape in class net.minecraft.world.level.block.state.BlockBehaviour
      Parameters:
      state - the BlockState of the block
      getter - the BlockGetter for the block
      pos - the BlockPos the block is at
      collisionContext - the CollisionContext of the block
      Returns:
      VoxelShape
    • canSurvive

      public boolean canSurvive(net.minecraft.world.level.block.state.BlockState pState, net.minecraft.world.level.LevelReader pLevel, net.minecraft.core.BlockPos pPos)
      Overrides:
      canSurvive in class net.minecraft.world.level.block.state.BlockBehaviour
    • updateShape

      public net.minecraft.world.level.block.state.BlockState updateShape(net.minecraft.world.level.block.state.BlockState pState, net.minecraft.core.Direction pDirection, net.minecraft.world.level.block.state.BlockState pNeighborState, net.minecraft.world.level.LevelAccessor pLevel, net.minecraft.core.BlockPos pPos, net.minecraft.core.BlockPos pNeighborPos)
      Overrides:
      updateShape in class net.minecraft.world.level.block.state.BlockBehaviour
    • newBlockEntity

      public net.minecraft.world.level.block.entity.BlockEntity newBlockEntity(net.minecraft.core.BlockPos blockPos, net.minecraft.world.level.block.state.BlockState blockState)
      Create a block entity for the block.
      Specified by:
      newBlockEntity in interface net.minecraft.world.level.block.EntityBlock
      Parameters:
      blockPos - the BlockPos the block is at
      blockState - the BlockState of the block
      Returns:
      BlockEntity
    • getTicker

      public <T extends net.minecraft.world.level.block.entity.BlockEntity> net.minecraft.world.level.block.entity.BlockEntityTicker<T> getTicker(net.minecraft.world.level.Level level, net.minecraft.world.level.block.state.BlockState blockState, net.minecraft.world.level.block.entity.BlockEntityType<T> blockEntityType)
      Get the ticker for the block.
      Specified by:
      getTicker in interface net.minecraft.world.level.block.EntityBlock
      Type Parameters:
      T - the type extending BlockEntity
      Parameters:
      level - the Level the block is in
      blockState - the BlockState of the block
      blockEntityType - the BlockEntityType to get the ticker of
      Returns:
      BlockEntityTicker
    • entityInside

      public void entityInside(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.entity.Entity entity)
      Runs when an entity is inside the block's collision area. Allows the block to deal damage on contact.
      Overrides:
      entityInside in class net.minecraft.world.level.block.state.BlockBehaviour
      Parameters:
      state - the BlockState of the block
      level - the Level the block is in
      pos - the BlockPos the block is at
      entity - the Entity passing through the block
    • getStateForPlacement

      public net.minecraft.world.level.block.state.BlockState getStateForPlacement(net.minecraft.world.item.context.BlockPlaceContext context)
      Set placement properties. Sets the facing direction of the block for placement.
      Overrides:
      getStateForPlacement in class net.minecraft.world.level.block.Block
      Parameters:
      context - the BlockPlaceContext during placement
      Returns:
      BlockState
    • getFluidState

      public net.minecraft.world.level.material.FluidState getFluidState(net.minecraft.world.level.block.state.BlockState state)
      Set FluidState properties. Allows the block to exhibit waterlogged behavior.
      Overrides:
      getFluidState in class net.minecraft.world.level.block.state.BlockBehaviour
      Parameters:
      state - the BlockState of the block
      Returns:
      FluidState
    • hasAnalogOutputSignal

      public boolean hasAnalogOutputSignal(net.minecraft.world.level.block.state.BlockState state)
      Set the block's analog output signal.
      Overrides:
      hasAnalogOutputSignal in class net.minecraft.world.level.block.state.BlockBehaviour
      Parameters:
      state - the BlockState of the block
      Returns:
      boolean
    • getAnalogOutputSignal

      public int getAnalogOutputSignal(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos)
      Set the block's analog output signal strength.
      Overrides:
      getAnalogOutputSignal in class net.minecraft.world.level.block.state.BlockBehaviour
      Parameters:
      state - the BlockState of the block
      level - the Level the block is in
      pos - the BlockPos the block is at
      Returns:
      int
    • createBlockStateDefinition

      protected void createBlockStateDefinition(net.minecraft.world.level.block.state.StateDefinition.Builder<net.minecraft.world.level.block.Block,net.minecraft.world.level.block.state.BlockState> builder)
      Create the BlockState definition.
      Overrides:
      createBlockStateDefinition in class net.minecraft.world.level.block.Block
      Parameters:
      builder - the StateDefinition.Builder of the block
    • isSignalSource

      public boolean isSignalSource(net.minecraft.world.level.block.state.BlockState state)
      Set the block's signal source.
      Overrides:
      isSignalSource in class net.minecraft.world.level.block.state.BlockBehaviour
      Parameters:
      state - the BlockState of the block
      Returns:
      boolean
    • getSignal

      public int getSignal(net.minecraft.world.level.block.state.BlockState blockState, net.minecraft.world.level.BlockGetter getter, net.minecraft.core.BlockPos pos, net.minecraft.core.Direction side)
      Get the signal of the block.
      Overrides:
      getSignal in class net.minecraft.world.level.block.state.BlockBehaviour
      Parameters:
      blockState - the BlockState of the block
      getter - the BlockGetter for the block
      pos - the BlockPos the block is at
      side - the Direction the block is facing
      Returns:
      int