Skip to content

Commit

Permalink
Update upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
MrPowerGamerBR committed Dec 22, 2023
1 parent 727ae7e commit b305e4f
Show file tree
Hide file tree
Showing 9 changed files with 41 additions and 41 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=net.sparklypower.sparklypaper
version=1.20.4-R0.1-SNAPSHOT

mcVersion=1.20.4
paperRef=086ca616d8bd98dde4e4859d29ce89314494d90c
paperRef=b4c9e7e5d40fd4a0a7fea270fd4ebb72b38fa0fc

org.gradle.caching=true
org.gradle.parallel=true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Subject: [PATCH] new fork who dis - Rebrand to SparklyPaper and Build Changes


diff --git a/build.gradle.kts b/build.gradle.kts
index e827ee211e3c65dc68ac5867fd8476639df63645..4b29c213a2a66370a84006d9c2cdcb199bb7d4f5 100644
index 3e3ea0e4e4ceb3283ad2b99957e3795d66a9a716..44e1bab2017e596fe822d561323f6e5870cae40b 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -75,7 +75,7 @@ dependencies {
@@ -78,7 +78,7 @@ dependencies {
}

// Paper start
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Subject: [PATCH] new fork who dis - Rebrand to SparklyPaper and Build Changes


diff --git a/build.gradle.kts b/build.gradle.kts
index 170a915098f09ace226648da342a04c5c7583d11..5c2c47b6e01c65ade4da9df65e8a799fb2654989 100644
index b12b5a1e82a5ebf47135a3863a390a45a9d8d8ec..b2e2eb5d6e3e63d13e8c4ca1ea0ebf16735555e7 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -3,6 +3,8 @@ import io.papermc.paperweight.util.*
Expand Down Expand Up @@ -79,10 +79,10 @@ index 34f19ac897a30c0c4e3ab406013fcca1c8b7db93..f1c65967b74e79452870438eea0942cc

public SystemReport fillSystemReport(SystemReport details) {
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 782bb8ca67517dde5dba8f0a133eb8699353dd01..e81a3a5e9aab6cb0c76d9e557a31d94536680ce4 100644
index e011cfcdda2e0a609d4158b0454bdf046b04c9d9..3b28e079dcfba5ca3de2aad903f95c142e73e6a3 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -270,7 +270,7 @@ import javax.annotation.Nullable; // Paper
@@ -264,7 +264,7 @@ import javax.annotation.Nullable; // Paper
import javax.annotation.Nonnull; // Paper

public final class CraftServer implements Server {
Expand Down
12 changes: 6 additions & 6 deletions patches/server/0002-SparklyPaper-config-files.patch
Original file line number Diff line number Diff line change
Expand Up @@ -116,34 +116,34 @@ index 0000000000000000000000000000000000000000..bc0ec96f91f7c9ab9f9a865a50f69707
+ }
+}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index e81a3a5e9aab6cb0c76d9e557a31d94536680ce4..ec838fa5248743ccd96f2c19b25b17d9a2ace3d0 100644
index 3b28e079dcfba5ca3de2aad903f95c142e73e6a3..64044cb5888c72797c369b5d015297677b20419a 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -118,6 +118,7 @@ import net.minecraft.world.level.storage.PrimaryLevelData;
@@ -112,6 +112,7 @@ import net.minecraft.world.level.storage.PrimaryLevelData;
import net.minecraft.world.level.storage.loot.LootDataManager;
import net.minecraft.world.level.validation.ContentValidationException;
import net.minecraft.world.phys.Vec3;
+import net.sparklypower.sparklypaper.configs.SparklyPaperConfigUtils;
import org.bukkit.BanList;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
@@ -1036,6 +1037,7 @@ public final class CraftServer implements Server {
@@ -1037,6 +1038,7 @@ public final class CraftServer implements Server {

org.spigotmc.SpigotConfig.init((File) this.console.options.valueOf("spigot-settings")); // Spigot
this.console.paperConfigurations.reloadConfigs(this.console);
+ net.sparklypower.sparklypaper.configs.SparklyPaperConfigUtils.INSTANCE.init((File) console.options.valueOf("sparklypaper-settings")); // SparklyPaper
for (ServerLevel world : this.console.getAllLevels()) {
// world.serverLevelData.setDifficulty(config.difficulty); // Paper - per level difficulty
world.setSpawnSettings(world.serverLevelData.getDifficulty() != Difficulty.PEACEFUL && config.spawnMonsters, config.spawnAnimals); // Paper - per level difficulty (from MinecraftServer#setDifficulty(ServerLevel, Difficulty, boolean))
@@ -1051,6 +1053,7 @@ public final class CraftServer implements Server {
@@ -1052,6 +1054,7 @@ public final class CraftServer implements Server {
}
}
world.spigotConfig.init(); // Spigot
+ world.sparklyPaperConfig = SparklyPaperConfigUtils.INSTANCE.getWorldSettings(world.serverLevelData.getLevelName()); // SparklyPaper
}

Plugin[] pluginClone = pluginManager.getPlugins().clone(); // Paper
@@ -1066,6 +1069,7 @@ public final class CraftServer implements Server {
@@ -1067,6 +1070,7 @@ public final class CraftServer implements Server {
this.reloadData();
org.spigotmc.SpigotConfig.registerCommands(); // Spigot
io.papermc.paper.command.PaperCommands.registerCommands(this.console); // Paper
Expand All @@ -152,7 +152,7 @@ index e81a3a5e9aab6cb0c76d9e557a31d94536680ce4..ec838fa5248743ccd96f2c19b25b17d9
this.ignoreVanillaPermissions = this.commandsConfiguration.getBoolean("ignore-vanilla-permissions");

diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index 4b457cbfc56e55e0ae0fee5b69e2e75349702aab..2791bd21e570c6bbcb3be19fac4a520a810f952d 100644
index a74a8a027c99eef199c1a6a54232ac2c8ffb9d08..73a358912fccd70b350d75e857a2affc5480473a 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -174,6 +174,14 @@ public class Main {
Expand Down
6 changes: 3 additions & 3 deletions patches/server/0003-Optimize-entity-coordinate-key.patch
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ data is already available in the blockPosition struct, so we use that
instead of re-doing the casting.

diff --git a/src/main/java/io/papermc/paper/util/MCUtil.java b/src/main/java/io/papermc/paper/util/MCUtil.java
index 8240bb085b619f257f8c0a25775e0b15068e440f..6d9668d993bb922ae9d2b76a4d766903cc3f98a4 100644
index 200ed770b57e1a9240abf0473968d4b85cbefe3c..0acc7cfc0fb0264dd76a58f7582e79d83fa040eb 100644
--- a/src/main/java/io/papermc/paper/util/MCUtil.java
+++ b/src/main/java/io/papermc/paper/util/MCUtil.java
@@ -213,7 +213,7 @@ public final class MCUtil {
@@ -212,7 +212,7 @@ public final class MCUtil {
}

public static long getCoordinateKey(final Entity entity) {
Expand All @@ -24,7 +24,7 @@ index 8240bb085b619f257f8c0a25775e0b15068e440f..6d9668d993bb922ae9d2b76a4d766903

public static long getCoordinateKey(final ChunkPos pair) {
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 9abe817ae202edaa2d88cd59ae5c7db0b1c634be..cfb4daaa28263aef1c74eac574b4f0e8b2f87776 100644
index 0c46a4aeafd03fbbfd590b0362d41bf2b1d5ca74..aa6045039450c4cce8d9481aa7f56867dd15c0fa 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -307,7 +307,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,10 @@ index f1c65967b74e79452870438eea0942cc700fe0e9..4820e5ae050966d89a0d0b587c83537d
io.papermc.paper.adventure.providers.ClickCallbackProviderImpl.CALLBACK_MANAGER.handleQueue(this.tickCount); // Paper
this.profiler.push("commandFunctions");
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
index aa4dbf91cf6da329fdcacbde98bb870eb48e8f5c..f974724f76a1d4edb65cacad7707882d6c6d3a1b 100644
index 1727e932ac6b9ca09b5df96f9547ff125114e15a..bcb1f764702dce94e9989c2a3cb745ff6e60753b 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -213,7 +213,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
@@ -68,7 +68,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
private final CraftPersistentDataContainer persistentDataContainer = new CraftPersistentDataContainer(CraftEntity.DATA_TYPE_REGISTRY);
protected net.kyori.adventure.pointer.Pointers adventure$pointers; // Paper - implement pointers
// Paper start - Folia shedulers
Expand All @@ -125,11 +125,11 @@ index aa4dbf91cf6da329fdcacbde98bb870eb48e8f5c..f974724f76a1d4edb65cacad7707882d
private final io.papermc.paper.threadedregions.scheduler.FoliaEntityScheduler apiScheduler = new io.papermc.paper.threadedregions.scheduler.FoliaEntityScheduler(this);

@Override
@@ -226,6 +226,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
@@ -81,6 +81,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
this.server = server;
this.entity = entity;
this.entityType = CraftEntityType.minecraftToBukkit(entity.getType());
+ this.taskScheduler = new io.papermc.paper.threadedregions.EntityScheduler(this.entity.getServer(), this); // SparklyPaper - skip EntityScheduler's executeTick checks if there isn't any tasks to be run
}

public static CraftEntity getEntity(CraftServer server, Entity entity) {
public static <T extends Entity> CraftEntity getEntity(CraftServer server, T entity) {
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ index 17ba07cbd4792f63d88ce29d00da280f30c4abff..8e8aad958c96fa1df3d906ec120a89ad
final TrackedChunk chunk = this.byChunk.get(CoordinateUtils.getChunkKey(chunkX, chunkZ));

diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
index 6e212f672579a3e08dc362c287be59ca5170d717..a9763733a0026f7785349dcdd845a01f50a022b1 100644
index 44ada45d9bf2d9b48e5de1c3cb1a855902f3884b..22213a52c5d546145d8b8de929af61e49d40375d 100644
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
@@ -647,7 +647,7 @@ public class ServerChunkCache extends ChunkSource {
@@ -617,7 +617,7 @@ public class ServerChunkCache extends ChunkSource {

// Paper start - optimise chunk tick iteration
com.destroystokyo.paper.util.maplist.ReferenceList<ServerPlayer> playersNearby
Expand Down
6 changes: 3 additions & 3 deletions patches/server/0013-Optimize-canSee-checks.patch
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ index caa73632aee15583c6b6ed12a668c8f49b794708..fa4c8a52a57775ef8f23e48e57b76ff7
}
// CraftBukkit end
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index fd84786f3e72875e79df46416f47f3403876cef3..a26150660b70442444d7dbcb5cae4ccab19838d5 100644
index 3be5e4df190bff0087c8450b16e4e37b07169040..960cc85150172eae9ba1eb1b6876ea8d21f2de34 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -184,7 +184,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -181,7 +181,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
private boolean hasPlayedBefore = false;
private final ConversationTracker conversationTracker = new ConversationTracker();
private final Set<String> channels = new HashSet<String>();
Expand All @@ -39,7 +39,7 @@ index fd84786f3e72875e79df46416f47f3403876cef3..a26150660b70442444d7dbcb5cae4cca
private final Set<UUID> unlistedEntities = new HashSet<>(); // Paper
private static final WeakHashMap<Plugin, WeakReference<Plugin>> pluginWeakReferences = new WeakHashMap<>();
private int hash = 0;
@@ -2094,9 +2094,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2091,9 +2091,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player {

@Override
public boolean canSee(org.bukkit.entity.Entity entity) {
Expand Down
Loading

0 comments on commit b305e4f

Please sign in to comment.