Skip to content

Commit

Permalink
Updated Upstream(Folia)
Browse files Browse the repository at this point in the history
  • Loading branch information
MrHua269 committed Dec 24, 2023
1 parent 27535b8 commit ad74975
Show file tree
Hide file tree
Showing 10 changed files with 26 additions and 26 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
group = me.earthme.luminol
version = 1.20.4-R0.1-SNAPSHOT

foliaCommit = cd713b8ea2e7a57a37a99755d8d84b7fa0c9f170
foliaCommit = 9a389a1a5e10b2c990c521f4af9674b9338b0b42

org.gradle.caching = true
org.gradle.parallel = true
Expand Down
4 changes: 2 additions & 2 deletions patches/server/0005-Add-config-for-unsafe-teleportation.patch
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ index 1f9ff0fc33fa36c90fc4cbbd21b7b790de581632..36ca0b94d29d81e5f1f2aff4a38ead0b

public static <T> T get(String key,T def){
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 65ae803da6fa395c9ad031460fc76077da62aeec..c31aa01dc355b5ca475f4f79049044034d730bb9 100644
index 34724fd847a99349f13a6690d1abe27647bc80ca..dbcb87e9a549392ddad79548f2cd9ecd54c9ce89 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -24,6 +24,8 @@ import java.util.function.BiConsumer;
Expand All @@ -39,7 +39,7 @@ index 65ae803da6fa395c9ad031460fc76077da62aeec..c31aa01dc355b5ca475f4f7904904403
import net.minecraft.BlockUtil;
import net.minecraft.CrashReport;
import net.minecraft.CrashReportCategory;
@@ -4056,6 +4058,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
@@ -4051,6 +4053,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S

protected boolean tryEndPortal() {
io.papermc.paper.util.TickThread.ensureTickThread(this, "Cannot portal entity async");
Expand Down
4 changes: 2 additions & 2 deletions patches/server/0010-Add-config-for-vanilla-random.patch
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ index 8d1ce8eae252fcf05b6a62d2dc467d6d503d3df4..89d8ffc947d265e0e81943ad851e868b

public static <T> T get(String key,T def){
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index c31aa01dc355b5ca475f4f79049044034d730bb9..eaee2eaa21651365b708b09a8377a7a0dfb4a6b7 100644
index dbcb87e9a549392ddad79548f2cd9ecd54c9ce89..76a33e322c77b95cbd1a524fc98cf73b954fd5be 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -574,7 +574,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
@@ -573,7 +573,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
this.bb = Entity.INITIAL_AABB;
this.stuckSpeedMultiplier = Vec3.ZERO;
this.nextStep = 1.0F;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Subject: [PATCH] Pufferfish Reduce entity fluid lookups if no fluids


diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 3bb40f6bd581113fda36df2ad73f95899c012a44..030c9d2e2c203375a3cc88da1c2e08fb23dcf60a 100644
index 535fd8e659088963c66431581193e8b3c5bb1846..e58c5c89c094e106511394ac184d4372942dc0a6 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -5200,16 +5200,18 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
@@ -5195,16 +5195,18 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
}

public boolean updateFluidHeightAndDoFluidPushing(TagKey<Fluid> tag, double speed) {
Expand All @@ -34,7 +34,7 @@ index 3bb40f6bd581113fda36df2ad73f95899c012a44..030c9d2e2c203375a3cc88da1c2e08fb
double d1 = 0.0D;
boolean flag = this.isPushedByFluid();
boolean flag1 = false;
@@ -5217,14 +5219,61 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
@@ -5212,14 +5214,61 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
int k1 = 0;
BlockPos.MutableBlockPos blockposition_mutableblockposition = new BlockPos.MutableBlockPos();

Expand Down Expand Up @@ -102,7 +102,7 @@ index 3bb40f6bd581113fda36df2ad73f95899c012a44..030c9d2e2c203375a3cc88da1c2e08fb

if (d2 >= axisalignedbb.minY) {
flag1 = true;
@@ -5246,9 +5295,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
@@ -5241,9 +5290,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
// CraftBukkit end
}
}
Expand Down
4 changes: 2 additions & 2 deletions patches/server/0028-Pufferfish-Entity-TTL.patch
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ index de0855656ad3882b182aa5674fd0117288268e71..d0c0b4daec59f23a989a8b8f66ea3c70

public static <T> T get(String key,T def){
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 030c9d2e2c203375a3cc88da1c2e08fb23dcf60a..ec7b7923ebdfb07c5a07e5e58aa3d66ac269c225 100644
index e58c5c89c094e106511394ac184d4372942dc0a6..ee3f366bc8df9e57a90f9dc7f85b7939a9c410c0 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -803,6 +803,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
@@ -802,6 +802,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
}

public void tick() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,10 @@ index 1c39d01d46522d7120653c0437e6b0d3fc76ce3e..d4fbc4537f614c803fa9c4c13077a787
if (false && this.shouldDiscardEntity(entity)) { // CraftBukkit - We prevent spawning in general, so this butchering is not needed
entity.discard();
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index ec7b7923ebdfb07c5a07e5e58aa3d66ac269c225..06f859e9e98c1cfd7161a43f93aa2b60eee9d666 100644
index ee3f366bc8df9e57a90f9dc7f85b7939a9c410c0..79f5582f6956c59aee3fbbf676866c5814c388d0 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -441,6 +441,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
@@ -440,6 +440,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
return this.originWorld;
}
// Paper end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ index 793dc5b35e9a0665d486a74ce5b776b43b941ee2..fcd532898e099a809969603941b90fdd

public static <T> T get(String key,T def){
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 06f859e9e98c1cfd7161a43f93aa2b60eee9d666..650a836324b15e90044a1ae1241679bd37354f85 100644
index 79f5582f6956c59aee3fbbf676866c5814c388d0..fd9255334881ff59ad2da70e77b6860a032a7c62 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -5398,6 +5398,16 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
@@ -5393,6 +5393,16 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
return this.feetBlockState;
}

Expand Down
4 changes: 2 additions & 2 deletions patches/server/0033-Gale-Optimize-sun-burn-tick.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Subject: [PATCH] Gale Optimize sun burn tick


diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 650a836324b15e90044a1ae1241679bd37354f85..8b77a86a5757ee00eeb842fb9a3bdc296744f48b 100644
index fd9255334881ff59ad2da70e77b6860a032a7c62..37ddd6a21ce5a88ae39e498bb8663ff31590369d 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -308,7 +308,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
Expand All @@ -17,7 +17,7 @@ index 650a836324b15e90044a1ae1241679bd37354f85..8b77a86a5757ee00eeb842fb9a3bdc29
public BlockPos blockPosition; // Pufferfish - private->public
private ChunkPos chunkPosition;
private Vec3 deltaMovement;
@@ -2031,9 +2031,17 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
@@ -2026,9 +2026,17 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
/** @deprecated */
@Deprecated
public float getLightLevelDependentMagicValue() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Subject: [PATCH] Kaiiju Vanilla end portal teleportation


diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 8b77a86a5757ee00eeb842fb9a3bdc296744f48b..885497da8152c5a9857bc4da1393dd0c9cd4339a 100644
index 37ddd6a21ce5a88ae39e498bb8663ff31590369d..9cf7f39ef5d74ded26bb3efff8bb422b633e1918 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -4163,12 +4163,17 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
@@ -4158,12 +4158,17 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
targetPos, 16, // load 16 blocks to be safe from block physics
ca.spottedleaf.concurrentutil.executor.standard.PrioritisedExecutor.Priority.HIGH,
(chunks) -> {
Expand All @@ -28,7 +28,7 @@ index 8b77a86a5757ee00eeb842fb9a3bdc296744f48b..885497da8152c5a9857bc4da1393dd0c
);
}
);
@@ -4355,6 +4360,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
@@ -4350,6 +4355,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
if (!this.canPortalAsync(takePassengers)) {
return false;
}
Expand All @@ -39,7 +39,7 @@ index 8b77a86a5757ee00eeb842fb9a3bdc296744f48b..885497da8152c5a9857bc4da1393dd0c

Vec3 initialPosition = this.position();
ChunkPos initialPositionChunk = new ChunkPos(
@@ -4413,7 +4422,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
@@ -4408,7 +4417,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
// place
passengerTree.root.placeInAsync(
originWorld, destination, Entity.TELEPORT_FLAG_LOAD_CHUNK | (takePassengers ? Entity.TELEPORT_FLAG_TELEPORT_PASSENGERS : 0L),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ index 0000000000000000000000000000000000000000..88d5b188ccfb17fe1ae4b08f32565f27
+ }
+}
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
index d248c0492a34c11fb96c9dd6f0a3d180ee846c51..712c28bb4842ca0f885a66fe35558db538245de9 100644
index 88db5ada13329a5fe0d0fb652d2c8a8d561649e8..d249827d121144e8b00ce174ffcdd2bdb34c6a97 100644
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
@@ -17,6 +17,9 @@ import java.util.function.BooleanSupplier;
Expand All @@ -328,7 +328,7 @@ index d248c0492a34c11fb96c9dd6f0a3d180ee846c51..712c28bb4842ca0f885a66fe35558db5
import net.minecraft.Util;
import net.minecraft.core.BlockPos;
import net.minecraft.core.SectionPos;
@@ -519,32 +522,38 @@ public class ServerChunkCache extends ChunkSource {
@@ -486,32 +489,38 @@ public class ServerChunkCache extends ChunkSource {
int k = this.distanceManager.getNaturalSpawnChunkCount();
// Paper start - per player mob spawning
int naturalSpawnChunkCount = k;
Expand Down Expand Up @@ -384,7 +384,7 @@ index d248c0492a34c11fb96c9dd6f0a3d180ee846c51..712c28bb4842ca0f885a66fe35558db5
gameprofilerfiller.popPush("spawnAndTick");
boolean flag = this.level.getGameRules().getBoolean(GameRules.RULE_DOMOBSPAWNING) && !this.level.getLocalPlayers().isEmpty(); // CraftBukkit // Folia - region threadin

@@ -637,7 +646,11 @@ public class ServerChunkCache extends ChunkSource {
@@ -606,7 +615,11 @@ public class ServerChunkCache extends ChunkSource {
chunk1.incrementInhabitedTime(j);
if (spawn && flag && (this.spawnEnemies || this.spawnFriendlies) && this.level.getWorldBorder().isWithinBounds(chunkcoordintpair)) { // Spigot // Paper - optimise chunk tick iteration
++spawnChunkCount; // Folia - profiler
Expand All @@ -397,7 +397,7 @@ index d248c0492a34c11fb96c9dd6f0a3d180ee846c51..712c28bb4842ca0f885a66fe35558db5
}

if (true || this.level.shouldTickBlocksAt(chunkcoordintpair.toLong())) { // Paper - optimise chunk tick iteration
@@ -667,6 +680,36 @@ public class ServerChunkCache extends ChunkSource {
@@ -636,6 +649,36 @@ public class ServerChunkCache extends ChunkSource {
} // Paper - timings
} finally { profiler.stopTimer(ca.spottedleaf.leafprofiler.LProfilerRegistry.MISC_MOB_SPAWN_TICK); } // Folia - profiler
}
Expand Down Expand Up @@ -434,7 +434,7 @@ index d248c0492a34c11fb96c9dd6f0a3d180ee846c51..712c28bb4842ca0f885a66fe35558db5
}

gameprofilerfiller.popPush("broadcast");
@@ -837,7 +880,7 @@ public class ServerChunkCache extends ChunkSource {
@@ -806,7 +849,7 @@ public class ServerChunkCache extends ChunkSource {
@VisibleForDebug
public NaturalSpawner.SpawnState getLastSpawnState() {
io.papermc.paper.threadedregions.RegionizedWorldData worldData = this.level.getCurrentWorldData(); // Folia - region threading
Expand Down

0 comments on commit ad74975

Please sign in to comment.