From f875833a1abb726de2d345e5d36b6ab5e337819c Mon Sep 17 00:00:00 2001 From: ASangarin Date: Tue, 15 Dec 2020 20:40:33 +0100 Subject: [PATCH] Item drops added by MMOItems are now dropped more naturally and have a much lower (if not 0%) chance of glitching through the ceiling --- lib/MMOLib.jar | Bin 410780 -> 412633 bytes pom.xml | 2 +- .../mmoitems/api/interaction/Tool.java | 8 ++-- .../mmoitems/manager/DropTableManager.java | 35 ++---------------- 4 files changed, 8 insertions(+), 37 deletions(-) diff --git a/lib/MMOLib.jar b/lib/MMOLib.jar index 2930648f0fb325af17fa3edb240000f1a9957472..ab5829170bf1a391612a815e5624d6ae1af1940f 100644 GIT binary patch delta 16388 zcmZu&2RxPE|93CW%vnjW!B(m}}$S6q(b*md1LJ^84${ta& zDkJm%jGOZP{k>k_?>*=J{;cyk=Q-y*=Q-u2@OFc|Ob#~GG#pfPbaYhjFQ2=^q(MXd z@$$KBGa6OoH=afZ`F%iR1pk7)*%-;}89th9ahw1`I2g;4f^b>@QYm4yN2DBVQ7MuL zeh&s=GSg(UMeq!yDkfzVSnosaKp5M%%<7y$fMP zl?*}pF(?+2bRH5*HjKo;NU{7OM4Ke4^cpFElw2`@+s1J`ByH8xo3g+_`lW~m|+1>_pq#*5Pv?n|4QLzAn3zWRbf??lqxa@;z zh#iuH@e?$~1k--B9S+7yBvEr49MYID8$0-yRA$fsgqHMtUjr=?MV*Z- z_+JX2JRYD1nbrwfQvLoUFG_o)WoJ6*F8a>!Ci<2VV zIe7{VPdCj8QOivG0{>=ZYUTdKv5^|mb&yEzX3o=W(q|*7<{1pRdTQ5-c;KyEn~~n0$q( zRi3vd^H^NH0w}2aaG=KnM+ms0q4+MJedeS%zvvbd#`<$M*reFc3iP%Td=CUT>3F-# zKS|lz?1)orGqJM=V`I0wXx-KitbRb6wz^$w?yq%eMqtiavMq~0?L9kd*V0q#{p`}g z<+bU7qs5VFJl`s^5@k};+juJ4ehhwmNj!WvuYKEt?XBlu52c<}sJR{z7{JZ*n>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BXEi0`!VWY(P^6Rlqyh zLk8-zjQ&?Hl|YgLoXV`ge@$2Dv*9KXKEWQJcc3P)?fkcSx9sF`%yqs}}JyMetfk z1Rv&Bf`L^saPJZe^YHxfG^~kH7lLs`RE`5PKca-3|A@>mB|b9_))SsuftR%G!?bN5p;j--fL42N|j;^W^+h z75X4jM(2YsF)0h$y4OETEhgVW05gHS{p~1@bJsA45kcpaU!tFYC zH}&W81m;D4OT_u@0|*OcPiZAu_mfP%Io=8CaHy5k=DKa7uFgi z^I^G_51iCOB}nbV^9hSc&fn%EDBzogRkXEWmF3#7%F(I6glrN;2;^y_<|Lcxd8h>7 z(t&2ZnE8u>dUgsY@P{z`yIp>5c(#FnAee>!%M|zzBhL~+h5_6FL0Aoh^TG?^Q|2fI z$m+uqgNX8yhS@QK0@$w$*)|-^4|YC^FnFyGt^1}6t>flm!XAPYUU10>hRatE!Uwqj zz>+}M7_u8NIF|>9v-P0|YxuFUHVD&)+UxKSeQ-w~wIfZ7V-i>JMUKJ`;^Fa>X;?Hg zmeeVY$qthy<*{Eou-XvSBVAVm8HVUilB6aEDga$0)R+{*`miyes51?|Wds#mFk*6k z8KHipK@;Z3Zev)%-jw;lV@**2Q^wFLx-}DVGew1g`%;Q1)5C)%P*0S@e3=sXWdf@d zFZly|k%~P3d?ed?D;>vyWhrHL3>k7NYtj^H0nV_ECz=oVJv$VJ*%tm@Ib9sJxk?NHyFVI?+n}hd48@iz!|kBXB5wcYMfCA^2)loko0YYAN1=&6?QIAMcRY8 z!rdH@9Ke=-+;-HC7lH&>`%wBsL~PsGC&JDLy(2oWJ_tRoNt-oQOD G;r{^HPYv_{ diff --git a/pom.xml b/pom.xml index 6c894b38..72b10ae9 100644 --- a/pom.xml +++ b/pom.xml @@ -93,7 +93,7 @@ net.Indyuce MMOLib - 1.6 + 1.7.3 system ${basedir}/lib/MMOLib.jar diff --git a/src/main/java/net/Indyuce/mmoitems/api/interaction/Tool.java b/src/main/java/net/Indyuce/mmoitems/api/interaction/Tool.java index 4c20b035..c6c7668b 100644 --- a/src/main/java/net/Indyuce/mmoitems/api/interaction/Tool.java +++ b/src/main/java/net/Indyuce/mmoitems/api/interaction/Tool.java @@ -1,5 +1,6 @@ package net.Indyuce.mmoitems.api.interaction; +import net.mmogroup.mmolib.UtilityMethods; import org.bukkit.Location; import org.bukkit.Material; import org.bukkit.Particle; @@ -30,12 +31,11 @@ public class Tool extends UseItem { if (getNBTItem().getBoolean("MMOITEMS_AUTOSMELT")) if (block.getType() == Material.IRON_ORE || block.getType() == Material.GOLD_ORE) { - ItemStack item = new ItemStack(Material.valueOf(block.getType().name().replace("_ORE", "") + "_INGOT")); + ItemStack item = new ItemStack(Material.valueOf(block.getType().name().replace("_ORE", "_INGOT"))); - Location loc = block.getLocation().add(.5, 0, .5); + UtilityMethods.dropItemNaturally(block.getLocation(), item); + block.getWorld().spawnParticle(Particle.CLOUD, block.getLocation().add(.5, .5, .5), 0); block.setType(Material.AIR); - block.getWorld().dropItemNaturally(loc, item); - block.getWorld().spawnParticle(Particle.CLOUD, loc.add(0, .5, 0), 0); cancel = true; } diff --git a/src/main/java/net/Indyuce/mmoitems/manager/DropTableManager.java b/src/main/java/net/Indyuce/mmoitems/manager/DropTableManager.java index 8eddae6f..4585b550 100644 --- a/src/main/java/net/Indyuce/mmoitems/manager/DropTableManager.java +++ b/src/main/java/net/Indyuce/mmoitems/manager/DropTableManager.java @@ -7,15 +7,14 @@ import net.Indyuce.mmoitems.api.droptable.DropTable; import net.Indyuce.mmoitems.api.event.CustomBlockDropEvent; import net.Indyuce.mmoitems.api.player.PlayerData; import net.Indyuce.mmoitems.listener.CustomBlockListener; +import net.mmogroup.mmolib.UtilityMethods; import org.bukkit.Bukkit; import org.bukkit.GameMode; import org.bukkit.Material; import org.bukkit.block.Block; -import org.bukkit.block.BlockFace; import org.bukkit.configuration.file.FileConfiguration; import org.bukkit.enchantments.Enchantment; import org.bukkit.entity.EntityType; -import org.bukkit.entity.Item; import org.bukkit.entity.LivingEntity; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; @@ -113,7 +112,7 @@ public class DropTableManager implements Listener, Reloadable { return; for (ItemStack drop : drops) - drop(block, drop); + UtilityMethods.dropItemNaturally(block.getLocation(), drop); }, 2); } @@ -121,38 +120,10 @@ public class DropTableManager implements Listener, Reloadable { final Material type = block.getType(); Bukkit.getScheduler().runTaskLater(MMOItems.plugin, () -> { for (ItemStack drop : blocks.get(type).read(PlayerData.get(player), hasSilkTouchTool(player))) - drop(block, drop); + UtilityMethods.dropItemNaturally(block.getLocation(), drop); }, 2); } } - - private void drop(Block block, ItemStack drop) { - Block above = block.getRelative(BlockFace.UP); - if(above.isEmpty() || above.isLiquid() || above.isPassable()) { - Item item = block.getWorld().dropItemNaturally(block.getLocation().add(.5, .1, .5), drop); - item.setVelocity(item.getVelocity().multiply(0.5f)); - } - else block.getWorld().dropItemNaturally(block.getLocation().add(.5, 0, .5), drop); - } - - // public Collection getBlockDrops(Block block, Player player) { - // final Material type = block.getType(); - // - // CustomBlock custom = CustomBlock.getFromData(block.getBlockData()) ; - // if (custom != null) { - // if (customBlocks.containsKey(custom.getId())) { - // if (CustomBlockListener.getPickaxePower(player) >= - // custom.getRequiredPower()) { - // return customBlocks.get(custom.getId()).read(hasSilkTouchTool(player)); - // } - // } - // } else { - // if (blocks.containsKey(type)) { - // return blocks.get(type).read(hasSilkTouchTool(player)); - // } - // } - // return block.getDrops(player.getInventory().getItemInMainHand()); - // } public boolean hasSilkTouchTool(Player player) { ItemStack item = player.getInventory().getItemInMainHand();