Class LodestoneEntityBlock<T extends LodestoneBlockEntity>

java.lang.Object
net.minecraft.world.level.block.state.BlockBehaviour
net.minecraft.world.level.block.Block
team.lodestar.lodestone.systems.block.LodestoneEntityBlock<T>
All Implemented Interfaces:
net.minecraft.world.flag.FeatureElement, net.minecraft.world.level.block.EntityBlock, net.minecraft.world.level.ItemLike, net.neoforged.neoforge.common.extensions.IBlockExtension
Direct Known Subclasses:
MultiblockComponentBlock, WaterLoggedEntityBlock

public class LodestoneEntityBlock<T extends LodestoneBlockEntity> extends net.minecraft.world.level.block.Block implements net.minecraft.world.level.block.EntityBlock
A SimpleBlock is an implementation of EntityBlock that allows most frequently used logic to be handled in a SimpleBlockEntity It's important to still utilize generic, T extends YourBlockEntity, in order to allow for other mods to extend your block and use a different block entity
  • 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>, net.minecraft.world.level.block.state.BlockBehaviour.StatePredicate
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected Supplier<net.minecraft.world.level.block.entity.BlockEntityType<T>>
     
    protected net.minecraft.world.level.block.entity.BlockEntityTicker<T>
     

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

    BLOCK_STATE_REGISTRY, CODEC, 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
    LodestoneEntityBlock(net.minecraft.world.level.block.state.BlockBehaviour.Properties properties)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    entityInside(net.minecraft.world.level.block.state.BlockState pState, net.minecraft.world.level.Level pLevel, net.minecraft.core.BlockPos pPos, net.minecraft.world.entity.Entity pEntity)
     
    @NotNull net.minecraft.world.item.ItemStack
    getCloneItemStack(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.phys.HitResult target, net.minecraft.world.level.LevelReader level, net.minecraft.core.BlockPos pos, net.minecraft.world.entity.player.Player player)
     
    <Y extends net.minecraft.world.level.block.entity.BlockEntity>
    net.minecraft.world.level.block.entity.BlockEntityTicker<Y>
    getTicker(net.minecraft.world.level.Level level, net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.block.entity.BlockEntityType<Y> type)
     
    boolean
    hasTileEntity(net.minecraft.world.level.block.state.BlockState state)
     
    void
    neighborChanged(net.minecraft.world.level.block.state.BlockState pState, net.minecraft.world.level.Level pLevel, net.minecraft.core.BlockPos pPos, net.minecraft.world.level.block.Block pBlock, net.minecraft.core.BlockPos pFromPos, boolean pIsMoving)
     
    net.minecraft.world.level.block.entity.BlockEntity
    newBlockEntity(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state)
     
    void
    onBlockBroken(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.BlockGetter level, net.minecraft.core.BlockPos pos, @Nullable net.minecraft.world.entity.player.Player player)
     
    void
    onBlockExploded(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.Explosion explosion)
     
    @NotNull net.minecraft.world.level.block.state.BlockState
    playerWillDestroy(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.entity.player.Player player)
     
    setBlockEntity(Supplier<net.minecraft.world.level.block.entity.BlockEntityType<T>> type)
     
    void
    setPlacedBy(net.minecraft.world.level.Level pLevel, net.minecraft.core.BlockPos pPos, net.minecraft.world.level.block.state.BlockState pState, @Nullable net.minecraft.world.entity.LivingEntity pPlacer, net.minecraft.world.item.ItemStack pStack)
     
    protected net.minecraft.world.ItemInteractionResult
    useItemOn(net.minecraft.world.item.ItemStack pStack, net.minecraft.world.level.block.state.BlockState pState, net.minecraft.world.level.Level pLevel, net.minecraft.core.BlockPos pPos, net.minecraft.world.entity.player.Player pPlayer, net.minecraft.world.InteractionHand pHand, net.minecraft.world.phys.BlockHitResult pHitResult)
     
    protected net.minecraft.world.InteractionResult
    useWithoutItem(net.minecraft.world.level.block.state.BlockState pState, net.minecraft.world.level.Level pLevel, net.minecraft.core.BlockPos pPos, net.minecraft.world.entity.player.Player pPlayer, net.minecraft.world.phys.BlockHitResult pHitResult)
     

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

    animateTick, appendHoverText, asBlock, asItem, box, builtInRegistryHolder, byItem, canSupportCenter, canSupportRigidBlock, codec, createBlockStateDefinition, defaultBlockState, destroy, dropFromExplosion, dropResources, dropResources, dropResources, fallOn, getCloneItemStack, getDescriptionId, getDrops, getDrops, getExplosionResistance, getFriction, getId, getJumpFactor, getName, getShapeForEachState, getSpeedFactor, getStateDefinition, getStateForPlacement, handlePrecipitation, hasDynamicShape, initializeClient, isExceptionForConnection, isFaceFull, isPossibleToRespawnInThis, isShapeFullBlock, playerDestroy, popExperience, popResource, popResourceFromFace, 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, getAnalogOutputSignal, getBlockSupportShape, getCollisionShape, getDestroyProgress, getDirectSignal, getDrops, getFluidState, getInteractionShape, getLightBlock, getLootTable, getMaxHorizontalOffset, getMaxVerticalOffset, getMenuProvider, getOcclusionShape, getRenderShape, getSeed, getShadeBrightness, getShape, getSignal, getSoundType, getVisualShape, hasAnalogOutputSignal, isAir, isCollisionShapeFullBlock, isOcclusionShapeFullBlock, isPathfindable, isRandomlyTicking, isSignalSource, mirror, onExplosionHit, onPlace, onProjectileHit, onRemove, propagatesSkylightDown, properties, propertiesCodec, randomTick, requiredFeatures, rotate, simpleCodec, 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 net.neoforged.neoforge.common.extensions.IBlockExtension

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

    • blockEntityType

      protected Supplier<net.minecraft.world.level.block.entity.BlockEntityType<T extends LodestoneBlockEntity>> blockEntityType
    • ticker

      protected net.minecraft.world.level.block.entity.BlockEntityTicker<T extends LodestoneBlockEntity> ticker
  • Constructor Details

    • LodestoneEntityBlock

      public LodestoneEntityBlock(net.minecraft.world.level.block.state.BlockBehaviour.Properties properties)
  • Method Details

    • setBlockEntity

      public LodestoneEntityBlock<T> setBlockEntity(Supplier<net.minecraft.world.level.block.entity.BlockEntityType<T>> type)
    • newBlockEntity

      public net.minecraft.world.level.block.entity.BlockEntity newBlockEntity(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state)
      Specified by:
      newBlockEntity in interface net.minecraft.world.level.block.EntityBlock
    • hasTileEntity

      public boolean hasTileEntity(net.minecraft.world.level.block.state.BlockState state)
    • getTicker

      public <Y extends net.minecraft.world.level.block.entity.BlockEntity> net.minecraft.world.level.block.entity.BlockEntityTicker<Y> getTicker(net.minecraft.world.level.Level level, net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.block.entity.BlockEntityType<Y> type)
      Specified by:
      getTicker in interface net.minecraft.world.level.block.EntityBlock
    • setPlacedBy

      public void setPlacedBy(net.minecraft.world.level.Level pLevel, net.minecraft.core.BlockPos pPos, net.minecraft.world.level.block.state.BlockState pState, @Nullable @Nullable net.minecraft.world.entity.LivingEntity pPlacer, net.minecraft.world.item.ItemStack pStack)
      Overrides:
      setPlacedBy in class net.minecraft.world.level.block.Block
    • getCloneItemStack

      @NotNull public @NotNull net.minecraft.world.item.ItemStack getCloneItemStack(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.phys.HitResult target, net.minecraft.world.level.LevelReader level, net.minecraft.core.BlockPos pos, net.minecraft.world.entity.player.Player player)
      Specified by:
      getCloneItemStack in interface net.neoforged.neoforge.common.extensions.IBlockExtension
    • playerWillDestroy

      @NotNull public @NotNull net.minecraft.world.level.block.state.BlockState playerWillDestroy(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.entity.player.Player player)
      Overrides:
      playerWillDestroy in class net.minecraft.world.level.block.Block
    • onBlockExploded

      public void onBlockExploded(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.Explosion explosion)
      Specified by:
      onBlockExploded in interface net.neoforged.neoforge.common.extensions.IBlockExtension
    • onBlockBroken

      public void onBlockBroken(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.BlockGetter level, net.minecraft.core.BlockPos pos, @Nullable @Nullable net.minecraft.world.entity.player.Player player)
    • entityInside

      public void entityInside(net.minecraft.world.level.block.state.BlockState pState, net.minecraft.world.level.Level pLevel, net.minecraft.core.BlockPos pPos, net.minecraft.world.entity.Entity pEntity)
      Overrides:
      entityInside in class net.minecraft.world.level.block.state.BlockBehaviour
    • neighborChanged

      public void neighborChanged(net.minecraft.world.level.block.state.BlockState pState, net.minecraft.world.level.Level pLevel, net.minecraft.core.BlockPos pPos, net.minecraft.world.level.block.Block pBlock, net.minecraft.core.BlockPos pFromPos, boolean pIsMoving)
      Overrides:
      neighborChanged in class net.minecraft.world.level.block.state.BlockBehaviour
    • useWithoutItem

      protected net.minecraft.world.InteractionResult useWithoutItem(net.minecraft.world.level.block.state.BlockState pState, net.minecraft.world.level.Level pLevel, net.minecraft.core.BlockPos pPos, net.minecraft.world.entity.player.Player pPlayer, net.minecraft.world.phys.BlockHitResult pHitResult)
      Overrides:
      useWithoutItem in class net.minecraft.world.level.block.state.BlockBehaviour
    • useItemOn

      protected net.minecraft.world.ItemInteractionResult useItemOn(net.minecraft.world.item.ItemStack pStack, net.minecraft.world.level.block.state.BlockState pState, net.minecraft.world.level.Level pLevel, net.minecraft.core.BlockPos pPos, net.minecraft.world.entity.player.Player pPlayer, net.minecraft.world.InteractionHand pHand, net.minecraft.world.phys.BlockHitResult pHitResult)
      Overrides:
      useItemOn in class net.minecraft.world.level.block.state.BlockBehaviour