mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-19 03:49:14 +00:00
[1.18.2] Fix tags for custom forge registries. (#8495)
Tag-enabled registries must now be registered to vanilla's root registry. See RegistryBuilder#hasTags. Modded tag-enabled registries have to use the format `data/<namespace>/tags/<registrynamespace>/<registryname>/<tag>.json` This format is to prevent conflicts for registries with the same path but different namespaces EX: Registry name `examplemod:shoe`, tag name `blue_shoes` would be `data/<namespace>/tags/examplemod/shoe/blue_shoes.json` RegistryEvent.NewRegistry has been moved and renamed to NewRegistryEvent. RegistryBuilder#create has been made private. See NewRegistryEvent#create Created new ITagManager system for looking up Forge tags. See IForgeRegistry#tags. Add lookup methods for Holders from forge registries. See IForgeRegistry#getHolder.
This commit is contained in:
1 parent
30f3a7dbba
commit
ad75cb8644
51 files changed
+1621
-531
No files matched your search
@@ -41,6 +41,6 @@ public class RegistryObjectTest
|
||||
public void commonSetup(FMLCommonSetupEvent event)
|
||||
{
|
||||
LOGGER.info("Stone 1: {}", RegistryObject.of(new ResourceLocation("minecraft", "stone"), ForgeRegistries.BLOCKS).get());
|
||||
LOGGER.info("Stone 2: {}", RegistryObject.of(new ResourceLocation("minecraft", "stone"), Block.class, MODID).get());
|
||||
LOGGER.info("Stone 2: {}", RegistryObject.of(new ResourceLocation("minecraft", "stone"), ForgeRegistries.BLOCKS.getRegistryKey(), MODID).get());
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user