-
Recently Browsing
- No registered users viewing this page.
-
Posts
-
By diesieben07 · Posted
Then it is a bad example to give on the Forge forums. -
Pretty sure it does it that way because it shares the same code with the fabric implementation which doesn't have deferred registration.
-
By diesieben07 · Posted
This is not ideal. The recommended way to register things is using DeferredRegister, which also provides you with the Holder. -
It depends what version of forge you are using. The old way (1.18 and before) is to use BiomeLoadingEvent. Then use event.getGeneration().addFeature() to add it to the appropriate GenerationStep. For an example, here is Botania adding mystical flowers and mushrooms to the vegetation step https://github.com/VazkiiMods/Botania/blob/0cfa08ebb4828aa48b3231d6db6dd3b70dc7942b/Forge/src/main/java/vazkii/botania/forge/ForgeCommonInitializer.java#L250 Of course you need to register your features to make them useful, see https://github.com/VazkiiMods/Botania/blob/0cfa08ebb4828aa48b3231d6db6dd3b70dc7942b/Xplat/src/main/java/vazkii/botania/common/world/ModFeatures.java 1.19 (still in beta) has overhauled this to use BiomeModifiers:https://forge.gemwire.uk/wiki/Biome_Modifier
-
By diesieben07 · Posted
TextureAtlasSprite has an array of NativeImages which you can access using reflection. However Forge allows custom TAS implementations, which might not be image-backed at all.
-
-
Topics
-
Who's Online (See full list)
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.