Skip to content

Commit 7fa5d90

Browse files
Merge pull request #78 from Polaris-Bears-MC/dev/Viola-Siemens
杜鹃 datagen + blockfamily 轮子
2 parents db92e8b + 42130b2 commit 7fa5d90

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+211
-62
lines changed

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

+55-30
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
import com.mojang.datafixers.types.Type;
55
import net.minecraft.util.valueproviders.UniformInt;
66
import net.minecraft.world.item.BlockItem;
7-
import net.minecraft.world.item.Item;
8-
import net.minecraft.world.item.Items;
97
import net.minecraft.world.item.HangingSignItem;
108
import net.minecraft.world.item.SignItem;
119
import net.minecraft.world.level.block.*;
@@ -22,12 +20,11 @@
2220

2321
import org.polaris2023.annotation.modelgen.item.BasicBlockItem;
2422
import org.polaris2023.annotation.modelgen.item.BasicItem;
25-
import org.polaris2023.wild_wind.common.block.*;
23+
import org.polaris2023.wild_wind.common.block.BrittleIceBlock;
2624

25+
import org.polaris2023.wild_wind.common.block.CookingPotBlock;
26+
import org.polaris2023.wild_wind.common.block.GlowMucusBlock;
2727
import org.polaris2023.wild_wind.common.block.entity.CookingPotBlockEntity;
28-
import org.polaris2023.wild_wind.common.block.entity.DuckweedBlockEntity;
29-
import org.polaris2023.wild_wind.common.block.entity.WoolBlockEntity;
30-
import org.polaris2023.wild_wind.common.block.item.WoolBlockItem;
3128

3229
import java.util.Arrays;
3330

@@ -94,42 +91,22 @@ public class ModBlocks {
9491
public static final DeferredItem<BlockItem> COOKING_POT_ITEM =
9592
register("cooking_pot", COOKING_POT);
9693

97-
@I18n(en_us = "Duckweed", zh_cn = "浮萍", zh_tw = "浮萍")
98-
public static final DeferredBlock<DuckweedBlock> DUCKWEED =
99-
register("duckweed", DuckweedBlock::new, BlockBehaviour.Properties.of());
100-
public static final DeferredHolder<BlockEntityType<?>, BlockEntityType<DuckweedBlockEntity>> DUCKWEED_TILE =
101-
entity("duckweed", DSL.remainderType(), DuckweedBlockEntity::new, DUCKWEED);
102-
public static final DeferredItem<BlockItem> DUCKWEED_ITEM =
103-
register("duckweed", DUCKWEED);
104-
105-
@I18n(en_us = "Sculk Jaw", zh_cn = "幽匿厄口", zh_tw = "幽匿厄口")
106-
public static final DeferredBlock<SculkJawBlock> SCULK_JAW =
107-
register("sculk_jaw", SculkJawBlock::new, BlockBehaviour.Properties.of());
108-
public static final DeferredItem<BlockItem> SCULK_JAW_ITEM =
109-
register("sculk_jaw", SCULK_JAW);
110-
111-
11294
@I18n(en_us = "Brittle Ice", zh_cn = "脆冰", zh_tw = "脆冰")
11395
public static final DeferredBlock<BrittleIceBlock> BRITTLE_ICE =
11496
register("brittle_ice", BrittleIceBlock::new, BlockBehaviour.Properties.ofFullCopy(Blocks.ICE)
11597
.strength(0.1F).isValidSpawn(Blocks::never).pushReaction(PushReaction.DESTROY));
11698
@BasicBlockItem
11799
public static final DeferredItem<BlockItem> BRITTLE_ICE_ITEM =
118100
register("brittle_ice", BRITTLE_ICE);
119-
101+
120102
@I18n(en_us = "wool", zh_cn = "羊毛", zh_tw = "羊毛")
121-
public static final DeferredBlock<WoolBlock> WOOL = register("wool", WoolBlock::new, BlockBehaviour.Properties.of()
122-
103+
public static final DeferredBlock<Block> WOOL = register("wool", BlockBehaviour.Properties.of()
123104
.instrument(NoteBlockInstrument.GUITAR)
124105
.strength(0.8F)
125106
.sound(SoundType.WOOL)
126107
.ignitedByLava());
127-
public static final DeferredHolder<BlockEntityType<?>, BlockEntityType<WoolBlockEntity>> WOOL_TILE =
128-
entity("wool", DSL.remainderType(), WoolBlockEntity::new, WOOL);
129108
@BasicBlockItem
130-
public static final DeferredItem<BlockItem> WOOL_ITEM =
131-
register("wool", p -> new WoolBlockItem(WOOL.get(), p));
132-
// register("wood", WOOL);
109+
public static final DeferredItem<BlockItem> WOOL_ITEM = register("wool", WOOL);
133110

134111
@I18n(en_us = "carpet", zh_cn = "地毯", zh_tw = "地毯")
135112
public static final DeferredBlock<CarpetBlock> CARPET =
@@ -180,7 +157,7 @@ public class ModBlocks {
180157

181158
@BasicBlockItem
182159
public static final DeferredItem<BlockItem> DEEPSLATE_SALT_ORE_ITEM =
183-
register("deepslate_salt_ore", DEEPSLATE_SALT_ORE);
160+
register("deepslate_salt_ore", SALT_ORE);
184161

185162
@I18n(en_us = "Azalea Log", zh_cn = "杜鹃木原木", zh_tw = "杜鵑木原木")
186163
public static final DeferredBlock<RotatedPillarBlock> AZALEA_LOG =
@@ -198,6 +175,30 @@ public class ModBlocks {
198175
@I18n(en_us = "Azalea Planks", zh_cn = "杜鹃木木板", zh_tw = "杜鵑木材")
199176
public static final DeferredBlock<Block> AZALEA_PLANKS =
200177
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));
201202
@I18n(en_us = "Azalea Sign", zh_cn = "杜鹃木告示牌", zh_tw = "杜鵑木告示牌")
202203
public static final DeferredBlock<StandingSignBlock> AZALEA_SIGN =
203204
register("azalea_sign", props -> new StandingSignBlock(ModWoodTypes.AZALEA, props), BlockBehaviour.Properties.ofFullCopy(Blocks.MANGROVE_SIGN));
@@ -227,6 +228,30 @@ public class ModBlocks {
227228
public static final DeferredItem<BlockItem> AZALEA_PLANKS_ITEM =
228229
register("azalea_planks", AZALEA_PLANKS);
229230
@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
230255
public static final DeferredItem<SignItem> AZALEA_SIGN_ITEM =
231256
registerSign("azalea_sign", AZALEA_SIGN, AZALEA_WALL_SIGN);
232257
@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

+52-23
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[] WOOL = new ResourceLocation[] {
36-
Helpers.location("block/wool")
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,32 +71,34 @@ protected void registerStatesAndModels() {
7971
}
8072
}
8173

82-
// Wood
83-
BlockModelBuilder woodModel = models().cubeAll("wool", WOOL[0]);
84-
simpleBlock(ModBlocks.WOOL.get(), woodModel);
85-
86-
//Carpet
87-
BlockModelBuilder carpetModel = models().carpet("carpet", WOOL[0]);
88-
simpleBlock(ModBlocks.CARPET.get(), carpetModel);
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");
8981

90-
//Concrete
91-
BlockModelBuilder concreteModel = models().cubeAll("concrete", CONCRETE[0]);
92-
simpleBlock(ModBlocks.CONCRETE.get(), concreteModel);
82+
// Wool
83+
simpleBlock(ModBlocks.WOOL.get(), models().cubeAll("wool", Helpers.location("block/wool")));
9384

85+
// Carpet
86+
simpleBlock(ModBlocks.CARPET.get(), models().carpet("carpet", Helpers.location("block/wool")));
9487

88+
// Concrete
89+
simpleBlock(ModBlocks.CONCRETE.get(), models().cubeAll("concrete", Helpers.location("block/concrete")));
9590

9691
// Glazed Terracotta
9792
VariantBlockStateBuilder glazedTerracottaStates = getVariantBuilder(ModBlocks.GLAZED_TERRACOTTA.get());
9893
for (Direction facing : Direction.Plane.HORIZONTAL) {
9994
int yRotation = switch (facing) {
10095
case EAST -> 270;
10196
case NORTH -> 180;
102-
case SOUTH -> 0;
103-
case WEST -> 90;
97+
case WEST -> 90;
10498
default -> 0;
10599
};
106-
glazedTerracottaStates.partialState().with(net.minecraft.world.level.block.state.properties.BlockStateProperties.HORIZONTAL_FACING, facing)
107-
.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));
108102
}
109103
}
110104

@@ -124,4 +118,39 @@ private void brittleIceModel(VariantBlockStateBuilder brittleIceStates, int age,
124118
new ConfiguredModel(models().getExistingFile(BRITTLE_ICES[age]))
125119
);
126120
}
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+
}
127156
}

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ protected void addShapedRecipe() {
122122
.pattern("SS ")
123123
.pattern("SS ")
124124
.pattern(" ")
125-
.group("wood")
125+
.group("wool")
126126
.define('S', Items.STRING);
127127
}));
128128
add(shaped(RecipeCategory.MISC, ModBlocks.CARPET.get(), 1,

0 commit comments

Comments
 (0)