Class EnchantingTableBlockMixin

java.lang.Object
net.minecraft.world.level.block.state.BlockBehaviour
net.minecraft.world.level.block.Block
net.minecraft.world.level.block.BaseEntityBlock
johnsmith.enchantingoverhauled.mixin.block.EnchantingTableBlockMixin
All Implemented Interfaces:
net.fabricmc.fabric.api.block.v1.FabricBlock, net.minecraft.world.flag.FeatureElement, net.minecraft.world.level.block.EntityBlock, net.minecraft.world.level.ItemLike

public abstract class EnchantingTableBlockMixin extends net.minecraft.world.level.block.BaseEntityBlock
  • Nested Class Summary

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

    net.minecraft.world.level.block.Block.UpdateFlags

    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
    static List<net.minecraft.core.BlockPos>
     

    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_SKIP_ALL_SIDEEFFECTS, UPDATE_SKIP_BLOCK_ENTITY_SIDEEFFECTS, UPDATE_SKIP_ON_PLACE, UPDATE_SKIP_SHAPE_UPDATE_ON_WIRE, UPDATE_SUPPRESS_DROPS

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

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

    Modifier and Type
    Method
    Description
    int
    enchanting_overhauled$getEnchantingPower(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos providerPos, EnchantmentTheme theme)
    Calculates the enchanting power provided by a block at a given position for a specific theme.
    protected @NotNull net.minecraft.world.item.ItemStack
    getCloneItemStack(net.minecraft.world.level.LevelReader levelReader, @NotNull net.minecraft.core.BlockPos blockPos, @NotNull net.minecraft.world.level.block.state.BlockState blockState, boolean includeData)
     
    float
    getDestroyProgress(@NotNull net.minecraft.world.level.block.state.BlockState state, @NotNull net.minecraft.world.entity.player.Player player, @NotNull net.minecraft.world.level.BlockGetter level, @NotNull net.minecraft.core.BlockPos pos)
    Dynamic override for Block Strength (Hardness).
    net.minecraft.world.MenuProvider
    getMenuProvider(@NotNull net.minecraft.world.level.block.state.BlockState state, @NotNull net.minecraft.world.level.Level level, @NotNull net.minecraft.core.BlockPos pos)
     
    void
    playerDestroy(@NotNull net.minecraft.world.level.Level level, @NotNull net.minecraft.world.entity.player.Player player, @NotNull net.minecraft.core.BlockPos blockPos, @NotNull net.minecraft.world.level.block.state.BlockState blockState, net.minecraft.world.level.block.entity.BlockEntity blockEntity, @NotNull net.minecraft.world.item.ItemStack tool)
     
    @NotNull net.minecraft.world.level.block.state.BlockState
    playerWillDestroy(@NotNull net.minecraft.world.level.Level level, @NotNull net.minecraft.core.BlockPos blockPos, @NotNull net.minecraft.world.level.block.state.BlockState blockState, @NotNull net.minecraft.world.entity.player.Player player)
     

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

    codec, createTickerHelper, triggerEvent

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

    animateTick, asBlock, asItem, box, boxes, boxZ, boxZ, boxZ, builtInRegistryHolder, byItem, canSupportCenter, canSupportRigidBlock, column, column, createBlockStateDefinition, cube, cube, defaultBlockState, destroy, dropFromBlockInteractLootTable, dropFromExplosion, dropFromLootTable, dropResources, dropResources, dropResources, fallOn, getDrops, getDrops, getExplosionResistance, getFriction, getId, getJumpFactor, getName, getShapeForEachState, getShapeForEachState, getSpeedFactor, getStateDefinition, getStateForPlacement, handlePrecipitation, hasDynamicShape, isExceptionForConnection, isFaceFull, isPossibleToRespawnInThis, isShapeFullBlock, popExperience, popResource, popResourceFromFace, pushEntitiesUp, registerDefaultState, setPlacedBy, shouldRenderFace, spawnDestroyParticles, stateById, stepOn, toString, tryDropExperience, updateEntityMovementAfterFallOn, updateFromNeighbourShapes, updateOrDestroy, updateOrDestroy, wasExploded, withPropertiesOf

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

    affectNeighborsAfterRemoval, attack, canBeReplaced, canBeReplaced, canSurvive, defaultDestroyTime, defaultMapColor, entityInside, getAnalogOutputSignal, getBlockSupportShape, getCollisionShape, getDescriptionId, getDirectSignal, getDrops, getEntityInsideCollisionShape, getFluidState, getInteractionShape, getLightBlock, getLootTable, getMaxHorizontalOffset, getMaxVerticalOffset, getOcclusionShape, getRenderShape, getSeed, getShadeBrightness, getShape, getSignal, getSoundType, getVisualShape, hasAnalogOutputSignal, isCollisionShapeFullBlock, isPathfindable, isRandomlyTicking, isSignalSource, mirror, neighborChanged, onExplosionHit, onPlace, onProjectileHit, propagatesSkylightDown, properties, propertiesCodec, randomTick, requiredFeatures, rotate, shouldChangedStateKeepBlockEntity, simpleCodec, skipRendering, spawnAfterBreak, tick, updateIndirectNeighbourShapes, updateShape, useItemOn, useShapeForLightOcclusion, useWithoutItem

    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, getTicker, newBlockEntity

    Methods inherited from interface net.fabricmc.fabric.api.block.v1.FabricBlock

    getAppearance

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

    isEnabled
  • Field Details

    • BOOKSHELF_OFFSETS

      public static List<net.minecraft.core.BlockPos> BOOKSHELF_OFFSETS
  • Constructor Details

    • EnchantingTableBlockMixin

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

    • getMenuProvider

      public net.minecraft.world.MenuProvider getMenuProvider(@NotNull @NotNull net.minecraft.world.level.block.state.BlockState state, @NotNull @NotNull net.minecraft.world.level.Level level, @NotNull @NotNull net.minecraft.core.BlockPos pos)
      Overrides:
      getMenuProvider in class net.minecraft.world.level.block.BaseEntityBlock
    • playerWillDestroy

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

      public void playerDestroy(@NotNull @NotNull net.minecraft.world.level.Level level, @NotNull @NotNull net.minecraft.world.entity.player.Player player, @NotNull @NotNull net.minecraft.core.BlockPos blockPos, @NotNull @NotNull net.minecraft.world.level.block.state.BlockState blockState, net.minecraft.world.level.block.entity.BlockEntity blockEntity, @NotNull @NotNull net.minecraft.world.item.ItemStack tool)
      Overrides:
      playerDestroy in class net.minecraft.world.level.block.Block
    • enchanting_overhauled$getEnchantingPower

      public int enchanting_overhauled$getEnchantingPower(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos providerPos, EnchantmentTheme theme)
      Calculates the enchanting power provided by a block at a given position for a specific theme.
      Parameters:
      level - The level to check.
      providerPos - The BlockPos of the potential power-providing block.
      theme - The EnchantmentTheme to calculate power for.
      Returns:
      The integer power level (0 or the calculated value).
    • getCloneItemStack

      @NotNull protected @NotNull net.minecraft.world.item.ItemStack getCloneItemStack(net.minecraft.world.level.LevelReader levelReader, @NotNull @NotNull net.minecraft.core.BlockPos blockPos, @NotNull @NotNull net.minecraft.world.level.block.state.BlockState blockState, boolean includeData)
      Overrides:
      getCloneItemStack in class net.minecraft.world.level.block.state.BlockBehaviour
    • getDestroyProgress

      public float getDestroyProgress(@NotNull @NotNull net.minecraft.world.level.block.state.BlockState state, @NotNull @NotNull net.minecraft.world.entity.player.Player player, @NotNull @NotNull net.minecraft.world.level.BlockGetter level, @NotNull @NotNull net.minecraft.core.BlockPos pos)
      Dynamic override for Block Strength (Hardness). Replaces properties.strength(0.0F, ...)
      Overrides:
      getDestroyProgress in class net.minecraft.world.level.block.state.BlockBehaviour