Skip to content

Commit

Permalink
Update Upstream (Folia)
Browse files Browse the repository at this point in the history
  • Loading branch information
kugge authored and sofianedjerbi committed Jul 26, 2023
1 parent 40d5526 commit 794ce3b
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 33 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ group = dev.kaiijumc.kaiiju
version = 1.20.1-R0.1-SNAPSHOT
mcVersion = 1.20.1

foliaRef = daacd4255022f3a1bf74dd3e84f751be838678ac
foliaRef = b2d7bdb0bb5c841b4ccd096c0181664664ce97b1

org.gradle.caching=true
org.gradle.parallel=true
Expand Down
6 changes: 3 additions & 3 deletions patches/server/0004-Add-Linear-region-format.patch
Original file line number Diff line number Diff line change
Expand Up @@ -587,10 +587,10 @@ index 25fe439c8d1e88a86e85ac9a4761425d98ee6c4f..c4d28d887b4cc71dc713b1e3f46bc80f
regionFile.setStatus(chunkPos.x, chunkPos.z, ChunkSerializer.getStatus(compound));
}
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 042ca6b3faae5249210567f2c26dff404974e1ff..7099a44a2322ab390c21e74668c8657dcc9e5e87 100644
index cf8f93734121e5c1959959f0ba13ee4e6db31959..4c587f783f4c2207e4e1a1f4596c8f50e997d541 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -426,8 +426,8 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -453,8 +453,8 @@ public class ServerLevel extends Level implements WorldGenLevel {

private static final class EntityRegionFileStorage extends net.minecraft.world.level.chunk.storage.RegionFileStorage {

Expand All @@ -601,7 +601,7 @@ index 042ca6b3faae5249210567f2c26dff404974e1ff..7099a44a2322ab390c21e74668c8657d
}

protected void write(ChunkPos pos, net.minecraft.nbt.CompoundTag nbt) throws IOException {
@@ -666,7 +666,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -693,7 +693,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
// CraftBukkit end
boolean flag2 = minecraftserver.forceSynchronousWrites();
DataFixer datafixer = minecraftserver.getFixerUpper();
Expand Down
8 changes: 4 additions & 4 deletions patches/server/0012-Crash-on-broken-symlink.patch
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ index abf5e2a06af9853b58ac9107cd6e9787c4185c66..389c68c0becd2f69dc1004d0b383f1a8
long expectedChunks = (long)regionFiles.length * (32L * 32L);

diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
index 61c6bc2859235874aefac71e9e55162f0a89f29f..24bd63c596c9f61f1e89ec5b001b7cb7a29a09ff 100644
index c4d28d887b4cc71dc713b1e3f46bc80f4484a95d..f50507ab85282d261985ce9b186581f5a7a50f79 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
@@ -269,7 +269,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
Expand All @@ -64,10 +64,10 @@ index 61c6bc2859235874aefac71e9e55162f0a89f29f..24bd63c596c9f61f1e89ec5b001b7cb7
// Paper start
this.dataRegionManager = new io.papermc.paper.chunk.SingleThreadChunkRegionManager(this.level, 2, (1.0 / 3.0), 1, 6, "Data", DataRegionData::new, DataRegionSectionData::new);
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 4774d3f357d62b0818b4713f8085d05be09eaa5c..1bbd8b475cdc57fb15ca05ffe122220a5539da10 100644
index 4c587f783f4c2207e4e1a1f4596c8f50e997d541..ad896c8a3060f5c8d85a8b5707317de646bf9cae 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -426,8 +426,8 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -453,8 +453,8 @@ public class ServerLevel extends Level implements WorldGenLevel {

private static final class EntityRegionFileStorage extends net.minecraft.world.level.chunk.storage.RegionFileStorage {

Expand All @@ -78,7 +78,7 @@ index 4774d3f357d62b0818b4713f8085d05be09eaa5c..1bbd8b475cdc57fb15ca05ffe122220a
}

protected void write(ChunkPos pos, net.minecraft.nbt.CompoundTag nbt) throws IOException {
@@ -666,7 +666,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -693,7 +693,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
// CraftBukkit end
boolean flag2 = minecraftserver.forceSynchronousWrites();
DataFixer datafixer = minecraftserver.getFixerUpper();
Expand Down
4 changes: 2 additions & 2 deletions patches/server/0013-Toggle-void-trading.patch
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ index f3f824d0ab1a2a72825c40b67192386479a0b34c..95ed6cb7b94797187d1011cab344e187
}
}
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 1bbd8b475cdc57fb15ca05ffe122220a5539da10..7f39e36037d55278d15399196459e51b885c5d1e 100644
index ad896c8a3060f5c8d85a8b5707317de646bf9cae..0df4672abb5e87587da8712b6febf6312e241cda 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -2838,7 +2838,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -2865,7 +2865,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
// Spigot Start
if (entity.getBukkitEntity() instanceof org.bukkit.inventory.InventoryHolder && (!(entity instanceof ServerPlayer) || entity.getRemovalReason() != Entity.RemovalReason.KILLED)) { // SPIGOT-6876: closeInventory clears death message
// Paper start
Expand Down
4 changes: 2 additions & 2 deletions patches/server/0015-Toggle-tick-level-when-empty.patch
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ index 6d7356cc07da58b1cef8d8963e790251d765de2c..601b9867d839f4928ba993ee8f00df9c

public boolean fixVoidTrading = true;
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 7f39e36037d55278d15399196459e51b885c5d1e..66509fa23bfcde70abd3917eb774cf48d5d6da93 100644
index 0df4672abb5e87587da8712b6febf6312e241cda..1818c5ae88c331fb900470436f72049165c9e9f4 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -798,7 +798,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -825,7 +825,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
timings.doSounds.stopTiming(); // Spigot
regionizedWorldData.setHandlingTick(false); // Folia - regionised ticking
gameprofilerfiller.pop();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -319,18 +319,18 @@ index 991e4c19763a34a6fead88363e007c2d11aad836..24a2d3f496727790f63cb66a2534d442
dev.kaiijumc.kaiiju.KaiijuConfig.registerCommands();
// Kaiiju end
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 245c3e63588379f51780963ba91bc6bf0a3feda6..761019f86983daaea4fface519e052f8fb6de1cd 100644
index 1818c5ae88c331fb900470436f72049165c9e9f4..7938ce423422c1a2cb72a9b2e45c7bbb6f20ec91 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -822,6 +822,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -849,6 +849,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
} // Folia end - region threading
}

+ if (kaiijuConfig.enableEntityThrottling) regionizedWorldData.entityThrottler.tickLimiterStart(); // Kaiiju
org.spigotmc.ActivationRange.activateEntities(this); // Spigot
timings.entityTick.startTiming(); // Spigot
regionizedWorldData.forEachTickingEntity((entity) -> { // Folia - regionised ticking
@@ -844,6 +845,13 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -871,6 +872,13 @@ public class ServerLevel extends Level implements WorldGenLevel {
entity.stopRiding();
}

Expand All @@ -344,7 +344,7 @@ index 245c3e63588379f51780963ba91bc6bf0a3feda6..761019f86983daaea4fface519e052f8
gameprofilerfiller.push("tick");
this.guardEntityTick(this::tickNonPassenger, entity);
gameprofilerfiller.pop();
@@ -851,6 +859,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -878,6 +886,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
}
}
});
Expand Down
4 changes: 2 additions & 2 deletions patches/server/0032-Option-to-disable-player-stats.patch
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ index f49510c999ce5241f26dc9ba90a6148bf31467c7..b23f2df433d7ebc871f4009081c28ed9

public static String serverModName = "Kaiiju";
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 817f79bfca1aec161cb4635b9c7a8e21b14db7eb..bba90683202b47284208416a37724e9d54266ffa 100644
index febd0ba72922462364eb65243640dcb693129e21..428da29b343eea9df25e5d719d5162faf0d9d7e5 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -2081,6 +2081,7 @@ public class ServerPlayer extends Player {
@@ -2139,6 +2139,7 @@ public class ServerPlayer extends Player {

@Override
public void awardStat(Stat<?> stat, int amount) {
Expand Down
30 changes: 15 additions & 15 deletions patches/server/0033-Option-to-disable-achievements.patch
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ index 9f0095f2196133a8bcffd5306aa9ac0b99b2f8d7..31d66bb2fcf4bb7262df2d8006e307fe

public boolean fixVoidTrading = true;
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index bba90683202b47284208416a37724e9d54266ffa..6bbbd7d4a409140df65f52f36e413c67ebac5561 100644
index 428da29b343eea9df25e5d719d5162faf0d9d7e5..ad5830f419321e0f901d58a18bba7b970de567aa 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -734,7 +734,7 @@ public class ServerPlayer extends Player {
@@ -792,7 +792,7 @@ public class ServerPlayer extends Player {

@Override
protected void onInsideBlock(BlockState state) {
Expand All @@ -36,7 +36,7 @@ index bba90683202b47284208416a37724e9d54266ffa..6bbbd7d4a409140df65f52f36e413c67
}

@Override
@@ -781,9 +781,9 @@ public class ServerPlayer extends Player {
@@ -839,9 +839,9 @@ public class ServerPlayer extends Player {
}
}

Expand All @@ -48,7 +48,7 @@ index bba90683202b47284208416a37724e9d54266ffa..6bbbd7d4a409140df65f52f36e413c67
}

this.trackStartFallingPosition();
@@ -858,7 +858,7 @@ public class ServerPlayer extends Player {
@@ -916,7 +916,7 @@ public class ServerPlayer extends Player {
}

if (this.tickCount % 20 == 0) {
Expand All @@ -57,7 +57,7 @@ index bba90683202b47284208416a37724e9d54266ffa..6bbbd7d4a409140df65f52f36e413c67
}

// CraftBukkit start - initialize oldLevel, fire PlayerLevelChangeEvent, and tick client-sided world border
@@ -887,7 +887,7 @@ public class ServerPlayer extends Player {
@@ -945,7 +945,7 @@ public class ServerPlayer extends Player {
@Override
public void resetFallDistance() {
if (this.getHealth() > 0.0F && this.startingToFallPosition != null) {
Expand All @@ -66,7 +66,7 @@ index bba90683202b47284208416a37724e9d54266ffa..6bbbd7d4a409140df65f52f36e413c67
}

this.startingToFallPosition = null;
@@ -906,7 +906,7 @@ public class ServerPlayer extends Player {
@@ -964,7 +964,7 @@ public class ServerPlayer extends Player {
if (this.enteredLavaOnVehiclePosition == null) {
this.enteredLavaOnVehiclePosition = this.position();
} else {
Expand All @@ -75,7 +75,7 @@ index bba90683202b47284208416a37724e9d54266ffa..6bbbd7d4a409140df65f52f36e413c67
}
}

@@ -1110,7 +1110,7 @@ public class ServerPlayer extends Player {
@@ -1168,7 +1168,7 @@ public class ServerPlayer extends Player {

this.handleTeamKill(s, s1, ObjectiveCriteria.TEAM_KILL);
this.handleTeamKill(s1, s, ObjectiveCriteria.KILLED_BY_TEAM);
Expand All @@ -84,7 +84,7 @@ index bba90683202b47284208416a37724e9d54266ffa..6bbbd7d4a409140df65f52f36e413c67
}
}

@@ -1228,7 +1228,7 @@ public class ServerPlayer extends Player {
@@ -1286,7 +1286,7 @@ public class ServerPlayer extends Player {
this.wonGame = false;

this.respawn((player) -> {
Expand All @@ -93,7 +93,7 @@ index bba90683202b47284208416a37724e9d54266ffa..6bbbd7d4a409140df65f52f36e413c67
}, true);
}

@@ -1730,14 +1730,14 @@ public class ServerPlayer extends Player {
@@ -1788,14 +1788,14 @@ public class ServerPlayer extends Player {
maindimensionkey1 = resourcekey1;
}
// Paper end
Expand All @@ -111,7 +111,7 @@ index bba90683202b47284208416a37724e9d54266ffa..6bbbd7d4a409140df65f52f36e413c67
}

if (maindimensionkey1 != Level.NETHER) { // CraftBukkit
@@ -1815,7 +1815,7 @@ public class ServerPlayer extends Player {
@@ -1873,7 +1873,7 @@ public class ServerPlayer extends Player {
{
Either<Player.BedSleepingProblem, Unit> either = super.startSleepInBed(blockposition, force).ifRight((unit) -> {
this.awardStat(Stats.SLEEP_IN_BED);
Expand All @@ -120,7 +120,7 @@ index bba90683202b47284208416a37724e9d54266ffa..6bbbd7d4a409140df65f52f36e413c67
});

if (!this.serverLevel().canSleepThroughNights()) {
@@ -2101,7 +2101,7 @@ public class ServerPlayer extends Player {
@@ -2159,7 +2159,7 @@ public class ServerPlayer extends Player {

@Override
public void triggerRecipeCrafted(Recipe<?> recipe, List<ItemStack> ingredients) {
Expand All @@ -129,7 +129,7 @@ index bba90683202b47284208416a37724e9d54266ffa..6bbbd7d4a409140df65f52f36e413c67
}

@Override
@@ -2230,14 +2230,14 @@ public class ServerPlayer extends Player {
@@ -2288,14 +2288,14 @@ public class ServerPlayer extends Player {
this.levitationStartPos = this.position();
}

Expand All @@ -146,7 +146,7 @@ index bba90683202b47284208416a37724e9d54266ffa..6bbbd7d4a409140df65f52f36e413c67
}

@Override
@@ -2248,7 +2248,7 @@ public class ServerPlayer extends Player {
@@ -2306,7 +2306,7 @@ public class ServerPlayer extends Player {
this.levitationStartPos = null;
}

Expand All @@ -155,7 +155,7 @@ index bba90683202b47284208416a37724e9d54266ffa..6bbbd7d4a409140df65f52f36e413c67
}

@Override
@@ -2808,7 +2808,7 @@ public class ServerPlayer extends Player {
@@ -2866,7 +2866,7 @@ public class ServerPlayer extends Player {

@Override
protected void updateUsingItem(ItemStack stack) {
Expand All @@ -164,7 +164,7 @@ index bba90683202b47284208416a37724e9d54266ffa..6bbbd7d4a409140df65f52f36e413c67
super.updateUsingItem(stack);
}

@@ -2837,7 +2837,7 @@ public class ServerPlayer extends Player {
@@ -2895,7 +2895,7 @@ public class ServerPlayer extends Player {
Entity entity = item.getOwner();

if (entity != null) {
Expand Down

0 comments on commit 794ce3b

Please sign in to comment.