From 2147b4f02be06b175eb5d4a8af001faa9575fc10 Mon Sep 17 00:00:00 2001 From: Brianna Date: Fri, 8 Nov 2019 17:43:31 -0500 Subject: [PATCH 1/3] Don't fetch from de side. --- src/main/java/com/songoda/epichoppers/tasks/HopTask.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/songoda/epichoppers/tasks/HopTask.java b/src/main/java/com/songoda/epichoppers/tasks/HopTask.java index 84340a2..138f363 100644 --- a/src/main/java/com/songoda/epichoppers/tasks/HopTask.java +++ b/src/main/java/com/songoda/epichoppers/tasks/HopTask.java @@ -18,6 +18,7 @@ import org.bukkit.block.BlockFace; import org.bukkit.block.Hopper; import org.bukkit.entity.Entity; import org.bukkit.entity.EntityType; +import org.bukkit.entity.Minecart; import org.bukkit.entity.minecart.StorageMinecart; import org.bukkit.inventory.Inventory; import org.bukkit.inventory.InventoryHolder; @@ -269,7 +270,8 @@ public class HopTask extends BukkitRunnable { contents = getFarmContents(above); pullableSlots = IntStream.rangeClosed(0, contents.length - 1).toArray(); } else { - if ((aboveInvHolder = this.getRandomInventoryHolderFromEntities(nearbyEntities)) == null) + if ((aboveInvHolder = this.getRandomInventoryHolderFromEntities(nearbyEntities)) == null + || ((Minecart) aboveInvHolder).getLocation().getBlockY() + 1 == above.getY()) return; if (aboveInvHolder instanceof StorageMinecart) { pullableSlots = IntStream.rangeClosed(0, 26).toArray(); From b9ace79052f017683cca1c4a7f8d6e1f6078f961 Mon Sep 17 00:00:00 2001 From: Brianna Date: Fri, 8 Nov 2019 21:55:15 -0500 Subject: [PATCH 2/3] Fixed an issue with rail naming. --- .../java/com/songoda/epichoppers/tasks/HopTask.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/songoda/epichoppers/tasks/HopTask.java b/src/main/java/com/songoda/epichoppers/tasks/HopTask.java index 138f363..cca15b2 100644 --- a/src/main/java/com/songoda/epichoppers/tasks/HopTask.java +++ b/src/main/java/com/songoda/epichoppers/tasks/HopTask.java @@ -359,11 +359,12 @@ public class HopTask extends BukkitRunnable { && pointingLocation.getWorld().isChunkLoaded( pointingLocation.getBlockX() >> 4, pointingLocation.getBlockZ() >> 4)) { - switch (pointingLocation.getBlock().getType()) { - case AIR: - case RAIL: - case POWERED_RAIL: - case DETECTOR_RAIL: + switch (pointingLocation.getBlock().getType().name()) { + case "AIR": + case "RAILS": + case "RAIL": + case "POWERED_RAIL": + case "DETECTOR_RAIL": // Add storage/hopper minecarts the hopper is pointing into if there aren't any destinations checkForMinecarts = linkedContainers.size() < 2; break; From 9c4fdd0971568d524ab6db566f6616725a79a255 Mon Sep 17 00:00:00 2001 From: Brianna Date: Fri, 8 Nov 2019 17:44:00 -0500 Subject: [PATCH 3/3] version 4.3.9 --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f5829ba..009c8f6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,7 +4,7 @@ stages: variables: name: "EpicHoppers" path: "/builds/$CI_PROJECT_PATH" - version: "4.3.8" + version: "4.3.9" build: stage: build