1
mirror of https://github.com/StarWishsama/Slimefun4.git synced 2024-09-20 03:35:51 +00:00

Merge pull request #503 from AtomicScience/ore_washer_fix

Ore washer dupe fix
This commit is contained in:
TheBusyBiscuit 2017-11-25 17:33:18 +01:00 committed by GitHub
commit fc5be2778d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1332,13 +1332,13 @@ public class SlimefunSetup {
else if (SlimefunStartup.chance(100, 25)) adding = SlimefunItems.LEAD_DUST; else if (SlimefunStartup.chance(100, 25)) adding = SlimefunItems.LEAD_DUST;
else if (SlimefunStartup.chance(100, 25)) adding = SlimefunItems.SILVER_DUST; else if (SlimefunStartup.chance(100, 25)) adding = SlimefunItems.SILVER_DUST;
if (InvUtils.fits(inv, adding)) { if (inv.firstEmpty() != -1) {
ItemStack removing = current.clone(); ItemStack removing = current.clone();
removing.setAmount(1); removing.setAmount(1);
inv.removeItem(removing); inv.removeItem(removing);
inv.addItem(adding); inv.addItem(adding);
p.getWorld().playEffect(b.getLocation(), Effect.STEP_SOUND, Material.WATER);
p.getWorld().playSound(b.getLocation(), Sound.ENTITY_PLAYER_SPLASH, 1, 1); p.getWorld().playSound(b.getLocation(), Sound.ENTITY_PLAYER_SPLASH, 1, 1);
p.getWorld().playEffect(b.getLocation(), Effect.STEP_SOUND, Material.WATER);
if (InvUtils.fits(inv, SlimefunItems.STONE_CHUNK)) inv.addItem(SlimefunItems.STONE_CHUNK); if (InvUtils.fits(inv, SlimefunItems.STONE_CHUNK)) inv.addItem(SlimefunItems.STONE_CHUNK);
} }
else Messages.local.sendTranslation(p, "machines.full-inventory", true); else Messages.local.sendTranslation(p, "machines.full-inventory", true);