Selaa lähdekoodia

fixed lava on water generators not generating cobblestone

MasterCake 4 vuotta sitten
vanhempi
commit
eed6dbad9e
3 muutettua tiedostoa jossa 5 lisäystä ja 10 poistoa
  1. 2 1
      pom.xml
  2. 1 5
      src/xyz/spaceio/customoregen/Events.java
  3. 2 4
      src/xyz/spaceio/hooks/HookVanilla.java

+ 2 - 1
pom.xml

@@ -4,7 +4,7 @@
 	<modelVersion>4.0.0</modelVersion>
 	<groupId>xyz.spaceio</groupId>
 	<artifactId>CustomOreGen</artifactId>
-	<version>1.3.25-SNAPSHOT</version>
+	<version>1.3.26-SNAPSHOT</version>
 	<repositories>
 		<!-- Spigot repository -->
 		<repository>
@@ -141,6 +141,7 @@
 			<version>2.6.6.2-SNAPSHOT</version>
 			<scope>provided</scope>
 		</dependency>
+		<!-- FabledSkyblock -->
 		<dependency>
 			<groupId>com.songoda</groupId>
 			<artifactId>fabledskyblock</artifactId>

+ 1 - 5
src/xyz/spaceio/customoregen/Events.java

@@ -76,9 +76,6 @@ public class Events implements Listener {
 				if (Material.getMaterial(winning.getName()) == null)
 					return;
 
-				if (Material.getMaterial(winning.getName()).equals(Material.COBBLESTONE) && winning.getDamage() == 0) {
-					return;
-				}
 				event.setCancelled(true);
 
 				//b.setType(Material.getMaterial(winning.getName()));
@@ -93,11 +90,10 @@ public class Events implements Listener {
 					}
 	
 				}else {
-					Bukkit.getScheduler().runTask(plugin, () -> {
 						b.setType(Material.getMaterial(winning.getName()));
 						b.getState().update(true);
 						b.getWorld().playSound(b.getLocation(), Sound.BLOCK_FIRE_EXTINGUISH, 1f, 10f);
-					});
+
 				}
 				//b.setData(winning.getDamage(), true);
 			}

+ 2 - 4
src/xyz/spaceio/hooks/HookVanilla.java

@@ -1,6 +1,5 @@
 package xyz.spaceio.hooks;
 
-import java.util.Arrays;
 import java.util.Comparator;
 import java.util.List;
 import java.util.Optional;
@@ -9,7 +8,6 @@ import java.util.stream.Collectors;
 
 import org.bukkit.Bukkit;
 import org.bukkit.Location;
-import org.bukkit.entity.Entity;
 import org.bukkit.entity.Player;
 
 public class HookVanilla implements SkyblockAPIHook{
@@ -27,11 +25,11 @@ public class HookVanilla implements SkyblockAPIHook{
 	public Optional<UUID> getIslandOwner(Location loc) {
 		Optional<UUID> optional = Optional.empty();
 		
-		List<Entity> list = loc.getWorld().getNearbyEntities(loc, 5, 5, 5).stream()
-			.filter(e -> e instanceof Player)
+		List<Player> list = loc.getWorld().getPlayers().stream()
 			.sorted(Comparator.comparingDouble(e -> e.getLocation().distance(loc)))
 			.collect(Collectors.toList());
 		
+		
 		if(list.size() > 0) {
 			optional = Optional.of(((Player) list.get(0)).getUniqueId());
 		}