Skip to content

Commit a6dfeaf

Browse files
committed
fix[datagen]: 生成杜鹃树类物品 model bs tag
1 parent 0358fc3 commit a6dfeaf

File tree

9 files changed

+210
-34
lines changed

9 files changed

+210
-34
lines changed

src/main/java/org/polaris2023/wild_wind/common/init/ModBlocks.java

+51-3
Original file line numberDiff line numberDiff line change
@@ -99,14 +99,14 @@ public class ModBlocks {
9999
public static final DeferredItem<BlockItem> BRITTLE_ICE_ITEM =
100100
register("brittle_ice", BRITTLE_ICE);
101101

102-
@I18n(en_us = "wood", zh_cn = "羊毛", zh_tw = "羊毛")
103-
public static final DeferredBlock<Block> WOOD = register("wood", BlockBehaviour.Properties.of()
102+
@I18n(en_us = "wool", zh_cn = "羊毛", zh_tw = "羊毛")
103+
public static final DeferredBlock<Block> WOOL = register("wool", BlockBehaviour.Properties.of()
104104
.instrument(NoteBlockInstrument.GUITAR)
105105
.strength(0.8F)
106106
.sound(SoundType.WOOL)
107107
.ignitedByLava());
108108
@BasicBlockItem
109-
public static final DeferredItem<BlockItem> WOOL_ITEM = register("wood", WOOD);
109+
public static final DeferredItem<BlockItem> WOOL_ITEM = register("wool", WOOL);
110110

111111
@I18n(en_us = "carpet", zh_cn = "地毯", zh_tw = "地毯")
112112
public static final DeferredBlock<CarpetBlock> CARPET =
@@ -175,6 +175,30 @@ public class ModBlocks {
175175
@I18n(en_us = "Azalea Planks", zh_cn = "杜鹃木木板", zh_tw = "杜鵑木材")
176176
public static final DeferredBlock<Block> AZALEA_PLANKS =
177177
register("azalea_planks", Block::new, BlockBehaviour.Properties.ofFullCopy(Blocks.MANGROVE_PLANKS));
178+
@I18n(en_us = "Azalea Button", zh_cn = "杜鹃木按钮", zh_tw = "杜鵑木按鈕")
179+
public static final DeferredBlock<ButtonBlock> AZALEA_BUTTON =
180+
register("azalea_button", props -> new ButtonBlock(ModBlockSetTypes.AZALEA, 30, props), BlockBehaviour.Properties.ofFullCopy(Blocks.MANGROVE_BUTTON));
181+
@I18n(en_us = "Azalea Fence", zh_cn = "杜鹃木栅栏", zh_tw = "杜鵑木柵欄")
182+
public static final DeferredBlock<FenceBlock> AZALEA_FENCE =
183+
register("azalea_fence", FenceBlock::new, BlockBehaviour.Properties.ofFullCopy(Blocks.MANGROVE_FENCE));
184+
@I18n(en_us = "Azalea Fence Gate", zh_cn = "杜鹃木栅栏门", zh_tw = "杜鵑木柵欄門")
185+
public static final DeferredBlock<FenceGateBlock> AZALEA_FENCE_GATE =
186+
register("azalea_fence_gate", props -> new FenceGateBlock(ModWoodTypes.AZALEA, props), BlockBehaviour.Properties.ofFullCopy(Blocks.MANGROVE_FENCE_GATE));
187+
@I18n(en_us = "Azalea Pressure Plate", zh_cn = "杜鹃木压力板", zh_tw = "杜鵑木压力板")
188+
public static final DeferredBlock<PressurePlateBlock> AZALEA_PRESSURE_PLATE =
189+
register("azalea_pressure_plate", props -> new PressurePlateBlock(ModBlockSetTypes.AZALEA, props), BlockBehaviour.Properties.ofFullCopy(Blocks.MANGROVE_PRESSURE_PLATE));
190+
@I18n(en_us = "Azalea Slab", zh_cn = "杜鹃木台阶", zh_tw = "杜鵑木半磚")
191+
public static final DeferredBlock<SlabBlock> AZALEA_SLAB =
192+
register("azalea_slab", SlabBlock::new, BlockBehaviour.Properties.ofFullCopy(Blocks.MANGROVE_SLAB));
193+
@I18n(en_us = "Azalea Stairs", zh_cn = "杜鹃木楼梯", zh_tw = "杜鵑木樓梯")
194+
public static final DeferredBlock<StairBlock> AZALEA_STAIRS =
195+
register("azalea_stairs", props -> new StairBlock(AZALEA_PLANKS.get().defaultBlockState(), props), BlockBehaviour.Properties.ofFullCopy(Blocks.MANGROVE_STAIRS));
196+
@I18n(en_us = "Azalea Door", zh_cn = "杜鹃木门", zh_tw = "杜鵑木門")
197+
public static final DeferredBlock<DoorBlock> AZALEA_DOOR =
198+
register("azalea_door", props -> new DoorBlock(ModBlockSetTypes.AZALEA, props), BlockBehaviour.Properties.ofFullCopy(Blocks.MANGROVE_DOOR));
199+
@I18n(en_us = "Azalea Door", zh_cn = "杜鹃木活板门", zh_tw = "杜鵑木地板門")
200+
public static final DeferredBlock<TrapDoorBlock> AZALEA_TRAPDOOR =
201+
register("azalea_trapdoor", props -> new TrapDoorBlock(ModBlockSetTypes.AZALEA, props), BlockBehaviour.Properties.ofFullCopy(Blocks.MANGROVE_TRAPDOOR));
178202
@I18n(en_us = "Azalea Sign", zh_cn = "杜鹃木告示牌", zh_tw = "杜鵑木告示牌")
179203
public static final DeferredBlock<StandingSignBlock> AZALEA_SIGN =
180204
register("azalea_sign", props -> new StandingSignBlock(ModWoodTypes.AZALEA, props), BlockBehaviour.Properties.ofFullCopy(Blocks.MANGROVE_SIGN));
@@ -204,6 +228,30 @@ public class ModBlocks {
204228
public static final DeferredItem<BlockItem> AZALEA_PLANKS_ITEM =
205229
register("azalea_planks", AZALEA_PLANKS);
206230
@BasicBlockItem
231+
public static final DeferredItem<BlockItem> AZALEA_BUTTON_ITEM =
232+
register("azalea_button", AZALEA_BUTTON);
233+
@BasicBlockItem
234+
public static final DeferredItem<BlockItem> AZALEA_FENCE_ITEM =
235+
register("azalea_fence", AZALEA_FENCE);
236+
@BasicBlockItem
237+
public static final DeferredItem<BlockItem> AZALEA_FENCE_GATE_ITEM =
238+
register("azalea_fence_gate", AZALEA_FENCE_GATE);
239+
@BasicBlockItem
240+
public static final DeferredItem<BlockItem> AZALEA_PRESSURE_PLATE_ITEM =
241+
register("azalea_pressure_plate", AZALEA_PRESSURE_PLATE);
242+
@BasicBlockItem
243+
public static final DeferredItem<BlockItem> AZALEA_SLAB_ITEM =
244+
register("azalea_slab", AZALEA_SLAB);
245+
@BasicBlockItem
246+
public static final DeferredItem<BlockItem> AZALEA_STAIRS_ITEM =
247+
register("azalea_stairs", AZALEA_STAIRS);
248+
@BasicBlockItem
249+
public static final DeferredItem<BlockItem> AZALEA_DOOR_ITEM =
250+
register("azalea_door", AZALEA_DOOR);
251+
@BasicBlockItem
252+
public static final DeferredItem<BlockItem> AZALEA_TRAPDOOR_ITEM =
253+
register("azalea_trapdoor", AZALEA_TRAPDOOR);
254+
@BasicBlockItem
207255
public static final DeferredItem<SignItem> AZALEA_SIGN_ITEM =
208256
registerSign("azalea_sign", AZALEA_SIGN, AZALEA_WALL_SIGN);
209257
@BasicBlockItem
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
package org.polaris2023.wild_wind.datagen;
2+
3+
import net.minecraft.world.level.block.*;
4+
import org.polaris2023.wild_wind.common.init.ModBlocks;
5+
6+
public class ModBlockFamilies {
7+
public static final ModBlockFamily AZALEA_PLANKS = family(
8+
ModBlocks.AZALEA_PLANKS.get(), ModBlocks.AZALEA_BUTTON.get(), ModBlocks.AZALEA_FENCE.get(), ModBlocks.AZALEA_FENCE_GATE.get(), ModBlocks.AZALEA_PRESSURE_PLATE.get(),
9+
ModBlocks.AZALEA_SIGN.get(), ModBlocks.AZALEA_WALL_SIGN.get(), ModBlocks.AZALEA_HANGING_SIGN.get(), ModBlocks.AZALEA_WALL_HANGING_SIGN.get(),
10+
ModBlocks.AZALEA_SLAB.get(), ModBlocks.AZALEA_STAIRS.get(), ModBlocks.AZALEA_DOOR.get(), ModBlocks.AZALEA_TRAPDOOR.get(), "wooden","has_planks");
11+
12+
public static ModBlockFamily family(Block baseBlock, ButtonBlock button, FenceBlock fence, FenceGateBlock fenceGate, PressurePlateBlock pressurePlate,
13+
StandingSignBlock standingSign, WallSignBlock wallSign, CeilingHangingSignBlock ceilingHangingSign, WallHangingSignBlock wallHangingSign,
14+
SlabBlock slab, StairBlock stair, DoorBlock door, TrapDoorBlock trapdoor, String recipeGroupPrefix, String recipeUnlockedBy) {
15+
return new ModBlockFamily(baseBlock, button, fence, fenceGate, pressurePlate, standingSign, wallSign, ceilingHangingSign, wallHangingSign, slab, stair, door, trapdoor, recipeGroupPrefix, recipeUnlockedBy);
16+
}
17+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
package org.polaris2023.wild_wind.datagen;
2+
3+
import net.minecraft.data.tags.IntrinsicHolderTagsProvider;
4+
import net.minecraft.resources.ResourceLocation;
5+
import net.minecraft.tags.BlockTags;
6+
import net.minecraft.tags.ItemTags;
7+
import net.minecraft.tags.TagKey;
8+
import net.minecraft.world.item.Item;
9+
import net.minecraft.world.level.block.*;
10+
import net.neoforged.neoforge.client.model.generators.BlockStateProvider;
11+
import org.polaris2023.wild_wind.util.Helpers;
12+
13+
import java.util.function.Consumer;
14+
import java.util.function.Function;
15+
16+
public record ModBlockFamily(Block baseBlock, ButtonBlock button, FenceBlock fence, FenceGateBlock fenceGate,
17+
PressurePlateBlock pressurePlate, StandingSignBlock standingSign, WallSignBlock wallSign,
18+
CeilingHangingSignBlock ceilingHangingSign, WallHangingSignBlock wallHangingSign,
19+
SlabBlock slab, StairBlock stair, DoorBlock door, TrapDoorBlock trapdoor,
20+
String recipeGroupPrefix, String recipeUnlockedBy) {
21+
public void registerStatesAndModels(BlockStateProvider provider, String name) {
22+
ResourceLocation planks = Helpers.location("block/" + name + "_planks");
23+
ResourceLocation log = Helpers.location("block/" + name + "_log");
24+
provider.buttonBlock(this.button, planks);
25+
provider.fenceBlock(this.fence, planks);
26+
provider.fenceGateBlock(this.fenceGate, planks);
27+
provider.pressurePlateBlock(this.pressurePlate, planks);
28+
provider.signBlock(this.standingSign, this.wallSign, planks);
29+
provider.hangingSignBlock(this.ceilingHangingSign, this.wallHangingSign, log);
30+
provider.slabBlock(this.slab, planks, planks);
31+
provider.stairsBlock(this.stair, planks);
32+
provider.doorBlock(this.door, Helpers.location("block/" + name + "_door_bottom"), Helpers.location("block/" + name + "_door_top"));
33+
provider.trapdoorBlock(this.trapdoor, Helpers.location("block/" + name + "_trapdoor"), true);
34+
}
35+
36+
public void generateBlockLoot(Consumer<Block> dropSelf) {
37+
dropSelf.accept(this.button);
38+
dropSelf.accept(this.fence);
39+
dropSelf.accept(this.fenceGate);
40+
dropSelf.accept(this.pressurePlate);
41+
dropSelf.accept(this.standingSign);
42+
dropSelf.accept(this.wallSign);
43+
dropSelf.accept(this.ceilingHangingSign);
44+
dropSelf.accept(this.wallHangingSign);
45+
dropSelf.accept(this.slab);
46+
dropSelf.accept(this.stair);
47+
dropSelf.accept(this.door);
48+
dropSelf.accept(this.trapdoor);
49+
}
50+
51+
public void generateBlockTags(Function<TagKey<Block>, IntrinsicHolderTagsProvider.IntrinsicTagAppender<Block>> tag) {
52+
tag.apply(BlockTags.WOODEN_BUTTONS).add(this.button);
53+
tag.apply(BlockTags.WOODEN_FENCES).add(this.fence);
54+
tag.apply(BlockTags.FENCE_GATES).add(this.fenceGate);
55+
tag.apply(BlockTags.WOODEN_PRESSURE_PLATES).add(this.pressurePlate);
56+
tag.apply(BlockTags.STANDING_SIGNS).add(this.standingSign);
57+
tag.apply(BlockTags.WALL_SIGNS).add(this.wallSign);
58+
tag.apply(BlockTags.CEILING_HANGING_SIGNS).add(this.ceilingHangingSign);
59+
tag.apply(BlockTags.WALL_HANGING_SIGNS).add(this.wallHangingSign);
60+
tag.apply(BlockTags.WOODEN_SLABS).add(this.slab);
61+
tag.apply(BlockTags.WOODEN_STAIRS).add(this.stair);
62+
tag.apply(BlockTags.WOODEN_DOORS).add(this.door);
63+
tag.apply(BlockTags.WOODEN_TRAPDOORS).add(this.trapdoor);
64+
}
65+
public void generateItemTags(Function<TagKey<Item>, IntrinsicHolderTagsProvider.IntrinsicTagAppender<Item>> tag) {
66+
tag.apply(ItemTags.WOODEN_BUTTONS).add(this.button.asItem());
67+
tag.apply(ItemTags.WOODEN_FENCES).add(this.fence.asItem());
68+
tag.apply(ItemTags.FENCE_GATES).add(this.fenceGate.asItem());
69+
tag.apply(ItemTags.WOODEN_PRESSURE_PLATES).add(this.pressurePlate.asItem());
70+
tag.apply(ItemTags.SIGNS).add(this.standingSign.asItem(), this.wallSign.asItem());
71+
tag.apply(ItemTags.HANGING_SIGNS).add(this.ceilingHangingSign.asItem(), this.wallHangingSign.asItem());
72+
tag.apply(ItemTags.WOODEN_SLABS).add(this.slab.asItem());
73+
tag.apply(ItemTags.WOODEN_STAIRS).add(this.stair.asItem());
74+
tag.apply(ItemTags.WOODEN_DOORS).add(this.door.asItem());
75+
tag.apply(ItemTags.WOODEN_TRAPDOORS).add(this.trapdoor.asItem());
76+
}
77+
}

src/main/java/org/polaris2023/wild_wind/datagen/ModBlockStateProvider.java

+53-22
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import net.minecraft.core.Direction;
44
import net.minecraft.data.PackOutput;
55
import net.minecraft.resources.ResourceLocation;
6+
import net.minecraft.world.level.block.state.properties.BlockStateProperties;
67
import net.neoforged.neoforge.client.model.generators.*;
78
import net.neoforged.neoforge.common.data.ExistingFileHelper;
89
import org.polaris2023.wild_wind.WildWindMod;
@@ -32,15 +33,6 @@ public ModBlockStateProvider(PackOutput output, ExistingFileHelper exFileHelper)
3233
Helpers.location("block/brittle_ice_2"),
3334
Helpers.location("block/brittle_ice_3")
3435
};
35-
public static final ResourceLocation[] WOOD = new ResourceLocation[] {
36-
Helpers.location("block/wood")
37-
};
38-
public static final ResourceLocation[] CONCRETE = new ResourceLocation[] {
39-
Helpers.location("block/concrete")
40-
};
41-
public static final ResourceLocation[] GLAZED_TERRACOTTA = new ResourceLocation[] {
42-
Helpers.location("block/glazed_terracotta")
43-
};
4436

4537
@Override
4638
protected void registerStatesAndModels() {
@@ -79,30 +71,34 @@ protected void registerStatesAndModels() {
7971
}
8072
}
8173

82-
// Wood
83-
BlockModelBuilder woodModel = models().cubeAll("wood", WOOD[0]);
84-
simpleBlock(ModBlocks.WOOD.get(), woodModel);
74+
// Logs
75+
logModel(getVariantBuilder(ModBlocks.AZALEA_LOG.get()), "azalea");
76+
logModel(getVariantBuilder(ModBlocks.STRIPPED_AZALEA_LOG.get()), "stripped_azalea");
77+
woodModel(getVariantBuilder(ModBlocks.AZALEA_WOOD.get()), "azalea");
78+
woodModel(getVariantBuilder(ModBlocks.STRIPPED_AZALEA_WOOD.get()), "stripped_azalea");
79+
simpleBlock(ModBlocks.AZALEA_PLANKS.get(), models().cubeAll("azalea_planks", Helpers.location("block/azalea_planks")));
80+
ModBlockFamilies.AZALEA_PLANKS.registerStatesAndModels(this, "azalea");
81+
82+
// Wool
83+
simpleBlock(ModBlocks.WOOL.get(), models().cubeAll("wool", Helpers.location("block/wool")));
8584

86-
//Carpet
87-
BlockModelBuilder carpetModel = models().carpet("carpet", WOOD[0]);
88-
simpleBlock(ModBlocks.CARPET.get(), carpetModel);
85+
// Carpet
86+
simpleBlock(ModBlocks.CARPET.get(), models().carpet("carpet", Helpers.location("block/wool")));
8987

90-
//Concrete
91-
BlockModelBuilder concreteModel = models().cubeAll("concrete", CONCRETE[0]);
92-
simpleBlock(ModBlocks.CONCRETE.get(), concreteModel);
88+
// Concrete
89+
simpleBlock(ModBlocks.CONCRETE.get(), models().cubeAll("concrete", Helpers.location("block/concrete")));
9390

9491
// Glazed Terracotta
9592
VariantBlockStateBuilder glazedTerracottaStates = getVariantBuilder(ModBlocks.GLAZED_TERRACOTTA.get());
9693
for (Direction facing : Direction.Plane.HORIZONTAL) {
9794
int yRotation = switch (facing) {
9895
case EAST -> 270;
9996
case NORTH -> 180;
100-
case SOUTH -> 0;
101-
case WEST -> 90;
97+
case WEST -> 90;
10298
default -> 0;
10399
};
104-
glazedTerracottaStates.partialState().with(net.minecraft.world.level.block.state.properties.BlockStateProperties.HORIZONTAL_FACING, facing)
105-
.addModels(new ConfiguredModel(models().cubeAll("glazed_terracotta", GLAZED_TERRACOTTA[0]), 0, yRotation, false));
100+
glazedTerracottaStates.partialState().with(BlockStateProperties.HORIZONTAL_FACING, facing)
101+
.addModels(new ConfiguredModel(models().cubeAll("glazed_terracotta", Helpers.location("block/glazed_terracotta")), 0, yRotation, false));
106102
}
107103
}
108104

@@ -122,4 +118,39 @@ private void brittleIceModel(VariantBlockStateBuilder brittleIceStates, int age,
122118
new ConfiguredModel(models().getExistingFile(BRITTLE_ICES[age]))
123119
);
124120
}
121+
122+
private void logModel(VariantBlockStateBuilder woodStates, String name) {
123+
ResourceLocation side = Helpers.location("block/" + name + "_log");
124+
ResourceLocation top = Helpers.location("block/" + name + "_log_top");
125+
woodStates.addModels(
126+
woodStates.partialState().with(BlockStateProperties.AXIS, Direction.Axis.Y),
127+
new ConfiguredModel(models().cubeColumn(name + "_log", side, top))
128+
);
129+
BlockModelBuilder azaleaLogHorizontal = models().cubeColumnHorizontal(name + "_log_horizontal", side, top);
130+
woodStates.addModels(
131+
woodStates.partialState().with(BlockStateProperties.AXIS, Direction.Axis.X),
132+
new ConfiguredModel(azaleaLogHorizontal, 90, 90, false)
133+
);
134+
woodStates.addModels(
135+
woodStates.partialState().with(BlockStateProperties.AXIS, Direction.Axis.Z),
136+
new ConfiguredModel(azaleaLogHorizontal, 90, 0, false)
137+
);
138+
}
139+
140+
private void woodModel(VariantBlockStateBuilder woodStates, String name) {
141+
ResourceLocation side = Helpers.location("block/" + name + "_log");
142+
woodStates.addModels(
143+
woodStates.partialState().with(BlockStateProperties.AXIS, Direction.Axis.Y),
144+
new ConfiguredModel(models().cubeColumn(name + "_wood", side, side))
145+
);
146+
BlockModelBuilder azaleaLogHorizontal = models().cubeColumnHorizontal(name + "_wood_horizontal", side, side);
147+
woodStates.addModels(
148+
woodStates.partialState().with(BlockStateProperties.AXIS, Direction.Axis.X),
149+
new ConfiguredModel(azaleaLogHorizontal, 90, 90, false)
150+
);
151+
woodStates.addModels(
152+
woodStates.partialState().with(BlockStateProperties.AXIS, Direction.Axis.Z),
153+
new ConfiguredModel(azaleaLogHorizontal, 90, 0, false)
154+
);
155+
}
125156
}

src/main/java/org/polaris2023/wild_wind/datagen/ModRecipeProvider.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -113,25 +113,25 @@ protected void addShapedRecipe() {
113113
.define('C', ItemTags.COALS);
114114
}));
115115

116-
add(shaped(RecipeCategory.MISC, ModBlocks.WOOD.get(), 1,
116+
add(shaped(RecipeCategory.MISC, ModBlocks.WOOL.get(), 1,
117117
builder -> {
118118
unlockedBy(builder, Items.STRING);
119119
builder
120120
.pattern("SS ")
121121
.pattern("SS ")
122122
.pattern(" ")
123-
.group("wood")
123+
.group("wool")
124124
.define('S', Items.STRING);
125125
}));
126126
add(shaped(RecipeCategory.MISC, ModBlocks.CARPET.get(), 1,
127127
builder -> {
128-
unlockedBy(builder, ModBlocks.WOOD.get());
128+
unlockedBy(builder, ModBlocks.WOOL.get());
129129
builder
130130
.pattern("SS ")
131131
.pattern(" ")
132132
.pattern(" ")
133133
.group("carpet")
134-
.define('S', ModBlocks.WOOD.get());
134+
.define('S', ModBlocks.WOOL.get());
135135
}));
136136
}
137137

src/main/java/org/polaris2023/wild_wind/datagen/loot/ModBlockLootSubProvider.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import org.polaris2023.wild_wind.common.init.ModBlocks;
1010
import org.polaris2023.wild_wind.common.init.ModInitializer;
1111
import org.polaris2023.wild_wind.common.init.ModItems;
12+
import org.polaris2023.wild_wind.datagen.ModBlockFamilies;
1213

1314
import java.util.Set;
1415

@@ -33,7 +34,7 @@ public void generate() {
3334
this.dropSelf(ModBlocks.CATTAILS.get());
3435
this.dropSelf(ModBlocks.COOKING_POT.get());
3536
this.dropWhenSilkTouch(ModBlocks.BRITTLE_ICE.get());
36-
this.dropSelf(ModBlocks.WOOD.get());
37+
this.dropSelf(ModBlocks.WOOL.get());
3738
this.dropSelf(ModBlocks.CARPET.get());
3839
this.dropSelf(ModBlocks.CONCRETE.get());
3940
this.dropSelf(ModBlocks.GLAZED_TERRACOTTA.get());
@@ -47,5 +48,6 @@ public void generate() {
4748
this.dropSelf(ModBlocks.AZALEA_PLANKS.get());
4849
this.dropSelf(ModBlocks.AZALEA_SIGN.get());
4950
this.dropSelf(ModBlocks.AZALEA_HANGING_SIGN.get());
51+
ModBlockFamilies.AZALEA_PLANKS.generateBlockLoot(this::dropSelf);
5052
}
5153
}

src/main/java/org/polaris2023/wild_wind/datagen/tag/ModBlockTagsProvider.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,12 @@
88
import net.minecraft.world.level.block.Blocks;
99
import net.neoforged.neoforge.common.data.BlockTagsProvider;
1010
import net.neoforged.neoforge.common.data.ExistingFileHelper;
11-
import net.neoforged.neoforge.registries.DeferredBlock;
1211
import org.jetbrains.annotations.Nullable;
1312
import org.polaris2023.wild_wind.WildWindMod;
1413
import org.polaris2023.wild_wind.common.init.ModBlocks;
1514
import org.polaris2023.wild_wind.common.init.tags.ModBlockTags;
15+
import org.polaris2023.wild_wind.datagen.ModBlockFamilies;
1616

17-
import java.util.Arrays;
1817
import java.util.concurrent.CompletableFuture;
1918
import java.util.function.Supplier;
2019

@@ -41,6 +40,8 @@ protected void addTags(HolderLookup.Provider provider) {
4140
tag(BlockTags.MINEABLE_WITH_PICKAXE).add(ModBlocks.BRITTLE_ICE.get(), ModBlocks.SALT_ORE.get());
4241
tag(ModBlockTags.AZALEA_LOGS).add(ModBlocks.AZALEA_LOG.get(), ModBlocks.AZALEA_WOOD.get(), ModBlocks.STRIPPED_AZALEA_LOG.get(), ModBlocks.STRIPPED_AZALEA_WOOD.get());
4342
tag(BlockTags.LOGS_THAT_BURN).addTag(ModBlockTags.AZALEA_LOGS.get());
43+
tag(BlockTags.PLANKS).add(ModBlocks.AZALEA_PLANKS.get());
44+
ModBlockFamilies.AZALEA_PLANKS.generateBlockTags(this::tag);
4445
}
4546

4647

0 commit comments

Comments
 (0)