maybe make functioning loot tables?

This commit is contained in:
Sunskimmer822 2022-02-22 22:06:52 -06:00
parent 08cbcc61f3
commit 14979ade8a
4 changed files with 29 additions and 2 deletions
src/main
java/net/test/mod
resources/data
minecraft/tags/blocks/mineable
testmod/loot_tables/blocks

@ -9,7 +9,7 @@ import net.minecraft.sound.BlockSoundGroup;
public class FabricBlock extends Block {
public FabricBlock() {
super(FabricBlockSettings.of(Material.WOOL).breakByHand(false).sounds(BlockSoundGroup.ANCIENT_DEBRIS).strength(7000, 100f));
super(FabricBlockSettings.of(Material.WOOL).breakByHand(false).sounds(BlockSoundGroup.ANCIENT_DEBRIS).strength(100, 100f));
}
}

@ -21,7 +21,7 @@ public class FabricItem extends Item {
public TypedActionResult<ItemStack> use(World world, PlayerEntity PlayerEntity, Hand hand) {
PlayerEntity.playSound(SoundEvents.BLOCK_AMETHYST_BLOCK_CHIME, 1.0F, 1.0F);
for (int i = 0; i < 11; i++) {
world.spawnEntity(new TntEntity(world, PlayerEntity.getX(), PlayerEntity.getY(), PlayerEntity.getZ(), PlayerEntity));;
world.spawnEntity(new TntEntity(world, PlayerEntity.getX(), PlayerEntity.getY(), PlayerEntity.getZ(), PlayerEntity));
}
return new TypedActionResult<ItemStack>(ActionResult.SUCCESS, PlayerEntity.getStackInHand(hand));
}

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

@ -0,0 +1,21 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "testmod:fabric_block",
"functions": [
{
"function": "minecraft:set_count",
"count": 1
}
]
}
]
}
]
}