mirror of
https://github.com/Xiao-MoMi/Custom-Crops.git
synced 2025-12-25 09:59:20 +00:00
3.4.4.2
This commit is contained in:
@@ -52,7 +52,7 @@ public class BlockPos {
|
||||
}
|
||||
|
||||
public int getSectionID() {
|
||||
return getY() / 16;
|
||||
return (int) Math.floor((double) getY() / 16);
|
||||
}
|
||||
|
||||
public int getY() {
|
||||
@@ -78,7 +78,7 @@ public class BlockPos {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ChunkPos{" +
|
||||
return "BlockPos{" +
|
||||
"x=" + getX() +
|
||||
"y=" + getY() +
|
||||
"z=" + getZ() +
|
||||
|
||||
@@ -8,7 +8,7 @@ plugins {
|
||||
allprojects {
|
||||
|
||||
project.group = "net.momirealms"
|
||||
project.version = "3.4.4.1"
|
||||
project.version = "3.4.4.2"
|
||||
|
||||
apply<JavaPlugin>()
|
||||
apply(plugin = "java")
|
||||
|
||||
@@ -26,10 +26,7 @@ import net.momirealms.customcrops.util.RotationUtils;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.entity.ItemFrame;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.entity.*;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import java.util.Collection;
|
||||
@@ -68,7 +65,7 @@ public interface CustomProvider {
|
||||
return false;
|
||||
Location center = LocationUtils.toCenterLocation(location);
|
||||
Collection<Entity> entities = center.getWorld().getNearbyEntities(center, 0.5,0.51,0.5);
|
||||
entities.removeIf(entity -> entity instanceof Player);
|
||||
entities.removeIf(entity -> (entity instanceof Player || entity instanceof Item));
|
||||
return entities.size() == 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user