added loot tables and correct tools to break blocks

This commit is contained in:
Steven 2023-10-02 21:04:02 -04:00
parent f9bc47b143
commit 79f304521b
9 changed files with 98 additions and 1 deletions

View file

@ -4,7 +4,9 @@ import com.skdevstudios.util_rings.UtilRings;
import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.Blocks; import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.level.block.SoundType;
import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockBehaviour;
import net.minecraft.world.level.material.MapColor;
import net.minecraftforge.registries.DeferredRegister; import net.minecraftforge.registries.DeferredRegister;
import net.minecraftforge.registries.ForgeRegistries; import net.minecraftforge.registries.ForgeRegistries;
import net.minecraftforge.registries.RegistryObject; import net.minecraftforge.registries.RegistryObject;
@ -14,5 +16,13 @@ public class BlockInit {
public static final RegistryObject<Block> LEAD_ORE = BLOCKS.register("lead_ore", () -> new Block(BlockBehaviour.Properties.copy(Blocks.IRON_ORE))); public static final RegistryObject<Block> LEAD_ORE = BLOCKS.register("lead_ore", () -> new Block(BlockBehaviour.Properties.copy(Blocks.IRON_ORE)));
public static final RegistryObject<Block> TIN_ORE = BLOCKS.register("tin_ore", () -> new Block(BlockBehaviour.Properties.copy(Blocks.IRON_ORE))); public static final RegistryObject<Block> TIN_ORE = BLOCKS.register("tin_ore", () -> new Block(BlockBehaviour.Properties.copy(Blocks.IRON_ORE)));
public static final RegistryObject<Block> PINE_LOG = BLOCKS.register("pine_log", () -> new Block(BlockBehaviour.Properties.copy(Blocks.STONE))); public static final RegistryObject<Block> PINE_LOG = BLOCKS.register("pine_log",
() -> new Block(BlockBehaviour.Properties.of()
.mapColor(MapColor.COLOR_BROWN)
.sound(SoundType.WOOD)
.strength(2)
.explosionResistance(2)
.requiresCorrectToolForDrops()
)
);
} }

View file

@ -5,3 +5,4 @@
} }
} }
} }

View file

@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"util_rings:pine_log"
]
}

View file

@ -0,0 +1,7 @@
{
"replace": false,
"values": [
"util_rings:lead_ore",
"util_rings:tin_ore"
]
}

View file

@ -0,0 +1,7 @@
{
"replace": false,
"values": [
"util_rings:lead_ore",
"util_rings:tin_ore"
]
}

View file

@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"util_rings:pine_log"
]
}

View file

@ -0,0 +1,20 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"bonus_rolls": 0,
"entries": [
{
"type": "minecraft:item",
"name": "util_rings:lead_ore"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View file

@ -0,0 +1,20 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"bonus_rolls": 0,
"entries": [
{
"type": "minecraft:item",
"name": "util_rings:pine_log"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View file

@ -0,0 +1,20 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"bonus_rolls": 0,
"entries": [
{
"type": "minecraft:item",
"name": "util_rings:tin_ore"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}