Skip to content

Commit

Permalink
update to autogen files
Browse files Browse the repository at this point in the history
  • Loading branch information
Jab125 committed Apr 17, 2024
1 parent 9832cc9 commit 38e8302
Show file tree
Hide file tree
Showing 22 changed files with 100 additions and 17 deletions.
10 changes: 8 additions & 2 deletions common/src/main/java/dev/architectury/tags/BiomeTags.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,19 @@

// AUTO GENERATED CLASS, DO NOT MANUALLY EDIT
package dev.architectury.tags;

import dev.architectury.injectables.annotations.ExpectPlatform;
import dev.architectury.injectables.annotations.PlatformOnly;
import net.minecraft.tags.TagKey;
import net.minecraft.world.level.biome.Biome;

// Only available on Fabric and NeoForge
@SuppressWarnings({"UnimplementedExpectPlatform", "unused"})
/**
* Convention Tags for biomes.<br>
* <b style="color:red;">WARNING! This class will not work on Forge!</b>
* @see net.fabricmc.fabric.api.tag.convention.v2.ConventionalBiomeTags
* @see net.neoforged.neoforge.common.Tags.Biomes
*/
@SuppressWarnings("unused")
public class BiomeTags {
public static TagKey<Biome> NO_DEFAULT_MONSTERS = impl_NO_DEFAULT_MONSTERS();
public static TagKey<Biome> HIDDEN_FROM_LOCATOR_SELECTION = impl_HIDDEN_FROM_LOCATOR_SELECTION();
Expand Down
10 changes: 8 additions & 2 deletions common/src/main/java/dev/architectury/tags/BlockTags.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,19 @@

// AUTO GENERATED CLASS, DO NOT MANUALLY EDIT
package dev.architectury.tags;

import dev.architectury.injectables.annotations.ExpectPlatform;
import dev.architectury.injectables.annotations.PlatformOnly;
import net.minecraft.tags.TagKey;
import net.minecraft.world.level.block.Block;

// Only available on Fabric and NeoForge
@SuppressWarnings({"UnimplementedExpectPlatform", "unused"})
/**
* Convention Tags for blocks.<br>
* <b style="color:red;">WARNING! This class will not work on Forge!</b>
* @see net.fabricmc.fabric.api.tag.convention.v2.ConventionalBlockTags
* @see net.neoforged.neoforge.common.Tags.Blocks
*/
@SuppressWarnings("unused")
public class BlockTags {
public static TagKey<Block> STONES = impl_STONES();
public static TagKey<Block> COBBLESTONES = impl_COBBLESTONES();
Expand Down
10 changes: 8 additions & 2 deletions common/src/main/java/dev/architectury/tags/EnchantmentTags.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,19 @@

// AUTO GENERATED CLASS, DO NOT MANUALLY EDIT
package dev.architectury.tags;

import dev.architectury.injectables.annotations.ExpectPlatform;
import dev.architectury.injectables.annotations.PlatformOnly;
import net.minecraft.tags.TagKey;
import net.minecraft.world.item.enchantment.Enchantment;

// Only available on Fabric and NeoForge
@SuppressWarnings({"UnimplementedExpectPlatform", "unused"})
/**
* Convention Tags for enchantments.<br>
* <b style="color:red;">WARNING! This class will not work on Forge!</b>
* @see net.fabricmc.fabric.api.tag.convention.v2.ConventionalEnchantmentTags
* @see net.neoforged.neoforge.common.Tags.Enchantments
*/
@SuppressWarnings("unused")
public class EnchantmentTags {
public static TagKey<Enchantment> INCREASE_BLOCK_DROPS = impl_INCREASE_BLOCK_DROPS();
public static TagKey<Enchantment> INCREASE_ENTITY_DROPS = impl_INCREASE_ENTITY_DROPS();
Expand Down
10 changes: 8 additions & 2 deletions common/src/main/java/dev/architectury/tags/EntityTypeTags.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,19 @@

// AUTO GENERATED CLASS, DO NOT MANUALLY EDIT
package dev.architectury.tags;

import dev.architectury.injectables.annotations.ExpectPlatform;
import dev.architectury.injectables.annotations.PlatformOnly;
import net.minecraft.tags.TagKey;
import net.minecraft.world.entity.EntityType;

// Only available on Fabric and NeoForge
@SuppressWarnings({"UnimplementedExpectPlatform", "unused"})
/**
* Convention Tags for entity types.<br>
* <b style="color:red;">WARNING! This class will not work on Forge!</b>
* @see net.fabricmc.fabric.api.tag.convention.v2.ConventionalEntityTypeTags
* @see net.neoforged.neoforge.common.Tags.EntityTypes
*/
@SuppressWarnings("unused")
public class EntityTypeTags {
public static TagKey<EntityType<?>> BOSSES = impl_BOSSES();
public static TagKey<EntityType<?>> MINECARTS = impl_MINECARTS();
Expand Down
10 changes: 8 additions & 2 deletions common/src/main/java/dev/architectury/tags/FluidTags.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,19 @@

// AUTO GENERATED CLASS, DO NOT MANUALLY EDIT
package dev.architectury.tags;

import dev.architectury.injectables.annotations.ExpectPlatform;
import dev.architectury.injectables.annotations.PlatformOnly;
import net.minecraft.tags.TagKey;
import net.minecraft.world.level.material.Fluid;

// Only available on Fabric and NeoForge
@SuppressWarnings({"UnimplementedExpectPlatform", "unused"})
/**
* Convention Tags for fluids.<br>
* <b style="color:red;">WARNING! This class will not work on Forge!</b>
* @see net.fabricmc.fabric.api.tag.convention.v2.ConventionalFluidTags
* @see net.neoforged.neoforge.common.Tags.Fluids
*/
@SuppressWarnings("unused")
public class FluidTags {
public static TagKey<Fluid> LAVA = impl_LAVA();
public static TagKey<Fluid> WATER = impl_WATER();
Expand Down
10 changes: 8 additions & 2 deletions common/src/main/java/dev/architectury/tags/ItemTags.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,19 @@

// AUTO GENERATED CLASS, DO NOT MANUALLY EDIT
package dev.architectury.tags;

import dev.architectury.injectables.annotations.ExpectPlatform;
import dev.architectury.injectables.annotations.PlatformOnly;
import net.minecraft.tags.TagKey;
import net.minecraft.world.item.Item;

// Only available on Fabric and NeoForge
@SuppressWarnings({"UnimplementedExpectPlatform", "unused"})
/**
* Convention Tags for items.<br>
* <b style="color:red;">WARNING! This class will not work on Forge!</b>
* @see net.fabricmc.fabric.api.tag.convention.v2.ConventionalItemTags
* @see net.neoforged.neoforge.common.Tags.Items
*/
@SuppressWarnings("unused")
public class ItemTags {
public static TagKey<Item> STONES = impl_STONES();
public static TagKey<Item> COBBLESTONES = impl_COBBLESTONES();
Expand Down
10 changes: 8 additions & 2 deletions common/src/main/java/dev/architectury/tags/StructureTags.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,19 @@

// AUTO GENERATED CLASS, DO NOT MANUALLY EDIT
package dev.architectury.tags;

import dev.architectury.injectables.annotations.ExpectPlatform;
import dev.architectury.injectables.annotations.PlatformOnly;
import net.minecraft.tags.TagKey;
import net.minecraft.world.level.levelgen.structure.Structure;

// Only available on Fabric and NeoForge
@SuppressWarnings({"UnimplementedExpectPlatform", "unused"})
/**
* Convention Tags for structures.<br>
* <b style="color:red;">WARNING! This class will not work on Forge!</b>
* @see net.fabricmc.fabric.api.tag.convention.v2.ConventionalStructureTags
* @see net.neoforged.neoforge.common.Tags.Structures
*/
@SuppressWarnings("unused")
public class StructureTags {
public static TagKey<Structure> HIDDEN_FROM_DISPLAYERS = impl_HIDDEN_FROM_DISPLAYERS();
public static TagKey<Structure> HIDDEN_FROM_LOCATOR_SELECTION = impl_HIDDEN_FROM_LOCATOR_SELECTION();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@

// AUTO GENERATED CLASS, DO NOT MANUALLY EDIT
package dev.architectury.tags.fabric;

import net.minecraft.tags.TagKey;
import net.minecraft.world.level.biome.Biome;

@SuppressWarnings("unused")
public class BiomeTagsImpl {
public static TagKey<Biome> impl_NO_DEFAULT_MONSTERS() {
return net.fabricmc.fabric.api.tag.convention.v2.ConventionalBiomeTags.NO_DEFAULT_MONSTERS;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@

// AUTO GENERATED CLASS, DO NOT MANUALLY EDIT
package dev.architectury.tags.fabric;

import net.minecraft.tags.TagKey;
import net.minecraft.world.level.block.Block;

@SuppressWarnings("unused")
public class BlockTagsImpl {
public static TagKey<Block> impl_STONES() {
return net.fabricmc.fabric.api.tag.convention.v2.ConventionalBlockTags.STONES;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,32 +122,45 @@ public static void generateStubClass() throws IOException {
String importRegistryName = registryClass.getName().replaceAll("\\$", "/").replace("/", ".");
String[] temp = entry.getKey().getPath().split("/");
String categoryShortName = WordUtils.capitalize(temp[temp.length-1].replaceAll("_", " ")).replaceAll(" ", "");
Pair<ConventionalTag, ConventionalTag> masterPair = entry.getValue().get(0);
String leftName = masterPair.getFirst().tagClassName.replaceAll("\\$", ".");
String rightName = masterPair.getSecond().tagClassName.replaceAll("\\$", ".");
commonClass.append(String.format("""
// AUTO GENERATED CLASS, DO NOT MANUALLY EDIT
package dev.architectury.tags;
import dev.architectury.injectables.annotations.ExpectPlatform;
import dev.architectury.injectables.annotations.PlatformOnly;
import net.minecraft.tags.TagKey;
import %s;
// Only available on Fabric and NeoForge
@SuppressWarnings({"UnimplementedExpectPlatform", "unused"})
/**
* Convention Tags for %s.<br>
* <b style="color:red;">WARNING! This class will not work on Forge!</b>
* @see %s
* @see %s
*/
@SuppressWarnings("unused")
public class %sTags {
""", importRegistryName, categoryShortName));
""", importRegistryName, temp[temp.length-1].replaceAll("_", " ") + "s", leftName, rightName, categoryShortName));
fabricClass.append(String.format("""
// AUTO GENERATED CLASS, DO NOT MANUALLY EDIT
package dev.architectury.tags.fabric;
import net.minecraft.tags.TagKey;
import %s;
@SuppressWarnings("unused")
public class %sTagsImpl {
""", importRegistryName, categoryShortName));
neoForgeClass.append(String.format("""
// AUTO GENERATED CLASS, DO NOT MANUALLY EDIT
package dev.architectury.tags.forge;
import net.minecraft.tags.TagKey;
import %s;
@SuppressWarnings("unused")
public class %sTagsImpl {
""", importRegistryName, categoryShortName));
StringBuilder commonClassEnd = new StringBuilder();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@

// AUTO GENERATED CLASS, DO NOT MANUALLY EDIT
package dev.architectury.tags.fabric;

import net.minecraft.tags.TagKey;
import net.minecraft.world.item.enchantment.Enchantment;

@SuppressWarnings("unused")
public class EnchantmentTagsImpl {
public static TagKey<Enchantment> impl_INCREASE_BLOCK_DROPS() {
return net.fabricmc.fabric.api.tag.convention.v2.ConventionalEnchantmentTags.INCREASE_BLOCK_DROPS;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@

// AUTO GENERATED CLASS, DO NOT MANUALLY EDIT
package dev.architectury.tags.fabric;

import net.minecraft.tags.TagKey;
import net.minecraft.world.entity.EntityType;

@SuppressWarnings("unused")
public class EntityTypeTagsImpl {
public static TagKey<EntityType<?>> impl_BOSSES() {
return net.fabricmc.fabric.api.tag.convention.v2.ConventionalEntityTypeTags.BOSSES;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@

// AUTO GENERATED CLASS, DO NOT MANUALLY EDIT
package dev.architectury.tags.fabric;

import net.minecraft.tags.TagKey;
import net.minecraft.world.level.material.Fluid;

@SuppressWarnings("unused")
public class FluidTagsImpl {
public static TagKey<Fluid> impl_LAVA() {
return net.fabricmc.fabric.api.tag.convention.v2.ConventionalFluidTags.LAVA;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@

// AUTO GENERATED CLASS, DO NOT MANUALLY EDIT
package dev.architectury.tags.fabric;

import net.minecraft.tags.TagKey;
import net.minecraft.world.item.Item;

@SuppressWarnings("unused")
public class ItemTagsImpl {
public static TagKey<Item> impl_STONES() {
return net.fabricmc.fabric.api.tag.convention.v2.ConventionalItemTags.STONES;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@

// AUTO GENERATED CLASS, DO NOT MANUALLY EDIT
package dev.architectury.tags.fabric;

import net.minecraft.tags.TagKey;
import net.minecraft.world.level.levelgen.structure.Structure;

@SuppressWarnings("unused")
public class StructureTagsImpl {
public static TagKey<Structure> impl_HIDDEN_FROM_DISPLAYERS() {
return net.fabricmc.fabric.api.tag.convention.v2.ConventionalStructureTags.HIDDEN_FROM_DISPLAYERS;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@

// AUTO GENERATED CLASS, DO NOT MANUALLY EDIT
package dev.architectury.tags.forge;

import net.minecraft.tags.TagKey;
import net.minecraft.world.level.biome.Biome;

@SuppressWarnings("unused")
public class BiomeTagsImpl {
public static TagKey<Biome> impl_NO_DEFAULT_MONSTERS() {
return net.neoforged.neoforge.common.Tags.Biomes.NO_DEFAULT_MONSTERS;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@

// AUTO GENERATED CLASS, DO NOT MANUALLY EDIT
package dev.architectury.tags.forge;

import net.minecraft.tags.TagKey;
import net.minecraft.world.level.block.Block;

@SuppressWarnings("unused")
public class BlockTagsImpl {
public static TagKey<Block> impl_STONES() {
return net.neoforged.neoforge.common.Tags.Blocks.STONES;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@

// AUTO GENERATED CLASS, DO NOT MANUALLY EDIT
package dev.architectury.tags.forge;

import net.minecraft.tags.TagKey;
import net.minecraft.world.item.enchantment.Enchantment;

@SuppressWarnings("unused")
public class EnchantmentTagsImpl {
public static TagKey<Enchantment> impl_INCREASE_BLOCK_DROPS() {
return net.neoforged.neoforge.common.Tags.Enchantments.INCREASE_BLOCK_DROPS;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@

// AUTO GENERATED CLASS, DO NOT MANUALLY EDIT
package dev.architectury.tags.forge;

import net.minecraft.tags.TagKey;
import net.minecraft.world.entity.EntityType;

@SuppressWarnings("unused")
public class EntityTypeTagsImpl {
public static TagKey<EntityType<?>> impl_BOSSES() {
return net.neoforged.neoforge.common.Tags.EntityTypes.BOSSES;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@

// AUTO GENERATED CLASS, DO NOT MANUALLY EDIT
package dev.architectury.tags.forge;

import net.minecraft.tags.TagKey;
import net.minecraft.world.level.material.Fluid;

@SuppressWarnings("unused")
public class FluidTagsImpl {
public static TagKey<Fluid> impl_LAVA() {
return net.neoforged.neoforge.common.Tags.Fluids.LAVA;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@

// AUTO GENERATED CLASS, DO NOT MANUALLY EDIT
package dev.architectury.tags.forge;

import net.minecraft.tags.TagKey;
import net.minecraft.world.item.Item;

@SuppressWarnings("unused")
public class ItemTagsImpl {
public static TagKey<Item> impl_STONES() {
return net.neoforged.neoforge.common.Tags.Items.STONES;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@

// AUTO GENERATED CLASS, DO NOT MANUALLY EDIT
package dev.architectury.tags.forge;

import net.minecraft.tags.TagKey;
import net.minecraft.world.level.levelgen.structure.Structure;

@SuppressWarnings("unused")
public class StructureTagsImpl {
public static TagKey<Structure> impl_HIDDEN_FROM_DISPLAYERS() {
return net.neoforged.neoforge.common.Tags.Structures.HIDDEN_FROM_DISPLAYERS;
Expand Down

0 comments on commit 38e8302

Please sign in to comment.