Update to Minecraft 1.17

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2021-06-11 15:00:00 +10:00
parent 75faba7fde
commit b3a8254758
619 changed files with 10708 additions and 8451 deletions

View File

@@ -34,14 +34,14 @@ public class CraftMapRenderer extends MapRenderer {
cursors.removeCursor(cursors.getCursor(0));
}
for (Object key : worldMap.decorations.keySet()) {
for (String key : worldMap.decorations.keySet()) {
// If this cursor is for a player check visibility with vanish system
Player other = Bukkit.getPlayerExact((String) key);
if (other != null && !player.canSee(other)) {
continue;
}
MapIcon decoration = (MapIcon) worldMap.decorations.get(key);
MapIcon decoration = worldMap.decorations.get(key);
cursors.addCursor(decoration.getX(), decoration.getY(), (byte) (decoration.getRotation() & 15), decoration.getType().a(), true, CraftChatMessage.fromComponent(decoration.getName()));
}
}

View File

@@ -32,7 +32,7 @@ public final class CraftMapView implements MapView {
@Override
public int getId() {
String text = worldMap.getId();
String text = worldMap.id;
if (text.startsWith("map_")) {
try {
return Integer.parseInt(text.substring("map_".length()));
@@ -61,7 +61,7 @@ public final class CraftMapView implements MapView {
@Override
public World getWorld() {
ResourceKey<net.minecraft.world.level.World> dimension = worldMap.map;
ResourceKey<net.minecraft.world.level.World> dimension = worldMap.dimension;
WorldServer world = MinecraftServer.getServer().getWorldServer(dimension);
return (world == null) ? null : world.getWorld();
@@ -69,27 +69,27 @@ public final class CraftMapView implements MapView {
@Override
public void setWorld(World world) {
worldMap.map = ((CraftWorld) world).getHandle().getDimensionKey();
worldMap.dimension = ((CraftWorld) world).getHandle().getDimensionKey();
}
@Override
public int getCenterX() {
return worldMap.centerX;
return worldMap.x;
}
@Override
public int getCenterZ() {
return worldMap.centerZ;
return worldMap.z;
}
@Override
public void setCenterX(int x) {
worldMap.centerX = x;
worldMap.x = x;
}
@Override
public void setCenterZ(int z) {
worldMap.centerZ = z;
worldMap.z = z;
}
@Override
@@ -178,12 +178,12 @@ public final class CraftMapView implements MapView {
@Override
public boolean isTrackingPosition() {
return worldMap.track;
return worldMap.trackingPosition;
}
@Override
public void setTrackingPosition(boolean trackingPosition) {
worldMap.track = trackingPosition;
worldMap.trackingPosition = trackingPosition;
}
@Override