Skip to content

Commit

Permalink
feat(game.tag): structure tag creator
Browse files Browse the repository at this point in the history
  • Loading branch information
WakelessSloth56 committed Feb 27, 2024
1 parent 033a631 commit b2a9eb8
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,18 @@
import net.minecraft.world.level.block.entity.BlockEntityType;
import net.minecraft.world.level.dimension.DimensionType;
import net.minecraft.world.level.gameevent.GameEvent;
import net.minecraft.world.level.levelgen.structure.Structure;
import net.minecraft.world.level.material.Fluid;

public class TagCreator {

// TODO instance

public static <T> TagKey<T> tag(ResourceKey<? extends Registry<T>> registryKey, ResourceLocation tag) {
return TagKey.create(registryKey, tag);
}

// ============================================================================================================== //

public static TagKey<Attribute> attribute(ResourceLocation tag) {
return tag(Registries.ATTRIBUTE, tag);
Expand Down Expand Up @@ -136,4 +140,8 @@ public static TagKey<VillagerType> villagerType(ResourceLocation tag) {
return tag(Registries.VILLAGER_TYPE, tag);
}

public static TagKey<Structure> structure(ResourceLocation tag) {
return tag(Registries.STRUCTURE, tag);
}

}

0 comments on commit b2a9eb8

Please sign in to comment.