Merge branch 'development'

This commit is contained in:
Brianna 2019-11-08 21:57:06 -05:00
commit 2ffe317556
2 changed files with 10 additions and 7 deletions

View File

@ -4,7 +4,7 @@ stages:
variables: variables:
name: "EpicHoppers" name: "EpicHoppers"
path: "/builds/$CI_PROJECT_PATH" path: "/builds/$CI_PROJECT_PATH"
version: "4.3.8" version: "4.3.9"
build: build:
stage: build stage: build

View File

@ -18,6 +18,7 @@ import org.bukkit.block.BlockFace;
import org.bukkit.block.Hopper; import org.bukkit.block.Hopper;
import org.bukkit.entity.Entity; import org.bukkit.entity.Entity;
import org.bukkit.entity.EntityType; import org.bukkit.entity.EntityType;
import org.bukkit.entity.Minecart;
import org.bukkit.entity.minecart.StorageMinecart; import org.bukkit.entity.minecart.StorageMinecart;
import org.bukkit.inventory.Inventory; import org.bukkit.inventory.Inventory;
import org.bukkit.inventory.InventoryHolder; import org.bukkit.inventory.InventoryHolder;
@ -269,7 +270,8 @@ public class HopTask extends BukkitRunnable {
contents = getFarmContents(above); contents = getFarmContents(above);
pullableSlots = IntStream.rangeClosed(0, contents.length - 1).toArray(); pullableSlots = IntStream.rangeClosed(0, contents.length - 1).toArray();
} else { } else {
if ((aboveInvHolder = this.getRandomInventoryHolderFromEntities(nearbyEntities)) == null) if ((aboveInvHolder = this.getRandomInventoryHolderFromEntities(nearbyEntities)) == null
|| ((Minecart) aboveInvHolder).getLocation().getBlockY() + 1 == above.getY())
return; return;
if (aboveInvHolder instanceof StorageMinecart) { if (aboveInvHolder instanceof StorageMinecart) {
pullableSlots = IntStream.rangeClosed(0, 26).toArray(); pullableSlots = IntStream.rangeClosed(0, 26).toArray();
@ -357,11 +359,12 @@ public class HopTask extends BukkitRunnable {
&& pointingLocation.getWorld().isChunkLoaded( && pointingLocation.getWorld().isChunkLoaded(
pointingLocation.getBlockX() >> 4, pointingLocation.getBlockX() >> 4,
pointingLocation.getBlockZ() >> 4)) { pointingLocation.getBlockZ() >> 4)) {
switch (pointingLocation.getBlock().getType()) { switch (pointingLocation.getBlock().getType().name()) {
case AIR: case "AIR":
case RAIL: case "RAILS":
case POWERED_RAIL: case "RAIL":
case DETECTOR_RAIL: case "POWERED_RAIL":
case "DETECTOR_RAIL":
// Add storage/hopper minecarts the hopper is pointing into if there aren't any destinations // Add storage/hopper minecarts the hopper is pointing into if there aren't any destinations
checkForMinecarts = linkedContainers.size() < 2; checkForMinecarts = linkedContainers.size() < 2;
break; break;