Rename potion registry fields to match the mojang names (#7939)

This commit is contained in:
Johannes Jäger authored and GitHub committed 2021-08-02 15:32:14 -07:00
1 parent ea9a72af85
commit 2f43f9910d
4 files changed
+7 -7

No files matched your search

@@ -1072,7 +1072,7 @@ public class ForgeHooks
else if (item instanceof PotionItem || item instanceof TippedArrowItem)
{
Potion potionType = PotionUtils.getPotion(itemStack);
ResourceLocation resourceLocation = ForgeRegistries.POTION_TYPES.getKey(potionType);
ResourceLocation resourceLocation = ForgeRegistries.POTIONS.getKey(potionType);
if (resourceLocation != null)
{
return resourceLocation.getNamespace();
@@ -72,9 +72,9 @@ public class ForgeRegistries
public static final IForgeRegistry<Block> BLOCKS = RegistryManager.ACTIVE.getRegistry(Block.class);
public static final IForgeRegistry<Fluid> FLUIDS = RegistryManager.ACTIVE.getRegistry(Fluid.class);
public static final IForgeRegistry<Item> ITEMS = RegistryManager.ACTIVE.getRegistry(Item.class);
public static final IForgeRegistry<MobEffect> POTIONS = RegistryManager.ACTIVE.getRegistry(MobEffect.class);
public static final IForgeRegistry<MobEffect> MOB_EFFECTS = RegistryManager.ACTIVE.getRegistry(MobEffect.class);
public static final IForgeRegistry<SoundEvent> SOUND_EVENTS = RegistryManager.ACTIVE.getRegistry(SoundEvent.class);
public static final IForgeRegistry<Potion> POTION_TYPES = RegistryManager.ACTIVE.getRegistry(Potion.class);
public static final IForgeRegistry<Potion> POTIONS = RegistryManager.ACTIVE.getRegistry(Potion.class);
public static final IForgeRegistry<Enchantment> ENCHANTMENTS = RegistryManager.ACTIVE.getRegistry(Enchantment.class);
public static final IForgeRegistry<EntityType<?>> ENTITIES = RegistryManager.ACTIVE.getRegistry(EntityType.class);
public static final IForgeRegistry<BlockEntityType<?>> BLOCK_ENTITIES = RegistryManager.ACTIVE.getRegistry(BlockEntityType.class);
@@ -118,7 +118,7 @@ public class ForgeRegistries
public static final ResourceKey<Registry<Block>> BLOCKS = key("block");
public static final ResourceKey<Registry<Fluid>> FLUIDS = key("fluid");
public static final ResourceKey<Registry<Item>> ITEMS = key("item");
public static final ResourceKey<Registry<MobEffect>> EFFECTS = key("mob_effect");
public static final ResourceKey<Registry<MobEffect>> MOB_EFFECTS = key("mob_effect");
public static final ResourceKey<Registry<Potion>> POTIONS = key("potion");
public static final ResourceKey<Registry<Attribute>> ATTRIBUTES = key("attribute");
public static final ResourceKey<Registry<StatType<?>>> STAT_TYPES = key("stat_type");
@@ -141,7 +141,7 @@ public class GameData
makeRegistry(BLOCKS, Block.class, "air").addCallback(BlockCallbacks.INSTANCE).legacyName("blocks").create();
makeRegistry(FLUIDS, Fluid.class, "empty").create();
makeRegistry(ITEMS, Item.class, "air").addCallback(ItemCallbacks.INSTANCE).legacyName("items").create();
makeRegistry(EFFECTS, MobEffect.class ).legacyName("potions").create();
makeRegistry(MOB_EFFECTS, MobEffect.class).legacyName("potions").create();
//makeRegistry(BIOMES, Biome.class).legacyName("biomes").create();
makeRegistry(SOUND_EVENTS, SoundEvent.class).legacyName("soundevents").create();
makeRegistry(POTIONS, Potion.class, "empty").legacyName("potiontypes").tagFolder("potions").create();