Skip to content

Commit

Permalink
Rebuild Patches
Browse files Browse the repository at this point in the history
  • Loading branch information
killerprojecte committed Jul 13, 2023
1 parent 85c6285 commit 1c94790
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 20 deletions.
10 changes: 5 additions & 5 deletions patches/server/0019-Recode-DirtyFolia.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Subject: [PATCH] Recode DirtyFolia


diff --git a/src/main/java/com/destroystokyo/paper/Metrics.java b/src/main/java/com/destroystokyo/paper/Metrics.java
index 58dc84b7b3b04c2d0b00fc5fac5303d3378b3467..aab323928f7838b2fc9a404e97956f5a64d84fdb 100644
index cb60d58d4a7556dd896f31d0cd249f860bb3ef84..b6f5b3fc1c0fc42c9e9611ecd5867a6dde45e4f0 100644
--- a/src/main/java/com/destroystokyo/paper/Metrics.java
+++ b/src/main/java/com/destroystokyo/paper/Metrics.java
@@ -41,7 +41,7 @@ public class Metrics {
Expand Down Expand Up @@ -1066,7 +1066,7 @@ index 39d404c278bdc1227cb806bb257492493d05a439..6d4407f0ff95036373bb96e024f70f97
final PlayerTeam team = scoreboard.getPlayersTeam(this.collideRuleTeamName);
if (team != null) scoreboard.removePlayerTeam(team);
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 52aa759db930c04a051686766c1b822a5131a20a..ad0fff286e660102898a7e67fb5512c1079ee7f4 100644
index ee15661227754149164893d6acf678d13b2e1b27..a0e5f4caa054d6c4fea6500e47940f817f1c5346 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -7,6 +7,7 @@ import com.google.common.collect.Lists;
Expand Down Expand Up @@ -1101,7 +1101,7 @@ index 52aa759db930c04a051686766c1b822a5131a20a..ad0fff286e660102898a7e67fb5512c1
// Folia end - region threading
if (!this.level().paperConfig().scoreboards.allowNonPlayerEntitiesOnScoreboards && !(this instanceof Player)) { return null; } // Paper
return this.level().getScoreboard().getPlayersTeam(this.getScoreboardName());
@@ -3854,6 +3858,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -3858,6 +3862,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
}
}

Expand All @@ -1114,7 +1114,7 @@ index 52aa759db930c04a051686766c1b822a5131a20a..ad0fff286e660102898a7e67fb5512c1
// TODO any events that can modify go HERE

// check for same region
@@ -3977,8 +3987,14 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -3981,8 +3991,14 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
io.papermc.paper.util.TickThread.ensureTickThread(this, "Cannot portal entity async");

ServerLevel destination = this.getServer().getLevel(this.level().getTypeKey() == LevelStem.END ? Level.OVERWORLD : Level.END);
Expand All @@ -1129,7 +1129,7 @@ index 52aa759db930c04a051686766c1b822a5131a20a..ad0fff286e660102898a7e67fb5512c1
return false;
}

@@ -3989,8 +4005,14 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -3993,8 +4009,14 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
io.papermc.paper.util.TickThread.ensureTickThread(this, "Cannot portal entity async");

ServerLevel destination = this.getServer().getLevel(this.level().getTypeKey() == LevelStem.NETHER ? Level.OVERWORLD : Level.NETHER);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -784,7 +784,7 @@ index 51e155d90c839b73c481cdca8fba1f700d4b5759..cb33fbdc2fc3312c0f4d4eaf5fd44811
ChunkPos chunkcoordintpair = new ChunkPos(x, z);
long k = chunkcoordintpair.toLong();
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 3c5b412ac6b09c667b05d9c44f341d4e8506c4cc..28aad969916c0e26971f9ab725c8569e74cb27fc 100644
index b2feaea169fa9d3977c3dfdfdf3dea9283f5d854..8c132b05d816f99a2bf77ee7b3cd1386c0040198 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -4,37 +4,15 @@ import com.google.common.collect.Lists;
Expand Down Expand Up @@ -1055,7 +1055,7 @@ index 3c5b412ac6b09c667b05d9c44f341d4e8506c4cc..28aad969916c0e26971f9ab725c8569e
// CraftBukkit end

public class ServerGamePacketListenerImpl implements ServerPlayerConnection, TickablePacketListener, ServerGamePacketListener {
@@ -2515,7 +2372,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -2523,7 +2380,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
public void handleCommand(String s) { // Paper - private -> public
// Paper Start
if (!org.spigotmc.AsyncCatcher.shuttingDown && !org.bukkit.Bukkit.isPrimaryThread()) {
Expand All @@ -1064,7 +1064,7 @@ index 3c5b412ac6b09c667b05d9c44f341d4e8506c4cc..28aad969916c0e26971f9ab725c8569e
LOGGER.error("Command Dispatched Async: " + s);
LOGGER.error("Please notify author of plugin causing this execution to fix this bug! see: http://bit.ly/1oSiM6C", new Throwable());
Waitable<Void> wait = new Waitable<>() {
@@ -2576,7 +2433,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -2584,7 +2441,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
if (s.isEmpty()) {
ServerGamePacketListenerImpl.LOGGER.warn(this.player.getScoreboardName() + " tried to send an empty message");
} else if (this.getCraftPlayer().isConversing()) {
Expand All @@ -1074,7 +1074,7 @@ index 3c5b412ac6b09c667b05d9c44f341d4e8506c4cc..28aad969916c0e26971f9ab725c8569e
this.server.processQueue.add(new Runnable() {
@Override
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index ad0fff286e660102898a7e67fb5512c1079ee7f4..c6cc979b4528b63615e680b5a09d5be16be87cf7 100644
index a0e5f4caa054d6c4fea6500e47940f817f1c5346..b71e3cbb8d9c14e383d73bff8d69975fe7a03790 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -1,35 +1,12 @@
Expand Down Expand Up @@ -1236,7 +1236,7 @@ index ad0fff286e660102898a7e67fb5512c1079ee7f4..c6cc979b4528b63615e680b5a09d5be1
// CraftBukkit end

public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -4311,9 +4264,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -4315,9 +4268,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@Nullable
public Entity teleportTo(ServerLevel worldserver, PositionImpl location) {
// Folia start - region threading
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ index 2e858160c648cf0fd9b85ca66c80e0b5470b4620..2b4c1fe155b2dadd6e9ee513fa054a52
if (this.level().getTypeKey() == LevelStem.END) {
if (!this.canPortalAsync(false)) {
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index c6cc979b4528b63615e680b5a09d5be16be87cf7..f709247ece3ca0b433ced219f394487677636487 100644
index b71e3cbb8d9c14e383d73bff8d69975fe7a03790..84b63e2a544fef9484ef42aa1618646a25adc485 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -1026,7 +1026,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
Expand All @@ -357,7 +357,7 @@ index c6cc979b4528b63615e680b5a09d5be16be87cf7..f709247ece3ca0b433ced219f3944876
synchronized (this.posLock) {
this.moveStartX = this.getX();
this.moveStartY = this.getY();
@@ -3572,7 +3572,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -3576,7 +3576,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
}

protected EntityTreeNode makePassengerTree() {
Expand All @@ -366,7 +366,7 @@ index c6cc979b4528b63615e680b5a09d5be16be87cf7..f709247ece3ca0b433ced219f3944876

EntityTreeNode root = new EntityTreeNode(null, this);
java.util.ArrayDeque<EntityTreeNode> queue = new java.util.ArrayDeque<>();
@@ -3598,7 +3598,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -3602,7 +3602,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
}

protected EntityTreeNode detachPassengers() {
Expand All @@ -375,7 +375,7 @@ index c6cc979b4528b63615e680b5a09d5be16be87cf7..f709247ece3ca0b433ced219f3944876

EntityTreeNode root = new EntityTreeNode(null, this);
java.util.ArrayDeque<EntityTreeNode> queue = new java.util.ArrayDeque<>();
@@ -3780,7 +3780,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -3784,7 +3784,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
public final boolean teleportAsync(ServerLevel destination, Vec3 pos, Float yaw, Float pitch, Vec3 speedDirectionUpdate,
org.bukkit.event.player.PlayerTeleportEvent.TeleportCause cause, long teleportFlags,
java.util.function.Consumer<Entity> teleportComplete) {
Expand All @@ -384,7 +384,7 @@ index c6cc979b4528b63615e680b5a09d5be16be87cf7..f709247ece3ca0b433ced219f3944876

if (!ServerLevel.isInSpawnableBounds(new BlockPos(io.papermc.paper.util.CoordinateUtils.getBlockX(pos), io.papermc.paper.util.CoordinateUtils.getBlockY(pos), io.papermc.paper.util.CoordinateUtils.getBlockZ(pos)))) {
return false;
@@ -3896,7 +3896,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -3900,7 +3900,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
}

protected boolean tryEndPortal() {
Expand All @@ -393,7 +393,7 @@ index c6cc979b4528b63615e680b5a09d5be16be87cf7..f709247ece3ca0b433ced219f3944876
BlockPos pos = this.portalBlock;
ServerLevel world = this.portalWorld;
this.portalBlock = null;
@@ -3914,7 +3914,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -3918,7 +3918,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
}

protected boolean tryNetherPortal() {
Expand All @@ -402,7 +402,7 @@ index c6cc979b4528b63615e680b5a09d5be16be87cf7..f709247ece3ca0b433ced219f3944876

int portalWaitTime = this.getPortalWaitTime();

@@ -3937,7 +3937,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -3941,7 +3941,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
}

public boolean endPortalLogicAsync() {
Expand All @@ -411,7 +411,7 @@ index c6cc979b4528b63615e680b5a09d5be16be87cf7..f709247ece3ca0b433ced219f3944876

ServerLevel destination = this.getServer().getLevel(this.level().getTypeKey() == LevelStem.END ? Level.OVERWORLD : Level.END);
EntityPortalReadyEvent event = new io.papermc.paper.event.entity.EntityPortalReadyEvent(this.getBukkitEntity(), destination == null ? null : destination.getWorld(), org.bukkit.PortalType.ENDER);
@@ -3955,7 +3955,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -3959,7 +3959,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
}

public boolean netherPortalLogicAsync() {
Expand All @@ -420,7 +420,7 @@ index c6cc979b4528b63615e680b5a09d5be16be87cf7..f709247ece3ca0b433ced219f3944876

ServerLevel destination = this.getServer().getLevel(this.level().getTypeKey() == LevelStem.NETHER ? Level.OVERWORLD : Level.NETHER);
EntityPortalReadyEvent event = new io.papermc.paper.event.entity.EntityPortalReadyEvent(this.getBukkitEntity(), destination == null ? null : destination.getWorld(), org.bukkit.PortalType.NETHER);
@@ -4182,7 +4182,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -4186,7 +4186,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {

protected boolean portalToAsync(ServerLevel destination, boolean takePassengers,
PortalType type, java.util.function.Consumer<Entity> teleportComplete) {
Expand All @@ -429,7 +429,7 @@ index c6cc979b4528b63615e680b5a09d5be16be87cf7..f709247ece3ca0b433ced219f3944876
if (!this.canPortalAsync(takePassengers)) {
return false;
}
@@ -5426,7 +5426,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -5430,7 +5430,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@Override
public final void setRemoved(Entity.RemovalReason reason) {
// Paper start - rewrite chunk system
Expand Down

0 comments on commit 1c94790

Please sign in to comment.