Skip to content

Commit 0fbd236

Browse files
committedFeb 21, 2025·
Actually add the storage block models
1 parent 21ee045 commit 0fbd236

16 files changed

+89
-85
lines changed
 
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"variants": {
3+
"": {
4+
"model": "spectrum:block/bedrock_storage_block"
5+
}
6+
}
7+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"variants": {
3+
"facing=down": {
4+
"model": "spectrum:block/neolith_block",
5+
"x": 180
6+
},
7+
"facing=east": {
8+
"model": "spectrum:block/neolith_block",
9+
"x": 90,
10+
"y": 90
11+
},
12+
"facing=north": {
13+
"model": "spectrum:block/neolith_block",
14+
"x": 90
15+
},
16+
"facing=south": {
17+
"model": "spectrum:block/neolith_block",
18+
"x": 90,
19+
"y": 180
20+
},
21+
"facing=up": {
22+
"model": "spectrum:block/neolith_block"
23+
},
24+
"facing=west": {
25+
"model": "spectrum:block/neolith_block",
26+
"x": 90,
27+
"y": 270
28+
}
29+
}
30+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"parent": "minecraft:block/cube_bottom_top",
3+
"textures": {
4+
"bottom": "spectrum:block/neolith_block_bottom",
5+
"side": "spectrum:block/neolith_block_side",
6+
"top": "spectrum:block/neolith_block_top"
7+
}
8+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"parent": "spectrum:templates/translucent_outer1",
3+
"textures": {
4+
"texture": "spectrum:block/vegetal_block"
5+
}
6+
}

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

+3-3
Original file line numberDiff line numberDiff line change
@@ -176,9 +176,9 @@ private static Settings gemstoneBlock(MapColor mapColor, BlockSoundGroup blockSo
176176
public static final Block ONYX_POWDER_BLOCK = registerSimple("onyx_powder_block", new ColoredFallingBlock(new ColorCode(DyeColor.BLACK.getFireworkColor()), AbstractBlock.Settings.copy(Blocks.SAND).mapColor(MapColor.BLACK)), DyeColor.BLACK);
177177
public static final Block MOONSTONE_POWDER_BLOCK = registerSimple("moonstone_powder_block", new ColoredFallingBlock(new ColorCode(DyeColor.WHITE.getFireworkColor()), AbstractBlock.Settings.copy(Blocks.SAND).mapColor(MapColor.WHITE)), DyeColor.WHITE);
178178

179-
public static final Block VEGETAL_BLOCK = registerWithoutModel("vegetal_block", new Block(settings(MapColor.PALE_GREEN, BlockSoundGroup.FUNGUS, 2.0F).nonOpaque()), DyeColor.GREEN);
180-
public static final Block NEOLITH_BLOCK = registerWithoutModel("neolith_block", new SpectrumFacingBlock(settings(MapColor.PURPLE, BlockSoundGroup.COPPER, 6.0F).requiresTool().instrument(NoteBlockInstrument.BASEDRUM).luminance(state -> 13).postProcess(SpectrumBlocks::always).emissiveLighting(SpectrumBlocks::always)), DyeColor.PINK);
181-
public static final Block BEDROCK_STORAGE_BLOCK = registerWithoutModel("bedrock_storage_block", new BlockWithTooltip(settings(MapColor.STONE_GRAY, BlockSoundGroup.STONE, 100.0F, 3600.0F).pistonBehavior(PistonBehavior.BLOCK).requiresTool().instrument(NoteBlockInstrument.BASEDRUM), Text.translatable("spectrum.tooltip.dragon_and_wither_immune")), IS.of(Rarity.UNCOMMON), DyeColor.BLACK);
179+
public static final Block VEGETAL_BLOCK = registerSingleton("vegetal_block", new Block(settings(MapColor.PALE_GREEN, BlockSoundGroup.FUNGUS, 2.0F).nonOpaque()), DyeColor.GREEN, TexturedModel.makeFactory(TextureMap::texture, SpectrumModels.TRANSLUCENT_OUTER1));
180+
public static final Block NEOLITH_BLOCK = registerCustom("neolith_block", new SpectrumFacingBlock(settings(MapColor.PURPLE, BlockSoundGroup.COPPER, 6.0F).requiresTool().instrument(NoteBlockInstrument.BASEDRUM).luminance(state -> 13).postProcess(SpectrumBlocks::always).emissiveLighting(SpectrumBlocks::always)), DyeColor.PINK, block -> registerDefaultFacingUpBlockModel(block, TexturedModel.CUBE_BOTTOM_TOP));
181+
public static final Block BEDROCK_STORAGE_BLOCK = registerCustom("bedrock_storage_block", new BlockWithTooltip(settings(MapColor.STONE_GRAY, BlockSoundGroup.STONE, 100.0F, 3600.0F).pistonBehavior(PistonBehavior.BLOCK).requiresTool().instrument(NoteBlockInstrument.BASEDRUM), Text.translatable("spectrum.tooltip.dragon_and_wither_immune")), IS.of(Rarity.UNCOMMON), DyeColor.BLACK, SpectrumModelProvider::registerSimpleBlockModel);
182182

183183
public static final SpectrumClusterBlock BISMUTH_CLUSTER = registerClusterBlock("bismuth_cluster", new SpectrumClusterBlock(gemstone(MapColor.DARK_AQUA, BlockSoundGroup.CHAIN, 8), SpectrumClusterBlock.GrowthStage.CLUSTER), IS.of(Rarity.UNCOMMON), SpectrumModels.CRYSTALLARIEUM_FARMABLE, DyeColor.CYAN);
184184
public static final SpectrumClusterBlock LARGE_BISMUTH_BUD = registerClusterBlock("large_bismuth_bud", new BismuthBudBlock(gemstone(MapColor.DARK_AQUA, BlockSoundGroup.CHAIN, 6).ticksRandomly(), SpectrumClusterBlock.GrowthStage.LARGE, BISMUTH_CLUSTER), IS.of(Rarity.UNCOMMON), SpectrumModels.CRYSTALLARIEUM_FARMABLE, DyeColor.CYAN);

‎src/main/java/de/dafuqs/spectrum/registries/client/SpectrumModels.java

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ public class SpectrumModels {
1616
public static final Model LARGE_BUD_ITEM = new Model(Optional.of(SpectrumCommon.locate("templates_item/large_bud")), Optional.empty(), TextureKey.LAYER0);
1717
public static final Model CLUSTER_ITEM = new Model(Optional.of(SpectrumCommon.locate("templates_item/cluster")), Optional.empty(), TextureKey.LAYER0);
1818

19+
public static final Model TRANSLUCENT_OUTER1 = new Model(Optional.of(SpectrumCommon.locate("templates/translucent_outer1")), Optional.empty(), TextureKey.TEXTURE);
1920
public static final Model MULTILAYER_LIGHT = new Model(Optional.of(SpectrumCommon.locate("templates/multilayer_light")), Optional.empty(), TextureKey.TOP, TextureKey.SIDE, TextureKey.INSIDE);
2021
public static final Model MOONSTONE_CHISELED = new Model(Optional.of(SpectrumCommon.locate("templates/moonstone_chiseled")), Optional.empty(), TextureKey.SIDE, SpectrumTextureKeys.LINE);
2122
public static final Model MOONSTONE_CHISELED_DOWN = new Model(Optional.of(SpectrumCommon.locate("templates/moonstone_chiseled_down")), Optional.empty(), TextureKey.SIDE, SpectrumTextureKeys.LINE);

‎src/main/resources/assets/spectrum/blockstates/bedrock_storage_block.json

-7
This file was deleted.

‎src/main/resources/assets/spectrum/blockstates/neolith_block.json

-30
This file was deleted.

‎src/main/resources/assets/spectrum/models/block/neolith_block.json

-12
This file was deleted.

‎src/main/resources/assets/spectrum/models/block/vegetal_block.json

-33
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"parent": "block/block",
3+
"textures": {
4+
"particle": "#texture",
5+
"texture": "#texture"
6+
},
7+
"elements": [
8+
{
9+
"from": [ 1, 1, 1 ],
10+
"to": [ 15, 15, 15 ],
11+
"faces": {
12+
"down": { "texture": "#texture" },
13+
"up": { "texture": "#texture" },
14+
"north": { "texture": "#texture" },
15+
"south": { "texture": "#texture" },
16+
"west": { "texture": "#texture" },
17+
"east": { "texture": "#texture" }
18+
}
19+
},
20+
{
21+
"from": [ 0, 0, 0 ],
22+
"to": [ 16, 16, 16 ],
23+
"faces": {
24+
"down": { "texture": "#texture", "cullface": "down" },
25+
"up": { "texture": "#texture", "cullface": "up" },
26+
"north": { "texture": "#texture", "cullface": "north" },
27+
"south": { "texture": "#texture", "cullface": "south" },
28+
"west": { "texture": "#texture", "cullface": "west" },
29+
"east": { "texture": "#texture", "cullface": "east" }
30+
}
31+
}
32+
]
33+
}
34+

0 commit comments

Comments
 (0)