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:
|
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
|
||||||
|
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user