Trying to fix villager spawn
This commit is contained in:
parent
c9dd268c14
commit
131d131dfe
@ -76,9 +76,9 @@ public class Merchand implements Listener{
|
||||
current = genTrade(System.currentTimeMillis() / (1000 * 60 * 60));
|
||||
next = genTrade(1 + System.currentTimeMillis() / (1000 * 60 * 60));
|
||||
Location center = Bukkit.getWorld("world").getWorldBorder().getCenter();
|
||||
double brdSize = Bukkit.getWorld("world").getWorldBorder().getSize();
|
||||
double brdSize = Bukkit.getWorld("world").getWorldBorder().getSize() - 1;
|
||||
double x = new Random().nextDouble(brdSize) - brdSize/2, z = new Random().nextDouble(brdSize) - brdSize/2;
|
||||
m = (Villager) Bukkit.getWorld("world").spawnEntity(center.add(x, 100, z), EntityType.VILLAGER);
|
||||
m = (Villager) Bukkit.getWorld("world").spawnEntity(center.add(x, 200, z), EntityType.VILLAGER);
|
||||
m.getPersistentDataContainer().set(tagger, PersistentDataType.BOOLEAN, true);
|
||||
m.setGlowing(true);
|
||||
m.setInvulnerable(true);
|
||||
|
Loading…
Reference in New Issue
Block a user