Class RedstoneOreBlock
- All Implemented Interfaces:
ItemConvertible
,ToggleableFeature
- Mappings:
Namespace Name official cvk
intermediary net/minecraft/class_2449
named net/minecraft/block/RedstoneOreBlock
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.block.Block
Block.NeighborGroup
Nested classes/interfaces inherited from class net.minecraft.block.AbstractBlock
AbstractBlock.AbstractBlockState, AbstractBlock.ContextPredicate, AbstractBlock.Offsetter, AbstractBlock.OffsetType, AbstractBlock.Settings, AbstractBlock.TypedContextPredicate<A>
-
Field Summary
Fields inherited from class net.minecraft.block.Block
field_31022, field_31023, field_31024, field_31025, field_31035, FORCE_STATE, MOVED, NO_REDRAW, NOTIFY_ALL, NOTIFY_LISTENERS, NOTIFY_NEIGHBORS, REDRAW_ON_MAIN_THREAD, SKIP_DROPS, STATE_IDS, stateManager
Fields inherited from class net.minecraft.block.AbstractBlock
collidable, DIRECTIONS, dynamicBounds, jumpVelocityMultiplier, lootTableId, randomTicks, requiredFeatures, resistance, settings, slipperiness, soundGroup, velocityMultiplier
Fields inherited from interface net.minecraft.resource.featuretoggle.ToggleableFeature
FEATURE_ENABLED_REGISTRY_KEYS
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
appendProperties
(StateManager.Builder<Block, BlockState> builder) Appends block state properties to this block.boolean
hasRandomTicks
(BlockState state) private static void
light
(BlockState state, World world, BlockPos pos) void
onBlockBreakStart
(BlockState state, World world, BlockPos pos, PlayerEntity player) Called when a player starts breaking the block (including when instant-mining).void
onStacksDropped
(BlockState state, ServerWorld world, BlockPos pos, ItemStack tool, boolean dropExperience) Called server-side when the stacks are dropped by mining or explosion.void
onSteppedOn
(World world, BlockPos pos, BlockState state, Entity entity) Called when an entity steps on this block.onUse
(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) Called when this block is used by a player.void
randomDisplayTick
(BlockState state, World world, BlockPos pos, Random random) Called randomly on the client.void
randomTick
(BlockState state, ServerWorld world, BlockPos pos, Random random) Called server-side when a block gets ticked randomly.private static void
spawnParticles
(World world, BlockPos pos) Methods inherited from class net.minecraft.block.Block
afterBreak, appendTooltip, asBlock, asItem, canMobSpawnInside, cannotConnect, createCuboidShape, dropExperience, dropExperienceWhenMined, dropStack, dropStack, dropStacks, dropStacks, dropStacks, getBlastResistance, getBlockFromItem, getDefaultState, getDroppedStacks, getDroppedStacks, getJumpVelocityMultiplier, getName, getPickStack, getPlacementState, getRawIdFromState, getRegistryEntry, getShapesForStates, getSlipperiness, getSoundGroup, getStateFromRawId, getStateManager, getStateWithProperties, getTranslationKey, getVelocityMultiplier, hasDynamicBounds, hasTopRim, isFaceFullSquare, isShapeFullCube, isTransparent, onBreak, onBroken, onDestroyedByExplosion, onEntityLand, onLandedUpon, onPlaced, postProcessState, precipitationTick, pushEntitiesUpBeforeBlockChange, replace, replace, setDefaultState, shouldDrawSide, shouldDropItemsOnExplosion, sideCoversSmallSquare, spawnBreakParticles, toString
Methods inherited from class net.minecraft.block.AbstractBlock
calcBlockBreakingDelta, canBucketPlace, canPathfindThrough, canPlaceAt, canReplace, createScreenHandlerFactory, emitsRedstonePower, getAmbientOcclusionLightLevel, getCameraCollisionShape, getCollisionShape, getComparatorOutput, getCullingShape, getDefaultMapColor, getDroppedStacks, getFluidState, getHardness, getLootTableId, getMaxHorizontalModelOffset, getOpacity, getOutlineShape, getRaycastShape, getRenderingSeed, getRenderType, getRequiredFeatures, getSidesShape, getStateForNeighborUpdate, getStrongRedstonePower, getVerticalModelOffsetMultiplier, getWeakRedstonePower, hasComparatorOutput, hasSidedTransparency, isCullingShapeFullCube, isShapeFullCube, isSideInvisible, mirror, neighborUpdate, onBlockAdded, onEntityCollision, onProjectileHit, onStateReplaced, onSyncedBlockEvent, prepare, rotate, scheduledTick
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minecraft.resource.featuretoggle.ToggleableFeature
isEnabled
-
Field Details
-
LIT
- Mappings:
Namespace Name Mixin selector official a
Lcvk;a:Ldcp;
intermediary field_11392
Lnet/minecraft/class_2449;field_11392:Lnet/minecraft/class_2746;
named LIT
Lnet/minecraft/block/RedstoneOreBlock;LIT:Lnet/minecraft/state/property/BooleanProperty;
-
-
Constructor Details
-
RedstoneOreBlock
- Mappings:
Namespace Name Mixin selector official <init>
Ldbx;<init>(Ldbx$d;)V
intermediary <init>
Lnet/minecraft/class_4970;<init>(Lnet/minecraft/class_4970$class_2251;)V
named <init>
Lnet/minecraft/block/AbstractBlock;<init>(Lnet/minecraft/block/AbstractBlock$Settings;)V
-
-
Method Details
-
onBlockBreakStart
Called when a player starts breaking the block (including when instant-mining).This method is called on both the logical client and logical server, so take caution when overriding this method. The logical side can be checked using
World.isClient
.- Overrides:
onBlockBreakStart
in classAbstractBlock
- Mappings:
Namespace Name Mixin selector official a
Ldbx;a(Ldby;Lcmk;Lgu;Lbym;)V
intermediary method_9606
Lnet/minecraft/class_4970;method_9606(Lnet/minecraft/class_2680;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_1657;)V
named onBlockBreakStart
Lnet/minecraft/block/AbstractBlock;onBlockBreakStart(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/entity/player/PlayerEntity;)V
-
onSteppedOn
Called when an entity steps on this block.This method is called on both the logical client and logical server, so take caution when overriding this method. The logical side can be checked using
World.isClient
.- Overrides:
onSteppedOn
in classBlock
- Mappings:
Namespace Name Mixin selector official a
Lcpl;a(Lcmk;Lgu;Ldby;Lbfh;)V
intermediary method_9591
Lnet/minecraft/class_2248;method_9591(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;Lnet/minecraft/class_1297;)V
named onSteppedOn
Lnet/minecraft/block/Block;onSteppedOn(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/entity/Entity;)V
-
onUse
public ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) Called when this block is used by a player. This, by default, is bound to using the right mouse button.This method is called on both the logical client and logical server, so take caution when overriding this method. The logical side can be checked using
world.isClient()
.If the action result is successful on a logical client, then the action will be sent to the logical server for processing.
- Overrides:
onUse
in classAbstractBlock
- Returns:
- an action result that specifies if using the block was successful.
- Mappings:
Namespace Name Mixin selector official a
Ldbx;a(Ldby;Lcmk;Lgu;Lbym;Lbdv;Ledw;)Lbdw;
intermediary method_9534
Lnet/minecraft/class_4970;method_9534(Lnet/minecraft/class_2680;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_1657;Lnet/minecraft/class_1268;Lnet/minecraft/class_3965;)Lnet/minecraft/class_1269;
named onUse
Lnet/minecraft/block/AbstractBlock;onUse(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/util/Hand;Lnet/minecraft/util/hit/BlockHitResult;)Lnet/minecraft/util/ActionResult;
-
light
- Mappings:
Namespace Name Mixin selector official d
Lcvk;d(Ldby;Lcmk;Lgu;)V
intermediary method_10441
Lnet/minecraft/class_2449;method_10441(Lnet/minecraft/class_2680;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;)V
named light
Lnet/minecraft/block/RedstoneOreBlock;light(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)V
-
hasRandomTicks
- Overrides:
hasRandomTicks
in classBlock
- Mappings:
Namespace Name Mixin selector official e_
Lcpl;e_(Ldby;)Z
intermediary method_9542
Lnet/minecraft/class_2248;method_9542(Lnet/minecraft/class_2680;)Z
named hasRandomTicks
Lnet/minecraft/block/Block;hasRandomTicks(Lnet/minecraft/block/BlockState;)Z
-
randomTick
Called server-side when a block gets ticked randomly. This can be overridden to implement various logics, most commonly plant growth. Default implementation callsAbstractBlock.scheduledTick(net.minecraft.block.BlockState, net.minecraft.server.world.ServerWorld, net.minecraft.util.math.BlockPos, net.minecraft.util.math.random.Random)
. To control the rate of the action, userandom
.Random tick speed is controlled by the game rule
randomTickSpeed
and can be disabled. Only blocks within 128-block cylinder (i.e. ignoring Y coordinates) around players receive random ticks.Blocks overriding this must use
AbstractBlock.Settings.ticksRandomly()
block settings.Here are some examples:
SugarCaneBlock
uses this to grow sugar cane.OxidizableBlock
uses this to oxidize.NetherPortalBlock
uses this to spawn zombified piglins.LeavesBlock
uses this to decay when far from logs.
- Overrides:
randomTick
in classAbstractBlock
- See Also:
- Mappings:
Namespace Name Mixin selector official b
Ldbx;b(Ldby;Laif;Lgu;Lapf;)V
intermediary method_9514
Lnet/minecraft/class_4970;method_9514(Lnet/minecraft/class_2680;Lnet/minecraft/class_3218;Lnet/minecraft/class_2338;Lnet/minecraft/class_5819;)V
named randomTick
Lnet/minecraft/block/AbstractBlock;randomTick(Lnet/minecraft/block/BlockState;Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/random/Random;)V
-
onStacksDropped
public void onStacksDropped(BlockState state, ServerWorld world, BlockPos pos, ItemStack tool, boolean dropExperience) Called server-side when the stacks are dropped by mining or explosion. This is mostly overridden to drop experience orbs. To change the dropped item stacks, use loot tables orAbstractBlock.getDroppedStacks(net.minecraft.block.BlockState, net.minecraft.loot.context.LootContextParameterSet.Builder)
. To drop inventory contents, useAbstractBlock.onStateReplaced(net.minecraft.block.BlockState, net.minecraft.world.World, net.minecraft.util.math.BlockPos, net.minecraft.block.BlockState, boolean)
instead.Experience orbs should only be dropped if
dropExperience
istrue
.Block.dropExperienceWhenMined(net.minecraft.server.world.ServerWorld, net.minecraft.util.math.BlockPos, net.minecraft.item.ItemStack, net.minecraft.util.math.intprovider.IntProvider)
can be used to drop experience orbs.ExperienceDroppingBlock
provides the implementation for experience-dropping blocks.- Overrides:
onStacksDropped
in classAbstractBlock
- See Also:
- Mappings:
Namespace Name Mixin selector official a
Ldbx;a(Ldby;Laif;Lgu;Lcfx;Z)V
intermediary method_9565
Lnet/minecraft/class_4970;method_9565(Lnet/minecraft/class_2680;Lnet/minecraft/class_3218;Lnet/minecraft/class_2338;Lnet/minecraft/class_1799;Z)V
named onStacksDropped
Lnet/minecraft/block/AbstractBlock;onStacksDropped(Lnet/minecraft/block/BlockState;Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/item/ItemStack;Z)V
-
randomDisplayTick
Called randomly on the client. Blocks may override this to spawn particles. UnlikeAbstractBlock.randomTick(net.minecraft.block.BlockState, net.minecraft.server.world.ServerWorld, net.minecraft.util.math.BlockPos, net.minecraft.util.math.random.Random)
this is not affected by a game rule.- Overrides:
randomDisplayTick
in classBlock
- Mappings:
Namespace Name Mixin selector official a
Lcpl;a(Ldby;Lcmk;Lgu;Lapf;)V
intermediary method_9496
Lnet/minecraft/class_2248;method_9496(Lnet/minecraft/class_2680;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_5819;)V
named randomDisplayTick
Lnet/minecraft/block/Block;randomDisplayTick(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/random/Random;)V
-
spawnParticles
- Mappings:
Namespace Name Mixin selector official a
Lcvk;a(Lcmk;Lgu;)V
intermediary method_10440
Lnet/minecraft/class_2449;method_10440(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;)V
named spawnParticles
Lnet/minecraft/block/RedstoneOreBlock;spawnParticles(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)V
-
appendProperties
Appends block state properties to this block. To use this, override and callStateManager.Builder.add(net.minecraft.state.property.Property<?>[])
inside the method. SeeProperties
for the list of pre-defined properties.- Overrides:
appendProperties
in classBlock
- Mappings:
Namespace Name Mixin selector official a
Lcpl;a(Ldbz$a;)V
intermediary method_9515
Lnet/minecraft/class_2248;method_9515(Lnet/minecraft/class_2689$class_2690;)V
named appendProperties
Lnet/minecraft/block/Block;appendProperties(Lnet/minecraft/state/StateManager$Builder;)V
-