28 lines
1.2 KiB
Diff
28 lines
1.2 KiB
Diff
--- a/net/minecraft/potion/Potion.java
|
|
+++ b/net/minecraft/potion/Potion.java
|
|
@@ -6,7 +6,8 @@
|
|
import net.minecraft.util.ResourceLocation;
|
|
import net.minecraft.util.registry.Registry;
|
|
|
|
-public class Potion {
|
|
+public class Potion extends net.minecraftforge.registries.ForgeRegistryEntry<Potion> {
|
|
+ private final net.minecraftforge.common.util.ReverseTagWrapper<Potion> reverseTags = new net.minecraftforge.common.util.ReverseTagWrapper<>(this, () -> net.minecraft.tags.TagCollectionManager.func_242178_a().getCustomTypeCollection(net.minecraftforge.registries.ForgeRegistries.POTION_TYPES));
|
|
private final String field_185179_d;
|
|
private final ImmutableList<EffectInstance> field_185180_e;
|
|
|
|
@@ -23,6 +24,14 @@
|
|
this.field_185180_e = ImmutableList.copyOf(p_i46740_2_);
|
|
}
|
|
|
|
+ public java.util.Set<net.minecraft.util.ResourceLocation> getTags() {
|
|
+ return reverseTags.getTagNames();
|
|
+ }
|
|
+
|
|
+ public boolean isIn(net.minecraft.tags.ITag<Potion> tag) {
|
|
+ return tag.func_230235_a_(this);
|
|
+ }
|
|
+
|
|
public String func_185174_b(String p_185174_1_) {
|
|
return p_185174_1_ + (this.field_185179_d == null ? Registry.field_212621_j.func_177774_c(this).func_110623_a() : this.field_185179_d);
|
|
}
|