Skip to content

Commit 5779e64

Browse files
committed
shimmer sand and sheets (wip)
1 parent 908df5a commit 5779e64

28 files changed

+636
-4
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"variants": {
3+
"": {
4+
"model": "infernalexp:block/luminous_fungus"
5+
}
6+
}
7+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"variants": {
3+
"": {
4+
"model": "infernalexp:block/shimmer_sand"
5+
}
6+
}
7+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"parent": "minecraft:block/cross",
3+
"textures": {
4+
"cross": "infernalexp:block/luminous_fungus"
5+
}
6+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"parent": "minecraft:block/cube_all",
3+
"textures": {
4+
"all": "infernalexp:block/shimmer_sand"
5+
}
6+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"parent": "minecraft:item/generated",
3+
"textures": {
4+
"layer0": "infernalexp:block/luminous_fungus"
5+
}
6+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"parent": "infernalexp:block/shimmer_sand"
3+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"type": "minecraft:block",
3+
"pools": [
4+
{
5+
"bonus_rolls": 0.0,
6+
"conditions": [
7+
{
8+
"condition": "minecraft:survives_explosion"
9+
}
10+
],
11+
"entries": [
12+
{
13+
"type": "minecraft:item",
14+
"name": "infernalexp:luminous_fungus"
15+
}
16+
],
17+
"rolls": 1.0
18+
}
19+
]
20+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"type": "minecraft:block",
3+
"pools": [
4+
{
5+
"bonus_rolls": 0.0,
6+
"conditions": [
7+
{
8+
"condition": "minecraft:survives_explosion"
9+
}
10+
],
11+
"entries": [
12+
{
13+
"type": "minecraft:item",
14+
"name": "infernalexp:shimmer_sand"
15+
}
16+
],
17+
"rolls": 1.0
18+
}
19+
]
20+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"replace": false,
3+
"values": [
4+
"infernalexp:shimmer_sand",
5+
"infernalexp:shimmer_sheet"
6+
]
7+
}
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,28 @@
11
package org.infernalstudios.infernalexp.block;
22

3+
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
4+
import net.minecraft.block.*;
5+
import net.minecraft.client.model.Model;
6+
import net.minecraft.data.client.Models;
37
import org.infernalstudios.infernalexp.InfernalExpansion;
8+
import org.infernalstudios.infernalexp.setup.ModRegistry;
49

510
public class ModBlocks {
611
public static void register() {
712
InfernalExpansion.log("Registering Blocks for " + InfernalExpansion.MOD_ID);
813
}
14+
15+
16+
public static final Block SHIMMER_SAND = ModRegistry.ofBlock("shimmer_sand",
17+
new SandBlock(0xffffaa, FabricBlockSettings.copyOf(Blocks.SAND)))
18+
.model().drop().tool("wood_shovel").build();
19+
20+
public static final Block SHIMMER_SHEET = ModRegistry.ofBlock("shimmer_sheet",
21+
new SnowBlock(FabricBlockSettings.copyOf(Blocks.SAND)))
22+
.tool("wood_shovel").build();
23+
24+
25+
public static final Block LUMINOUS_FUNGUS = ModRegistry.ofBlock("luminous_fungus",
26+
new PlantBlock(FabricBlockSettings.copyOf(Blocks.WARPED_FUNGUS).luminance(10)))
27+
.drop().model(ModRegistry.Models.CROSS).cutout().build();
928
}

src/main/java/org/infernalstudios/infernalexp/item/ModItemGroups.java

+8-2
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,19 @@
1010
import net.minecraft.registry.Registry;
1111
import net.minecraft.text.Text;
1212
import org.infernalstudios.infernalexp.InfernalExpansion;
13+
import org.infernalstudios.infernalexp.block.ModBlocks;
1314

1415
public class ModItemGroups {
1516
public static final ItemGroup INFERNALEXP = register(InfernalExpansion.MOD_ID,
1617
FabricItemGroup.builder().displayName(Text.translatable("itemgroup.infernalexp"))
17-
.icon(() -> new ItemStack(Blocks.NETHERRACK)) // TODO: change the tab's icon
18+
.icon(() -> new ItemStack(ModBlocks.SHIMMER_SAND)) // TODO: change the tab's icon
1819
.entries((displayContext, entries) -> {
19-
//entries.add(ModItems.OBJECT);
20+
21+
entries.add(ModBlocks.SHIMMER_SAND);
22+
entries.add(ModBlocks.SHIMMER_SHEET);
23+
24+
entries.add(ModBlocks.LUMINOUS_FUNGUS);
25+
2026
})
2127
.build());
2228

src/main/java/org/infernalstudios/infernalexp/setup/datagen/ModLootTableProvider.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import net.minecraft.item.ItemConvertible;
77
import org.infernalstudios.infernalexp.setup.ModRegistry;
88

9+
import java.util.List;
910
import java.util.Map;
1011

1112
public class ModLootTableProvider extends FabricBlockLootTableProvider {
@@ -16,9 +17,9 @@ public ModLootTableProvider(FabricDataOutput dataOutput) {
1617
@Override
1718
public void generate() {
1819
for (Map.Entry<Block, ItemConvertible> entry : ModRegistry.BLOCK_DROPS.entrySet()) {
19-
if (ModRegistry.BLOCK_MODELS.get(ModRegistry.Models.SLAB).contains(entry.getKey()))
20+
if (ModRegistry.BLOCK_MODELS.getOrDefault(ModRegistry.Models.SLAB, List.of()).contains(entry.getKey()))
2021
addDrop(entry.getKey(), slabDrops(entry.getKey()));
21-
else if (ModRegistry.BLOCK_MODELS.get(ModRegistry.Models.DOOR).contains(entry.getKey()))
22+
else if (ModRegistry.BLOCK_MODELS.getOrDefault(ModRegistry.Models.DOOR, List.of()).contains(entry.getKey()))
2223
addDrop(entry.getKey(), doorDrops(entry.getKey()));
2324
else
2425
addDrop(entry.getKey(), entry.getValue());
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"variants": {
3+
"layers=1": {
4+
"model": "infernalexp:block/shimmer_sheet2"
5+
},
6+
"layers=2": {
7+
"model": "infernalexp:block/shimmer_sheet4"
8+
},
9+
"layers=3": {
10+
"model": "infernalexp:block/shimmer_sheet6"
11+
},
12+
"layers=4": {
13+
"model": "infernalexp:block/shimmer_sheet8"
14+
},
15+
"layers=5": {
16+
"model": "infernalexp:block/shimmer_sheet10"
17+
},
18+
"layers=6": {
19+
"model": "infernalexp:block/shimmer_sheet12"
20+
},
21+
"layers=7": {
22+
"model": "infernalexp:block/shimmer_sheet14"
23+
},
24+
"layers=8": {
25+
"model": "infernalexp:block/shimmer_sand"
26+
}
27+
}
28+
}
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
{
2+
"itemgroup.infernalexp": "Infernal Expansion",
23

4+
"block.infernalexp.shimmer_sand": "Shimmer Sand",
5+
"block.infernalexp.shimmer_sheet": "Shimmer Sheet"
36
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"textures": {
3+
"particle": "infernalexp:block/shimmer_sand",
4+
"texture": "infernalexp:block/shimmer_sand"
5+
},
6+
"elements": [
7+
{ "from": [ 0, 0, 0 ],
8+
"to": [ 16, 10, 16 ],
9+
"faces": {
10+
"down": { "uv": [ 0, 0, 16, 16 ], "texture": "#texture", "cullface": "down" },
11+
"up": { "uv": [ 0, 0, 16, 16 ], "texture": "#texture" },
12+
"north": { "uv": [ 0, 6, 16, 16 ], "texture": "#texture", "cullface": "north" },
13+
"south": { "uv": [ 0, 6, 16, 16 ], "texture": "#texture", "cullface": "south" },
14+
"west": { "uv": [ 0, 6, 16, 16 ], "texture": "#texture", "cullface": "west" },
15+
"east": { "uv": [ 0, 6, 16, 16 ], "texture": "#texture", "cullface": "east" }
16+
}
17+
}
18+
]
19+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"textures": {
3+
"particle": "infernalexp:block/shimmer_sand",
4+
"texture": "infernalexp:block/shimmer_sand"
5+
},
6+
"elements": [
7+
{ "from": [ 0, 0, 0 ],
8+
"to": [ 16, 12, 16 ],
9+
"faces": {
10+
"down": { "uv": [ 0, 0, 16, 16 ], "texture": "#texture", "cullface": "down" },
11+
"up": { "uv": [ 0, 0, 16, 16 ], "texture": "#texture" },
12+
"north": { "uv": [ 0, 4, 16, 16 ], "texture": "#texture", "cullface": "north" },
13+
"south": { "uv": [ 0, 4, 16, 16 ], "texture": "#texture", "cullface": "south" },
14+
"west": { "uv": [ 0, 4, 16, 16 ], "texture": "#texture", "cullface": "west" },
15+
"east": { "uv": [ 0, 4, 16, 16 ], "texture": "#texture", "cullface": "east" }
16+
}
17+
}
18+
]
19+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"textures": {
3+
"particle": "infernalexp:block/shimmer_sand",
4+
"texture": "infernalexp:block/shimmer_sand"
5+
},
6+
"elements": [
7+
{ "from": [ 0, 0, 0 ],
8+
"to": [ 16, 14, 16 ],
9+
"faces": {
10+
"down": { "uv": [ 0, 0, 16, 16 ], "texture": "#texture", "cullface": "down" },
11+
"up": { "uv": [ 0, 0, 16, 16 ], "texture": "#texture" },
12+
"north": { "uv": [ 0, 2, 16, 16 ], "texture": "#texture", "cullface": "north" },
13+
"south": { "uv": [ 0, 2, 16, 16 ], "texture": "#texture", "cullface": "south" },
14+
"west": { "uv": [ 0, 2, 16, 16 ], "texture": "#texture", "cullface": "west" },
15+
"east": { "uv": [ 0, 2, 16, 16 ], "texture": "#texture", "cullface": "east" }
16+
}
17+
}
18+
]
19+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"parent": "block/thin_block",
3+
"textures": {
4+
"particle": "infernalexp:block/shimmer_sand",
5+
"texture": "infernalexp:block/shimmer_sand"
6+
},
7+
"elements": [
8+
{ "from": [ 0, 0, 0 ],
9+
"to": [ 16, 2, 16 ],
10+
"faces": {
11+
"down": { "uv": [ 0, 0, 16, 16 ], "texture": "#texture", "cullface": "down" },
12+
"up": { "uv": [ 0, 0, 16, 16 ], "texture": "#texture" },
13+
"north": { "uv": [ 0, 14, 16, 16 ], "texture": "#texture", "cullface": "north" },
14+
"south": { "uv": [ 0, 14, 16, 16 ], "texture": "#texture", "cullface": "south" },
15+
"west": { "uv": [ 0, 14, 16, 16 ], "texture": "#texture", "cullface": "west" },
16+
"east": { "uv": [ 0, 14, 16, 16 ], "texture": "#texture", "cullface": "east" }
17+
}
18+
}
19+
]
20+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"textures": {
3+
"particle": "infernalexp:block/shimmer_sand",
4+
"texture": "infernalexp:block/shimmer_sand"
5+
},
6+
"elements": [
7+
{ "from": [ 0, 0, 0 ],
8+
"to": [ 16, 4, 16 ],
9+
"faces": {
10+
"down": { "uv": [ 0, 0, 16, 16 ], "texture": "#texture", "cullface": "down" },
11+
"up": { "uv": [ 0, 0, 16, 16 ], "texture": "#texture" },
12+
"north": { "uv": [ 0, 12, 16, 16 ], "texture": "#texture", "cullface": "north" },
13+
"south": { "uv": [ 0, 12, 16, 16 ], "texture": "#texture", "cullface": "south" },
14+
"west": { "uv": [ 0, 12, 16, 16 ], "texture": "#texture", "cullface": "west" },
15+
"east": { "uv": [ 0, 12, 16, 16 ], "texture": "#texture", "cullface": "east" }
16+
}
17+
}
18+
]
19+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"textures": {
3+
"particle": "infernalexp:block/shimmer_sand",
4+
"texture": "infernalexp:block/shimmer_sand"
5+
},
6+
"elements": [
7+
{ "from": [ 0, 0, 0 ],
8+
"to": [ 16, 6, 16 ],
9+
"faces": {
10+
"down": { "uv": [ 0, 0, 16, 16 ], "texture": "#texture", "cullface": "down" },
11+
"up": { "uv": [ 0, 0, 16, 16 ], "texture": "#texture" },
12+
"north": { "uv": [ 0, 10, 16, 16 ], "texture": "#texture", "cullface": "north" },
13+
"south": { "uv": [ 0, 10, 16, 16 ], "texture": "#texture", "cullface": "south" },
14+
"west": { "uv": [ 0, 10, 16, 16 ], "texture": "#texture", "cullface": "west" },
15+
"east": { "uv": [ 0, 10, 16, 16 ], "texture": "#texture", "cullface": "east" }
16+
}
17+
}
18+
]
19+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"textures": {
3+
"particle": "infernalexp:block/shimmer_sand",
4+
"texture": "infernalexp:block/shimmer_sand"
5+
},
6+
"elements": [
7+
{ "from": [ 0, 0, 0 ],
8+
"to": [ 16, 8, 16 ],
9+
"faces": {
10+
"down": { "uv": [ 0, 0, 16, 16 ], "texture": "#texture", "cullface": "down" },
11+
"up": { "uv": [ 0, 0, 16, 16 ], "texture": "#texture" },
12+
"north": { "uv": [ 0, 8, 16, 16 ], "texture": "#texture", "cullface": "north" },
13+
"south": { "uv": [ 0, 8, 16, 16 ], "texture": "#texture", "cullface": "south" },
14+
"west": { "uv": [ 0, 8, 16, 16 ], "texture": "#texture", "cullface": "west" },
15+
"east": { "uv": [ 0, 8, 16, 16 ], "texture": "#texture", "cullface": "east" }
16+
}
17+
}
18+
]
19+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"parent": "infernalexp:block/shimmer_sheet2"
3+
}
Loading
Loading
Loading
Loading
Loading

0 commit comments

Comments
 (0)