From 50e4cdef31f0637facd9485c2276471d71395db2 Mon Sep 17 00:00:00 2001 From: Brianna Date: Wed, 16 Oct 2019 18:42:16 -0400 Subject: [PATCH 1/4] Fix for egg drop amount. --- .../com/songoda/ultimatestacker/listeners/EntityListeners.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/com/songoda/ultimatestacker/listeners/EntityListeners.java b/src/main/java/com/songoda/ultimatestacker/listeners/EntityListeners.java index affb414..6d4b9bc 100644 --- a/src/main/java/com/songoda/ultimatestacker/listeners/EntityListeners.java +++ b/src/main/java/com/songoda/ultimatestacker/listeners/EntityListeners.java @@ -70,7 +70,10 @@ public class EntityListeners implements Listener { EntityStack stack = stackManager.getStack(entity); ItemStack item = event.getEntity().getItemStack(); + int amount = (stack.getAmount() - 1) + item.getAmount(); item.setAmount(Math.min((stack.getAmount() - 1) + item.getAmount(), item.getMaxStackSize())); + if (amount > item.getMaxStackSize()) + UltimateStacker.updateItemAmount(event.getEntity(), amount); event.getEntity().setItemStack(item); } From 57735defa443428c18600377b58bb1998bf0c9e0 Mon Sep 17 00:00:00 2001 From: Brianna Date: Sun, 20 Oct 2019 11:54:17 -0400 Subject: [PATCH 2/4] Fixed an issue with zombie pigmen and spawners. --- .../songoda/ultimatestacker/listeners/SpawnerListeners.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/songoda/ultimatestacker/listeners/SpawnerListeners.java b/src/main/java/com/songoda/ultimatestacker/listeners/SpawnerListeners.java index ac3f246..cd694d3 100644 --- a/src/main/java/com/songoda/ultimatestacker/listeners/SpawnerListeners.java +++ b/src/main/java/com/songoda/ultimatestacker/listeners/SpawnerListeners.java @@ -82,7 +82,9 @@ public class SpawnerListeners implements Listener { EntityType entityType; if (ServerVersion.isServerVersionAtLeast(ServerVersion.V1_13)) - entityType = EntityType.valueOf(itemType.name().replace("_SPAWN_EGG", "").replace("MOOSHROOM", "MUSHROOM_COW")); + entityType = EntityType.valueOf(itemType.name().replace("_SPAWN_EGG", "") + .replace("MOOSHROOM", "MUSHROOM_COW") + .replace("ZOMBIE_PIGMAN", "PIG_ZOMBIE")); else if (ServerVersion.isServerVersionAtLeast(ServerVersion.V1_12)) { String str = Reflection.getNBTTagCompound(Reflection.getNMSItemStack(event.getItem())).toString(); if (str.contains("minecraft:")) From 0231ea8811d9af426829ebc2e9671e8776ec6728 Mon Sep 17 00:00:00 2001 From: Brianna Date: Sun, 20 Oct 2019 11:56:29 -0400 Subject: [PATCH 3/4] removed some imports. --- .../ultimatestacker/listeners/EntityListeners.java | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/main/java/com/songoda/ultimatestacker/listeners/EntityListeners.java b/src/main/java/com/songoda/ultimatestacker/listeners/EntityListeners.java index 6d4b9bc..9bca418 100644 --- a/src/main/java/com/songoda/ultimatestacker/listeners/EntityListeners.java +++ b/src/main/java/com/songoda/ultimatestacker/listeners/EntityListeners.java @@ -7,19 +7,12 @@ import com.songoda.ultimatestacker.entity.EntityStackManager; import com.songoda.ultimatestacker.settings.Settings; import com.songoda.ultimatestacker.spawner.SpawnerStack; import com.songoda.ultimatestacker.utils.Methods; -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; import org.bukkit.Bukkit; import org.bukkit.Location; import org.bukkit.Material; import org.bukkit.block.Block; import org.bukkit.block.CreatureSpawner; -import org.bukkit.entity.Creeper; -import org.bukkit.entity.Entity; -import org.bukkit.entity.EntityType; -import org.bukkit.entity.LivingEntity; -import org.bukkit.entity.TNTPrimed; +import org.bukkit.entity.*; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; import org.bukkit.event.Listener; @@ -29,6 +22,10 @@ import org.bukkit.event.entity.ItemSpawnEvent; import org.bukkit.inventory.ItemStack; import org.bukkit.metadata.FixedMetadataValue; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; + public class EntityListeners implements Listener { private final UltimateStacker plugin; From a590124534ade080f5a2900d841e1acc034943cf Mon Sep 17 00:00:00 2001 From: Brianna Date: Sun, 20 Oct 2019 11:56:45 -0400 Subject: [PATCH 4/4] version 1.10.18 --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index fd2e066..dc4d82c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,7 +4,7 @@ stages: variables: name: "UltimateStacker" path: "/builds/$CI_PROJECT_PATH" - version: "1.10.17" + version: "1.10.18" build: stage: build