mirror of
https://github.com/songoda/EpicHoppers.git
synced 2024-11-26 12:16:18 +01:00
Merge branch 'development'
This commit is contained in:
commit
2ffe317556
@ -4,7 +4,7 @@ stages:
|
||||
variables:
|
||||
name: "EpicHoppers"
|
||||
path: "/builds/$CI_PROJECT_PATH"
|
||||
version: "4.3.8"
|
||||
version: "4.3.9"
|
||||
|
||||
build:
|
||||
stage: build
|
||||
|
@ -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();
|
||||
@ -357,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;
|
||||
|
Loading…
Reference in New Issue
Block a user