Fix compile errors
This commit is contained in:
parent
9edbf4ee8a
commit
aa4cd9b0b9
9 changed files with 10 additions and 10 deletions
|
@ -48,7 +48,7 @@ public class SetHomeCommand {
|
||||||
Vec3 position = p.position();
|
Vec3 position = p.position();
|
||||||
Vec2 rot = p.getRotationVector();
|
Vec2 rot = p.getRotationVector();
|
||||||
|
|
||||||
TeleportDestination dest = new TeleportDestination(new Vector3(position), new Vector2(rot), p.getLevel());
|
TeleportDestination dest = new TeleportDestination(new Vector3(position), new Vector2(rot), p.serverLevel());
|
||||||
|
|
||||||
Home newhome = new Home(p, homeName, dest);
|
Home newhome = new Home(p, homeName, dest);
|
||||||
AriasEssentials.player_homes.get(p.getUUID()).add(newhome);
|
AriasEssentials.player_homes.get(p.getUUID()).add(newhome);
|
||||||
|
|
|
@ -51,7 +51,7 @@ public class RTPCommand {
|
||||||
Vec3 pos = pla.position();
|
Vec3 pos = pla.position();
|
||||||
|
|
||||||
//boolean found_place= false;
|
//boolean found_place= false;
|
||||||
RandomPositionFactory.beginRTPSearch(pla, pos, pla.getRotationVector(), pla.getLevel());
|
RandomPositionFactory.beginRTPSearch(pla, pos, pla.getRotationVector(), pla.serverLevel());
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -109,7 +109,8 @@ public class TPACommand {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static int usage(CommandSourceStack source) {
|
private static int usage(CommandSourceStack source) {
|
||||||
source.sendSuccess(ChatHelpers.macro("/tpa USAGE\n\n "+ChatColor.BOLD + ChatColor.DARK_GRAY+"/tpa "+ChatColor.DARK_RED+"target_player\n"), false);
|
|
||||||
|
source.sendSystemMessage(ChatHelpers.macro("/tpa USAGE\n\n "+ChatColor.BOLD + ChatColor.DARK_GRAY+"/tpa "+ChatColor.DARK_RED+"target_player\n"));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -106,7 +106,7 @@ public class TPAHereCommand {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static int usage(CommandSourceStack source) {
|
private static int usage(CommandSourceStack source) {
|
||||||
source.sendSuccess(ChatHelpers.macro("/tpahere USAGE\n\n !Bold!!Dark_Gray!/tpahere !Dark_Red!target_player\n"), false);
|
source.sendSystemMessage(ChatHelpers.macro("/tpahere USAGE\n\n !Bold!!Dark_Gray!/tpahere !Dark_Red!target_player\n"));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,7 +53,7 @@ public class TPAcceptCommand {
|
||||||
cont.PlayerInst = from;
|
cont.PlayerInst = from;
|
||||||
cont.Position = to.position();
|
cont.Position = to.position();
|
||||||
cont.Rotation = to.getRotationVector();
|
cont.Rotation = to.getRotationVector();
|
||||||
cont.Dimension = to.getLevel();
|
cont.Dimension = to.serverLevel();
|
||||||
|
|
||||||
TeleportActioner.ApplyTeleportEffect(from);
|
TeleportActioner.ApplyTeleportEffect(from);
|
||||||
TeleportActioner.PerformTeleport(cont);
|
TeleportActioner.PerformTeleport(cont);
|
||||||
|
|
|
@ -43,7 +43,7 @@ public class RTPWarpCommand {
|
||||||
Vec3 position = p.position();
|
Vec3 position = p.position();
|
||||||
Vec2 rot = p.getRotationVector();
|
Vec2 rot = p.getRotationVector();
|
||||||
|
|
||||||
TeleportDestination dest = new TeleportDestination(new Vector3(position), new Vector2(rot), p.getLevel());
|
TeleportDestination dest = new TeleportDestination(new Vector3(position), new Vector2(rot), p.serverLevel());
|
||||||
Warp warp = new Warp(p.getUUID(), string, true, true, dest);
|
Warp warp = new Warp(p.getUUID(), string, true, true, dest);
|
||||||
WarpCreatedEvent event = new WarpCreatedEvent(warp);
|
WarpCreatedEvent event = new WarpCreatedEvent(warp);
|
||||||
if(MinecraftForge.EVENT_BUS.post(event))
|
if(MinecraftForge.EVENT_BUS.post(event))
|
||||||
|
|
|
@ -44,7 +44,7 @@ public class SetWarpCommand {
|
||||||
Vec3 position = p.position();
|
Vec3 position = p.position();
|
||||||
Vec2 rot = p.getRotationVector();
|
Vec2 rot = p.getRotationVector();
|
||||||
|
|
||||||
TeleportDestination dest = new TeleportDestination(new Vector3(position), new Vector2(rot), p.getLevel());
|
TeleportDestination dest = new TeleportDestination(new Vector3(position), new Vector2(rot), p.serverLevel());
|
||||||
Warp w = new Warp(p.getUUID(), string, false, true, dest);
|
Warp w = new Warp(p.getUUID(), string, false, true, dest);
|
||||||
WarpCreatedEvent event = new WarpCreatedEvent(w);
|
WarpCreatedEvent event = new WarpCreatedEvent(w);
|
||||||
if(MinecraftForge.EVENT_BUS.post(event)){
|
if(MinecraftForge.EVENT_BUS.post(event)){
|
||||||
|
|
|
@ -10,7 +10,6 @@ import net.minecraft.nbt.NbtIo;
|
||||||
public class HomesProvider {
|
public class HomesProvider {
|
||||||
/**
|
/**
|
||||||
* DO NOT USE. Internal use only.
|
* DO NOT USE. Internal use only.
|
||||||
* @see Profile#player_homes
|
|
||||||
* @param player
|
* @param player
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -86,13 +86,13 @@ public class RTPContainer {
|
||||||
Random rng = new Random(Instant.now().getEpochSecond());
|
Random rng = new Random(Instant.now().getEpochSecond());
|
||||||
Vector3 pos = new Vector3(rng.nextDouble(0xFFFF), 0, rng.nextDouble(0xFFFF));
|
Vector3 pos = new Vector3(rng.nextDouble(0xFFFF), 0, rng.nextDouble(0xFFFF));
|
||||||
BlockPos bpos = pos.asBlockPos();
|
BlockPos bpos = pos.asBlockPos();
|
||||||
container.Dimension.getChunk(bpos.getX() >> 4, bpos.getZ() >> 4, ChunkStatus.HEIGHTMAPS);
|
container.Dimension.getChunk(bpos.getX() >> 4, bpos.getZ() >> 4, ChunkStatus.SURFACE);
|
||||||
pos = new Vector3(
|
pos = new Vector3(
|
||||||
container.Dimension.getHeightmapPos(heightMapType, pos.asBlockPos()));
|
container.Dimension.getHeightmapPos(heightMapType, pos.asBlockPos()));
|
||||||
while (!container.Dimension.getWorldBorder().isWithinBounds(pos.asBlockPos())) {
|
while (!container.Dimension.getWorldBorder().isWithinBounds(pos.asBlockPos())) {
|
||||||
pos = new Vector3(rng.nextDouble(0xffff), 0, rng.nextDouble(0xffff));
|
pos = new Vector3(rng.nextDouble(0xffff), 0, rng.nextDouble(0xffff));
|
||||||
bpos = pos.asBlockPos();
|
bpos = pos.asBlockPos();
|
||||||
container.Dimension.getChunk(bpos.getX() >> 4, bpos.getZ() >> 4, ChunkStatus.HEIGHTMAPS);
|
container.Dimension.getChunk(bpos.getX() >> 4, bpos.getZ() >> 4, ChunkStatus.SURFACE);
|
||||||
pos = new Vector3(
|
pos = new Vector3(
|
||||||
container.Dimension.getHeightmapPos(heightMapType, pos.asBlockPos()));
|
container.Dimension.getHeightmapPos(heightMapType, pos.asBlockPos()));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue