Deprecated API
Contents
-
ElementDescriptionSet 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)
UseRenderLevelStageEvent
instead for more flexibility and improved compatibility with translucent objects. There is noRenderLevelStageEvent.Stage
that directly replaces this event, instead you must decide which Stage best fits your use case.Use IForgePoseStack.pushTransformation(Transformation), as Transformation can be present in common code.Merge into the method above in 1.20 once the call fromBlockModel
is gone.SeeForgeEventFactory.onAdvancementEarnedEvent(net.minecraft.world.entity.player.Player, net.minecraft.advancements.Advancement)
andForgeEventFactory.onAdvancementProgressedEvent(net.minecraft.world.entity.player.Player, net.minecraft.advancements.Advancement, net.minecraft.advancements.AdvancementProgress, java.lang.String, net.minecraftforge.event.entity.player.AdvancementEvent.AdvancementProgressEvent.ProgressType)
To be removed in 1.20. UseForgeHooks.readAdditionalLevelSaveData(CompoundTag, LevelStorageSource.LevelDirectory)
instead.UseModifiableBiomeInfo.BiomeInfo.Builder.getSpecialEffects()
as it provides read access. TODO remove this by 1.20Create your own reference usingCapabilityManager.get(CapabilityToken)
, or useForgeCapabilities.ENERGY
.Use EnderPearl(ServerPlayer, double, double, double, ThrownEnderpearl, float, HitResult) the hit result-sensitive version}.Create your own reference usingCapabilityManager.get(CapabilityToken)
, or useForgeCapabilities.FLUID_HANDLER
.Create your own reference usingCapabilityManager.get(CapabilityToken)
, or useForgeCapabilities.FLUID_HANDLER_ITEM
.Create your own reference usingCapabilityManager.get(CapabilityToken)
, or useForgeCapabilities.ITEM_HANDLER
.
-
ClassDescriptionUse
RenderLevelStageEvent
instead for more flexibility and improved compatibility with translucent objects. There is noRenderLevelStageEvent.Stage
that directly replaces this event, instead you must decide which Stage best fits your use case.
-
Record ClassDescription
-
FieldDescriptionForge: This map is patched out of vanilla code. Listen to
net.minecraftforge.event.world.BlockEvent.BlockToolModificationEvent
or overrideIForgeBlock.getToolModifiedState(BlockState, UseOnContext, net.minecraftforge.common.ToolAction, boolean)
.Forge: UseRarity.getStyleModifier()
Create your own reference usingCapabilityManager.get(CapabilityToken)
, or useForgeCapabilities.ENERGY
.Create your own reference usingCapabilityManager.get(CapabilityToken)
, or useForgeCapabilities.FLUID_HANDLER
.Create your own reference usingCapabilityManager.get(CapabilityToken)
, or useForgeCapabilities.FLUID_HANDLER_ITEM
.Create your own reference usingCapabilityManager.get(CapabilityToken)
, or useForgeCapabilities.ITEM_HANDLER
.
-
MethodDescriptionForge: use overload with context.Register via
RegisterColorHandlersEvent.Block
Register viaRegisterColorHandlersEvent.Item
Register viaRegisterParticleProvidersEvent
Register viaRegisterParticleProvidersEvent
Forge: useParticleEngine.render(PoseStack, MultiBufferSource.BufferSource, LightTexture, Camera, float, net.minecraft.client.renderer.culling.Frustum)
with Frustum as additional parameterSet 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: Use variant with RenderTypeGroupForge: 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: UsePackMetadataSection.getPackFormat(net.minecraft.server.packs.PackType)
instead.Forge: Userider sensitive version
Forge: use overload with context.Forge useCreativeModeTab.getBackgroundImage()
insteadForge: useCreativeModeTab.setBackgroundImage(net.minecraft.resources.ResourceLocation)
insteadForge: Use damage source sensitive versionForge: Use damage source sensitive versionForge: callForgeSpawnEggItem.fromEntityType(EntityType)
insteadForge: 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: get burn times by calling ForgeHooks#getBurnTime(ItemStack)net.minecraft.world.level.block.grower.AbstractMegaTreeGrower.getConfiguredMegaFeature(RandomSource) net.minecraft.world.level.levelgen.synth.ImprovedNoise.noise(double, double, double, double, double) Forge: useLavaFluid.isFlammable(LevelReader,BlockPos,Direction)
insteadUse IForgePoseStack.pushTransformation(Transformation), as Transformation can be present in common code.Merge into the method above in 1.20 once the call fromBlockModel
is gone.useIngredient.fromJson(JsonElement)
(Stream)}net.minecraftforge.common.crafting.AbstractIngredient.fromValues(Stream<? extends Ingredient.Value>) useIngredient.of()
useIngredient.of(Stream)
(Stream)}useIngredient.of(TagKey)
(Stream)}useIngredient.of(ItemStack...)
(Stream)}useIngredient.of(ItemLike...)
(Stream)}SeeForgeEventFactory.onAdvancementEarnedEvent(net.minecraft.world.entity.player.Player, net.minecraft.advancements.Advancement)
andForgeEventFactory.onAdvancementProgressedEvent(net.minecraft.world.entity.player.Player, net.minecraft.advancements.Advancement, net.minecraft.advancements.AdvancementProgress, java.lang.String, net.minecraftforge.event.entity.player.AdvancementEvent.AdvancementProgressEvent.ProgressType)
To be removed in 1.20. UseForgeHooks.readAdditionalLevelSaveData(CompoundTag, LevelStorageSource.LevelDirectory)
instead.UseModifiableBiomeInfo.BiomeInfo.Builder.getSpecialEffects()
as it provides read access. TODO remove this by 1.20useDistExecutor.safeCallWhenOn(Dist, Supplier)
instead. This remains for advanced use cases.useDistExecutor.safeRunWhenOn(Dist, Supplier)
where possible. Advanced uses only.Forge: For internal use only. Use the Register events when registering values.Forge: For internal use only. Use the Register events when registering values.
-
ConstructorDescriptionForge: Use variant with RenderTypeGroupForge: Use the
mod id variant
Forge: Use themod id variant
Forge: Use themod id variant
Forge: Use themod id variant
Forge: Use themod id variant
Forge: Use themod id variant
Forge: Use themod id variant
Forge: Use themod id variant
Forge: Use themod id variant
Forge: Use themod id variant
Forge: Use themod id variant
Forge: Use themod id variant
Forge: Use themod id variant
Forge: Use the mod id variantForge: Use themod id variant
Forge: use constructor with context.Forge: use constructor with context.Forge: UseForgeSpawnEggItem
instead for suppliersFORGE: Use supplier version insteadUse EnderPearl(ServerPlayer, double, double, double, ThrownEnderpearl, float, HitResult) the hit result-sensitive version}.
IForgeBakedModel.getRenderTypes(BlockState, net.minecraft.util.RandomSource, net.minecraftforge.client.model.data.ModelData)
.