Skip to content

Commit

Permalink
Merge pull request #2 from MrJoshuaT/StackedTreasureMaps
Browse files Browse the repository at this point in the history
fix: Support for stacked treasure maps
  • Loading branch information
Machine-Maker authored Jul 14, 2023
2 parents 2f698de + b5b2713 commit 6ba9933
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public void onEvent(final PlayerInteractEvent event) {
final ServerPlayer serverPlayer = Utils.getNmsPlayer(event.getPlayer());
final List<net.minecraft.world.item.ItemStack> randomItems = rollLootTable(event.getItem(), serverPlayer);
if (event.getPlayer().getGameMode() != GameMode.CREATIVE) {
event.getItem().setAmount(0);
event.getItem().setAmount(event.getItem().getAmount() - 1);
}
for (final net.minecraft.world.item.ItemStack randomItem : randomItems) {
event.getPlayer().getWorld().dropItem(event.getPlayer().getLocation(), Utils.getBukkitStackMirror(randomItem.copy()), item1 -> {
Expand Down

0 comments on commit 6ba9933

Please sign in to comment.