-
-
Notifications
You must be signed in to change notification settings - Fork 510
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
There's a choice between buffering up Item objects so that Creative tab filling event can read it, or registering a new event handler for every single item. I opted for the latter as it more clearly attributes that memory usage to Botania. Note that Forge floating flower rendering still crashes the creative tab so I can't actually test it quite yet.
- Loading branch information
1 parent
37db6ab
commit 304d59b
Showing
3 changed files
with
71 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
Xplat/src/main/java/vazkii/botania/api/BotaniaRegistries.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,20 @@ | ||
package vazkii.botania.api; | ||
|
||
import net.minecraft.core.Registry; | ||
import net.minecraft.core.registries.Registries; | ||
import net.minecraft.resources.ResourceKey; | ||
import net.minecraft.resources.ResourceLocation; | ||
import net.minecraft.world.item.CreativeModeTab; | ||
|
||
import vazkii.botania.api.brew.Brew; | ||
|
||
public class BotaniaRegistries { | ||
public static final ResourceKey<Registry<Brew>> BREWS = | ||
ResourceKey.createRegistryKey(new ResourceLocation(BotaniaAPI.MODID, "brews")); | ||
|
||
/** | ||
* The ID of Botania's Creative Tab | ||
*/ | ||
public static final ResourceKey<CreativeModeTab> BOTANIA_TAB_KEY = ResourceKey.create(Registries.CREATIVE_MODE_TAB, | ||
new ResourceLocation(BotaniaAPI.MODID, "botania")); | ||
} |
304d59b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I meant the former.