mirror of
https://github.com/StarWishsama/Slimefun4.git
synced 2024-09-19 19:25:48 +00:00
Fixes #2325
This commit is contained in:
parent
0227e0cc30
commit
cdc495e62b
@ -37,6 +37,7 @@
|
|||||||
* Fixed Cheat Sheet Slimefun Guide being unable to open the settings menu via shift + right click
|
* Fixed Cheat Sheet Slimefun Guide being unable to open the settings menu via shift + right click
|
||||||
* Fixed #2320
|
* Fixed #2320
|
||||||
* Fixed some issues with ChestTerminal
|
* Fixed some issues with ChestTerminal
|
||||||
|
* Fixed #2325
|
||||||
|
|
||||||
## Release Candidate 16 (07 Sep 2020)
|
## Release Candidate 16 (07 Sep 2020)
|
||||||
https://thebusybiscuit.github.io/builds/TheBusyBiscuit/Slimefun4/stable/#16
|
https://thebusybiscuit.github.io/builds/TheBusyBiscuit/Slimefun4/stable/#16
|
||||||
|
@ -133,11 +133,19 @@ public class TalismanListener implements Listener {
|
|||||||
|
|
||||||
LivingEntity entity = e.getEntity();
|
LivingEntity entity = e.getEntity();
|
||||||
|
|
||||||
if (!(entity instanceof Player) && !(entity instanceof ArmorStand) && Talisman.checkFor(e, SlimefunItems.TALISMAN_HUNTER)) {
|
if (entity instanceof Player || entity instanceof ArmorStand) {
|
||||||
|
// We absolutely don't want to double the
|
||||||
|
// drops from players or ArmorStands
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// We are also excluding entities which can pickup items, this is not perfect
|
||||||
|
// but it at least prevents dupes by tossing items to zombies
|
||||||
|
if (!entity.getCanPickupItems() && Talisman.checkFor(e, SlimefunItems.TALISMAN_HUNTER)) {
|
||||||
Collection<ItemStack> extraDrops = getExtraDrops(e.getEntity(), e.getDrops());
|
Collection<ItemStack> extraDrops = getExtraDrops(e.getEntity(), e.getDrops());
|
||||||
|
|
||||||
for (ItemStack drop : extraDrops) {
|
for (ItemStack drop : extraDrops) {
|
||||||
if (drop != null) {
|
if (drop != null && drop.getType() != Material.AIR) {
|
||||||
e.getDrops().add(drop.clone());
|
e.getDrops().add(drop.clone());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -163,7 +171,10 @@ public class TalismanListener implements Listener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Prevent duplication of handheld items or armor
|
// WARNING: This check is broken as entities now set their
|
||||||
|
// equipment to NULL before calling the event!
|
||||||
|
|
||||||
|
// Prevents duplication of handheld items or armor
|
||||||
EntityEquipment equipment = entity.getEquipment();
|
EntityEquipment equipment = entity.getEquipment();
|
||||||
if (equipment != null) {
|
if (equipment != null) {
|
||||||
for (ItemStack item : equipment.getArmorContents()) {
|
for (ItemStack item : equipment.getArmorContents()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user