diff --git a/nms-patches/ChunkMapDistance.patch b/nms-patches/ChunkMapDistance.patch index 910fb6dad4..8477d9a903 100644 --- a/nms-patches/ChunkMapDistance.patch +++ b/nms-patches/ChunkMapDistance.patch @@ -43,7 +43,7 @@ completablefuture.thenAccept((either) -> { this.m.execute(() -> { - this.k.a((Object) ChunkTaskQueueSorter.a(() -> { -+ this.k.a(ChunkTaskQueueSorter.a(() -> { // Craftbukkit - decompile error ++ this.k.a(ChunkTaskQueueSorter.a(() -> { // CraftBukkit - decompile error }, j, false)); }); }); @@ -137,14 +137,14 @@ if (flag1) { - ChunkMapDistance.this.j.a((Object) ChunkTaskQueueSorter.a(() -> { -+ ChunkMapDistance.this.j.a(ChunkTaskQueueSorter.a(() -> { // Craftbukkit - decompile error ++ ChunkMapDistance.this.j.a(ChunkTaskQueueSorter.a(() -> { // CraftBukkit - decompile error ChunkMapDistance.this.m.execute(() -> { if (this.c(this.c(i))) { ChunkMapDistance.this.addTicket(i, ticket); ChunkMapDistance.this.l.add(i); } else { - ChunkMapDistance.this.k.a((Object) ChunkTaskQueueSorter.a(() -> { -+ ChunkMapDistance.this.k.a(ChunkTaskQueueSorter.a(() -> { // Craftbukkit - decompile error ++ ChunkMapDistance.this.k.a(ChunkTaskQueueSorter.a(() -> { // CraftBukkit - decompile error }, i, false)); } @@ -153,7 +153,7 @@ })); } else { - ChunkMapDistance.this.k.a((Object) ChunkTaskQueueSorter.a(() -> { -+ ChunkMapDistance.this.k.a(ChunkTaskQueueSorter.a(() -> { // Craftbukkit - decompile error ++ ChunkMapDistance.this.k.a(ChunkTaskQueueSorter.a(() -> { // CraftBukkit - decompile error ChunkMapDistance.this.m.execute(() -> { ChunkMapDistance.this.removeTicket(i, ticket); }); diff --git a/nms-patches/ChunkProviderServer.patch b/nms-patches/ChunkProviderServer.patch index d756cbda60..adb0b48483 100644 --- a/nms-patches/ChunkProviderServer.patch +++ b/nms-patches/ChunkProviderServer.patch @@ -14,13 +14,13 @@ return null; } else { - Either either = (Either) playerchunk.b(ChunkStatus.FULL).getNow((Object) null); -+ Either either = (Either) playerchunk.b(ChunkStatus.FULL).getNow(null); // Craftbukkit - decompile error ++ Either either = (Either) playerchunk.b(ChunkStatus.FULL).getNow(null); // CraftBukkit - decompile error if (either == null) { return null; } else { - IChunkAccess ichunkaccess1 = (IChunkAccess) either.left().orElse((Object) null); -+ IChunkAccess ichunkaccess1 = (IChunkAccess) either.left().orElse(null); // Craftbukkit - decompile error ++ IChunkAccess ichunkaccess1 = (IChunkAccess) either.left().orElse(null); // CraftBukkit - decompile error if (ichunkaccess1 != null) { this.a(k, ichunkaccess1, ChunkStatus.FULL); diff --git a/nms-patches/EntityFishingHook.patch b/nms-patches/EntityFishingHook.patch index 462496df59..a4581609ea 100644 --- a/nms-patches/EntityFishingHook.patch +++ b/nms-patches/EntityFishingHook.patch @@ -16,7 +16,7 @@ }, RayTrace.BlockCollisionOption.COLLIDER, true); if (movingobjectposition.getType() != MovingObjectPosition.EnumMovingObjectType.MISS) { -+ org.bukkit.craftbukkit.event.CraftEventFactory.callProjectileHitEvent(this, movingobjectposition); // Craftbukkit - Call event ++ org.bukkit.craftbukkit.event.CraftEventFactory.callProjectileHitEvent(this, movingobjectposition); // CraftBukkit - Call event if (movingobjectposition.getType() == MovingObjectPosition.EnumMovingObjectType.ENTITY) { this.hooked = ((MovingObjectPositionEntity) movingobjectposition).getEntity(); this.n(); diff --git a/nms-patches/EntityItem.patch b/nms-patches/EntityItem.patch index 4209fe0548..f95107f33b 100644 --- a/nms-patches/EntityItem.patch +++ b/nms-patches/EntityItem.patch @@ -39,11 +39,11 @@ } } -+ /* Craftbukkit start - moved up ++ /* CraftBukkit start - moved up if (this.age != -32768) { ++this.age; } -+ // Craftbukkit end */ ++ // CraftBukkit end */ this.impulse |= this.aC(); if (!this.world.isClientSide) { diff --git a/nms-patches/EntityLlamaSpit.patch b/nms-patches/EntityLlamaSpit.patch index f46b68adbd..f12d79985d 100644 --- a/nms-patches/EntityLlamaSpit.patch +++ b/nms-patches/EntityLlamaSpit.patch @@ -13,7 +13,7 @@ } public void a(MovingObjectPosition movingobjectposition) { -+ org.bukkit.craftbukkit.event.CraftEventFactory.callProjectileHitEvent(this, movingobjectposition); // Craftbukkit - Call event ++ org.bukkit.craftbukkit.event.CraftEventFactory.callProjectileHitEvent(this, movingobjectposition); // CraftBukkit - Call event MovingObjectPosition.EnumMovingObjectType movingobjectposition_enummovingobjecttype = movingobjectposition.getType(); if (movingobjectposition_enummovingobjecttype == MovingObjectPosition.EnumMovingObjectType.ENTITY && this.shooter != null) { diff --git a/nms-patches/EntityShulkerBullet.patch b/nms-patches/EntityShulkerBullet.patch index 33d778a9b7..d90a5b70d7 100644 --- a/nms-patches/EntityShulkerBullet.patch +++ b/nms-patches/EntityShulkerBullet.patch @@ -34,7 +34,7 @@ } protected void a(MovingObjectPosition movingobjectposition) { -+ org.bukkit.craftbukkit.event.CraftEventFactory.callProjectileHitEvent(this, movingobjectposition); // Craftbukkit - Call event ++ org.bukkit.craftbukkit.event.CraftEventFactory.callProjectileHitEvent(this, movingobjectposition); // CraftBukkit - Call event if (movingobjectposition.getType() == MovingObjectPosition.EnumMovingObjectType.ENTITY) { Entity entity = ((MovingObjectPositionEntity) movingobjectposition).getEntity(); boolean flag = entity.damageEntity(DamageSource.a(this, this.shooter).c(), 4.0F); diff --git a/nms-patches/PathfinderGoalNearestAttackableTarget.patch b/nms-patches/PathfinderGoalNearestAttackableTarget.patch index 7cd7f16e48..60b369519d 100644 --- a/nms-patches/PathfinderGoalNearestAttackableTarget.patch +++ b/nms-patches/PathfinderGoalNearestAttackableTarget.patch @@ -5,7 +5,7 @@ @Override public void c() { - this.e.setGoalTarget(this.c); -+ this.e.setGoalTarget(this.c, c instanceof EntityPlayer ? org.bukkit.event.entity.EntityTargetEvent.TargetReason.CLOSEST_PLAYER : org.bukkit.event.entity.EntityTargetEvent.TargetReason.CLOSEST_ENTITY, true); // Craftbukkit - reason ++ this.e.setGoalTarget(this.c, c instanceof EntityPlayer ? org.bukkit.event.entity.EntityTargetEvent.TargetReason.CLOSEST_PLAYER : org.bukkit.event.entity.EntityTargetEvent.TargetReason.CLOSEST_ENTITY, true); // CraftBukkit - reason super.c(); } } diff --git a/nms-patches/PlayerChunkMap.patch b/nms-patches/PlayerChunkMap.patch index 224b382fb4..0b3fced791 100644 --- a/nms-patches/PlayerChunkMap.patch +++ b/nms-patches/PlayerChunkMap.patch @@ -148,7 +148,7 @@ }); - csvwriter.a(chunkcoordintpair.x, chunkcoordintpair.z, playerchunk.getTicketLevel(), optional.isPresent(), optional.map(IChunkAccess::getChunkStatus).orElse((Object) null), optional1.map(Chunk::getState).orElse((Object) null), a(playerchunk.c()), a(playerchunk.a()), a(playerchunk.b()), this.chunkDistanceManager.c(entry.getLongKey()), !this.isOutsideOfRange(chunkcoordintpair), optional1.map((chunk) -> { -+ // Craftbukkit - decompile error ++ // CraftBukkit - decompile error + csvwriter.a(chunkcoordintpair.x, chunkcoordintpair.z, playerchunk.getTicketLevel(), optional.isPresent(), optional.map(IChunkAccess::getChunkStatus).orElse(null), optional1.map(Chunk::getState).orElse(null), a(playerchunk.c()), a(playerchunk.a()), a(playerchunk.b()), this.chunkDistanceManager.c(entry.getLongKey()), !this.isOutsideOfRange(chunkcoordintpair), optional1.map((chunk) -> { return Stream.of(chunk.getEntitySlices()).mapToInt(EntitySlice::size).sum(); }).orElse(0), optional1.map((chunk) -> { @@ -158,7 +158,7 @@ private static String a(CompletableFuture> completablefuture) { try { - Either either = (Either) completablefuture.getNow((Object) null); -+ Either either = (Either) completablefuture.getNow(null); // Craftbukkit - decompile error ++ Either either = (Either) completablefuture.getNow(null); // CraftBukkit - decompile error return either != null ? (String) either.map((chunk) -> { return "done"; diff --git a/nms-patches/TicketType.patch b/nms-patches/TicketType.patch index 9d083d9571..16efb14d35 100644 --- a/nms-patches/TicketType.patch +++ b/nms-patches/TicketType.patch @@ -5,7 +5,7 @@ public static final TicketType POST_TELEPORT = a("post_teleport", Integer::compareTo, 5); public static final TicketType UNKNOWN = a("unknown", Comparator.comparingLong(ChunkCoordIntPair::pair), 1); + public static final TicketType PLUGIN = a("plugin", (a, b) -> 0); // CraftBukkit -+ public static final TicketType PLUGIN_TICKET = a("plugin_ticket", (plugin1, plugin2) -> plugin1.getClass().getName().compareTo(plugin2.getClass().getName())); // Craftbukkit ++ public static final TicketType PLUGIN_TICKET = a("plugin_ticket", (plugin1, plugin2) -> plugin1.getClass().getName().compareTo(plugin2.getClass().getName())); // CraftBukkit public static TicketType a(String s, Comparator comparator) { return new TicketType<>(s, comparator, 0L); diff --git a/nms-patches/TileEntityBeacon.patch b/nms-patches/TileEntityBeacon.patch index 3fca71d0fe..470958a8cb 100644 --- a/nms-patches/TileEntityBeacon.patch +++ b/nms-patches/TileEntityBeacon.patch @@ -125,11 +125,11 @@ super.load(nbttagcompound); - this.primaryEffect = b(nbttagcompound.getInt("Primary")); - this.secondaryEffect = b(nbttagcompound.getInt("Secondary")); -+ // Craftbukkit start - persist manually set non-default beacon effects (SPIGOT-3598) ++ // CraftBukkit start - persist manually set non-default beacon effects (SPIGOT-3598) + this.primaryEffect = MobEffectList.fromId(nbttagcompound.getInt("Primary")); + this.secondaryEffect = MobEffectList.fromId(nbttagcompound.getInt("Secondary")); + this.levels = nbttagcompound.getInt("Levels"); // SPIGOT-5053, use where available -+ // Craftbukkit end ++ // CraftBukkit end if (nbttagcompound.hasKeyOfType("CustomName", 8)) { this.customName = IChatBaseComponent.ChatSerializer.a(nbttagcompound.getString("CustomName")); }