已过时的 API
目录
-
最终已过时的元素元素说明Set your render type in your block model's JSON (eg.
"render_type": "cutout"
) or overrideIForgeBakedModel.getRenderTypes(BlockState, net.minecraft.util.RandomSource, net.minecraftforge.client.model.data.ModelData)
Set your render type in your block model's JSON (eg."render_type": "cutout"
) or overrideIForgeBakedModel.getRenderTypes(BlockState, net.minecraft.util.RandomSource, net.minecraftforge.client.model.data.ModelData)
Set your render type in your block model's JSON (eg."render_type": "cutout"
) or overrideIForgeBakedModel.getRenderTypes(BlockState, net.minecraft.util.RandomSource, net.minecraftforge.client.model.data.ModelData)
Use Vanilla's providersModelProvider
Use Vanilla's providersModelProvider
Use Vanilla's providersModelProvider
Use Vanilla's providersModelProvider
Use Vanilla's providersModelProvider
Use Vanilla's providersModelProvider
Use Vanilla's providersModelProvider
Use Vanilla's providersModelProvider
Use Vanilla's providersModelProvider
Use Vanilla's providersModelProvider
Use Vanilla's providersModelProvider
Use Vanilla's providersModelProvider
Use Vanilla's providersModelProvider
UseAutoRegisterCapability
annotation on your class.Use the itemstack-sensitive version instead:IForgeItem.getCapabilityProvider(ItemStack)
UseTags.Biomes.IS_DENSE_VEGETATION
insteadUseTags.Biomes.IS_DENSE_VEGETATION_OVERWORLD
insteadUseTags.Biomes.IS_MOUNTAIN_PEAK
insteadUseTags.Biomes.IS_MOUNTAIN_SLOPE
insteadUseTags.Biomes.IS_SPARSE_VEGETATION
insteadUseTags.Biomes.IS_SPARSE_VEGETATION_OVERWORLD
insteadUseTags.Biomes.IS_AQUATIC
insteadUseTags.Blocks.COBBLESTONES
insteadUseTags.Blocks.GLASS_BLOCKS
and/orTags.Blocks.GLASS_PANES
UseTags.Blocks.DYED_LIGHT_BLUE
combined withTags.Blocks.GLASS_BLOCKS
and/orTags.Blocks.GLASS_PANES
UseTags.Blocks.DYED_LIGHT_GRAY
combined withTags.Blocks.GLASS_BLOCKS
and/orTags.Blocks.GLASS_PANES
UseTags.Blocks.DYED_BLACK
combined withTags.Blocks.GLASS_PANES
UseTags.Blocks.DYED_BLUE
combined withTags.Blocks.GLASS_PANES
UseTags.Blocks.DYED_BROWN
combined withTags.Blocks.GLASS_PANES
UseTags.Blocks.DYED_CYAN
combined withTags.Blocks.GLASS_PANES
UseTags.Blocks.DYED_GRAY
combined withTags.Blocks.GLASS_PANES
UseTags.Blocks.DYED_GREEN
combined withTags.Blocks.GLASS_PANES
UseTags.Blocks.DYED_LIGHT_BLUE
combined withTags.Blocks.GLASS_PANES
UseTags.Blocks.DYED_LIGHT_GRAY
combined withTags.Blocks.GLASS_PANES
UseTags.Blocks.DYED_LIME
combined withTags.Blocks.GLASS_PANES
UseTags.Blocks.DYED_MAGENTA
combined withTags.Blocks.GLASS_PANES
UseTags.Blocks.DYED_ORANGE
combined withTags.Blocks.GLASS_PANES
UseTags.Blocks.DYED_PINK
combined withTags.Blocks.GLASS_PANES
UseTags.Blocks.DYED_PURPLE
combined withTags.Blocks.GLASS_PANES
UseTags.Blocks.DYED_RED
combined withTags.Blocks.GLASS_PANES
UseTags.Blocks.DYED_WHITE
combined withTags.Blocks.GLASS_PANES
UseTags.Blocks.DYED_YELLOW
combined withTags.Blocks.GLASS_PANES
UseTags.Blocks.GLASS_BLOCKS_CHEAP
insteadUseTags.Blocks.DYED
combined withTags.Blocks.GLASS_PANES
Use the Vanilla tagItemTags.FOOT_ARMOR
insteadUse the Vanilla tagItemTags.CHEST_ARMOR
insteadUse the Vanilla tagItemTags.HEAD_ARMOR
insteadUse the Vanilla tagItemTags.LEG_ARMOR
insteadUseTags.Items.COBBLESTONES
insteadUseTags.Items.GLASS_BLOCKS
and/orTags.Items.GLASS_PANES
UseTags.Items.DYED_BLACK
combined withTags.Items.GLASS_PANES
UseTags.Items.DYED_BLUE
combined withTags.Items.GLASS_PANES
UseTags.Items.DYED_BROWN
combined withTags.Items.GLASS_PANES
UseTags.Items.DYED_CYAN
combined withTags.Items.GLASS_PANES
UseTags.Items.DYED_GRAY
combined withTags.Items.GLASS_PANES
UseTags.Items.DYED_GREEN
combined withTags.Items.GLASS_PANES
UseTags.Items.DYED_LIGHT_BLUE
combined withTags.Items.GLASS_PANES
UseTags.Items.DYED_LIGHT_GRAY
combined withTags.Items.GLASS_PANES
UseTags.Items.DYED_LIME
combined withTags.Items.GLASS_PANES
UseTags.Items.DYED_MAGENTA
combined withTags.Items.GLASS_PANES
UseTags.Items.DYED_ORANGE
combined withTags.Items.GLASS_PANES
UseTags.Items.DYED_PINK
combined withTags.Items.GLASS_PANES
UseTags.Items.DYED_PURPLE
combined withTags.Items.GLASS_PANES
UseTags.Items.DYED_RED
combined withTags.Items.GLASS_PANES
UseTags.Items.DYED_WHITE
combined withTags.Items.GLASS_PANES
UseTags.Items.DYED_YELLOW
combined withTags.Items.GLASS_PANES
UseTags.Items.LEATHERS
insteadUseTags.Items.SANDSTONE_BLOCKS
insteadUseTags.Items.TOOLS_SHEAR
insteadUseTags.Items.DYED
combined withTags.Items.GLASS_PANES
UseTags.Items.STONES
insteadUseTags.Items.STRINGS
insteadUseTags.Items.TOOLS_SPEAR
insteadDoes not provide additional context. UseAddReloadListenerEvent(ReloadableServerResources, HolderLookup.Provider, RegistryAccess)
instead.Does not contain updated tags. UseAddReloadListenerEvent.getRegistries()
instead.useFMLJavaModLoadingContext
in your mod constructorUseVersionSupportMatrix.testVersionSupportMatrix(VersionRange, String, String)
instead, unwrapping your BiPredicate.Use the context provided by your language loader in your mod's constructorOverride/UseModLoadingContext.getContainer()
Going to be moved to ForgeHooks for Internal use.Going to be moved to ForgeHooks for Internal use.Use the builderUse the builderUse the builderUse the builderUseDeferredRegister
orRegistryObject
instead. Refer to the MDK for more detailed examples.
Example usage of alternatives:// To register something public static final DeferredRegister<Item> ITEMS = DeferredRegister.create(ForgeRegistries.ITEMS, MODID); public static final RegistryObject<Item> EXAMPLE_ITEM = ITEMS.register("example_item", () -> new Item(new Item.Properties())); // To get a RegistryObject that you didn't register yourself: public static final RegistryObject<Block> DIRT = RegistryObject.create(ResourceLocation.withDefaultNamespace("dirt"), ForgeRegistries.BLOCKS);
-
已过时的 接口接口说明Use Vanilla's providers
ModelProvider
// Mojang has switched most things to Codecs and registry context, probably worth deleting this. Most cases this is used for Capabilities, and should use Components attached to the object that the cap is attached to.
-
已过时的 类类说明Forge: Use
ForgeAdvancementProvider
instead, provides ease of access for theExistingFileHelper
in the generatorUse Vanilla's providersModelProvider
Use Vanilla's providersModelProvider
Use Vanilla's providersModelProvider
Use Vanilla's providersModelProvider
Use Vanilla's providersModelProvider
Use Vanilla's providersModelProvider
Use Vanilla's providersModelProvider
Use Vanilla's providersModelProvider
Use Vanilla's providersModelProvider
Use Vanilla's providersModelProvider
Use Vanilla's providersModelProvider
Use Vanilla's providersModelProvider
Use Vanilla's providersModelProvider
Use Vanilla's providersModelProvider
Use Vanilla's providersModelProvider
Use Vanilla's providersModelProvider
Use Vanilla's providersModelProvider
UseAutoRegisterCapability
annotation on your class.
-
已过时的 批注接口批注接口说明Use
DeferredRegister
orRegistryObject
instead. Refer to the MDK for more detailed examples.
Example usage of alternatives:// To register something public static final DeferredRegister<Item> ITEMS = DeferredRegister.create(ForgeRegistries.ITEMS, MODID); public static final RegistryObject<Item> EXAMPLE_ITEM = ITEMS.register("example_item", () -> new Item(new Item.Properties())); // To get a RegistryObject that you didn't register yourself: public static final RegistryObject<Block> DIRT = RegistryObject.create(ResourceLocation.withDefaultNamespace("dirt"), ForgeRegistries.BLOCKS);
-
已过时的 字段字段说明Forge: Use
PresetEditorManager.get(ResourceKey)
instead.Forge: This map is patched out of vanilla code. Listen to引用无效
net.minecraftforge.event.world.BlockEvent.BlockToolModificationEvent
IForgeBlock.getToolModifiedState(BlockState, UseOnContext, net.minecraftforge.common.ToolAction, boolean)
.Redirected toBiome.getModifiedClimateSettings()
by field_to_method.jsRedirected toBiome.getModifiedSpecialEffects()
by field_to_method.jsUseTags.Biomes.IS_DENSE_VEGETATION
insteadUseTags.Biomes.IS_DENSE_VEGETATION_OVERWORLD
insteadUseTags.Biomes.IS_MOUNTAIN_PEAK
insteadUseTags.Biomes.IS_MOUNTAIN_SLOPE
insteadUseTags.Biomes.IS_SPARSE_VEGETATION
insteadUseTags.Biomes.IS_SPARSE_VEGETATION_OVERWORLD
insteadUseTags.Biomes.IS_AQUATIC
insteadUseTags.Blocks.COBBLESTONES
insteadUseTags.Blocks.GLASS_BLOCKS
and/orTags.Blocks.GLASS_PANES
UseTags.Blocks.DYED_LIGHT_BLUE
combined withTags.Blocks.GLASS_BLOCKS
and/orTags.Blocks.GLASS_PANES
UseTags.Blocks.DYED_LIGHT_GRAY
combined withTags.Blocks.GLASS_BLOCKS
and/orTags.Blocks.GLASS_PANES
UseTags.Blocks.DYED_BLACK
combined withTags.Blocks.GLASS_PANES
UseTags.Blocks.DYED_BLUE
combined withTags.Blocks.GLASS_PANES
UseTags.Blocks.DYED_BROWN
combined withTags.Blocks.GLASS_PANES
UseTags.Blocks.DYED_CYAN
combined withTags.Blocks.GLASS_PANES
UseTags.Blocks.DYED_GRAY
combined withTags.Blocks.GLASS_PANES
UseTags.Blocks.DYED_GREEN
combined withTags.Blocks.GLASS_PANES
UseTags.Blocks.DYED_LIGHT_BLUE
combined withTags.Blocks.GLASS_PANES
UseTags.Blocks.DYED_LIGHT_GRAY
combined withTags.Blocks.GLASS_PANES
UseTags.Blocks.DYED_LIME
combined withTags.Blocks.GLASS_PANES
UseTags.Blocks.DYED_MAGENTA
combined withTags.Blocks.GLASS_PANES
UseTags.Blocks.DYED_ORANGE
combined withTags.Blocks.GLASS_PANES
UseTags.Blocks.DYED_PINK
combined withTags.Blocks.GLASS_PANES
UseTags.Blocks.DYED_PURPLE
combined withTags.Blocks.GLASS_PANES
UseTags.Blocks.DYED_RED
combined withTags.Blocks.GLASS_PANES
UseTags.Blocks.DYED_WHITE
combined withTags.Blocks.GLASS_PANES
UseTags.Blocks.DYED_YELLOW
combined withTags.Blocks.GLASS_PANES
UseTags.Blocks.GLASS_BLOCKS_CHEAP
insteadUseTags.Blocks.DYED
combined withTags.Blocks.GLASS_PANES
Use the Vanilla tagItemTags.FOOT_ARMOR
insteadUse the Vanilla tagItemTags.CHEST_ARMOR
insteadUse the Vanilla tagItemTags.HEAD_ARMOR
insteadUse the Vanilla tagItemTags.LEG_ARMOR
insteadUseTags.Items.COBBLESTONES
insteadUseTags.Items.GLASS_BLOCKS
and/orTags.Items.GLASS_PANES
UseTags.Items.DYED_BLACK
combined withTags.Items.GLASS_PANES
UseTags.Items.DYED_BLUE
combined withTags.Items.GLASS_PANES
UseTags.Items.DYED_BROWN
combined withTags.Items.GLASS_PANES
UseTags.Items.DYED_CYAN
combined withTags.Items.GLASS_PANES
UseTags.Items.DYED_GRAY
combined withTags.Items.GLASS_PANES
UseTags.Items.DYED_GREEN
combined withTags.Items.GLASS_PANES
UseTags.Items.DYED_LIGHT_BLUE
combined withTags.Items.GLASS_PANES
UseTags.Items.DYED_LIGHT_GRAY
combined withTags.Items.GLASS_PANES
UseTags.Items.DYED_LIME
combined withTags.Items.GLASS_PANES
UseTags.Items.DYED_MAGENTA
combined withTags.Items.GLASS_PANES
UseTags.Items.DYED_ORANGE
combined withTags.Items.GLASS_PANES
UseTags.Items.DYED_PINK
combined withTags.Items.GLASS_PANES
UseTags.Items.DYED_PURPLE
combined withTags.Items.GLASS_PANES
UseTags.Items.DYED_RED
combined withTags.Items.GLASS_PANES
UseTags.Items.DYED_WHITE
combined withTags.Items.GLASS_PANES
UseTags.Items.DYED_YELLOW
combined withTags.Items.GLASS_PANES
UseTags.Items.LEATHERS
insteadUseTags.Items.SANDSTONE_BLOCKS
insteadUseTags.Items.TOOLS_SHEAR
insteadUseTags.Items.DYED
combined withTags.Items.GLASS_PANES
UseTags.Items.STONES
insteadUseTags.Items.STRINGS
insteadUseTags.Items.TOOLS_SPEAR
instead
-
已过时的 方法方法说明Register via
RegisterColorHandlersEvent.Block
Register viaRegisterParticleProvidersEvent
Register viaRegisterParticleProvidersEvent
Register viaRegisterParticleProvidersEvent
Forge: use引用无效
#render(Camera, float, net.minecraft.client.renderer.culling.Frustum)
Set your render type in your block model's JSON (eg."render_type": "cutout"
) or overrideIForgeBakedModel.getRenderTypes(BlockState, net.minecraft.util.RandomSource, net.minecraftforge.client.model.data.ModelData)
Set your render type in your block model's JSON (eg."render_type": "cutout"
) or overrideIForgeBakedModel.getRenderTypes(BlockState, net.minecraft.util.RandomSource, net.minecraftforge.client.model.data.ModelData)
Set your render type in your block model's JSON (eg."render_type": "cutout"
) or overrideIForgeBakedModel.getRenderTypes(BlockState, net.minecraft.util.RandomSource, net.minecraftforge.client.model.data.ModelData)
Forge: For internal use only. Use the Register events when registering values.Forge: UseRegisterGameTestsEvent
to register game testsForge: UseRegisterGameTestsEvent
to register game testsForge: UseRegisterGameTestsEvent
to register game testsForge: Userider sensitive version
Use无效输入:''
FORGE: use SpawnPlacementRegisterEvent to register and modify spawn placementsForge: use hasMix(ItemStack, ItemStack)Forge: use hasMix(ItemStack, ItemStack)Forge: useCreativeModeTab.builder()
Forge: Use damage source sensitive versionForge: UseBaseRailBlock.getRailDirection(BlockState, BlockGetter, BlockPos, net.minecraft.world.entity.vehicle.AbstractMinecart)
for enhanced ability. If you do change this property, be aware that other functions in this/subclasses may break as they can make assumptions about this propertyForge use引用无效
IForgeStateBlock#getFriction(Level, BlockPos, Entity)
Forge: Use state-sensitive variant insteadForge: UseIForgeBlockState.getLightEmission(BlockGetter, BlockPos)
insteadUse more sensitive version引用无效
IForgeBlockState#getSoundType(IWorldReader, BlockPos, Entity)
net.minecraft.world.level.levelgen.synth.ImprovedNoise.noise(double, double, double, double, double) Forge: Use引用无效
#canConvertToSource(FluidState, Level, BlockPos)
Forge: useLavaFluid.isFlammable(LevelReader,BlockPos,Direction)
insteadnet.minecraft.world.level.storage.loot.LootTable.getRandomItemsRaw(LootContext, Consumer<ItemStack>) use引用无效
Ingredient#of()
use引用无效
Ingredient#of(TagKey)
use引用无效
Ingredient#of(ItemStack...)
useIngredient.of(ItemLike...)
(Stream)}Use the itemstack-sensitive version instead:IForgeItem.getCapabilityProvider(ItemStack)
Does not contain updated tags. UseAddReloadListenerEvent.getRegistries()
instead.useDistExecutor.safeCallWhenOn(Dist, Supplier)
instead. This remains for advanced use cases.useDistExecutor.safeRunWhenOn(Dist, Supplier)
where possible. Advanced uses only.useFMLJavaModLoadingContext
in your mod constructorUseVersionSupportMatrix.testVersionSupportMatrix(VersionRange, String, String)
instead, unwrapping your BiPredicate.Use the context provided by your language loader in your mod's constructorOverride/UseModLoadingContext.getContainer()
Going to be moved to ForgeHooks for Internal use.Going to be moved to ForgeHooks for Internal use.Use the builderUse the builderUse the builderUse the builderForge: For internal use only. Use the Register events when registering values.
-
已过时的 构造器构造器说明Forge: Use the
引用无效
overload with Forge metadata parameter
Forge: Use variant with RenderTypeGroupForge: Use the mod id variantForge: Use the mod id variantForge: Use the mod id variantForge: Use the mod id variantForge: Use the mod id variantForge: Use the mod id variantForge: Use the mod id variantForge: use引用无效
constructor with context
Use the one that specifes a PotionBrewingForge: use引用无效
constructor with context
Does not provide additional context. UseAddReloadListenerEvent(ReloadableServerResources, HolderLookup.Provider, RegistryAccess)
instead.