Class CopperChestBlock
- All Implemented Interfaces:
BlockEntityProvider,FluidDrainable,FluidFillable,Waterloggable,ItemConvertible,ToggleableFeature
- Direct Known Subclasses:
OxidizableCopperChestBlock
- Mappings:
Namespace Name named net/minecraft/block/CopperChestBlockintermediary net/minecraft/class_11582official dwl
-
Nested Class Summary
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
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<CopperChestBlock> private final Oxidizable.OxidationLevelFields inherited from class net.minecraft.block.ChestBlock
CHEST_TYPE, FACING, field_31057, WATERLOGGEDFields inherited from class net.minecraft.block.AbstractChestBlock
entityTypeRetrieverFields inherited from class net.minecraft.block.Block
field_31023, field_31024, field_31025, FORCE_STATE, FORCE_STATE_AND_SKIP_CALLBACKS_AND_DROPS, MOVED, NO_REDRAW, NOTIFY_ALL, NOTIFY_ALL_AND_REDRAW, NOTIFY_LISTENERS, NOTIFY_NEIGHBORS, REDRAW_ON_MAIN_THREAD, SKIP_BLOCK_ADDED_CALLBACK, SKIP_BLOCK_ENTITY_REPLACED_CALLBACK, SKIP_DROPS, SKIP_REDRAW_AND_BLOCK_ENTITY_REPLACED_CALLBACK, SKIP_REDSTONE_WIRE_STATE_REPLACEMENT, STATE_IDS, stateManagerFields inherited from class net.minecraft.block.AbstractBlock
collidable, DIRECTIONS, dynamicBounds, jumpVelocityMultiplier, lootTableKey, randomTicks, requiredFeatures, resistance, settings, slipperiness, soundGroup, translationKey, velocityMultiplierFields inherited from interface net.minecraft.resource.featuretoggle.ToggleableFeature
FEATURE_ENABLED_REGISTRY_KEYS -
Constructor Summary
ConstructorsConstructorDescriptionCopperChestBlock(Oxidizable.OxidationLevel oxidationLevel, SoundEvent openSound, SoundEvent closeSound, AbstractBlock.Settings settings) -
Method Summary
Modifier and TypeMethodDescriptionbooleancanMergeWith(BlockState state) static BlockStatefromCopperBlock(Block block, Direction facing, World world, BlockPos pos) com.mojang.serialization.MapCodec<? extends CopperChestBlock> getCodec()private static BlockStategetNewState(BlockState state, World world, BlockPos pos) Explanation for connecting two copper chests: If either one is unwaxed, then unwax the other. Set the oxidation level of the more oxidized one to the same level as the less oxidized one.protected BlockStategetStateForNeighborUpdate(BlockState state, WorldView world, ScheduledTickView tickView, BlockPos pos, Direction direction, BlockPos neighborPos, BlockState neighborState, Random random) Returns the state of the block after a neighboring block's state change.private static Optional<BlockState> getUnwaxed(CopperChestBlock block, BlockState state) booleanisWaxed()booleanMethods inherited from class net.minecraft.block.ChestBlock
appendProperties, canPathfindThrough, createBlockEntity, createScreenHandlerFactory, getAnimationProgressRetriever, getBlockEntitySource, getChestType, getCloseSound, getComparatorOutput, getDoubleBlockType, getExpectedEntityType, getFacing, getFluidState, getInventory, getOpenSound, getOpenStat, getOutlineShape, getPosInFrontOf, getTicker, hasComparatorOutput, isChestBlocked, mirror, onStateReplaced, onUse, rotate, scheduledTickMethods inherited from class net.minecraft.block.BlockWithEntity
onSyncedBlockEvent, validateTickerMethods inherited from class net.minecraft.block.Block
afterBreak, asBlock, asItem, canMobSpawnInside, cannotConnect, createColumnShape, createColumnShape, createCubeShape, createCuboidShape, createCuboidShape, createCuboidZShape, createCuboidZShape, createCuboidZShape, createShapeArray, createShapeFunction, createShapeFunction, dropExperience, dropExperienceWhenMined, dropStack, dropStack, dropStacks, dropStacks, dropStacks, generateBlockInteractLoot, generateLoot, getBlastResistance, getBlockFromItem, getDefaultState, getDroppedStacks, getDroppedStacks, getJumpVelocityMultiplier, getName, getRawIdFromState, getRegistryEntry, getSlipperiness, getStateFromRawId, getStateManager, getStateWithProperties, getVelocityMultiplier, hasDynamicBounds, hasTopRim, isFaceFullSquare, isShapeFullCube, onBreak, onBroken, onDestroyedByExplosion, onEntityLand, onLandedUpon, onPlaced, onSteppedOn, postProcessState, precipitationTick, pushEntitiesUpBeforeBlockChange, randomDisplayTick, replace, replace, setDefaultState, shouldDrawSide, shouldDropItemsOnExplosion, sideCoversSmallSquare, spawnBreakParticles, toStringMethods inherited from class net.minecraft.block.AbstractBlock
calcBlockBreakingDelta, canBucketPlace, canPlaceAt, canReplace, createCodec, createSettingsCodec, emitsRedstonePower, getAmbientOcclusionLightLevel, getCameraCollisionShape, getCollisionShape, getCullingShape, getDefaultMapColor, getDroppedStacks, getHardness, getInsideCollisionShape, getLootTableKey, getMaxHorizontalModelOffset, getOpacity, getPickStack, getRaycastShape, getRenderingSeed, getRenderType, getRequiredFeatures, getSettings, getSidesShape, getSoundGroup, getStrongRedstonePower, getTranslationKey, getVerticalModelOffsetMultiplier, getWeakRedstonePower, hasRandomTicks, hasSidedTransparency, isShapeFullCube, isSideInvisible, isTransparent, neighborUpdate, onBlockAdded, onBlockBreakStart, onEntityCollision, onExploded, onProjectileHit, onStacksDropped, onUseWithItem, prepare, randomTickMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.block.BlockEntityProvider
getGameEventListenerMethods inherited from interface net.minecraft.resource.featuretoggle.ToggleableFeature
isEnabledMethods inherited from interface net.minecraft.block.Waterloggable
canFillWithFluid, getBucketFillSound, tryDrainFluid, tryFillWithFluid
-
Field Details
-
CODEC
- Mappings:
Namespace Name Mixin selector named CODECLnet/minecraft/block/CopperChestBlock;CODEC:Lcom/mojang/serialization/MapCodec;intermediary field_61405Lnet/minecraft/class_11582;field_61405:Lcom/mojang/serialization/MapCodec;official gLdwl;g:Lcom/mojang/serialization/MapCodec;
-
FROM_COPPER_BLOCK
- Mappings:
Namespace Name Mixin selector named FROM_COPPER_BLOCKLnet/minecraft/block/CopperChestBlock;FROM_COPPER_BLOCK:Ljava/util/Map;intermediary field_61406Lnet/minecraft/class_11582;field_61406:Ljava/util/Map;official hLdwl;h:Ljava/util/Map;
-
oxidationLevel
- Mappings:
Namespace Name Mixin selector named oxidationLevelLnet/minecraft/block/CopperChestBlock;oxidationLevel:Lnet/minecraft/block/Oxidizable$OxidationLevel;intermediary field_61407Lnet/minecraft/class_11582;field_61407:Lnet/minecraft/class_5955$class_5811;official iLdwl;i:Leev$a;
-
-
Constructor Details
-
CopperChestBlock
public CopperChestBlock(Oxidizable.OxidationLevel oxidationLevel, SoundEvent openSound, SoundEvent closeSound, AbstractBlock.Settings settings) - Mappings:
Namespace Name Mixin selector named <init>Lnet/minecraft/block/CopperChestBlock;<init>(Lnet/minecraft/block/Oxidizable$OxidationLevel;Lnet/minecraft/sound/SoundEvent;Lnet/minecraft/sound/SoundEvent;Lnet/minecraft/block/AbstractBlock$Settings;)Vintermediary <init>Lnet/minecraft/class_11582;<init>(Lnet/minecraft/class_5955$class_5811;Lnet/minecraft/class_3414;Lnet/minecraft/class_3414;Lnet/minecraft/class_4970$class_2251;)Vofficial <init>Ldwl;<init>(Leev$a;Lbcd;Lbcd;Lejl$d;)V
-
-
Method Details
-
getCodec
- Overrides:
getCodecin classChestBlock- Mappings:
Namespace Name Mixin selector named getCodecLnet/minecraft/block/AbstractBlock;getCodec()Lcom/mojang/serialization/MapCodec;intermediary method_53969Lnet/minecraft/class_4970;method_53969()Lcom/mojang/serialization/MapCodec;official aLejl;a()Lcom/mojang/serialization/MapCodec;
-
canMergeWith
- Overrides:
canMergeWithin classChestBlock- Mappings:
Namespace Name Mixin selector named canMergeWithLnet/minecraft/block/ChestBlock;canMergeWith(Lnet/minecraft/block/BlockState;)Zintermediary method_72582Lnet/minecraft/class_2281;method_72582(Lnet/minecraft/class_2680;)Zofficial iLdvz;i(Lejm;)Z
-
getPlacementState
- Overrides:
getPlacementStatein classChestBlock- Mappings:
Namespace Name Mixin selector named getPlacementStateLnet/minecraft/block/Block;getPlacementState(Lnet/minecraft/item/ItemPlacementContext;)Lnet/minecraft/block/BlockState;intermediary method_9605Lnet/minecraft/class_2248;method_9605(Lnet/minecraft/class_1750;)Lnet/minecraft/class_2680;official aLduv;a(Ldlk;)Lejm;
-
getNewState
Explanation for connecting two copper chests:- If either one is unwaxed, then unwax the other.
- Set the oxidation level of the more oxidized one to the same level as the less oxidized one.
- Mappings:
Namespace Name Mixin selector named getNewStateLnet/minecraft/block/CopperChestBlock;getNewState(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/block/BlockState;intermediary method_74028Lnet/minecraft/class_11582;method_74028(Lnet/minecraft/class_2680;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;)Lnet/minecraft/class_2680;official cLdwl;c(Lejm;Ldrq;Lja;)Lejm;
-
getStateForNeighborUpdate
protected BlockState getStateForNeighborUpdate(BlockState state, WorldView world, ScheduledTickView tickView, BlockPos pos, Direction direction, BlockPos neighborPos, BlockState neighborState, Random random) Returns the state of the block after a neighboring block's state change.Returning
Blocks.AIRbreaks the block. This is useful to implement supporting block requirement for blocks (if used along withAbstractBlock.canPlaceAt(net.minecraft.block.BlockState, net.minecraft.world.WorldView, net.minecraft.util.math.BlockPos)).Side effects like activating a redstone component (but not scheduling a tick) should be performed in
AbstractBlock.neighborUpdate(net.minecraft.block.BlockState, net.minecraft.world.World, net.minecraft.util.math.BlockPos, net.minecraft.block.Block, net.minecraft.world.block.WireOrientation, boolean)instead. If the block supports waterlogging and currently has water, this method should be overridden to tick the fluid at the block's position.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. This is not called ifBlock.FORCE_STATEflag is set in thesetBlockStatecall.This method can be used for multiple purposes. Here are some examples:
FenceBlockuses it to update the fence's connection when a horizontally neighboring block's state is changed.PlantBlockuses it to break the plant if the state change causes it to lose its supporting block.DoorBlockuses it to copy the state of the other half of the door.SlabBlockuses it to schedule the fluid to tick if waterlogged.SoulSandBlockuses it to schedule the water block above to tick so that it becomes a bubble column.FallingBlockuses it to schedule the block to tick so that it can fall if needed.
- Overrides:
getStateForNeighborUpdatein classChestBlock- Parameters:
state- the state of this blockworld- the worldpos- the position of this blockdirection- the direction from this block to the neighborneighborPos- the position of the neighbor blockneighborState- the state of the updated neighbor block- Returns:
- the state of the block after a neighboring block's state change
- See Also:
- Mappings:
Namespace Name Mixin selector named getStateForNeighborUpdateLnet/minecraft/block/AbstractBlock;getStateForNeighborUpdate(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/WorldView;Lnet/minecraft/world/tick/ScheduledTickView;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/Direction;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/util/math/random/Random;)Lnet/minecraft/block/BlockState;intermediary method_9559Lnet/minecraft/class_4970;method_9559(Lnet/minecraft/class_2680;Lnet/minecraft/class_4538;Lnet/minecraft/class_10225;Lnet/minecraft/class_2338;Lnet/minecraft/class_2350;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;Lnet/minecraft/class_5819;)Lnet/minecraft/class_2680;official aLejl;a(Lejm;Ldrt;Ldsf;Lja;Ljg;Lja;Lejm;Lbfq;)Lejm;
-
getUnwaxed
- Mappings:
Namespace Name Mixin selector named getUnwaxedLnet/minecraft/block/CopperChestBlock;getUnwaxed(Lnet/minecraft/block/CopperChestBlock;Lnet/minecraft/block/BlockState;)Ljava/util/Optional;intermediary method_72598Lnet/minecraft/class_11582;method_72598(Lnet/minecraft/class_11582;Lnet/minecraft/class_2680;)Ljava/util/Optional;official aLdwl;a(Ldwl;Lejm;)Ljava/util/Optional;
-
getOxidationLevel
- Mappings:
Namespace Name Mixin selector named getOxidationLevelLnet/minecraft/block/CopperChestBlock;getOxidationLevel()Lnet/minecraft/block/Oxidizable$OxidationLevel;intermediary method_72601Lnet/minecraft/class_11582;method_72601()Lnet/minecraft/class_5955$class_5811;official tLdwl;t()Leev$a;
-
fromCopperBlock
- Mappings:
Namespace Name Mixin selector named fromCopperBlockLnet/minecraft/block/CopperChestBlock;fromCopperBlock(Lnet/minecraft/block/Block;Lnet/minecraft/util/math/Direction;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/block/BlockState;intermediary method_72597Lnet/minecraft/class_11582;method_72597(Lnet/minecraft/class_2248;Lnet/minecraft/class_2350;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;)Lnet/minecraft/class_2680;official aLdwl;a(Lduv;Ljg;Ldrq;Lja;)Lejm;
-
isWaxed
public boolean isWaxed()- Mappings:
Namespace Name Mixin selector named isWaxedLnet/minecraft/block/CopperChestBlock;isWaxed()Zintermediary method_72602Lnet/minecraft/class_11582;method_72602()Zofficial uLdwl;u()Z
-
keepBlockEntityWhenReplacedWith
- Overrides:
keepBlockEntityWhenReplacedWithin classAbstractBlock- Mappings:
Namespace Name Mixin selector named keepBlockEntityWhenReplacedWithLnet/minecraft/block/AbstractBlock;keepBlockEntityWhenReplacedWith(Lnet/minecraft/block/BlockState;)Zintermediary method_72600Lnet/minecraft/class_4970;method_72600(Lnet/minecraft/class_2680;)Zofficial oLejl;o(Lejm;)Z
-