mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-27 15:00:13 +01:00
Apply remaining patches, fix API
This commit is contained in:
parent
e3db6ac6e4
commit
834a4c4a8d
36 changed files with 14 additions and 10 deletions
|
@ -79,7 +79,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
* @deprecated Biome is no longer an enum, custom biomes will have their own biome instance.
|
||||
*/
|
||||
- @Deprecated(since = "1.21.3")
|
||||
+ @Deprecated(since = "1.21.3", forRemoval = true) @ApiStatus.ScheduledForRemoval(inVersion = "1.22") // Paper - will be removed via asm-utils
|
||||
+ @Deprecated(since = "1.21.3", forRemoval = true) @org.jetbrains.annotations.ApiStatus.ScheduledForRemoval(inVersion = "1.22") // Paper - will be removed via asm-utils
|
||||
Biome CUSTOM = Bukkit.getUnsafe().getCustomBiome();
|
||||
|
||||
@NotNull
|
||||
|
@ -88,7 +88,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
*/
|
||||
@NotNull
|
||||
- @Deprecated(since = "1.21.3")
|
||||
+ @Deprecated(since = "1.21.3", forRemoval = true) @ApiStatus.ScheduledForRemoval(inVersion = "1.22") // Paper - will be removed via asm-utils
|
||||
+ @Deprecated(since = "1.21.3", forRemoval = true) @org.jetbrains.annotations.ApiStatus.ScheduledForRemoval(inVersion = "1.22") // Paper - will be removed via asm-utils
|
||||
static Biome valueOf(@NotNull String name) {
|
||||
if ("CUSTOM".equals(name)) {
|
||||
return Biome.CUSTOM;
|
||||
|
|
|
@ -96,9 +96,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ * Does not apply to plain creaking entities as they are not invulnerable like the transient ones spawned by the
|
||||
+ * creaking heart.
|
||||
+ */
|
||||
+ @MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
+ @org.jetbrains.annotations.ApiStatus.Experimental
|
||||
+ SHAKE(66, org.bukkit.entity.CreakingTransient.class);
|
||||
+ SHAKE(66, org.bukkit.entity.Creaking.class);
|
||||
+ // Paper end - add missing EntityEffect
|
||||
|
||||
private final byte data;
|
||||
|
|
|
@ -109,7 +109,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
--- a/src/main/java/net/minecraft/server/Main.java
|
||||
+++ b/src/main/java/net/minecraft/server/Main.java
|
||||
@@ -0,0 +0,0 @@ public class Main {
|
||||
|
||||
@SuppressForbidden(reason = "System.out needed before bootstrap") // CraftBukkit - decompile error
|
||||
@DontObfuscate
|
||||
public static void main(final OptionSet optionset) { // CraftBukkit - replaces main(String[] astring)
|
||||
+ io.papermc.paper.util.LogManagerShutdownThread.hook(); // Paper
|
|
@ -19,7 +19,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ AABB oldBox = entity.getBoundingBox(); // Paper - copy from player movement packet
|
||||
|
||||
d6 = d3 - this.vehicleLastGoodX; // Paper - diff on change, used for checking large move vectors above
|
||||
d7 = d4 - this.vehicleLastGoodY - 1.0E-6D; // Paper - diff on change, used for checking large move vectors above
|
||||
d7 = d4 - this.vehicleLastGoodY; // Paper - diff on change, used for checking large move vectors above
|
||||
@@ -0,0 +0,0 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
}
|
||||
|
||||
|
@ -54,7 +54,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ if (teleportBack) { // Paper end - optimise out extra getCubes
|
||||
entity.absMoveTo(d0, d1, d2, f, f1);
|
||||
this.player.absMoveTo(d0, d1, d2, this.player.getYRot(), this.player.getXRot()); // CraftBukkit
|
||||
this.send(new ClientboundMoveVehiclePacket(entity));
|
||||
this.send(ClientboundMoveVehiclePacket.fromEntity(entity));
|
||||
@@ -0,0 +0,0 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
}
|
||||
|
|
@ -856,11 +856,17 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
- poiPredicate, predicate2, entity.blockPosition(), 48, PoiManager.Occupancy.HAS_SPACE
|
||||
- )
|
||||
- .limit(5L)
|
||||
- .filter(pairx -> worldPosBiPredicate.test(world, (BlockPos)pairx.getSecond()))
|
||||
- .collect(Collectors.toSet());
|
||||
+ // Paper start - optimise POI access
|
||||
+ java.util.List<Pair<Holder<PoiType>, BlockPos>> poiposes = new java.util.ArrayList<>();
|
||||
+ final java.util.List<Pair<Holder<PoiType>, BlockPos>> poiposes = new java.util.ArrayList<>();
|
||||
+ io.papermc.paper.util.PoiAccess.findNearestPoiPositions(poiManager, poiPredicate, predicate2, entity.blockPosition(), 48, 48*48, PoiManager.Occupancy.HAS_SPACE, false, 5, poiposes);
|
||||
+ Set<Pair<Holder<PoiType>, BlockPos>> set = new java.util.HashSet<>(poiposes);
|
||||
+ final Set<Pair<Holder<PoiType>, BlockPos>> set = new java.util.HashSet<>(poiposes.size());
|
||||
+ for (final Pair<Holder<PoiType>, BlockPos> poiPose : poiposes) {
|
||||
+ if (worldPosBiPredicate.test(world, poiPose.getSecond())) {
|
||||
+ set.add(poiPose);
|
||||
+ }
|
||||
+ }
|
||||
+ // Paper end - optimise POI access
|
||||
Path path = findPathToPois(entity, set);
|
||||
if (path != null && path.canReach()) {
|
Loading…
Reference in a new issue