Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,9 @@ private boolean breakBlock(World world, Player player, int x, int y, int z, Mate

CustomBlock customBlock = CustomBlock.byAlreadyPlaced(block);
if (customBlock != null) {
customBlock.drop(block.getLocation());
customBlock.getLoot(player.getInventory().getItemInMainHand(), false).forEach(
item -> world.dropItemNaturally(block.getLocation(), item)
);
return customBlock.remove();
}

Expand Down
24 changes: 0 additions & 24 deletions src/main/resources/contents/omc_blocks/blocks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,6 @@ items:
name: BLOCK_STONE_PLACE
volume: 1
pitch: 1
events:
placed_block:
break:
drop_item:
item: omc_items:aywenite
min_amount: 1
max_amount: 2
chance: 100
drop_exp:
chance: 100
min_amount: 1
max_amount: 3
deepslate_aywenite_ore:
display_name: <lang:itemsadder.omc_blocks.deepslate_aywenite_ore.name>
lore:
Expand Down Expand Up @@ -80,18 +68,6 @@ items:
name: BLOCK_STONE_PLACE
volume: 1
pitch: 1
events:
placed_block:
break:
drop_item:
item: omc_items:aywenite
min_amount: 1
max_amount: 2
chance: 100
drop_exp:
chance: 100
min_amount: 1
max_amount: 3
aywenite_block:
display_name: <lang:itemsadder.omc_blocks.aywenite_block.name>
lore:
Expand Down
30 changes: 30 additions & 0 deletions src/main/resources/contents/omc_blocks/loots.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
info:
namespace: omc_blocks
loots:
blocks:
aywenite_ore:
type: omc_blocks:aywenite_ore
items:
ruby:
item: omc_items:aywenite
min_amount: 1
max_amount: 2
chance: 100
exp:
exp_1:
chance: 100
min_amount: 1
max_amount: 3
deepslate_aywenite_ore:
type: omc_blocks:deepslate_aywenite_ore
items:
ruby:
item: omc_items:aywenite
min_amount: 1
max_amount: 2
chance: 100
exp:
exp_1:
chance: 100
min_amount: 1
max_amount: 3
24 changes: 0 additions & 24 deletions src/main/resources/contents/omc_dream/blocks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,18 +47,6 @@ items:
name: BLOCK_STONE_PLACE
volume: 1
pitch: 1
events:
placed_block:
break:
drop_item:
item: omc_dream:ewenite
min_amount: 1
max_amount: 2
chance: 100
drop_exp:
chance: 0
min_amount: 1
max_amount: 3
deepslate_ewenite_ore:
display_name: <lang:itemsadder.omc_dream.deepslate_ewenite_ore.name>
lore:
Expand Down Expand Up @@ -91,18 +79,6 @@ items:
name: BLOCK_STONE_PLACE
volume: 1
pitch: 1
events:
placed_block:
break:
drop_item:
item: omc_dream:ewenite
min_amount: 1
max_amount: 2
chance: 100
drop_exp:
chance: 0
min_amount: 1
max_amount: 3
ewenite_block:
display_name: <lang:itemsadder.omc_dream.ewenite_block.name>
lore:
Expand Down
30 changes: 30 additions & 0 deletions src/main/resources/contents/omc_dream/loots.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
info:
namespace: omc_dream
loots:
blocks:
ewenite_ore:
type: omc_dream:ewenite_ore
items:
ruby:
item: omc_dream:ewenite
min_amount: 1
max_amount: 2
chance: 100
exp:
exp_1:
chance: 0
min_amount: 1
max_amount: 3
deepslate_ewenite_ore:
type: omc_dream:deepslate_ewenite_ore
items:
ruby:
item: omc_dream:ewenite
min_amount: 1
max_amount: 2
chance: 100
exp:
exp_1:
chance: 0
min_amount: 1
max_amount: 3
Loading