Skip to content

Commit fd0275d

Browse files
committed
Merge branch 'api-8' into api-9
2 parents 919d497 + 9e9f8c2 commit fd0275d

File tree

16 files changed

+1021
-4
lines changed

16 files changed

+1021
-4
lines changed

src/main/java/org/spongepowered/api/block/BlockType.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
import org.spongepowered.api.item.ItemType;
3131
import org.spongepowered.api.registry.DefaultedRegistryValue;
3232
import org.spongepowered.api.state.StateContainer;
33+
import org.spongepowered.api.tag.Taggable;
3334
import org.spongepowered.api.util.annotation.CatalogedBy;
3435

3536
import java.util.Optional;
@@ -43,7 +44,7 @@
4344
* via {@link BlockEntity}.</p>
4445
*/
4546
@CatalogedBy(BlockTypes.class)
46-
public interface BlockType extends DefaultedRegistryValue, ComponentLike, StateContainer<BlockState>, DataHolder.Immutable<BlockType> {
47+
public interface BlockType extends DefaultedRegistryValue, ComponentLike, StateContainer<BlockState>, DataHolder.Immutable<BlockType>, Taggable<BlockType> {
4748

4849
/**
4950
* Return the {@link ItemType} that represents this block.

src/main/java/org/spongepowered/api/datapack/DataPackType.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
import org.spongepowered.api.advancement.Advancement;
2929
import org.spongepowered.api.event.lifecycle.RegisterDataPackValueEvent;
3030
import org.spongepowered.api.item.recipe.RecipeRegistration;
31+
import org.spongepowered.api.tag.TagTemplate;
3132
import org.spongepowered.api.util.annotation.CatalogedBy;
3233
import org.spongepowered.api.world.WorldTypeTemplate;
3334
import org.spongepowered.api.world.server.WorldTemplate;
@@ -57,5 +58,7 @@ interface Factory {
5758
DataPackType<WorldTypeTemplate> worldType();
5859

5960
DataPackType<WorldTemplate> world();
61+
62+
DataPackType<TagTemplate> tag();
6063
}
6164
}

src/main/java/org/spongepowered/api/datapack/DataPackTypes.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
import org.spongepowered.api.Sponge;
2828
import org.spongepowered.api.advancement.Advancement;
2929
import org.spongepowered.api.item.recipe.RecipeRegistration;
30+
import org.spongepowered.api.tag.TagTemplate;
3031
import org.spongepowered.api.world.WorldTypeTemplate;
3132
import org.spongepowered.api.world.server.WorldTemplate;
3233

@@ -40,6 +41,8 @@ public final class DataPackTypes {
4041

4142
public static final DataPackType<WorldTemplate> WORLD = Sponge.game().factoryProvider().provide(DataPackType.Factory.class).world();
4243

44+
public static final DataPackType<TagTemplate> TAG = Sponge.game().factoryProvider().provide(DataPackType.Factory.class).tag();
45+
4346
private DataPackTypes() {
4447
}
4548
}

src/main/java/org/spongepowered/api/entity/EntityType.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,14 @@
2727
import net.kyori.adventure.text.ComponentLike;
2828
import org.spongepowered.api.entity.living.player.server.ServerPlayer;
2929
import org.spongepowered.api.registry.DefaultedRegistryValue;
30+
import org.spongepowered.api.tag.Taggable;
3031
import org.spongepowered.api.util.annotation.CatalogedBy;
3132

3233
/**
3334
* Describes a type of entity.
3435
*/
3536
@CatalogedBy(EntityTypes.class)
36-
public interface EntityType<A extends Entity> extends DefaultedRegistryValue, ComponentLike {
37+
public interface EntityType<A extends Entity> extends DefaultedRegistryValue, ComponentLike, Taggable<EntityType<?>> {
3738

3839
/**
3940
* If true {@link Entity entities} of this type will not be saved to disk.

src/main/java/org/spongepowered/api/fluid/FluidType.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
import org.spongepowered.api.item.ItemType;
3333
import org.spongepowered.api.registry.DefaultedRegistryValue;
3434
import org.spongepowered.api.state.StateContainer;
35+
import org.spongepowered.api.tag.Taggable;
3536
import org.spongepowered.api.util.annotation.CatalogedBy;
3637

3738
/**
@@ -47,6 +48,6 @@
4748
* than how vanilla implementations handle them.</p>
4849
*/
4950
@CatalogedBy(FluidTypes.class)
50-
public interface FluidType extends DefaultedRegistryValue, StateContainer<FluidState>, DataHolder.Immutable<FluidType> {
51+
public interface FluidType extends DefaultedRegistryValue, StateContainer<FluidState>, DataHolder.Immutable<FluidType>, Taggable<FluidType> {
5152

5253
}

src/main/java/org/spongepowered/api/item/ItemType.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
import org.spongepowered.api.data.DataHolder;
3030
import org.spongepowered.api.item.inventory.ItemStack;
3131
import org.spongepowered.api.registry.DefaultedRegistryValue;
32+
import org.spongepowered.api.tag.Taggable;
3233
import org.spongepowered.api.util.annotation.CatalogedBy;
3334

3435
import java.util.Optional;
@@ -38,7 +39,7 @@
3839
* A type of item.
3940
*/
4041
@CatalogedBy(ItemTypes.class)
41-
public interface ItemType extends DefaultedRegistryValue, ComponentLike, DataHolder.Immutable<ItemType> {
42+
public interface ItemType extends DefaultedRegistryValue, ComponentLike, DataHolder.Immutable<ItemType>, Taggable<ItemType> {
4243

4344
/**
4445
* Gets the corresponding {@link BlockType} of this item if one exists.

src/main/java/org/spongepowered/api/registry/RegistryTypes.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,9 @@
131131
import org.spongepowered.api.state.IntegerStateProperty;
132132
import org.spongepowered.api.statistic.Statistic;
133133
import org.spongepowered.api.statistic.StatisticCategory;
134+
import org.spongepowered.api.tag.Tag;
135+
import org.spongepowered.api.tag.TagType;
136+
import org.spongepowered.api.tag.TagTypes;
134137
import org.spongepowered.api.util.mirror.Mirror;
135138
import org.spongepowered.api.util.orientation.Orientation;
136139
import org.spongepowered.api.util.rotation.Rotation;
@@ -404,6 +407,16 @@ public final class RegistryTypes {
404407

405408
public static final DefaultedRegistryType<MapShade> MAP_SHADE = RegistryTypes.spongeKeyInGame("map_shade");
406409

410+
public static final DefaultedRegistryType<TagType<?>> TAG_TYPES = RegistryTypes.spongeKeyInGame("tag_type");
411+
412+
public static final DefaultedRegistryType<Tag<BlockType>> BLOCK_TYPE_TAGS = RegistryTypes.spongeKeyInGame("block_type_tags");
413+
414+
public static final DefaultedRegistryType<Tag<ItemType>> ITEM_TYPE_TAGS = RegistryTypes.spongeKeyInGame("item_type_tags");
415+
416+
public static final DefaultedRegistryType<Tag<EntityType<?>>> ENTITY_TYPE_TAGS = RegistryTypes.spongeKeyInGame("entity_type_tags");
417+
418+
public static final DefaultedRegistryType<Tag<FluidType>> FLUID_TYPE_TAGS = RegistryTypes.spongeKeyInGame("fluid_type_tags");
419+
407420
// @formatter:on
408421

409422
private static <V> RegistryType<V> minecraftKey(final String key) {
Lines changed: 223 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,223 @@
1+
/*
2+
* This file is part of SpongeAPI, licensed under the MIT License (MIT).
3+
*
4+
* Copyright (c) SpongePowered <https://www.spongepowered.org>
5+
* Copyright (c) contributors
6+
*
7+
* Permission is hereby granted, free of charge, to any person obtaining a copy
8+
* of this software and associated documentation files (the "Software"), to deal
9+
* in the Software without restriction, including without limitation the rights
10+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11+
* copies of the Software, and to permit persons to whom the Software is
12+
* furnished to do so, subject to the following conditions:
13+
*
14+
* The above copyright notice and this permission notice shall be included in
15+
* all copies or substantial portions of the Software.
16+
*
17+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23+
* THE SOFTWARE.
24+
*/
25+
package org.spongepowered.api.tag;
26+
27+
import org.spongepowered.api.ResourceKey;
28+
import org.spongepowered.api.Sponge;
29+
import org.spongepowered.api.block.BlockType;
30+
import org.spongepowered.api.registry.DefaultedRegistryReference;
31+
import org.spongepowered.api.registry.RegistryKey;
32+
import org.spongepowered.api.registry.RegistryScope;
33+
import org.spongepowered.api.registry.RegistryScopes;
34+
import org.spongepowered.api.registry.RegistryTypes;
35+
36+
/**
37+
* <!-- This file is automatically generated. Any manual changes will be overwritten. -->
38+
*/
39+
@SuppressWarnings("unused")
40+
@RegistryScopes(scopes = RegistryScope.GAME)
41+
public final class BlockTypeTags {
42+
43+
// @formatter:off
44+
public static final DefaultedRegistryReference<Tag<BlockType>> ACACIA_LOGS = BlockTypeTags.key(ResourceKey.minecraft("acacia_logs"));
45+
46+
public static final DefaultedRegistryReference<Tag<BlockType>> ANVIL = BlockTypeTags.key(ResourceKey.minecraft("anvil"));
47+
48+
public static final DefaultedRegistryReference<Tag<BlockType>> BAMBOO_PLANTABLE_ON = BlockTypeTags.key(ResourceKey.minecraft("bamboo_plantable_on"));
49+
50+
public static final DefaultedRegistryReference<Tag<BlockType>> BANNERS = BlockTypeTags.key(ResourceKey.minecraft("banners"));
51+
52+
public static final DefaultedRegistryReference<Tag<BlockType>> BASE_STONE_NETHER = BlockTypeTags.key(ResourceKey.minecraft("base_stone_nether"));
53+
54+
public static final DefaultedRegistryReference<Tag<BlockType>> BASE_STONE_OVERWORLD = BlockTypeTags.key(ResourceKey.minecraft("base_stone_overworld"));
55+
56+
public static final DefaultedRegistryReference<Tag<BlockType>> BEACON_BASE_BLOCKS = BlockTypeTags.key(ResourceKey.minecraft("beacon_base_blocks"));
57+
58+
public static final DefaultedRegistryReference<Tag<BlockType>> BEDS = BlockTypeTags.key(ResourceKey.minecraft("beds"));
59+
60+
public static final DefaultedRegistryReference<Tag<BlockType>> BEE_GROWABLES = BlockTypeTags.key(ResourceKey.minecraft("bee_growables"));
61+
62+
public static final DefaultedRegistryReference<Tag<BlockType>> BEEHIVES = BlockTypeTags.key(ResourceKey.minecraft("beehives"));
63+
64+
public static final DefaultedRegistryReference<Tag<BlockType>> BIRCH_LOGS = BlockTypeTags.key(ResourceKey.minecraft("birch_logs"));
65+
66+
public static final DefaultedRegistryReference<Tag<BlockType>> BUTTONS = BlockTypeTags.key(ResourceKey.minecraft("buttons"));
67+
68+
public static final DefaultedRegistryReference<Tag<BlockType>> CAMPFIRES = BlockTypeTags.key(ResourceKey.minecraft("campfires"));
69+
70+
public static final DefaultedRegistryReference<Tag<BlockType>> CARPETS = BlockTypeTags.key(ResourceKey.minecraft("carpets"));
71+
72+
public static final DefaultedRegistryReference<Tag<BlockType>> CLIMBABLE = BlockTypeTags.key(ResourceKey.minecraft("climbable"));
73+
74+
public static final DefaultedRegistryReference<Tag<BlockType>> CORAL_BLOCKS = BlockTypeTags.key(ResourceKey.minecraft("coral_blocks"));
75+
76+
public static final DefaultedRegistryReference<Tag<BlockType>> CORAL_PLANTS = BlockTypeTags.key(ResourceKey.minecraft("coral_plants"));
77+
78+
public static final DefaultedRegistryReference<Tag<BlockType>> CORALS = BlockTypeTags.key(ResourceKey.minecraft("corals"));
79+
80+
public static final DefaultedRegistryReference<Tag<BlockType>> CRIMSON_STEMS = BlockTypeTags.key(ResourceKey.minecraft("crimson_stems"));
81+
82+
public static final DefaultedRegistryReference<Tag<BlockType>> CROPS = BlockTypeTags.key(ResourceKey.minecraft("crops"));
83+
84+
public static final DefaultedRegistryReference<Tag<BlockType>> DARK_OAK_LOGS = BlockTypeTags.key(ResourceKey.minecraft("dark_oak_logs"));
85+
86+
public static final DefaultedRegistryReference<Tag<BlockType>> DOORS = BlockTypeTags.key(ResourceKey.minecraft("doors"));
87+
88+
public static final DefaultedRegistryReference<Tag<BlockType>> DRAGON_IMMUNE = BlockTypeTags.key(ResourceKey.minecraft("dragon_immune"));
89+
90+
public static final DefaultedRegistryReference<Tag<BlockType>> ENDERMAN_HOLDABLE = BlockTypeTags.key(ResourceKey.minecraft("enderman_holdable"));
91+
92+
public static final DefaultedRegistryReference<Tag<BlockType>> FENCE_GATES = BlockTypeTags.key(ResourceKey.minecraft("fence_gates"));
93+
94+
public static final DefaultedRegistryReference<Tag<BlockType>> FENCES = BlockTypeTags.key(ResourceKey.minecraft("fences"));
95+
96+
public static final DefaultedRegistryReference<Tag<BlockType>> FIRE = BlockTypeTags.key(ResourceKey.minecraft("fire"));
97+
98+
public static final DefaultedRegistryReference<Tag<BlockType>> FLOWER_POTS = BlockTypeTags.key(ResourceKey.minecraft("flower_pots"));
99+
100+
public static final DefaultedRegistryReference<Tag<BlockType>> FLOWERS = BlockTypeTags.key(ResourceKey.minecraft("flowers"));
101+
102+
public static final DefaultedRegistryReference<Tag<BlockType>> GOLD_ORES = BlockTypeTags.key(ResourceKey.minecraft("gold_ores"));
103+
104+
public static final DefaultedRegistryReference<Tag<BlockType>> GUARDED_BY_PIGLINS = BlockTypeTags.key(ResourceKey.minecraft("guarded_by_piglins"));
105+
106+
public static final DefaultedRegistryReference<Tag<BlockType>> HOGLIN_REPELLENTS = BlockTypeTags.key(ResourceKey.minecraft("hoglin_repellents"));
107+
108+
public static final DefaultedRegistryReference<Tag<BlockType>> ICE = BlockTypeTags.key(ResourceKey.minecraft("ice"));
109+
110+
public static final DefaultedRegistryReference<Tag<BlockType>> IMPERMEABLE = BlockTypeTags.key(ResourceKey.minecraft("impermeable"));
111+
112+
public static final DefaultedRegistryReference<Tag<BlockType>> INFINIBURN_END = BlockTypeTags.key(ResourceKey.minecraft("infiniburn_end"));
113+
114+
public static final DefaultedRegistryReference<Tag<BlockType>> INFINIBURN_NETHER = BlockTypeTags.key(ResourceKey.minecraft("infiniburn_nether"));
115+
116+
public static final DefaultedRegistryReference<Tag<BlockType>> INFINIBURN_OVERWORLD = BlockTypeTags.key(ResourceKey.minecraft("infiniburn_overworld"));
117+
118+
public static final DefaultedRegistryReference<Tag<BlockType>> JUNGLE_LOGS = BlockTypeTags.key(ResourceKey.minecraft("jungle_logs"));
119+
120+
public static final DefaultedRegistryReference<Tag<BlockType>> LEAVES = BlockTypeTags.key(ResourceKey.minecraft("leaves"));
121+
122+
public static final DefaultedRegistryReference<Tag<BlockType>> LOGS = BlockTypeTags.key(ResourceKey.minecraft("logs"));
123+
124+
public static final DefaultedRegistryReference<Tag<BlockType>> LOGS_THAT_BURN = BlockTypeTags.key(ResourceKey.minecraft("logs_that_burn"));
125+
126+
public static final DefaultedRegistryReference<Tag<BlockType>> MUSHROOM_GROW_BLOCK = BlockTypeTags.key(ResourceKey.minecraft("mushroom_grow_block"));
127+
128+
public static final DefaultedRegistryReference<Tag<BlockType>> NON_FLAMMABLE_WOOD = BlockTypeTags.key(ResourceKey.minecraft("non_flammable_wood"));
129+
130+
public static final DefaultedRegistryReference<Tag<BlockType>> NYLIUM = BlockTypeTags.key(ResourceKey.minecraft("nylium"));
131+
132+
public static final DefaultedRegistryReference<Tag<BlockType>> OAK_LOGS = BlockTypeTags.key(ResourceKey.minecraft("oak_logs"));
133+
134+
public static final DefaultedRegistryReference<Tag<BlockType>> PIGLIN_REPELLENTS = BlockTypeTags.key(ResourceKey.minecraft("piglin_repellents"));
135+
136+
public static final DefaultedRegistryReference<Tag<BlockType>> PLANKS = BlockTypeTags.key(ResourceKey.minecraft("planks"));
137+
138+
public static final DefaultedRegistryReference<Tag<BlockType>> PORTALS = BlockTypeTags.key(ResourceKey.minecraft("portals"));
139+
140+
public static final DefaultedRegistryReference<Tag<BlockType>> PRESSURE_PLATES = BlockTypeTags.key(ResourceKey.minecraft("pressure_plates"));
141+
142+
public static final DefaultedRegistryReference<Tag<BlockType>> PREVENT_MOB_SPAWNING_INSIDE = BlockTypeTags.key(ResourceKey.minecraft("prevent_mob_spawning_inside"));
143+
144+
public static final DefaultedRegistryReference<Tag<BlockType>> RAILS = BlockTypeTags.key(ResourceKey.minecraft("rails"));
145+
146+
public static final DefaultedRegistryReference<Tag<BlockType>> SAND = BlockTypeTags.key(ResourceKey.minecraft("sand"));
147+
148+
public static final DefaultedRegistryReference<Tag<BlockType>> SAPLINGS = BlockTypeTags.key(ResourceKey.minecraft("saplings"));
149+
150+
public static final DefaultedRegistryReference<Tag<BlockType>> SHULKER_BOXES = BlockTypeTags.key(ResourceKey.minecraft("shulker_boxes"));
151+
152+
public static final DefaultedRegistryReference<Tag<BlockType>> SIGNS = BlockTypeTags.key(ResourceKey.minecraft("signs"));
153+
154+
public static final DefaultedRegistryReference<Tag<BlockType>> SLABS = BlockTypeTags.key(ResourceKey.minecraft("slabs"));
155+
156+
public static final DefaultedRegistryReference<Tag<BlockType>> SMALL_FLOWERS = BlockTypeTags.key(ResourceKey.minecraft("small_flowers"));
157+
158+
public static final DefaultedRegistryReference<Tag<BlockType>> SOUL_FIRE_BASE_BLOCKS = BlockTypeTags.key(ResourceKey.minecraft("soul_fire_base_blocks"));
159+
160+
public static final DefaultedRegistryReference<Tag<BlockType>> SOUL_SPEED_BLOCKS = BlockTypeTags.key(ResourceKey.minecraft("soul_speed_blocks"));
161+
162+
public static final DefaultedRegistryReference<Tag<BlockType>> SPRUCE_LOGS = BlockTypeTags.key(ResourceKey.minecraft("spruce_logs"));
163+
164+
public static final DefaultedRegistryReference<Tag<BlockType>> STAIRS = BlockTypeTags.key(ResourceKey.minecraft("stairs"));
165+
166+
public static final DefaultedRegistryReference<Tag<BlockType>> STANDING_SIGNS = BlockTypeTags.key(ResourceKey.minecraft("standing_signs"));
167+
168+
public static final DefaultedRegistryReference<Tag<BlockType>> STONE_BRICKS = BlockTypeTags.key(ResourceKey.minecraft("stone_bricks"));
169+
170+
public static final DefaultedRegistryReference<Tag<BlockType>> STONE_PRESSURE_PLATES = BlockTypeTags.key(ResourceKey.minecraft("stone_pressure_plates"));
171+
172+
public static final DefaultedRegistryReference<Tag<BlockType>> STRIDER_WARM_BLOCKS = BlockTypeTags.key(ResourceKey.minecraft("strider_warm_blocks"));
173+
174+
public static final DefaultedRegistryReference<Tag<BlockType>> TALL_FLOWERS = BlockTypeTags.key(ResourceKey.minecraft("tall_flowers"));
175+
176+
public static final DefaultedRegistryReference<Tag<BlockType>> TRAPDOORS = BlockTypeTags.key(ResourceKey.minecraft("trapdoors"));
177+
178+
public static final DefaultedRegistryReference<Tag<BlockType>> UNDERWATER_BONEMEALS = BlockTypeTags.key(ResourceKey.minecraft("underwater_bonemeals"));
179+
180+
public static final DefaultedRegistryReference<Tag<BlockType>> UNSTABLE_BOTTOM_CENTER = BlockTypeTags.key(ResourceKey.minecraft("unstable_bottom_center"));
181+
182+
public static final DefaultedRegistryReference<Tag<BlockType>> VALID_SPAWN = BlockTypeTags.key(ResourceKey.minecraft("valid_spawn"));
183+
184+
public static final DefaultedRegistryReference<Tag<BlockType>> WALL_CORALS = BlockTypeTags.key(ResourceKey.minecraft("wall_corals"));
185+
186+
public static final DefaultedRegistryReference<Tag<BlockType>> WALL_POST_OVERRIDE = BlockTypeTags.key(ResourceKey.minecraft("wall_post_override"));
187+
188+
public static final DefaultedRegistryReference<Tag<BlockType>> WALL_SIGNS = BlockTypeTags.key(ResourceKey.minecraft("wall_signs"));
189+
190+
public static final DefaultedRegistryReference<Tag<BlockType>> WALLS = BlockTypeTags.key(ResourceKey.minecraft("walls"));
191+
192+
public static final DefaultedRegistryReference<Tag<BlockType>> WARPED_STEMS = BlockTypeTags.key(ResourceKey.minecraft("warped_stems"));
193+
194+
public static final DefaultedRegistryReference<Tag<BlockType>> WART_BLOCKS = BlockTypeTags.key(ResourceKey.minecraft("wart_blocks"));
195+
196+
public static final DefaultedRegistryReference<Tag<BlockType>> WITHER_IMMUNE = BlockTypeTags.key(ResourceKey.minecraft("wither_immune"));
197+
198+
public static final DefaultedRegistryReference<Tag<BlockType>> WITHER_SUMMON_BASE_BLOCKS = BlockTypeTags.key(ResourceKey.minecraft("wither_summon_base_blocks"));
199+
200+
public static final DefaultedRegistryReference<Tag<BlockType>> WOODEN_BUTTONS = BlockTypeTags.key(ResourceKey.minecraft("wooden_buttons"));
201+
202+
public static final DefaultedRegistryReference<Tag<BlockType>> WOODEN_DOORS = BlockTypeTags.key(ResourceKey.minecraft("wooden_doors"));
203+
204+
public static final DefaultedRegistryReference<Tag<BlockType>> WOODEN_FENCES = BlockTypeTags.key(ResourceKey.minecraft("wooden_fences"));
205+
206+
public static final DefaultedRegistryReference<Tag<BlockType>> WOODEN_PRESSURE_PLATES = BlockTypeTags.key(ResourceKey.minecraft("wooden_pressure_plates"));
207+
208+
public static final DefaultedRegistryReference<Tag<BlockType>> WOODEN_SLABS = BlockTypeTags.key(ResourceKey.minecraft("wooden_slabs"));
209+
210+
public static final DefaultedRegistryReference<Tag<BlockType>> WOODEN_STAIRS = BlockTypeTags.key(ResourceKey.minecraft("wooden_stairs"));
211+
212+
public static final DefaultedRegistryReference<Tag<BlockType>> WOODEN_TRAPDOORS = BlockTypeTags.key(ResourceKey.minecraft("wooden_trapdoors"));
213+
214+
public static final DefaultedRegistryReference<Tag<BlockType>> WOOL = BlockTypeTags.key(ResourceKey.minecraft("wool"));
215+
216+
// @formatter:on
217+
private BlockTypeTags() {
218+
}
219+
220+
private static DefaultedRegistryReference<Tag<BlockType>> key(final ResourceKey location) {
221+
return RegistryKey.of(RegistryTypes.BLOCK_TYPE_TAGS, location).asDefaultedReference(() -> Sponge.game().registries());
222+
}
223+
}

0 commit comments

Comments
 (0)