类 AbstractFurnaceBlockEntity
java.lang.Object
net.minecraftforge.common.capabilities.CapabilityProvider<BlockEntity>
net.minecraft.world.level.block.entity.BlockEntity
net.minecraft.world.level.block.entity.BaseContainerBlockEntity
net.minecraft.world.level.block.entity.AbstractFurnaceBlockEntity
- 所有已实现的接口:
Clearable
,Container
,MenuConstructor
,RecipeCraftingHolder
,StackedContentsCompatible
,MenuProvider
,Nameable
,WorldlyContainer
,ICapabilityProvider
,ICapabilityProviderImpl<BlockEntity>
,IForgeBlockEntity
public abstract class AbstractFurnaceBlockEntity
extends BaseContainerBlockEntity
implements WorldlyContainer, RecipeCraftingHolder, StackedContentsCompatible
-
嵌套类概要
从类继承的嵌套类/接口 net.minecraft.world.level.block.entity.BlockEntity
BlockEntity.ComponentHelper, BlockEntity.DataComponentInput
从类继承的嵌套类/接口 net.minecraftforge.common.capabilities.CapabilityProvider
CapabilityProvider.AsField<B extends ICapabilityProviderImpl<B>>
-
字段概要
字段修饰符和类型字段说明static final int
static final int
(专用程序包) int
(专用程序包) int
static final int
static final int
static final int
static final int
protected final ContainerData
(专用程序包) LazyOptional<? extends IItemHandler>[]
protected NonNullList
<ItemStack> (专用程序包) int
(专用程序包) int
static final int
private final RecipeManager.CachedCheck
<SingleRecipeInput, ? extends AbstractCookingRecipe> private final it.unimi.dsi.fastutil.objects.Reference2IntOpenHashMap
<ResourceKey<Recipe<?>>> private final RecipeType
<? extends AbstractCookingRecipe> protected static final int
protected static final int
protected static final int
private static final int[]
private static final int[]
private static final int[]
从类继承的字段 net.minecraft.world.level.block.entity.BlockEntity
level, remove, worldPosition
从接口继承的字段 net.minecraft.world.Container
DEFAULT_DISTANCE_BUFFER
从接口继承的字段 net.minecraftforge.common.extensions.IForgeBlockEntity
INFINITE_EXTENT_AABB
-
构造器概要
构造器限定符构造器说明protected
AbstractFurnaceBlockEntity
(BlockEntityType<?> p_154991_, BlockPos p_154992_, BlockState p_154993_, RecipeType<? extends AbstractCookingRecipe> p_154994_) -
方法概要
修饰符和类型方法说明void
awardUsedRecipes
(Player p_58396_, List<ItemStack> p_282202_) void
awardUsedRecipesAndPopExperience
(ServerPlayer p_155004_) private boolean
burn
(RegistryAccess p_266740_, RecipeHolder<? extends AbstractCookingRecipe> p_299450_, SingleRecipeInput p_364092_, NonNullList<ItemStack> p_267073_, int p_267157_) private boolean
canBurn
(RegistryAccess p_266924_, RecipeHolder<? extends AbstractCookingRecipe> p_299207_, SingleRecipeInput p_364069_, NonNullList<ItemStack> p_155007_, int p_155008_) boolean
canPlaceItem
(int p_58389_, ItemStack p_58390_) boolean
canPlaceItemThroughFace
(int p_58336_, ItemStack p_58337_, Direction p_58338_) boolean
canTakeItemThroughFace
(int p_58392_, ItemStack p_58393_, Direction p_58394_) private static void
createExperience
(ServerLevel p_154999_, Vec3 p_155000_, int p_155001_, float p_155002_) void
fillStackedContents
(StackedItemContents p_363325_) protected int
getBurnDuration
(FuelValues p_363312_, ItemStack p_58343_) <T> LazyOptional
<T> getCapability
(Capability<T> capability, Direction facing) Retrieves the Optional handler for the capability requested on the specific side.int
protected NonNullList
<ItemStack> getItems()
List
<RecipeHolder<?>> getRecipesToAwardAndPopExperience
(ServerLevel p_154996_, Vec3 p_154997_) RecipeHolder
<?> int[]
getSlotsForFace
(Direction p_58363_) private static int
getTotalCookTime
(ServerLevel p_364532_, AbstractFurnaceBlockEntity p_222694_) void
private boolean
isLit()
protected void
loadAdditional
(CompoundTag p_335441_, HolderLookup.Provider p_330623_) void
protected void
saveAdditional
(CompoundTag p_187452_, HolderLookup.Provider p_330192_) static void
serverTick
(ServerLevel p_364207_, BlockPos p_155015_, BlockState p_155016_, AbstractFurnaceBlockEntity p_155017_) void
protected void
setItems
(NonNullList<ItemStack> p_327930_) void
setRecipeUsed
(RecipeHolder<?> p_297739_) 从类继承的方法 net.minecraft.world.level.block.entity.BaseContainerBlockEntity
applyImplicitComponents, canOpen, canUnlock, clearContent, collectImplicitComponents, createMenu, createMenu, createUnSidedHandler, getCustomName, getDefaultName, getDisplayName, getItem, getName, isEmpty, removeComponentsFromTag, removeItem, removeItemNoUpdate, stillValid
从类继承的方法 net.minecraft.world.level.block.entity.BlockEntity
addEntityType, applyComponents, applyComponentsFromItemStack, clearRemoved, collectComponents, components, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getPosFromTag, getType, getUpdatePacket, getUpdateTag, hasLevel, isRemoved, isValidBlockState, loadCustomOnly, loadStatic, loadWithComponents, onChunkUnloaded, parseCustomNameSafe, saveCustomAndMetadata, saveCustomOnly, saveWithFullMetadata, saveWithId, saveWithoutMetadata, setBlockState, setChanged, setChanged, setComponents, setLevel, setRemoved, triggerEvent
从类继承的方法 net.minecraftforge.common.capabilities.CapabilityProvider
deserializeCaps, gatherCapabilities, gatherCapabilities, gatherCapabilities, getCapabilities, serializeCaps
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
从接口继承的方法 net.minecraft.world.Clearable
clearContent
从接口继承的方法 net.minecraft.world.Container
canTakeItem, countItem, getItem, getMaxStackSize, getMaxStackSize, hasAnyMatching, hasAnyOf, isEmpty, removeItem, removeItemNoUpdate, setChanged, startOpen, stillValid, stopOpen
从接口继承的方法 net.minecraftforge.common.capabilities.ICapabilityProvider
getCapability
从接口继承的方法 net.minecraftforge.common.extensions.IForgeBlockEntity
getModelData, getRenderBoundingBox, handleUpdateTag, hasCustomOutlineRendering, onDataPacket, onLoad, requestModelDataUpdate
从接口继承的方法 net.minecraft.world.Nameable
hasCustomName
从接口继承的方法 net.minecraft.world.inventory.RecipeCraftingHolder
setRecipeUsed
-
字段详细资料
-
SLOT_INPUT
protected static final int SLOT_INPUT- 另请参阅:
-
SLOT_FUEL
protected static final int SLOT_FUEL- 另请参阅:
-
SLOT_RESULT
protected static final int SLOT_RESULT- 另请参阅:
-
DATA_LIT_TIME
public static final int DATA_LIT_TIME- 另请参阅:
-
SLOTS_FOR_UP
private static final int[] SLOTS_FOR_UP -
SLOTS_FOR_DOWN
private static final int[] SLOTS_FOR_DOWN -
SLOTS_FOR_SIDES
private static final int[] SLOTS_FOR_SIDES -
DATA_LIT_DURATION
public static final int DATA_LIT_DURATION- 另请参阅:
-
DATA_COOKING_PROGRESS
public static final int DATA_COOKING_PROGRESS- 另请参阅:
-
DATA_COOKING_TOTAL_TIME
public static final int DATA_COOKING_TOTAL_TIME- 另请参阅:
-
NUM_DATA_VALUES
public static final int NUM_DATA_VALUES- 另请参阅:
-
BURN_TIME_STANDARD
public static final int BURN_TIME_STANDARD- 另请参阅:
-
BURN_COOL_SPEED
public static final int BURN_COOL_SPEED- 另请参阅:
-
recipeType
-
items
-
litTimeRemaining
int litTimeRemaining -
litTotalTime
int litTotalTime -
cookingTimer
int cookingTimer -
cookingTotalTime
int cookingTotalTime -
dataAccess
-
recipesUsed
private final it.unimi.dsi.fastutil.objects.Reference2IntOpenHashMap<ResourceKey<Recipe<?>>> recipesUsed -
quickCheck
private final RecipeManager.CachedCheck<SingleRecipeInput,? extends AbstractCookingRecipe> quickCheck -
handlers
LazyOptional<? extends IItemHandler>[] handlers
-
-
构造器详细资料
-
AbstractFurnaceBlockEntity
protected AbstractFurnaceBlockEntity(BlockEntityType<?> p_154991_, BlockPos p_154992_, BlockState p_154993_, RecipeType<? extends AbstractCookingRecipe> p_154994_)
-
-
方法详细资料
-
isLit
private boolean isLit() -
loadAdditional
-
saveAdditional
-
serverTick
public static void serverTick(ServerLevel p_364207_, BlockPos p_155015_, BlockState p_155016_, AbstractFurnaceBlockEntity p_155017_) -
canBurn
private boolean canBurn(RegistryAccess p_266924_, @Nullable RecipeHolder<? extends AbstractCookingRecipe> p_299207_, SingleRecipeInput p_364069_, NonNullList<ItemStack> p_155007_, int p_155008_) -
burn
private boolean burn(RegistryAccess p_266740_, @Nullable RecipeHolder<? extends AbstractCookingRecipe> p_299450_, SingleRecipeInput p_364092_, NonNullList<ItemStack> p_267073_, int p_267157_) -
getBurnDuration
-
getTotalCookTime
-
getSlotsForFace
- 指定者:
getSlotsForFace
在接口中WorldlyContainer
-
canPlaceItemThroughFace
public boolean canPlaceItemThroughFace(int p_58336_, ItemStack p_58337_, @Nullable Direction p_58338_) - 指定者:
canPlaceItemThroughFace
在接口中WorldlyContainer
-
canTakeItemThroughFace
- 指定者:
canTakeItemThroughFace
在接口中WorldlyContainer
-
getContainerSize
public int getContainerSize()- 指定者:
getContainerSize
在接口中Container
-
getItems
- 指定者:
getItems
在类中BaseContainerBlockEntity
-
setItems
- 指定者:
setItems
在类中BaseContainerBlockEntity
-
setItem
- 指定者:
setItem
在接口中Container
- 覆盖:
setItem
在类中BaseContainerBlockEntity
-
canPlaceItem
- 指定者:
canPlaceItem
在接口中Container
-
setRecipeUsed
- 指定者:
setRecipeUsed
在接口中RecipeCraftingHolder
-
getRecipeUsed
- 指定者:
getRecipeUsed
在接口中RecipeCraftingHolder
-
awardUsedRecipes
- 指定者:
awardUsedRecipes
在接口中RecipeCraftingHolder
-
awardUsedRecipesAndPopExperience
-
getRecipesToAwardAndPopExperience
public List<RecipeHolder<?>> getRecipesToAwardAndPopExperience(ServerLevel p_154996_, Vec3 p_154997_) -
createExperience
private static void createExperience(ServerLevel p_154999_, Vec3 p_155000_, int p_155001_, float p_155002_) -
fillStackedContents
- 指定者:
fillStackedContents
在接口中StackedContentsCompatible
-
getCapability
从接口复制的说明:ICapabilityProvider
Retrieves the Optional handler for the capability requested on the specific side. The return value CAN be the same for multiple faces. Modders are encouraged to cache this value, using the listener capabilities of the Optional to be notified if the requested capability get lost.- 指定者:
getCapability
在接口中ICapabilityProvider
- 覆盖:
getCapability
在类中BaseContainerBlockEntity
- 参数:
capability
- The capability to checkfacing
- The Side to check from, CAN BE NULL. Null is defined to represent 'internal' or 'self'- 返回:
- The requested an optional holding the requested capability.
-
invalidateCaps
public void invalidateCaps()- 指定者:
invalidateCaps
在接口中ICapabilityProviderImpl<BlockEntity>
- 覆盖:
invalidateCaps
在类中BaseContainerBlockEntity
-
reviveCaps
public void reviveCaps()- 指定者:
reviveCaps
在接口中ICapabilityProviderImpl<BlockEntity>
- 覆盖:
reviveCaps
在类中BaseContainerBlockEntity
-