Package net.minecraft.block.entity
Class AbstractFurnaceBlockEntity
java.lang.Object
net.minecraft.block.entity.BlockEntity
net.minecraft.block.entity.LockableContainerBlockEntity
net.minecraft.block.entity.AbstractFurnaceBlockEntity
- All Implemented Interfaces:
Inventory,SidedInventory,RecipeInputProvider,RecipeUnlocker,NamedScreenHandlerFactory,ScreenHandlerFactory,Clearable,Nameable
- Direct Known Subclasses:
BlastFurnaceBlockEntity,FurnaceBlockEntity,SmokerBlockEntity
public abstract class AbstractFurnaceBlockEntity extends LockableContainerBlockEntity implements SidedInventory, RecipeUnlocker, RecipeInputProvider
- Mappings:
Namespace Name official cfhintermediary net/minecraft/class_2609named net/minecraft/block/entity/AbstractFurnaceBlockEntity
-
Field Summary
Fields Modifier and Type Field Description private static int[]BOTTOM_SLOTSprivate intburnTimeprivate intcookTimeprivate intcookTimeTotalprivate intfuelTimeprotected DefaultedList<ItemStack>inventoryprotected PropertyDelegatepropertyDelegateprivate Object2IntOpenHashMap<Identifier>recipesUsedprivate RecipeType<? extends AbstractCookingRecipe>recipeTypeprivate static int[]SIDE_SLOTSprivate static int[]TOP_SLOTSFields inherited from class net.minecraft.block.entity.BlockEntity
pos, removed, world -
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractFurnaceBlockEntity(BlockEntityType<?> blockEntityType, BlockPos pos, BlockState state, RecipeType<? extends AbstractCookingRecipe> recipeType) -
Method Summary
Modifier and Type Method Description private static voidaddFuel(Map<Item,Integer> map, ItemConvertible item, int fuelTime)private static voidaddFuel(Map<Item,Integer> fuelTimes, Tag<Item> tag, int fuelTime)private static booleancanAcceptRecipeOutput(Recipe<?> recipe, DefaultedList<ItemStack> slots, int count)booleancanExtract(int slot, ItemStack stack, Direction dir)Determines whether the given stack can be removed from this inventory at the specified slot position from the given direction.booleancanInsert(int slot, ItemStack stack, Direction dir)Determines whether the given stack can be inserted into this inventory at the specified slot position from the given direction.booleancanPlayerUse(PlayerEntity player)static booleancanUseAsFuel(ItemStack stack)voidclear()private static booleancraftRecipe(Recipe<?> recipe, DefaultedList<ItemStack> slots, int count)static Map<Item,Integer>createFuelTimeMap()private static voiddropExperience(ServerWorld world, Vec3d pos, int multiplier, float experience)voiddropExperienceForRecipesUsed(ServerPlayerEntity player)voidfromTag(CompoundTag tag)int[]getAvailableSlots(Direction side)Gets the available slot positions that are reachable from a given side.private static intgetCookTime(World world, RecipeType<? extends AbstractCookingRecipe> recipeType, Inventory inventory)protected intgetFuelTime(ItemStack fuel)Recipe<?>getLastRecipe()List<Recipe<?>>getRecipesUsedAndDropExperience(ServerWorld world, Vec3d pos)ItemStackgetStack(int slot)Fetches the stack currently stored at the given slot.private booleanisBurning()booleanisEmpty()private static booleanisNonFlammableWood(Item item)booleanisValid(int slot, ItemStack stack)Returns whether the given stack is a valid for the indicated slot position.voidprovideRecipeInputs(RecipeFinder finder)ItemStackremoveStack(int slot)Removes the stack currently stored at the indicated slot.ItemStackremoveStack(int slot, int amount)Removes a specific number of items from the given slot.voidsetLastRecipe(Recipe<?> recipe)voidsetStack(int slot, ItemStack stack)intsize()static voidtick(World world, BlockPos pos, BlockState state, AbstractFurnaceBlockEntity blockEntity)CompoundTagtoTag(CompoundTag tag)voidunlockLastRecipe(PlayerEntity player)Methods inherited from class net.minecraft.block.entity.LockableContainerBlockEntity
checkUnlocked, checkUnlocked, createMenu, createScreenHandler, getContainerName, getCustomName, getDisplayName, getName, setCustomNameMethods inherited from class net.minecraft.block.entity.BlockEntity
cancelRemoval, copyItemDataRequiresOperator, createFromTag, getCachedState, getPos, getSquaredRenderDistance, getType, getWorld, hasWorld, isRemoved, markDirty, markDirty, markRemoved, onSyncedBlockEvent, populateCrashReport, setCachedState, setWorld, toInitialChunkDataTag, toUpdatePacketMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.inventory.Inventory
containsAny, count, getMaxCountPerStack, markDirty, onClose, onOpenMethods inherited from interface net.minecraft.util.Nameable
hasCustomNameMethods inherited from interface net.minecraft.recipe.RecipeUnlocker
shouldCraftRecipe
-
Field Details
-
TOP_SLOTS
private static final int[] TOP_SLOTS- Mappings:
Namespace Name Mixin selector official cLcfh;c:[Iintermediary field_11987Lnet/minecraft/class_2609;field_11987:[Inamed TOP_SLOTSLnet/minecraft/block/entity/AbstractFurnaceBlockEntity;TOP_SLOTS:[I
-
BOTTOM_SLOTS
private static final int[] BOTTOM_SLOTS- Mappings:
Namespace Name Mixin selector official gLcfh;g:[Iintermediary field_11982Lnet/minecraft/class_2609;field_11982:[Inamed BOTTOM_SLOTSLnet/minecraft/block/entity/AbstractFurnaceBlockEntity;BOTTOM_SLOTS:[I
-
SIDE_SLOTS
private static final int[] SIDE_SLOTS- Mappings:
Namespace Name Mixin selector official hLcfh;h:[Iintermediary field_11983Lnet/minecraft/class_2609;field_11983:[Inamed SIDE_SLOTSLnet/minecraft/block/entity/AbstractFurnaceBlockEntity;SIDE_SLOTS:[I
-
inventory
- Mappings:
Namespace Name Mixin selector official aLcfh;a:Lgj;intermediary field_11984Lnet/minecraft/class_2609;field_11984:Lnet/minecraft/class_2371;named inventoryLnet/minecraft/block/entity/AbstractFurnaceBlockEntity;inventory:Lnet/minecraft/util/collection/DefaultedList;
-
burnTime
private int burnTime- Mappings:
Namespace Name Mixin selector official iLcfh;i:Iintermediary field_11981Lnet/minecraft/class_2609;field_11981:Inamed burnTimeLnet/minecraft/block/entity/AbstractFurnaceBlockEntity;burnTime:I
-
fuelTime
private int fuelTime- Mappings:
Namespace Name Mixin selector official jLcfh;j:Iintermediary field_11980Lnet/minecraft/class_2609;field_11980:Inamed fuelTimeLnet/minecraft/block/entity/AbstractFurnaceBlockEntity;fuelTime:I
-
cookTime
private int cookTime- Mappings:
Namespace Name Mixin selector official kLcfh;k:Iintermediary field_11989Lnet/minecraft/class_2609;field_11989:Inamed cookTimeLnet/minecraft/block/entity/AbstractFurnaceBlockEntity;cookTime:I
-
cookTimeTotal
private int cookTimeTotal- Mappings:
Namespace Name Mixin selector official lLcfh;l:Iintermediary field_11988Lnet/minecraft/class_2609;field_11988:Inamed cookTimeTotalLnet/minecraft/block/entity/AbstractFurnaceBlockEntity;cookTimeTotal:I
-
propertyDelegate
- Mappings:
Namespace Name Mixin selector official bLcfh;b:Lbkb;intermediary field_17374Lnet/minecraft/class_2609;field_17374:Lnet/minecraft/class_3913;named propertyDelegateLnet/minecraft/block/entity/AbstractFurnaceBlockEntity;propertyDelegate:Lnet/minecraft/screen/PropertyDelegate;
-
recipesUsed
- Mappings:
Namespace Name Mixin selector official mLcfh;m:Lit/unimi/dsi/fastutil/objects/Object2IntOpenHashMap;intermediary field_11986Lnet/minecraft/class_2609;field_11986:Lit/unimi/dsi/fastutil/objects/Object2IntOpenHashMap;named recipesUsedLnet/minecraft/block/entity/AbstractFurnaceBlockEntity;recipesUsed:Lit/unimi/dsi/fastutil/objects/Object2IntOpenHashMap;
-
recipeType
- Mappings:
Namespace Name Mixin selector official nLcfh;n:Lbqq;intermediary field_17582Lnet/minecraft/class_2609;field_17582:Lnet/minecraft/class_3956;named recipeTypeLnet/minecraft/block/entity/AbstractFurnaceBlockEntity;recipeType:Lnet/minecraft/recipe/RecipeType;
-
-
Constructor Details
-
AbstractFurnaceBlockEntity
protected AbstractFurnaceBlockEntity(BlockEntityType<?> blockEntityType, BlockPos pos, BlockState state, RecipeType<? extends AbstractCookingRecipe> recipeType)- Mappings:
Namespace Name Mixin selector official <init>Lcfh;<init>(Lcft;Lfx;Lcht;Lbqq;)Vintermediary <init>Lnet/minecraft/class_2609;<init>(Lnet/minecraft/class_2591;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;Lnet/minecraft/class_3956;)Vnamed <init>Lnet/minecraft/block/entity/AbstractFurnaceBlockEntity;<init>(Lnet/minecraft/block/entity/BlockEntityType;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/recipe/RecipeType;)V
-
-
Method Details
-
createFuelTimeMap
- Mappings:
Namespace Name Mixin selector official fLcfh;f()Ljava/util/Map;intermediary method_11196Lnet/minecraft/class_2609;method_11196()Ljava/util/Map;named createFuelTimeMapLnet/minecraft/block/entity/AbstractFurnaceBlockEntity;createFuelTimeMap()Ljava/util/Map;
-
isNonFlammableWood
- Mappings:
Namespace Name Mixin selector official bLcfh;b(Lbnr;)Zintermediary method_26395Lnet/minecraft/class_2609;method_26395(Lnet/minecraft/class_1792;)Znamed isNonFlammableWoodLnet/minecraft/block/entity/AbstractFurnaceBlockEntity;isNonFlammableWood(Lnet/minecraft/item/Item;)Z
-
addFuel
- Mappings:
Namespace Name Mixin selector official aLcfh;a(Ljava/util/Map;Lafc;I)Vintermediary method_11194Lnet/minecraft/class_2609;method_11194(Ljava/util/Map;Lnet/minecraft/class_3494;I)Vnamed addFuelLnet/minecraft/block/entity/AbstractFurnaceBlockEntity;addFuel(Ljava/util/Map;Lnet/minecraft/tag/Tag;I)V
-
addFuel
- Mappings:
Namespace Name Mixin selector official aLcfh;a(Ljava/util/Map;Lbtu;I)Vintermediary method_11202Lnet/minecraft/class_2609;method_11202(Ljava/util/Map;Lnet/minecraft/class_1935;I)Vnamed addFuelLnet/minecraft/block/entity/AbstractFurnaceBlockEntity;addFuel(Ljava/util/Map;Lnet/minecraft/item/ItemConvertible;I)V
-
isBurning
private boolean isBurning()- Mappings:
Namespace Name Mixin selector official hLcfh;h()Zintermediary method_11201Lnet/minecraft/class_2609;method_11201()Znamed isBurningLnet/minecraft/block/entity/AbstractFurnaceBlockEntity;isBurning()Z
-
fromTag
- Overrides:
fromTagin classLockableContainerBlockEntity- Mappings:
Namespace Name Mixin selector official aLcfr;a(Lmq;)Vintermediary method_11014Lnet/minecraft/class_2586;method_11014(Lnet/minecraft/class_2487;)Vnamed fromTagLnet/minecraft/block/entity/BlockEntity;fromTag(Lnet/minecraft/nbt/CompoundTag;)V
-
toTag
- Overrides:
toTagin classLockableContainerBlockEntity- Mappings:
Namespace Name Mixin selector official bLcfr;b(Lmq;)Lmq;intermediary method_11007Lnet/minecraft/class_2586;method_11007(Lnet/minecraft/class_2487;)Lnet/minecraft/class_2487;named toTagLnet/minecraft/block/entity/BlockEntity;toTag(Lnet/minecraft/nbt/CompoundTag;)Lnet/minecraft/nbt/CompoundTag;
-
tick
public static void tick(World world, BlockPos pos, BlockState state, AbstractFurnaceBlockEntity blockEntity)- Mappings:
Namespace Name Mixin selector official aLcfh;a(Lbtv;Lfx;Lcht;Lcfh;)Vintermediary method_31651Lnet/minecraft/class_2609;method_31651(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;Lnet/minecraft/class_2609;)Vnamed tickLnet/minecraft/block/entity/AbstractFurnaceBlockEntity;tick(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/block/entity/AbstractFurnaceBlockEntity;)V
-
canAcceptRecipeOutput
private static boolean canAcceptRecipeOutput(@Nullable Recipe<?> recipe, DefaultedList<ItemStack> slots, int count)- Mappings:
Namespace Name Mixin selector official aLcfh;a(Lbqn;Lgj;I)Zintermediary method_11192Lnet/minecraft/class_2609;method_11192(Lnet/minecraft/class_1860;Lnet/minecraft/class_2371;I)Znamed canAcceptRecipeOutputLnet/minecraft/block/entity/AbstractFurnaceBlockEntity;canAcceptRecipeOutput(Lnet/minecraft/recipe/Recipe;Lnet/minecraft/util/collection/DefaultedList;I)Z
-
craftRecipe
private static boolean craftRecipe(@Nullable Recipe<?> recipe, DefaultedList<ItemStack> slots, int count)- Mappings:
Namespace Name Mixin selector official bLcfh;b(Lbqn;Lgj;I)Zintermediary method_11203Lnet/minecraft/class_2609;method_11203(Lnet/minecraft/class_1860;Lnet/minecraft/class_2371;I)Znamed craftRecipeLnet/minecraft/block/entity/AbstractFurnaceBlockEntity;craftRecipe(Lnet/minecraft/recipe/Recipe;Lnet/minecraft/util/collection/DefaultedList;I)Z
-
getFuelTime
- Mappings:
Namespace Name Mixin selector official aLcfh;a(Lbnv;)Iintermediary method_11200Lnet/minecraft/class_2609;method_11200(Lnet/minecraft/class_1799;)Inamed getFuelTimeLnet/minecraft/block/entity/AbstractFurnaceBlockEntity;getFuelTime(Lnet/minecraft/item/ItemStack;)I
-
getCookTime
private static int getCookTime(World world, RecipeType<? extends AbstractCookingRecipe> recipeType, Inventory inventory)- Mappings:
Namespace Name Mixin selector official aLcfh;a(Lbtv;Lbqq;Lapj;)Iintermediary method_17029Lnet/minecraft/class_2609;method_17029(Lnet/minecraft/class_1937;Lnet/minecraft/class_3956;Lnet/minecraft/class_1263;)Inamed getCookTimeLnet/minecraft/block/entity/AbstractFurnaceBlockEntity;getCookTime(Lnet/minecraft/world/World;Lnet/minecraft/recipe/RecipeType;Lnet/minecraft/inventory/Inventory;)I
-
canUseAsFuel
- Mappings:
Namespace Name Mixin selector official bLcfh;b(Lbnv;)Zintermediary method_11195Lnet/minecraft/class_2609;method_11195(Lnet/minecraft/class_1799;)Znamed canUseAsFuelLnet/minecraft/block/entity/AbstractFurnaceBlockEntity;canUseAsFuel(Lnet/minecraft/item/ItemStack;)Z
-
getAvailableSlots
Gets the available slot positions that are reachable from a given side.- Specified by:
getAvailableSlotsin interfaceSidedInventory- Mappings:
Namespace Name Mixin selector official aLapz;a(Lgc;)[Iintermediary method_5494Lnet/minecraft/class_1278;method_5494(Lnet/minecraft/class_2350;)[Inamed getAvailableSlotsLnet/minecraft/inventory/SidedInventory;getAvailableSlots(Lnet/minecraft/util/math/Direction;)[I
-
canInsert
Determines whether the given stack can be inserted into this inventory at the specified slot position from the given direction.- Specified by:
canInsertin interfaceSidedInventory- Mappings:
Namespace Name Mixin selector official aLapz;a(ILbnv;Lgc;)Zintermediary method_5492Lnet/minecraft/class_1278;method_5492(ILnet/minecraft/class_1799;Lnet/minecraft/class_2350;)Znamed canInsertLnet/minecraft/inventory/SidedInventory;canInsert(ILnet/minecraft/item/ItemStack;Lnet/minecraft/util/math/Direction;)Z
-
canExtract
Determines whether the given stack can be removed from this inventory at the specified slot position from the given direction.- Specified by:
canExtractin interfaceSidedInventory- Mappings:
Namespace Name Mixin selector official bLapz;b(ILbnv;Lgc;)Zintermediary method_5493Lnet/minecraft/class_1278;method_5493(ILnet/minecraft/class_1799;Lnet/minecraft/class_2350;)Znamed canExtractLnet/minecraft/inventory/SidedInventory;canExtract(ILnet/minecraft/item/ItemStack;Lnet/minecraft/util/math/Direction;)Z
-
size
public int size() -
isEmpty
public boolean isEmpty() -
getStack
Fetches the stack currently stored at the given slot. If the slot is empty, or is outside the bounds of this inventory, returns seeItemStack.EMPTY. -
removeStack
Removes a specific number of items from the given slot.- Specified by:
removeStackin interfaceInventory- Returns:
- the removed items as a stack
- Mappings:
Namespace Name Mixin selector official aLapj;a(II)Lbnv;intermediary method_5434Lnet/minecraft/class_1263;method_5434(II)Lnet/minecraft/class_1799;named removeStackLnet/minecraft/inventory/Inventory;removeStack(II)Lnet/minecraft/item/ItemStack;
-
removeStack
Removes the stack currently stored at the indicated slot.- Specified by:
removeStackin interfaceInventory- Returns:
- the stack previously stored at the indicated slot.
- Mappings:
Namespace Name Mixin selector official bLapj;b(I)Lbnv;intermediary method_5441Lnet/minecraft/class_1263;method_5441(I)Lnet/minecraft/class_1799;named removeStackLnet/minecraft/inventory/Inventory;removeStack(I)Lnet/minecraft/item/ItemStack;
-
setStack
-
canPlayerUse
- Specified by:
canPlayerUsein interfaceInventory- Mappings:
Namespace Name Mixin selector official aLapj;a(Lbhl;)Zintermediary method_5443Lnet/minecraft/class_1263;method_5443(Lnet/minecraft/class_1657;)Znamed canPlayerUseLnet/minecraft/inventory/Inventory;canPlayerUse(Lnet/minecraft/entity/player/PlayerEntity;)Z
-
isValid
Returns whether the given stack is a valid for the indicated slot position. -
clear
public void clear() -
setLastRecipe
- Specified by:
setLastRecipein interfaceRecipeUnlocker- Mappings:
Namespace Name Mixin selector official aLblb;a(Lbqn;)Vintermediary method_7662Lnet/minecraft/class_1732;method_7662(Lnet/minecraft/class_1860;)Vnamed setLastRecipeLnet/minecraft/recipe/RecipeUnlocker;setLastRecipe(Lnet/minecraft/recipe/Recipe;)V
-
getLastRecipe
- Specified by:
getLastRecipein interfaceRecipeUnlocker- Mappings:
Namespace Name Mixin selector official ao_Lblb;ao_()Lbqn;intermediary method_7663Lnet/minecraft/class_1732;method_7663()Lnet/minecraft/class_1860;named getLastRecipeLnet/minecraft/recipe/RecipeUnlocker;getLastRecipe()Lnet/minecraft/recipe/Recipe;
-
unlockLastRecipe
- Specified by:
unlockLastRecipein interfaceRecipeUnlocker- Mappings:
Namespace Name Mixin selector official bLblb;b(Lbhl;)Vintermediary method_7664Lnet/minecraft/class_1732;method_7664(Lnet/minecraft/class_1657;)Vnamed unlockLastRecipeLnet/minecraft/recipe/RecipeUnlocker;unlockLastRecipe(Lnet/minecraft/entity/player/PlayerEntity;)V
-
dropExperienceForRecipesUsed
- Mappings:
Namespace Name Mixin selector official aLcfh;a(Laaw;)Vintermediary method_17763Lnet/minecraft/class_2609;method_17763(Lnet/minecraft/class_3222;)Vnamed dropExperienceForRecipesUsedLnet/minecraft/block/entity/AbstractFurnaceBlockEntity;dropExperienceForRecipesUsed(Lnet/minecraft/server/network/ServerPlayerEntity;)V
-
getRecipesUsedAndDropExperience
- Mappings:
Namespace Name Mixin selector official aLcfh;a(Laav;Ldiu;)Ljava/util/List;intermediary method_27354Lnet/minecraft/class_2609;method_27354(Lnet/minecraft/class_3218;Lnet/minecraft/class_243;)Ljava/util/List;named getRecipesUsedAndDropExperienceLnet/minecraft/block/entity/AbstractFurnaceBlockEntity;getRecipesUsedAndDropExperience(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/util/math/Vec3d;)Ljava/util/List;
-
dropExperience
- Mappings:
Namespace Name Mixin selector official aLcfh;a(Laav;Ldiu;IF)Vintermediary method_17760Lnet/minecraft/class_2609;method_17760(Lnet/minecraft/class_3218;Lnet/minecraft/class_243;IF)Vnamed dropExperienceLnet/minecraft/block/entity/AbstractFurnaceBlockEntity;dropExperience(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/util/math/Vec3d;IF)V
-
provideRecipeInputs
- Specified by:
provideRecipeInputsin interfaceRecipeInputProvider- Mappings:
Namespace Name Mixin selector official aLblk;a(Lbhn;)Vintermediary method_7683Lnet/minecraft/class_1737;method_7683(Lnet/minecraft/class_1662;)Vnamed provideRecipeInputsLnet/minecraft/recipe/RecipeInputProvider;provideRecipeInputs(Lnet/minecraft/recipe/RecipeFinder;)V
-