net.minecraft.block

public class ComposterBlock

extends Block implements InventoryProvider

All mapped superinterfaces:

ToggleableFeature, ItemConvertible, InventoryProvider

net.minecraft.world.level.block.ComposterBlock
net.minecraft.class_3962
net.minecraft.block.ComposterBlock

Field summary

Modifier and TypeField
public static final com.mojang.serialization.MapCodec<ComposterBlock>
CODEC
field_46320
CODEC
public static final int
READY
field_31071
NUM_LEVELS
public static final int
MIN_LEVEL
field_31072
MIN_LEVEL
public static final int
MAX_LEVEL
field_31073
MAX_LEVEL
public static final IntProperty
LEVEL
field_17565
LEVEL
public static final it.unimi.dsi.fastutil.objects.Object2FloatMap<ItemConvertible>
COMPOSTABLES
field_17566
ITEM_TO_LEVEL_INCREASE_CHANCE
private static final int
HOLE_WIDTH
field_55750
field_55750
private static final VoxelShape[]
SHAPES
field_17568
COLLISION_SHAPES_BY_LEVEL

Constructor summary

ModifierConstructor
public (AbstractBlock$Settings properties)

Method summary

Modifier and TypeMethod
public com.mojang.serialization.MapCodec<ComposterBlock>
codec()
method_53969()
getCodec()
public static void
bootStrap()
method_17758()
registerDefaultCompostableItems()
private static void
add(float value, ItemLike item)
method_17753(float arg0, class_1935 arg1)
registerCompostableItem(float levelIncreaseChance, ItemConvertible item)
public static void
handleFill(Level level, BlockPos pos, boolean success)
method_18027(class_1937 arg0, class_2338 arg1, boolean arg2)
playEffects(World world, BlockPos pos, boolean fill)
protected VoxelShape
getShape(BlockState state, BlockGetter level, BlockPos pos, CollisionContext context)
method_9530(class_2680 arg0, class_1922 arg1, class_2338 arg2, class_3726 arg3)
getOutlineShape(BlockState arg0, BlockView arg1, BlockPos arg2, ShapeContext arg3)
protected VoxelShape
getInteractionShape(BlockState state, BlockGetter level, BlockPos pos)
method_9584(class_2680 arg0, class_1922 arg1, class_2338 arg2)
getRaycastShape(BlockState arg0, BlockView arg1, BlockPos arg2)
protected VoxelShape
getCollisionShape(BlockState state, BlockGetter level, BlockPos pos, CollisionContext context)
method_9549(class_2680 arg0, class_1922 arg1, class_2338 arg2, class_3726 arg3)
getCollisionShape(BlockState arg0, BlockView arg1, BlockPos arg2, ShapeContext arg3)
protected void
onPlace(BlockState state, Level level, BlockPos pos, BlockState oldState, boolean movedByPiston)
method_9615(class_2680 arg0, class_1937 arg1, class_2338 arg2, class_2680 arg3, boolean arg4)
onBlockAdded(BlockState arg0, World arg1, BlockPos arg2, BlockState arg3, boolean arg4)
protected ActionResult
useItemOn(ItemStack itemStack, BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hitResult)
method_55765(class_1799 arg0, class_2680 arg1, class_1937 arg2, class_2338 arg3, class_1657 arg4, class_1268 arg5, class_3965 arg6)
onUseWithItem(ItemStack arg0, BlockState arg1, World arg2, BlockPos arg3, PlayerEntity arg4, Hand arg5, BlockHitResult arg6)
protected ActionResult
useWithoutItem(BlockState state, Level level, BlockPos pos, Player player, BlockHitResult hitResult)
method_55766(class_2680 arg0, class_1937 arg1, class_2338 arg2, class_1657 arg3, class_3965 arg4)
onUse(BlockState arg0, World arg1, BlockPos arg2, PlayerEntity arg3, BlockHitResult arg4)
public static BlockState
insertItem(Entity sourceEntity, BlockState state, ServerLevel level, ItemStack itemStack, BlockPos pos)
method_26373(class_1297 arg0, class_2680 arg1, class_3218 arg2, class_1799 arg3, class_2338 arg4)
compost(Entity user, BlockState state, ServerWorld world, ItemStack stack, BlockPos pos)
public static BlockState
extractProduce(Entity sourceEntity, BlockState state, Level level, BlockPos pos)
method_26374(class_1297 arg0, class_2680 arg1, class_1937 arg2, class_2338 arg3)
emptyFullComposter(Entity user, BlockState state, World world, BlockPos pos)
private static BlockState
empty(Entity sourceEntity, BlockState state, LevelAccessor level, BlockPos pos)
method_17759(class_1297 arg0, class_2680 arg1, class_1936 arg2, class_2338 arg3)
emptyComposter(Entity user, BlockState state, WorldAccess world, BlockPos pos)
private static BlockState
addItem(Entity sourceEntity, BlockState state, LevelAccessor level, BlockPos pos, ItemStack itemStack)
method_17756(class_1297 arg0, class_2680 arg1, class_1936 arg2, class_2338 arg3, class_1799 arg4)
addToComposter(Entity user, BlockState state, WorldAccess world, BlockPos pos, ItemStack stack)
protected void
tick(BlockState state, ServerLevel level, BlockPos pos, RandomSource random)
method_9588(class_2680 arg0, class_3218 arg1, class_2338 arg2, class_5819 arg3)
scheduledTick(BlockState arg0, ServerWorld arg1, BlockPos arg2, Random arg3)
protected boolean
hasAnalogOutputSignal(BlockState state)
method_9498(class_2680 arg0)
hasComparatorOutput(BlockState arg0)
protected int
getAnalogOutputSignal(BlockState state, Level level, BlockPos pos, Direction direction)
method_9572(class_2680 arg0, class_1937 arg1, class_2338 arg2, class_2350 arg3)
getComparatorOutput(BlockState arg0, World arg1, BlockPos arg2, Direction arg3)
protected void
createBlockStateDefinition(StateDefinition$Builder<Block, BlockState> builder)
method_9515(class_2689$class_2690<class_2248, class_2680> arg0)
appendProperties(StateManager$Builder<Block, BlockState> arg0)
protected boolean
isPathfindable(BlockState state, PathComputationType type)
method_9516(class_2680 arg0, class_10 arg1)
canPathfindThrough(BlockState arg0, NavigationType arg1)
public SidedInventory
getContainer(BlockState state, LevelAccessor level, BlockPos pos)
method_17680(class_2680 arg0, class_1936 arg1, class_2338 arg2)
getInventory(BlockState arg0, WorldAccess arg1, BlockPos arg2)
private static VoxelShape[]
lambda$static$0()
method_66426()
method_66426()
private static VoxelShape
lambda$static$1(int arg0)
method_66425(int arg0)
method_66425(int level)