From 29d2aaf055741cb5712167b6bb4a5383d9999a0f Mon Sep 17 00:00:00 2001 From: TheBusyBiscuit Date: Sat, 16 May 2020 12:42:46 +0200 Subject: [PATCH] Fixes #1914 --- CHANGELOG.md | 1 + .../implementation/items/multiblocks/OreWasher.java | 11 ++++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0031bf7d1..52672c631 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -47,6 +47,7 @@ * Fixed #1829 * Fixed some mojang.com connection errors * Fixed some very weird SkullMeta serialization problems in 1.15 +* Fixed #1914 ## Release Candidate 11 (25 Apr 2020) diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/multiblocks/OreWasher.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/multiblocks/OreWasher.java index a55e669ae..3f9c334e6 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/multiblocks/OreWasher.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/multiblocks/OreWasher.java @@ -74,7 +74,7 @@ public class OreWasher extends MultiBlockMachine { return; } - else if (SlimefunUtils.isItemSimilar(current, new ItemStack(Material.SAND, 4), false)) { + else if (SlimefunUtils.isItemSimilar(current, new ItemStack(Material.SAND, 2), false)) { ItemStack output = SlimefunItems.SALT; Inventory outputInv = findOutputInventory(output, dispBlock, inv); @@ -82,7 +82,7 @@ public class OreWasher extends MultiBlockMachine { ItemStack removing = current.clone(); removing.setAmount(2); inv.removeItem(removing); - outputInv.addItem(output); + outputInv.addItem(output.clone()); p.getWorld().playEffect(b.getLocation(), Effect.STEP_SOUND, Material.WATER); p.getWorld().playSound(b.getLocation(), Sound.ENTITY_PLAYER_SPLASH, 1, 1); } @@ -98,7 +98,7 @@ public class OreWasher extends MultiBlockMachine { ItemStack removing = current.clone(); removing.setAmount(1); inv.removeItem(removing); - outputInv.addItem(output); + outputInv.addItem(output.clone()); p.getWorld().playEffect(b.getLocation(), Effect.STEP_SOUND, Material.WATER); p.getWorld().playSound(b.getLocation(), Sound.ENTITY_PLAYER_SPLASH, 1, 1); } @@ -111,6 +111,11 @@ public class OreWasher extends MultiBlockMachine { SlimefunPlugin.getLocal().sendMessage(p, "machines.unknown-material", true); } + /** + * This returns a random dust item from Slimefun. + * + * @return A randomly picked dust item + */ public ItemStack getRandomDust() { int index = ThreadLocalRandom.current().nextInt(shownRecipes.size() / 2); return shownRecipes.get(index * 2 + 1).clone();