Moved Herobrine's default spawn location from (0, -20, 0) to (0, -100, 0). This change was made because, as of Minecraft 1.18, (0, -20, 0) is no longer a coordinate located underneath the world boundary.

This commit is contained in:
David Berdik 2022-03-11 18:23:42 -05:00
parent 1d07521107
commit 482aedc6e3
6 changed files with 10 additions and 10 deletions

View File

@ -212,7 +212,7 @@ public class AICore {
Stop_RM();
Stop_RS();
Stop_CG();
Location nowloc = new Location((World) Bukkit.getServer().getWorlds().get(0), 0, -20.f, 0);
Location nowloc = new Location((World) Bukkit.getServer().getWorlds().get(0), 0, -100.f, 0);
nowloc.setYaw(1.f);
nowloc.setPitch(1.f);
@ -235,7 +235,7 @@ public class AICore {
Herobrine.HerobrineHP = Herobrine.HerobrineMaxHP;
log.info("[Herobrine] Cancelled target.");
Location nowloc = new Location((World) Bukkit.getServer().getWorlds().get(0), 0, -20.f, 0);
Location nowloc = new Location((World) Bukkit.getServer().getWorlds().get(0), 0, -100.f, 0);
nowloc.setYaw(1.f);
nowloc.setPitch(1.f);
@ -478,7 +478,7 @@ public class AICore {
}
}
ploc.setY(-20);
ploc.setY(-100);
Herobrine.getPluginCore().HerobrineNPC.moveTo(ploc);
}
@ -695,7 +695,7 @@ public class AICore {
public void visibilityActivationTeleport() {
// Makes Herobrine visible to players that should be able to see him by quickly teleporting him out of the map and back to where he previously was.
Location original = Herobrine.getPluginCore().HerobrineNPC.getBukkitEntity().getLocation();
Herobrine.getPluginCore().HerobrineNPC.getBukkitEntity().teleport(new Location(Bukkit.getServer().getWorlds().get(0), 0, -20, 0));
Herobrine.getPluginCore().HerobrineNPC.getBukkitEntity().teleport(new Location(Bukkit.getServer().getWorlds().get(0), 0, -100, 0));
Herobrine.getPluginCore().HerobrineNPC.getBukkitEntity().teleport(original);
}

View File

@ -181,7 +181,7 @@ public class Attack extends Core {
Location ploc = (Location) AICore.PlayerTarget.getLocation();
ploc.setY(-20);
ploc.setY(-100);
for(int i=0; i < 5; i++){
for(float j=0; j < 2; j+= 0.5f){

View File

@ -46,7 +46,7 @@ public class Haunt extends Core {
AICore.PlayerTarget = player;
AICore.log.info("[Herobrine] " + player.getDisplayName() + " is now being haunted by Herobrine.");
Location loc = (Location) PluginCore.HerobrineNPC.getBukkitEntity().getLocation();
loc.setY(-20);
loc.setY(-100);
PluginCore.HerobrineNPC.moveTo(loc);
StartHandler();

View File

@ -209,7 +209,7 @@ public class RandomPosition extends Core {
&& ploc.getY() + 7 > loc.getY()
&& ploc.getY() - 7 < loc.getY()) {
loc.setY(-20);
loc.setY(-100);
PluginCore.HerobrineNPC.moveTo(loc);
PluginCore.getAICore().CancelTarget(CoreType.RANDOM_POSITION);
RandomMoveIsPlayer = false;

View File

@ -157,7 +157,7 @@ public class Herobrine extends JavaPlugin implements Listener {
}
// Spawn Herobrine
Location nowloc = new Location((World) Bukkit.getServer().getWorlds().get(0), (float) 0, (float) -20,
Location nowloc = new Location((World) Bukkit.getServer().getWorlds().get(0), (float) 0, (float) -100,
(float) 0);
nowloc.setYaw((float) 1);
nowloc.setPitch((float) 1);

View File

@ -209,7 +209,7 @@ public class EntityListener implements Listener {
} else {
if (PluginCore.getAICore().getCoreTypeNow() == CoreType.RANDOM_POSITION) {
Location newloc = (Location) PluginCore.HerobrineNPC.getBukkitEntity().getLocation();
newloc.setY(-20);
newloc.setY(-100);
PluginCore.HerobrineNPC.moveTo(newloc);
PluginCore.getAICore().CancelTarget(CoreType.ANY);
}
@ -217,7 +217,7 @@ public class EntityListener implements Listener {
} else {
if (PluginCore.getAICore().getCoreTypeNow() == CoreType.RANDOM_POSITION) {
Location newloc = (Location) PluginCore.HerobrineNPC.getBukkitEntity().getLocation();
newloc.setY(-20);
newloc.setY(-100);
PluginCore.HerobrineNPC.moveTo(newloc);
PluginCore.getAICore().CancelTarget(CoreType.ANY);
}