1.17: TechReborn compiles and runs, big thanks to @petabyteboy

Co-authored-by: Milan Pässler <milan@petabyte.dev>
This commit is contained in:
modmuss50 2021-05-29 13:19:29 +01:00
parent c661de5254
commit b33f4be5f4
212 changed files with 952 additions and 2025 deletions

View file

@ -29,7 +29,7 @@ import net.minecraft.fluid.Fluid;
import net.minecraft.item.Item;
import net.minecraft.tag.Tag;
import net.minecraft.tag.TagGroup;
import net.minecraft.tag.TagGroupLoader;
import net.minecraft.util.registry.Registry;
import net.minecraft.world.World;
public class TagUtils {
@ -39,14 +39,14 @@ public class TagUtils {
}
public static TagGroup<Block> getAllBlockTags(World world) {
return world.getTagManager().getBlocks();
return world.getTagManager().getOrCreateTagGroup(Registry.BLOCK_KEY);
}
public static TagGroup<Item> getAllItemTags(World world) {
return world.getTagManager().getItems();
return world.getTagManager().getOrCreateTagGroup(Registry.ITEM_KEY);
}
public static TagGroup<Fluid> getAllFluidTags(World world) {
return world.getTagManager().getFluids();
return world.getTagManager().getOrCreateTagGroup(Registry.FLUID_KEY);
}
}