Skip to content

Commit d3b7953

Browse files
committed
Fix nephrite blossoms
1 parent df7cd51 commit d3b7953

2 files changed

Lines changed: 18 additions & 11 deletions

File tree

src/main/generated/assets/spectrum/blockstates/nephrite_blossom_stem.json

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,24 @@
1010
},
1111
{
1212
"apply": {
13-
"model": "spectrum:block/nephrite_blossom_stem_base"
13+
"model": "spectrum:block/nephrite_blossom_stem_top"
1414
},
1515
"when": {
1616
"part": "stemalt"
1717
}
1818
},
1919
{
20-
"apply": [
21-
{
22-
"model": "spectrum:block/nephrite_blossom_stem_top"
23-
},
24-
{
25-
"model": "spectrum:block/nephrite_blossom_stem_bottom"
26-
}
27-
],
20+
"apply": {
21+
"model": "spectrum:block/nephrite_blossom_stem_base"
22+
},
23+
"when": {
24+
"part": "base"
25+
}
26+
},
27+
{
28+
"apply": {
29+
"model": "spectrum:block/nephrite_blossom_stem_bottom"
30+
},
2831
"when": {
2932
"part": "base"
3033
}

src/main/java/de/dafuqs/spectrum/registries/SpectrumBlocks.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1124,8 +1124,12 @@ public static Settings jadeVine() {
11241124
public static final Block NEPHRITE_BLOSSOM_STEM = register(cutout(blockWithItem("nephrite_blossom_stem", new NephriteBlossomStemBlock(settings(MapColor.PINK, BlockSoundGroup.WOOL, 2.0F).nonOpaque().noCollision()), InkColors.PINK)).withBlockItemModel((ctx, block) -> SpectrumModelHelper.registerBlockTexturedItemModel(ctx, block, "_bottom")).withBlockModel((ctx, block) -> {
11251125
Identifier bottom = SpectrumTexturedModels.cross(b -> b, "_bottom").upload(block, "_bottom", ctx.modelCollector);
11261126
Identifier top = SpectrumTexturedModels.cross(b -> b, "_top").upload(block, "_top", ctx.modelCollector);
1127-
Identifier base = ModelIds.getBlockSubModelId(block, "_base");
1128-
return MultipartBlockStateSupplier.create(block).with(When.create().set(NephriteBlossomStemBlock.STEM_PART, StemComponent.STEM), SpectrumModelHelper.createModelVariant(bottom)).with(When.create().set(NephriteBlossomStemBlock.STEM_PART, StemComponent.STEMALT), SpectrumModelHelper.createModelVariant(base)).with(When.create().set(NephriteBlossomStemBlock.STEM_PART, StemComponent.BASE), SpectrumModelHelper.createModelVariant(top), SpectrumModelHelper.createModelVariant(bottom));
1127+
Identifier fronds = ModelIds.getBlockSubModelId(block, "_base");
1128+
return MultipartBlockStateSupplier.create(block)
1129+
.with(When.create().set(NephriteBlossomStemBlock.STEM_PART, StemComponent.STEM), SpectrumModelHelper.createModelVariant(bottom))
1130+
.with(When.create().set(NephriteBlossomStemBlock.STEM_PART, StemComponent.STEMALT), SpectrumModelHelper.createModelVariant(top))
1131+
.with(When.create().set(NephriteBlossomStemBlock.STEM_PART, StemComponent.BASE), SpectrumModelHelper.createModelVariant(fronds))
1132+
.with(When.create().set(NephriteBlossomStemBlock.STEM_PART, StemComponent.BASE), SpectrumModelHelper.createModelVariant(bottom));
11291133
}));
11301134
public static final Block NEPHRITE_BLOSSOM_LEAVES = register(cutout(blockWithItem("nephrite_blossom_leaves", new NephriteBlossomLeavesBlock(settings(MapColor.PINK, BlockSoundGroup.GRASS, 0.2F).nonOpaque().ticksRandomly().luminance(state -> 13)), InkColors.PINK)).withBlockModel((ctx, block) -> VariantsBlockStateSupplier.create(block).coordinate(BlockStateVariantMap.create(Properties.AGE_2).register(age -> {
11311135
String suffix = age == 0 ? "" : age == 1 ? "_flowering" : "_fruiting";

0 commit comments

Comments
 (0)