goban rendering correctly in game

This commit is contained in:
Dani The Skunk 2022-10-20 01:23:35 +00:00
parent 05db258001
commit 8991ea9ee3
6 changed files with 378 additions and 69 deletions

File diff suppressed because one or more lines are too long

View File

@ -1,15 +1,30 @@
package com.danitheskunk.skunkstuff; package com.danitheskunk.skunkstuff;
import net.minecraft.block.Block;
import net.minecraft.block.Material;
import net.minecraft.item.BlockItem;
import net.minecraft.item.ItemGroup;
import net.minecraft.util.Identifier;
import net.minecraft.util.registry.Registry;
import org.quiltmc.loader.api.ModContainer; import org.quiltmc.loader.api.ModContainer;
import org.quiltmc.qsl.base.api.entrypoint.ModInitializer; import org.quiltmc.qsl.base.api.entrypoint.ModInitializer;
import org.quiltmc.qsl.block.extensions.api.QuiltBlockSettings;
import org.quiltmc.qsl.item.setting.api.QuiltItemSettings;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
public class SkunkStuff implements ModInitializer { public class SkunkStuff implements ModInitializer {
public static final Logger LOGGER = LoggerFactory.getLogger("SkunkStuff"); public static final Logger LOGGER = LoggerFactory.getLogger("SkunkStuff");
public static final Block GOBAN_BLOCK =
new Block(QuiltBlockSettings.of(Material.WOOD).strength(2).opaque(false));
@Override @Override
public void onInitialize(ModContainer mod) { public void onInitialize(ModContainer mod) {
Registry.register(Registry.BLOCK, new Identifier("skunkstuff", "goban"), GOBAN_BLOCK);
Registry.register(Registry.ITEM, new Identifier("skunkstuff",
"goban"), new BlockItem(GOBAN_BLOCK,
new QuiltItemSettings().group(ItemGroup.MISC)));
LOGGER.info("Hello Quilt world from {}!", mod.metadata().name()); LOGGER.info("Hello Quilt world from {}!", mod.metadata().name());
} }
} }

View File

@ -0,0 +1,7 @@
{
"variants": {
"": {
"model": "skunkstuff:block/goban"
}
}
}

View File

@ -1,69 +1,353 @@
{ {
"credit": "Made with Blockbench", "credit": "Made with Blockbench",
"texture_size": [32, 32],
"texture_size": [
32,
32
],
"textures": { "textures": {
"0": "goban", "0": "skunkstuff:block/goban",
"particle": "goban" "particle": "skunkstuff:block/goban"
}, },
"elements": [ "elements": [
{ {
"from": [1, 0, 1], "from": [
"to": [3, 2, 3], 1,
0,
1
],
"to": [
3,
2,
3
],
"faces": { "faces": {
"north": {"uv": [8, 12, 9, 13], "texture": "#0"}, "north": {
"east": {"uv": [9, 12, 10, 13], "texture": "#0"}, "uv": [
"south": {"uv": [10, 12, 11, 13], "texture": "#0"}, 8,
"west": {"uv": [11, 12, 12, 13], "texture": "#0"}, 12,
"up": {"uv": [13, 13, 12, 12], "texture": "#0"}, 9,
"down": {"uv": [9, 13, 8, 14], "texture": "#0"} 13
],
"texture": "#0"
},
"east": {
"uv": [
9,
12,
10,
13
],
"texture": "#0"
},
"south": {
"uv": [
10,
12,
11,
13
],
"texture": "#0"
},
"west": {
"uv": [
11,
12,
12,
13
],
"texture": "#0"
},
"up": {
"uv": [
13,
13,
12,
12
],
"texture": "#0"
},
"down": {
"uv": [
9,
13,
8,
14
],
"texture": "#0"
}
} }
}, },
{ {
"from": [1, 0, 13], "from": [
"to": [3, 2, 15], 1,
0,
13
],
"to": [
3,
2,
15
],
"faces": { "faces": {
"north": {"uv": [9, 13, 10, 14], "texture": "#0"}, "north": {
"east": {"uv": [10, 13, 11, 14], "texture": "#0"}, "uv": [
"south": {"uv": [11, 13, 12, 14], "texture": "#0"}, 9,
"west": {"uv": [12, 13, 13, 14], "texture": "#0"}, 13,
"up": {"uv": [14, 13, 13, 12], "texture": "#0"}, 10,
"down": {"uv": [14, 13, 13, 14], "texture": "#0"} 14
],
"texture": "#0"
},
"east": {
"uv": [
10,
13,
11,
14
],
"texture": "#0"
},
"south": {
"uv": [
11,
13,
12,
14
],
"texture": "#0"
},
"west": {
"uv": [
12,
13,
13,
14
],
"texture": "#0"
},
"up": {
"uv": [
14,
13,
13,
12
],
"texture": "#0"
},
"down": {
"uv": [
14,
13,
13,
14
],
"texture": "#0"
}
} }
}, },
{ {
"from": [13, 0, 1], "from": [
"to": [15, 2, 3], 13,
0,
1
],
"to": [
15,
2,
3
],
"faces": { "faces": {
"north": {"uv": [8, 14, 9, 15], "texture": "#0"}, "north": {
"east": {"uv": [9, 14, 10, 15], "texture": "#0"}, "uv": [
"south": {"uv": [10, 14, 11, 15], "texture": "#0"}, 8,
"west": {"uv": [11, 14, 12, 15], "texture": "#0"}, 14,
"up": {"uv": [13, 15, 12, 14], "texture": "#0"}, 9,
"down": {"uv": [15, 12, 14, 13], "texture": "#0"} 15
],
"texture": "#0"
},
"east": {
"uv": [
9,
14,
10,
15
],
"texture": "#0"
},
"south": {
"uv": [
10,
14,
11,
15
],
"texture": "#0"
},
"west": {
"uv": [
11,
14,
12,
15
],
"texture": "#0"
},
"up": {
"uv": [
13,
15,
12,
14
],
"texture": "#0"
},
"down": {
"uv": [
15,
12,
14,
13
],
"texture": "#0"
}
} }
}, },
{ {
"from": [13, 0, 13], "from": [
"to": [15, 2, 15], 13,
0,
13
],
"to": [
15,
2,
15
],
"faces": { "faces": {
"north": {"uv": [13, 14, 14, 15], "texture": "#0"}, "north": {
"east": {"uv": [14, 13, 15, 14], "texture": "#0"}, "uv": [
"south": {"uv": [14, 14, 15, 15], "texture": "#0"}, 13,
"west": {"uv": [8, 15, 9, 16], "texture": "#0"}, 14,
"up": {"uv": [10, 16, 9, 15], "texture": "#0"}, 14,
"down": {"uv": [11, 15, 10, 16], "texture": "#0"} 15
],
"texture": "#0"
},
"east": {
"uv": [
14,
13,
15,
14
],
"texture": "#0"
},
"south": {
"uv": [
14,
14,
15,
15
],
"texture": "#0"
},
"west": {
"uv": [
8,
15,
9,
16
],
"texture": "#0"
},
"up": {
"uv": [
10,
16,
9,
15
],
"texture": "#0"
},
"down": {
"uv": [
11,
15,
10,
16
],
"texture": "#0"
}
} }
}, },
{ {
"from": [0, 2, 0], "from": [
"to": [16, 8, 16], 0,
2,
0
],
"to": [
16,
8,
16
],
"faces": { "faces": {
"north": {"uv": [8, 0, 16, 3], "texture": "#0"}, "north": {
"east": {"uv": [8, 3, 16, 6], "texture": "#0"}, "uv": [
"south": {"uv": [8, 6, 16, 9], "texture": "#0"}, 8,
"west": {"uv": [8, 9, 16, 12], "texture": "#0"}, 0,
"up": {"uv": [8, 8, 0, 0], "texture": "#0"}, 16,
"down": {"uv": [8, 8, 0, 16], "texture": "#0"} 3
],
"texture": "#0"
},
"east": {
"uv": [
8,
3,
16,
6
],
"texture": "#0"
},
"south": {
"uv": [
8,
6,
16,
9
],
"texture": "#0"
},
"west": {
"uv": [
8,
9,
16,
12
],
"texture": "#0"
},
"up": {
"uv": [
8,
8,
0,
0
],
"texture": "#0"
},
"down": {
"uv": [
8,
8,
0,
16
],
"texture": "#0"
}
} }
} }
] ]

View File

@ -0,0 +1,3 @@
{
"parent": "skunkstuff:block/goban"
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB