Package net.minecraft.block
Class CakeBlock
java.lang.Object
net.minecraft.block.AbstractBlock
net.minecraft.block.Block
net.minecraft.block.CakeBlock
- All Implemented Interfaces:
ItemConvertible
- Mappings:
Namespace Name official cjgintermediary net/minecraft/class_2272named net/minecraft/block/CakeBlock
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.block.Block
Block.NeighborGroupNested classes/interfaces inherited from class net.minecraft.block.AbstractBlock
AbstractBlock.AbstractBlockState, AbstractBlock.ContextPredicate, AbstractBlock.OffsetType, AbstractBlock.Settings, AbstractBlock.TypedContextPredicate<A> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final IntPropertyprotected static final VoxelShape[]static final intprotected static final floatprotected static final floatstatic final intFields 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, SKIP_LIGHTING_UPDATES, STATE_IDS, stateManagerFields inherited from class net.minecraft.block.AbstractBlock
collidable, DIRECTIONS, dynamicBounds, jumpVelocityMultiplier, lootTableId, material, randomTicks, resistance, settings, slipperiness, soundGroup, velocityMultiplier -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidappendProperties(StateManager.Builder<Block, BlockState> builder) booleancanPathfindThrough(BlockState state, BlockView world, BlockPos pos, NavigationType type) booleancanPlaceAt(BlockState state, WorldView world, BlockPos pos) static intgetComparatorOutput(int bites) intgetComparatorOutput(BlockState state, World world, BlockPos pos) getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context) getStateForNeighborUpdate(BlockState state, Direction direction, BlockState neighborState, WorldAccess world, BlockPos pos, BlockPos neighborPos) Gets the possibly updated block state of this block when a neighboring block is updated.booleanhasComparatorOutput(BlockState state) onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) Called when this block is used by a player.protected static ActionResulttryEat(WorldAccess world, BlockPos pos, BlockState state, PlayerEntity player) Methods inherited from class net.minecraft.block.Block
afterBreak, appendStacks, appendTooltip, asBlock, asItem, canMobSpawnInside, cannotConnect, createCuboidShape, dropExperience, dropExperienceWhenMined, dropStack, dropStack, dropStacks, dropStacks, dropStacks, dropStacks, getBlastResistance, getBlockFromItem, getDefaultState, getDroppedStacks, getDroppedStacks, getJumpVelocityMultiplier, getName, getPickStack, getPlacementState, getRawIdFromState, getRegistryEntry, getShapesForStates, getSlipperiness, getSoundGroup, getStateFromRawId, getStateManager, getStateWithProperties, getTranslationKey, getVelocityMultiplier, hasDynamicBounds, hasRandomTicks, hasTopRim, isFaceFullSquare, isShapeFullCube, isTranslucent, 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, canReplace, createScreenHandlerFactory, emitsRedstonePower, getAmbientOcclusionLightLevel, getCameraCollisionShape, getCollisionShape, getCullingShape, getDefaultMapColor, getDroppedStacks, getFluidState, getHardness, getLootTableId, getMaxHorizontalModelOffset, getOpacity, getPistonBehavior, getRaycastShape, getRenderingSeed, getRenderType, getSidesShape, getStrongRedstonePower, getVerticalModelOffsetMultiplier, getWeakRedstonePower, hasSidedTransparency, isCullingShapeFullCube, isShapeFullCube, isSideInvisible, mirror, neighborUpdate, onBlockAdded, onBlockBreakStart, onEntityCollision, onProjectileHit, onStacksDropped, onStateReplaced, onSyncedBlockEvent, prepare, randomTick, rotate, scheduledTick
-
Field Details
-
MAX_BITES
public static final int MAX_BITES- See Also:
- Mappings:
Namespace Name Mixin selector official aLcjg;a:Iintermediary field_31046Lnet/minecraft/class_2272;field_31046:Inamed MAX_BITESLnet/minecraft/block/CakeBlock;MAX_BITES:I
-
BITES
- Mappings:
Namespace Name Mixin selector official bLcjg;b:Lcvr;intermediary field_10739Lnet/minecraft/class_2272;field_10739:Lnet/minecraft/class_2758;named BITESLnet/minecraft/block/CakeBlock;BITES:Lnet/minecraft/state/property/IntProperty;
-
DEFAULT_COMPARATOR_OUTPUT
public static final int DEFAULT_COMPARATOR_OUTPUT- Mappings:
Namespace Name Mixin selector official cLcjg;c:Iintermediary field_27173Lnet/minecraft/class_2272;field_27173:Inamed DEFAULT_COMPARATOR_OUTPUTLnet/minecraft/block/CakeBlock;DEFAULT_COMPARATOR_OUTPUT:I
-
field_31047
protected static final float field_31047- See Also:
- Mappings:
Namespace Name Mixin selector official dLcjg;d:Fintermediary field_31047Lnet/minecraft/class_2272;field_31047:Fnamed field_31047Lnet/minecraft/block/CakeBlock;field_31047:F
-
field_31048
protected static final float field_31048- See Also:
- Mappings:
Namespace Name Mixin selector official eLcjg;e:Fintermediary field_31048Lnet/minecraft/class_2272;field_31048:Fnamed field_31048Lnet/minecraft/block/CakeBlock;field_31048:F
-
BITES_TO_SHAPE
- Mappings:
Namespace Name Mixin selector official fLcjg;f:[Ldwm;intermediary field_10738Lnet/minecraft/class_2272;field_10738:[Lnet/minecraft/class_265;named BITES_TO_SHAPELnet/minecraft/block/CakeBlock;BITES_TO_SHAPE:[Lnet/minecraft/util/shape/VoxelShape;
-
-
Constructor Details
-
CakeBlock
- Mappings:
Namespace Name Mixin selector official <init>Lcuq;<init>(Lcuq$c;)Vintermediary <init>Lnet/minecraft/class_4970;<init>(Lnet/minecraft/class_4970$class_2251;)Vnamed <init>Lnet/minecraft/block/AbstractBlock;<init>(Lnet/minecraft/block/AbstractBlock$Settings;)V
-
-
Method Details
-
getOutlineShape
public VoxelShape getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context) - Overrides:
getOutlineShapein classAbstractBlock- Mappings:
Namespace Name Mixin selector official aLcuq;a(Lcur;Lcfg;Lgt;Ldvy;)Ldwm;intermediary method_9530Lnet/minecraft/class_4970;method_9530(Lnet/minecraft/class_2680;Lnet/minecraft/class_1922;Lnet/minecraft/class_2338;Lnet/minecraft/class_3726;)Lnet/minecraft/class_265;named getOutlineShapeLnet/minecraft/block/AbstractBlock;getOutlineShape(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/BlockView;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/ShapeContext;)Lnet/minecraft/util/shape/VoxelShape;
-
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:
onUsein classAbstractBlock- Returns:
- an action result that specifies if using the block was successful.
- Mappings:
Namespace Name Mixin selector official aLcuq;a(Lcur;Lcga;Lgt;Lbtf;Lazl;Ldvp;)Lazm;intermediary method_9534Lnet/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 onUseLnet/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;
-
tryEat
protected static ActionResult tryEat(WorldAccess world, BlockPos pos, BlockState state, PlayerEntity player) - Mappings:
Namespace Name Mixin selector official aLcjg;a(Lcgb;Lgt;Lcur;Lbtf;)Lazm;intermediary method_9719Lnet/minecraft/class_2272;method_9719(Lnet/minecraft/class_1936;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;Lnet/minecraft/class_1657;)Lnet/minecraft/class_1269;named tryEatLnet/minecraft/block/CakeBlock;tryEat(Lnet/minecraft/world/WorldAccess;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/entity/player/PlayerEntity;)Lnet/minecraft/util/ActionResult;
-
getStateForNeighborUpdate
public BlockState getStateForNeighborUpdate(BlockState state, Direction direction, BlockState neighborState, WorldAccess world, BlockPos pos, BlockPos neighborPos) Gets the possibly updated block state of this block when a neighboring block is updated.- Overrides:
getStateForNeighborUpdatein classAbstractBlock- Parameters:
state- the state of this blockdirection- the direction from this block to the neighborneighborState- the state of the updated neighbor blockworld- the worldpos- the position of this blockneighborPos- the position of the neighbor block- Returns:
- the new state of this block
- Mappings:
Namespace Name Mixin selector official aLcuq;a(Lcur;Lgy;Lcur;Lcgb;Lgt;Lgt;)Lcur;intermediary method_9559Lnet/minecraft/class_4970;method_9559(Lnet/minecraft/class_2680;Lnet/minecraft/class_2350;Lnet/minecraft/class_2680;Lnet/minecraft/class_1936;Lnet/minecraft/class_2338;Lnet/minecraft/class_2338;)Lnet/minecraft/class_2680;named getStateForNeighborUpdateLnet/minecraft/block/AbstractBlock;getStateForNeighborUpdate(Lnet/minecraft/block/BlockState;Lnet/minecraft/util/math/Direction;Lnet/minecraft/block/BlockState;Lnet/minecraft/world/WorldAccess;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/block/BlockState;
-
canPlaceAt
- Overrides:
canPlaceAtin classAbstractBlock- Mappings:
Namespace Name Mixin selector official aLcuq;a(Lcur;Lcgd;Lgt;)Zintermediary method_9558Lnet/minecraft/class_4970;method_9558(Lnet/minecraft/class_2680;Lnet/minecraft/class_4538;Lnet/minecraft/class_2338;)Znamed canPlaceAtLnet/minecraft/block/AbstractBlock;canPlaceAt(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/WorldView;Lnet/minecraft/util/math/BlockPos;)Z
-
appendProperties
- Overrides:
appendPropertiesin classBlock- Mappings:
Namespace Name Mixin selector official aLciw;a(Lcus$a;)Vintermediary method_9515Lnet/minecraft/class_2248;method_9515(Lnet/minecraft/class_2689$class_2690;)Vnamed appendPropertiesLnet/minecraft/block/Block;appendProperties(Lnet/minecraft/state/StateManager$Builder;)V
-
getComparatorOutput
- Overrides:
getComparatorOutputin classAbstractBlock- Mappings:
Namespace Name Mixin selector official aLcuq;a(Lcur;Lcga;Lgt;)Iintermediary method_9572Lnet/minecraft/class_4970;method_9572(Lnet/minecraft/class_2680;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;)Inamed getComparatorOutputLnet/minecraft/block/AbstractBlock;getComparatorOutput(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)I
-
getComparatorOutput
public static int getComparatorOutput(int bites) - Mappings:
Namespace Name Mixin selector official bLcjg;b(I)Iintermediary method_31627Lnet/minecraft/class_2272;method_31627(I)Inamed getComparatorOutputLnet/minecraft/block/CakeBlock;getComparatorOutput(I)I
-
hasComparatorOutput
- Overrides:
hasComparatorOutputin classAbstractBlock- Mappings:
Namespace Name Mixin selector official d_Lcuq;d_(Lcur;)Zintermediary method_9498Lnet/minecraft/class_4970;method_9498(Lnet/minecraft/class_2680;)Znamed hasComparatorOutputLnet/minecraft/block/AbstractBlock;hasComparatorOutput(Lnet/minecraft/block/BlockState;)Z
-