已过时的 API
目录
-
最终已过时的元素元素说明Use
the hand sensitive version
as this version provides wrong hand informationUsethe hand sensitive version
as this version provides wrong hand information
-
已过时的 接口
-
已过时的 类
-
已过时的 字段字段说明Neo: use the
data map
insteadNeo: use thedata map
insteadNeo: useLivingEntity.PLAYER_NOT_WEARING_DISGUISE_ITEM_FOR_TARGET
with target info insteadNeoforge: useIPlayerExtension.mayFly()
to read andNeoForgeMod.CREATIVE_FLIGHT
Attribute to modifyForge: This map is patched out of vanilla code. Listen toBlockEvent.BlockToolModificationEvent
or overrideIBlockExtension.getToolModifiedState(BlockState, UseOnContext, net.neoforged.neoforge.common.ItemAbility, boolean)
.Use theinverse map
generated from the data map, this field will be ignored in a future versionNeo: Use thedata map
, this field will be ignored in a future versionNeo: Use thecompostable
data map insteadNeo: Usethe data map
, this field will be ignored in a future versionNeo: Use theinverse map
generated from the data map, this field will be ignored in a future versionNeo: use thedata map
instead.
-
已过时的 方法方法说明Forge: For internal use only. Use the Register events when registering values.Use
BundlerInfo.unbundlePacket(Packet, Consumer, io.netty.channel.ChannelHandlerContext)
instead, as it supports packet filtering and is more efficient.Neo: use overload with ConnectionType contextNeoForge: UseNeoForgeRegistries.ENTITY_DATA_SERIALIZERS
insteadNeo: usethe source-aware variant
UseServerCommonPacketListenerImpl.createCookie(ClientInformation, net.neoforged.neoforge.network.connection.ConnectionType)
instead, keeping the connection type information available.Neo: Use引用无效
net.neoforged.neoforge.client.event.AddClientReloadListenerEvent
Forge: Userider sensitive version
Neo: useLivingEntity.travelInFluid(Vec3, FluidState)
insteadNeo:Player.getDestroySpeed(BlockState, BlockPos)
insteadNeo: Modders should useRegisterSpawnPlacementsEvent
instead.Neo: useFeatureFlagRegistry.Builder.create(ResourceLocation, boolean)
insteadForge: useCreativeModeTab.builder()
Neo: UseIItemStackExtension.isPrimaryItemFor(Holder)
This method does not respectIItemStackExtension.supportsEnchantment(Holder)
since theHolder
is not available, which makes the result of calling it invalid.Neo: UseEnchantmentHelper.getTagEnchantmentLevel(Holder, ItemStack)
for NBT enchantments, orIItemStackExtension.getEnchantmentLevel(Holder)
for gameplay.Neo: do not use, usethe event
insteadnet.minecraft.world.item.ItemStack.addAttributeTooltips(Consumer<Component>, TooltipDisplay, Player) Neo: UseItemStack.getTagEnchantments()
for NBT enchantments, orIItemStackExtension.getAllEnchantments(net.minecraft.core.HolderLookup.RegistryLookup<net.minecraft.world.item.enchantment.Enchantment>)
for gameplay.Forge: Use damage source sensitive versionUse ItemStack sensitive versionProjectileWeaponItem.getAllSupportedProjectiles(ItemStack)
Use ItemStack sensitive versionProjectileWeaponItem.getSupportedHeldProjectiles(ItemStack)
NeoForge: UseRarity.getStyleModifier()
Forge: 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 propertyNeo: use overload with level context insteadUse IItemHandler capability instead. To preserve Container-specific interactions, useHopperBlockEntity.getContainerOrHandlerAt(net.minecraft.world.level.Level, net.minecraft.core.BlockPos, net.minecraft.core.Direction)
and handle both cases.Neo: UseIBlockStateExtension.getLightEmission(BlockGetter, BlockPos)
insteadnet.minecraft.world.level.levelgen.synth.ImprovedNoise.noise(double, double, double, double, double) Neo: use overload with level context insteadForge: UseFlowingFluid.canConvertToSource(FluidState, ServerLevel, BlockPos)
instead.Forge: useLavaFluid.isFlammable(LevelReader,BlockPos,Direction)
insteadnet.minecraft.world.level.storage.loot.LootTable.getRandomItemsRaw(LootContext, Consumer<ItemStack>) Usethe hand sensitive version
as this version provides wrong hand informationVanilla has deprecated intrusive holders and is in the process of moving away from them, you should not use this unless you have no better option.
-
已过时的 构造器构造器说明Forge: Use the mod id variantForge: Use the mod id variantnet.minecraft.data.tags.DamageTypeTagsProvider
(PackOutput, CompletableFuture<HolderLookup.Provider>) Forge: Use the mod id variantForge: Use the mod id variantnet.minecraft.data.tags.EntityTypeTagsProvider(PackOutput, CompletableFuture<HolderLookup.Provider>) Forge: Use the mod id variantForge: Use the mod id variantForge: Use the mod id variantNeo: Use the mod id variantnet.minecraft.data.tags.InstrumentTagsProvider(PackOutput, CompletableFuture<HolderLookup.Provider>) Forge: 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 variantNeo: use overload with ConnectionType contextUseCommonListenerCookie(GameProfile, int, ClientInformation, boolean, net.neoforged.neoforge.network.connection.ConnectionType)
instead, to indicate whether the connection is modded.Neo: useMetadata(Component,PackCompatibility,FeatureFlagSet,List,boolean)
insteadNeo: useFeatureFlag(FeatureFlagUniverse, int, int, boolean)
insteadNeo: use constructor with additional data insteadNeo: use the constructor引用无效
with a default value and id setter
Usethe hand sensitive version
as this version provides wrong hand information