Skip to content

Commit

Permalink
fix: barrels and crates now drop their respective item
Browse files Browse the repository at this point in the history
Fix: Barrels and Crates now drop their respective item
  • Loading branch information
jasperalani committed Jan 30, 2024
2 parents 5b9d55d + 8bbd238 commit c9665ed
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/com/kikis/ptdyeplus/init/BlockInit.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ public class BlockInit{

public static final RegistryObject<Barrel> BARREL = register(
"barrel_barrel",
() -> new Barrel(BlockBehaviour.Properties.of(Material.METAL).sound(SoundType.METAL).dynamicShape()),
() -> new Barrel(BlockBehaviour.Properties.of(Material.METAL).sound(SoundType.METAL).dynamicShape().strength(2, 8)),
new Item.Properties().tab(CreativeModeTab.TAB_DECORATIONS)
);

public static final RegistryObject<Crate> CRATE = register(
"crate_barrel",
() -> new Crate(BlockBehaviour.Properties.of(Material.METAL).sound(SoundType.METAL).dynamicShape()),
() -> new Crate(BlockBehaviour.Properties.of(Material.METAL).sound(SoundType.METAL).dynamicShape().strength(2, 8)),
new Item.Properties().tab(CreativeModeTab.TAB_DECORATIONS)
);

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"bonus_rolls": 0,
"entries": [
{
"type": "minecraft:item",
"name": "ptdyeplus:barrel_barrel",
"functions": [
{
"function": "minecraft:copy_name",
"source": "block_entity"
}
]
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"bonus_rolls": 0,
"entries": [
{
"type": "minecraft:item",
"name": "ptdyeplus:crate_barrel",
"functions": [
{
"function": "minecraft:copy_name",
"source": "block_entity"
}
]
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

0 comments on commit c9665ed

Please sign in to comment.