fix DataGen & add loot tables

This commit is contained in:
Jenny 2025-01-23 12:29:38 +01:00
parent 2325f0ce18
commit 1226338d10
Signed by: Jenny
GPG Key ID: 4A98012FB1C39311
21 changed files with 142 additions and 73 deletions

View File

@ -7,6 +7,7 @@ import net.minecraft.data.PackOutput;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.level.block.*;
import net.minecraftforge.client.model.generators.BlockStateProvider;
import net.minecraftforge.client.model.generators.ConfiguredModel;
import net.minecraftforge.common.data.ExistingFileHelper;
import net.minecraftforge.registries.ForgeRegistries;
import net.minecraftforge.registries.RegistryObject;
@ -26,9 +27,6 @@ public class ModBlockStateProvider extends BlockStateProvider {
sideTopBottom(blocks.TNT_32.get());
sideTopBottom(blocks.TNT_64.get());
sideTopBottom(blocks.TNT_128.get());
sideTopBottom(blocks.TNT_CLUSTER_2.get());
sideTopBottom(blocks.TNT_CLUSTER_4.get());
sideTopBottom(blocks.TNT_CLUSTER_8.get());
}
private void blockWithItem(RegistryObject<Block> blockRegistryObject) {
@ -62,6 +60,7 @@ public class ModBlockStateProvider extends BlockStateProvider {
public void sideTopBottom(Block block) {
ModelFile model = models().cubeBottomTop(name(block), extend(blockTexture(block), "_side"), extend(blockTexture(block), "_bottom"), extend(blockTexture(block), "_top"));
this.getVariantBuilder(block).forAllStates(blockState -> ConfiguredModel.builder().modelFile(model).build());
simpleBlockItem(block, model);
}

View File

@ -1,7 +0,0 @@
{
"variants": {
"": {
"model": "compressedtnt:block/tnt_128"
}
}
}

View File

@ -1,7 +0,0 @@
{
"variants": {
"": {
"model": "compressedtnt:block/tnt_16"
}
}
}

View File

@ -1,7 +0,0 @@
{
"variants": {
"": {
"model": "compressedtnt:block/tnt_32"
}
}
}

View File

@ -1,7 +0,0 @@
{
"variants": {
"": {
"model": "compressedtnt:block/tnt_64"
}
}
}

View File

@ -1,7 +0,0 @@
{
"variants": {
"": {
"model": "compressedtnt:block/tnt_8"
}
}
}

View File

@ -1,7 +0,0 @@
{
"variants": {
"": {
"model": "compressedtnt:block/ttn_black_hole"
}
}
}

View File

@ -1,7 +0,0 @@
{
"variants": {
"": {
"model": "compressedtnt:block/tnt_cluster_2"
}
}
}

View File

@ -1,7 +0,0 @@
{
"variants": {
"": {
"model": "compressedtnt:block/tnt_cluster_4"
}
}
}

View File

@ -1,7 +0,0 @@
{
"variants": {
"": {
"model": "compressedtnt:block/tnt_cluster_8"
}
}
}

View File

@ -1,7 +0,0 @@
{
"variants": {
"": {
"model": "compressedtnt:block/tnt_homing"
}
}
}

View File

@ -0,0 +1,14 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "compressedtnt:tnt_128"
}
]
}
]
}

View File

@ -0,0 +1,14 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "compressedtnt:tnt_16"
}
]
}
]
}

View File

@ -0,0 +1,14 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "compressedtnt:tnt_32"
}
]
}
]
}

View File

@ -0,0 +1,14 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "compressedtnt:tnt_64"
}
]
}
]
}

View File

@ -0,0 +1,14 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "compressedtnt:tnt_8"
}
]
}
]
}

View File

@ -0,0 +1,14 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "compressedtnt:tnt_black_hole"
}
]
}
]
}

View File

@ -0,0 +1,14 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "compressedtnt:tnt_cluster_2"
}
]
}
]
}

View File

@ -0,0 +1,14 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "compressedtnt:tnt_cluster_4"
}
]
}
]
}

View File

@ -0,0 +1,14 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "compressedtnt:tnt_cluster_8"
}
]
}
]
}

View File

@ -0,0 +1,14 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "compressedtnt:tnt_homing"
}
]
}
]
}