1
mirror of https://github.com/StarWishsama/Slimefun4.git synced 2024-09-20 03:35:51 +00:00

Merge pull request #898 from jellysnake/master

Fix miners not having the correct range
This commit is contained in:
TheBusyBiscuit 2019-04-20 10:16:16 +02:00 committed by GitHub
commit 5b0a3f2acf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1901,8 +1901,8 @@ public class SlimefunSetup {
Chest chest = (Chest) chestBlock.getState(); Chest chest = (Chest) chestBlock.getState();
final Inventory inv = chest.getInventory(); final Inventory inv = chest.getInventory();
List<Location> ores = new ArrayList<Location>(); List<Location> ores = new ArrayList<Location>();
for (int x = b.getX() - 4; x < b.getX() + 4; x++) { for (int x = b.getX() - 4; x <= b.getX() + 4; x++) {
for (int z = b.getZ() - 4; z < b.getZ() + 4; z++) { for (int z = b.getZ() - 4; z <= b.getZ() + 4; z++) {
for (int y = b.getY(); y > 0; y--) { for (int y = b.getY(); y > 0; y--) {
if (b.getWorld().getBlockAt(x, y, z).getType().toString().endsWith("_ORE")) { if (b.getWorld().getBlockAt(x, y, z).getType().toString().endsWith("_ORE")) {
ores.add(b.getWorld().getBlockAt(x, y, z).getLocation()); ores.add(b.getWorld().getBlockAt(x, y, z).getLocation());
@ -1959,8 +1959,8 @@ public class SlimefunSetup {
Chest chest = (Chest) chestBlock.getState(); Chest chest = (Chest) chestBlock.getState();
final Inventory inv = chest.getInventory(); final Inventory inv = chest.getInventory();
List<Location> ores = new ArrayList<Location>(); List<Location> ores = new ArrayList<Location>();
for (int x = b.getX() - 6; x < b.getX() + 6; x++) { for (int x = b.getX() - 6; x <= b.getX() + 6; x++) {
for (int z = b.getZ() - 6; z < b.getZ() + 6; z++) { for (int z = b.getZ() - 6; z <= b.getZ() + 6; z++) {
for (int y = b.getY(); y > 0; y--) { for (int y = b.getY(); y > 0; y--) {
if (b.getWorld().getBlockAt(x, y, z).getType().toString().endsWith("_ORE")) { if (b.getWorld().getBlockAt(x, y, z).getType().toString().endsWith("_ORE")) {
ores.add(b.getWorld().getBlockAt(x, y, z).getLocation()); ores.add(b.getWorld().getBlockAt(x, y, z).getLocation());