Update to Minecraft 1.15.1

This commit is contained in:
md_5 2019-12-18 08:00:00 +11:00
parent e2790ae2ea
commit 30a1b6911f
9 changed files with 40 additions and 52 deletions

View File

@ -1,15 +1,15 @@
--- a/net/minecraft/server/BiomeStorage.java --- a/net/minecraft/server/BiomeStorage.java
+++ b/net/minecraft/server/BiomeStorage.java +++ b/net/minecraft/server/BiomeStorage.java
@@ -77,7 +77,7 @@ @@ -88,7 +88,7 @@
int[] aint = new int[this.f.length]; int[] aint = new int[this.g.length];
for (int i = 0; i < this.f.length; ++i) { for (int i = 0; i < this.g.length; ++i) {
- aint[i] = IRegistry.BIOME.a((Object) this.f[i]); - aint[i] = IRegistry.BIOME.a((Object) this.g[i]);
+ aint[i] = IRegistry.BIOME.a(this.f[i]); // CraftBukkit - decompile error + aint[i] = IRegistry.BIOME.a(this.g[i]); // CraftBukkit - decompile error
} }
return aint; return aint;
@@ -90,7 +90,7 @@ @@ -101,7 +101,7 @@
for (int j = 0; j < i; ++j) { for (int j = 0; j < i; ++j) {
BiomeBase biomebase = abiomebase[j]; BiomeBase biomebase = abiomebase[j];
@ -18,9 +18,9 @@
} }
} }
@@ -107,4 +107,14 @@ @@ -118,4 +118,14 @@
return this.f[i1 << BiomeStorage.d + BiomeStorage.d | j1 << BiomeStorage.d | l]; return this.g[i1 << BiomeStorage.e + BiomeStorage.e | j1 << BiomeStorage.e | l];
} }
+ +
+ // CraftBukkit start + // CraftBukkit start
@ -29,7 +29,7 @@
+ int i1 = MathHelper.clamp(j, 0, BiomeStorage.c); + int i1 = MathHelper.clamp(j, 0, BiomeStorage.c);
+ int j1 = k & BiomeStorage.b; + int j1 = k & BiomeStorage.b;
+ +
+ this.f[i1 << BiomeStorage.d + BiomeStorage.d | j1 << BiomeStorage.d | l] = biome; + this.g[i1 << BiomeStorage.e + BiomeStorage.e | j1 << BiomeStorage.e | l] = biome;
+ } + }
+ // CraftBukkit end + // CraftBukkit end
} }

View File

@ -60,7 +60,7 @@
} }
} }
@@ -658,7 +675,12 @@ @@ -661,7 +678,12 @@
entitywitch.setCustomNameVisible(this.getCustomNameVisible()); entitywitch.setCustomNameVisible(this.getCustomNameVisible());
} }
@ -74,7 +74,7 @@
this.die(); this.die();
} }
@@ -808,7 +830,7 @@ @@ -811,7 +833,7 @@
} }
private void b(long i) { private void b(long i) {
@ -83,7 +83,7 @@
} }
private boolean c(long i) { private boolean c(long i) {
@@ -857,7 +879,7 @@ @@ -860,7 +882,7 @@
if (entityirongolem != null) { if (entityirongolem != null) {
if (entityirongolem.a((GeneratorAccess) this.world, EnumMobSpawn.MOB_SUMMONED) && entityirongolem.a((IWorldReader) this.world)) { if (entityirongolem.a((GeneratorAccess) this.world, EnumMobSpawn.MOB_SUMMONED) && entityirongolem.a((IWorldReader) this.world)) {
@ -92,7 +92,7 @@
return entityirongolem; return entityirongolem;
} }
@@ -919,13 +941,13 @@ @@ -922,13 +944,13 @@
@Override @Override
public void entitySleep(BlockPosition blockposition) { public void entitySleep(BlockPosition blockposition) {
super.entitySleep(blockposition); super.entitySleep(blockposition);

View File

@ -287,19 +287,7 @@
public NBTTagCompound getOrCreateTag() { public NBTTagCompound getOrCreateTag() {
if (this.tag == null) { if (this.tag == null) {
this.setTag(new NBTTagCompound()); this.setTag(new NBTTagCompound());
@@ -386,6 +595,11 @@ @@ -498,6 +707,12 @@
public void setTag(@Nullable NBTTagCompound nbttagcompound) {
this.tag = nbttagcompound;
+ // CraftBukkit start - ensure null tags do not get inappropriately used (SpigotCraft#463)
+ if (this.tag == null && this.item != null && this.item.usesDurability()) {
+ this.setDamage(this.getDamage());
+ }
+ // CraftBukkit end
}
public IChatBaseComponent getName() {
@@ -494,6 +708,12 @@
} }
public void setRepairCost(int i) { public void setRepairCost(int i) {
@ -312,7 +300,7 @@
this.getOrCreateTag().setInt("RepairCost", i); this.getOrCreateTag().setInt("RepairCost", i);
} }
@@ -516,7 +736,7 @@ @@ -520,7 +735,7 @@
object = this.getItem().a(enumitemslot); object = this.getItem().a(enumitemslot);
} }
@ -321,7 +309,7 @@
attributemodifier1.a(false); attributemodifier1.a(false);
}); });
return (Multimap) object; return (Multimap) object;
@@ -539,6 +759,13 @@ @@ -543,6 +758,13 @@
nbttaglist.add(nbttagcompound); nbttaglist.add(nbttagcompound);
} }

View File

@ -55,7 +55,7 @@
final Either<IChunkAccess, PlayerChunk.Failure> either = (Either) iterator.next(); final Either<IChunkAccess, PlayerChunk.Failure> either = (Either) iterator.next();
Optional<IChunkAccess> optional = either.left(); Optional<IChunkAccess> optional = either.left();
@@ -293,7 +322,7 @@ @@ -297,7 +326,7 @@
PlayerChunkMap.LOGGER.info("ThreadedAnvilChunkStorage ({}): All chunks are saved", this.w.getName()); PlayerChunkMap.LOGGER.info("ThreadedAnvilChunkStorage ({}): All chunks are saved", this.w.getName());
} else { } else {
this.visibleChunks.values().stream().filter(PlayerChunk::hasBeenLoaded).forEach((playerchunk) -> { this.visibleChunks.values().stream().filter(PlayerChunk::hasBeenLoaded).forEach((playerchunk) -> {
@ -64,7 +64,7 @@
if (ichunkaccess instanceof ProtoChunkExtension || ichunkaccess instanceof Chunk) { if (ichunkaccess instanceof ProtoChunkExtension || ichunkaccess instanceof Chunk) {
this.saveChunk(ichunkaccess); this.saveChunk(ichunkaccess);
@@ -304,7 +333,6 @@ @@ -308,7 +337,6 @@
} }
} }
@ -72,7 +72,7 @@
protected void unloadChunks(BooleanSupplier booleansupplier) { protected void unloadChunks(BooleanSupplier booleansupplier) {
GameProfilerFiller gameprofilerfiller = this.world.getMethodProfiler(); GameProfilerFiller gameprofilerfiller = this.world.getMethodProfiler();
@@ -343,7 +371,7 @@ @@ -347,7 +375,7 @@
private void a(long i, PlayerChunk playerchunk) { private void a(long i, PlayerChunk playerchunk) {
CompletableFuture<IChunkAccess> completablefuture = playerchunk.getChunkSave(); CompletableFuture<IChunkAccess> completablefuture = playerchunk.getChunkSave();
@ -81,7 +81,7 @@
CompletableFuture<IChunkAccess> completablefuture1 = playerchunk.getChunkSave(); CompletableFuture<IChunkAccess> completablefuture1 = playerchunk.getChunkSave();
if (completablefuture1 != completablefuture) { if (completablefuture1 != completablefuture) {
@@ -492,7 +520,7 @@ @@ -496,7 +524,7 @@
return CompletableFuture.completedFuture(Either.right(playerchunk_failure)); return CompletableFuture.completedFuture(Either.right(playerchunk_failure));
}); });
}, (runnable) -> { }, (runnable) -> {
@ -90,7 +90,7 @@
}); });
} }
@@ -550,8 +578,15 @@ @@ -554,8 +582,15 @@
while (iterator.hasNext()) { while (iterator.hasNext()) {
Entity entity = (Entity) iterator.next(); Entity entity = (Entity) iterator.next();
@ -107,7 +107,7 @@
if (list == null) { if (list == null) {
list = Lists.newArrayList(new Entity[]{entity}); list = Lists.newArrayList(new Entity[]{entity});
} else { } else {
@@ -573,7 +608,7 @@ @@ -577,7 +612,7 @@
long i = playerchunk.i().pair(); long i = playerchunk.i().pair();
playerchunk.getClass(); playerchunk.getClass();
@ -116,7 +116,7 @@
}); });
} }
@@ -590,7 +625,7 @@ @@ -594,7 +629,7 @@
return Either.left(chunk); return Either.left(chunk);
}); });
}, (runnable) -> { }, (runnable) -> {
@ -125,7 +125,7 @@
}); });
completablefuture1.thenAcceptAsync((either) -> { completablefuture1.thenAcceptAsync((either) -> {
@@ -604,7 +639,7 @@ @@ -608,7 +643,7 @@
return Either.left(chunk); return Either.left(chunk);
}); });
}, (runnable) -> { }, (runnable) -> {
@ -134,7 +134,7 @@
}); });
return completablefuture1; return completablefuture1;
} }
@@ -618,7 +653,7 @@ @@ -622,7 +657,7 @@
return chunk; return chunk;
}); });
}, (runnable) -> { }, (runnable) -> {
@ -143,7 +143,7 @@
}); });
} }
@@ -742,7 +777,8 @@ @@ -746,7 +781,8 @@
return ichunkaccess instanceof Chunk ? Optional.of((Chunk) ichunkaccess) : Optional.empty(); return ichunkaccess instanceof Chunk ? Optional.of((Chunk) ichunkaccess) : Optional.empty();
}); });
@ -153,7 +153,7 @@
return Stream.of(chunk.getEntitySlices()).mapToInt(EntitySlice::size).sum(); return Stream.of(chunk.getEntitySlices()).mapToInt(EntitySlice::size).sum();
}).orElse(0), optional1.map((chunk) -> { }).orElse(0), optional1.map((chunk) -> {
return chunk.getTileEntities().size(); return chunk.getTileEntities().size();
@@ -753,7 +789,7 @@ @@ -757,7 +793,7 @@
private static String a(CompletableFuture<Either<Chunk, PlayerChunk.Failure>> completablefuture) { private static String a(CompletableFuture<Either<Chunk, PlayerChunk.Failure>> completablefuture) {
try { try {
@ -162,7 +162,7 @@
return either != null ? (String) either.map((chunk) -> { return either != null ? (String) either.map((chunk) -> {
return "done"; return "done";
@@ -771,7 +807,7 @@ @@ -775,7 +811,7 @@
private NBTTagCompound readChunkData(ChunkCoordIntPair chunkcoordintpair) throws IOException { private NBTTagCompound readChunkData(ChunkCoordIntPair chunkcoordintpair) throws IOException {
NBTTagCompound nbttagcompound = this.read(chunkcoordintpair); NBTTagCompound nbttagcompound = this.read(chunkcoordintpair);
@ -171,7 +171,7 @@
} }
boolean isOutsideOfRange(ChunkCoordIntPair chunkcoordintpair) { boolean isOutsideOfRange(ChunkCoordIntPair chunkcoordintpair) {
@@ -1105,7 +1141,7 @@ @@ -1109,7 +1145,7 @@
public final Set<EntityPlayer> trackedPlayers = Sets.newHashSet(); public final Set<EntityPlayer> trackedPlayers = Sets.newHashSet();
public EntityTracker(Entity entity, int i, int j, boolean flag) { public EntityTracker(Entity entity, int i, int j, boolean flag) {
@ -180,7 +180,7 @@
this.tracker = entity; this.tracker = entity;
this.trackingDistance = i; this.trackingDistance = i;
this.e = SectionPosition.a(entity); this.e = SectionPosition.a(entity);
@@ -1158,7 +1194,7 @@ @@ -1162,7 +1198,7 @@
public void updatePlayer(EntityPlayer entityplayer) { public void updatePlayer(EntityPlayer entityplayer) {
if (entityplayer != this.tracker) { if (entityplayer != this.tracker) {
@ -189,7 +189,7 @@
int i = Math.min(this.b(), (PlayerChunkMap.this.viewDistance - 1) * 16); int i = Math.min(this.b(), (PlayerChunkMap.this.viewDistance - 1) * 16);
boolean flag = vec3d.x >= (double) (-i) && vec3d.x <= (double) i && vec3d.z >= (double) (-i) && vec3d.z <= (double) i && this.tracker.a(entityplayer); boolean flag = vec3d.x >= (double) (-i) && vec3d.x <= (double) i && vec3d.z >= (double) (-i) && vec3d.z <= (double) i && this.tracker.a(entityplayer);
@@ -1174,6 +1210,17 @@ @@ -1178,6 +1214,17 @@
} }
} }

View File

@ -298,14 +298,14 @@
@@ -306,11 +510,11 @@ @@ -306,11 +510,11 @@
} }
public boolean J() { public boolean isDay() {
- return this.worldProvider.getDimensionManager() == DimensionManager.OVERWORLD && this.c < 4; - return this.worldProvider.getDimensionManager() == DimensionManager.OVERWORLD && this.c < 4;
+ return this.worldProvider.getDimensionManager().getType() == DimensionManager.OVERWORLD && this.c < 4; // CraftBukkit + return this.worldProvider.getDimensionManager().getType() == DimensionManager.OVERWORLD && this.c < 4; // CraftBukkit
} }
public boolean K() { public boolean isNight() {
- return this.worldProvider.getDimensionManager() == DimensionManager.OVERWORLD && !this.J(); - return this.worldProvider.getDimensionManager() == DimensionManager.OVERWORLD && !this.isDay();
+ return this.worldProvider.getDimensionManager().getType() == DimensionManager.OVERWORLD && !this.J(); // CraftBukkit + return this.worldProvider.getDimensionManager().getType() == DimensionManager.OVERWORLD && !this.isDay(); // CraftBukkit
} }
@Override @Override

View File

@ -1,6 +1,6 @@
--- a/net/minecraft/server/WorldUpgrader.java --- a/net/minecraft/server/WorldUpgrader.java
+++ b/net/minecraft/server/WorldUpgrader.java +++ b/net/minecraft/server/WorldUpgrader.java
@@ -123,7 +123,7 @@ @@ -124,7 +124,7 @@
int j = IChunkLoader.a(nbttagcompound); int j = IChunkLoader.a(nbttagcompound);
NBTTagCompound nbttagcompound1 = ichunkloader.getChunkData(dimensionmanager2, () -> { NBTTagCompound nbttagcompound1 = ichunkloader.getChunkData(dimensionmanager2, () -> {
return this.q; return this.q;

View File

@ -4,7 +4,7 @@
<groupId>org.bukkit</groupId> <groupId>org.bukkit</groupId>
<artifactId>craftbukkit</artifactId> <artifactId>craftbukkit</artifactId>
<packaging>jar</packaging> <packaging>jar</packaging>
<version>1.15-R0.1-SNAPSHOT</version> <version>1.15.1-R0.1-SNAPSHOT</version>
<name>CraftBukkit</name> <name>CraftBukkit</name>
<url>https://www.spigotmc.org/</url> <url>https://www.spigotmc.org/</url>
@ -12,7 +12,7 @@
<skipTests>true</skipTests> <skipTests>true</skipTests>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<api.version>unknown</api.version> <api.version>unknown</api.version>
<minecraft.version>1.15</minecraft.version> <minecraft.version>1.15.1</minecraft.version>
<minecraft_version>1_15_R1</minecraft_version> <minecraft_version>1_15_R1</minecraft_version>
<buildtag.prefix>git-Bukkit-</buildtag.prefix> <buildtag.prefix>git-Bukkit-</buildtag.prefix>
<buildtag.suffix></buildtag.suffix> <buildtag.suffix></buildtag.suffix>

View File

@ -177,7 +177,7 @@ public class Main {
useConsole = false; useConsole = false;
} }
if (false && Main.class.getPackage().getImplementationVendor() != null && System.getProperty("IReallyKnowWhatIAmDoingISwear") == null) { if (Main.class.getPackage().getImplementationVendor() != null && System.getProperty("IReallyKnowWhatIAmDoingISwear") == null) {
Date buildDate = new SimpleDateFormat("yyyyMMdd-HHmm").parse(Main.class.getPackage().getImplementationVendor()); Date buildDate = new SimpleDateFormat("yyyyMMdd-HHmm").parse(Main.class.getPackage().getImplementationVendor());
Calendar deadline = Calendar.getInstance(); Calendar deadline = Calendar.getInstance();

View File

@ -188,7 +188,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
* @return string * @return string
*/ */
public String getMappingsVersion() { public String getMappingsVersion() {
return "e50e3dd1d07234cc9c09cb516a951227"; return "d2fa25e37d6e69667dc7f4a33d7644e1";
} }
@Override @Override