Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,14 +115,14 @@ jobs:

- name: Create Paperclip Jar
if: fromJSON(steps.determine.outputs.result).action == 'paperclip'
run: ./gradlew createMojmapPaperclipJar --stacktrace
run: ./gradlew createPaperclipJar --stacktrace

- name: Upload Paperclip Jar
if: fromJSON(steps.determine.outputs.result).action == 'paperclip'
uses: actions/upload-artifact@v4
with:
name: paper-${{ fromJSON(steps.determine.outputs.result).pr }}
path: paper-server/build/libs/paper-paperclip-*-mojmap.jar
path: paper-server/build/libs/paper-paperclip-*.jar

- name: Publish Artifacts
if: fromJSON(steps.determine.outputs.result).action == 'paperclip'
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ nbactions.xml
bin/
dist/
manifest.mf
__pycache__/

# Mac filesystem dust
.DS_Store/
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ mcVersion=26.1
apiVersion=26.1

# Set to true while updating Minecraft version
updatingMinecraft=true
updatingMinecraft=false

org.gradle.configuration-cache=true
org.gradle.caching=true
Expand Down
23 changes: 19 additions & 4 deletions paper-api/src/main/java/org/bukkit/Server.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import java.io.File;
import java.io.Serializable;
import java.net.InetAddress;
import java.nio.file.Path;
import java.util.Collection;
import java.util.Collections;
import java.util.Iterator;
Expand Down Expand Up @@ -1565,7 +1566,6 @@ default int broadcast(net.kyori.adventure.text.@NotNull Component message) {
@NotNull
public ConsoleCommandSender getConsoleSender();

// Paper start
/**
* Creates a special {@link CommandSender} which redirects command feedback (in the form of chat messages) to the
* specified listener. The returned sender will have the same effective permissions as {@link #getConsoleSender()}.
Expand All @@ -1575,16 +1575,31 @@ default int broadcast(net.kyori.adventure.text.@NotNull Component message) {
*/
@NotNull
public CommandSender createCommandSender(final @NotNull java.util.function.Consumer<? super net.kyori.adventure.text.Component> feedback);
// Paper end

/**
* Gets the folder that contains all the various {@link World}s.
* Gets the folder that contains {@link #getLevelDirectory()}.
*
* <p>This is usually the server's current working directory
* but can be overridden using command line flags (i.e. {@code --universe} or {@code --world-container}).</p>
*
* @return folder that contains all worlds
* @return folder that contains the level directory
*/
@ApiStatus.Obsolete
@NotNull
public File getWorldContainer();

/**
* Gets the level directory.
*
* <p>This is the {@code ./world} directory in a fresh default server. Contains player data, dimensions, datapacks,
* and other world data.</p>
*
* @return the level directory
*/
@ApiStatus.Experimental
@NotNull
Path getLevelDirectory();

/**
* Gets every player that has ever played on this server.
* <p>
Expand Down
11 changes: 5 additions & 6 deletions paper-api/src/main/java/org/bukkit/WorldCreator.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,10 @@ public class WorldCreator {
* @param name Name of the world that will be created
*/
public WorldCreator(@NotNull String name) {
// Paper start
this(name, getWorldKey(name));
this(name, defaultWorldKey(name));
}

private static NamespacedKey getWorldKey(String name) {
private static NamespacedKey defaultWorldKey(String name) {
final String mainLevelName = Bukkit.getUnsafe().getMainLevelName();
if (name.equals(mainLevelName)) {
return NamespacedKey.minecraft("overworld");
Expand All @@ -58,6 +57,9 @@ public WorldCreator(@NotNull String levelName, @NotNull NamespacedKey worldKey)
if (levelName == null || worldKey == null) {
throw new IllegalArgumentException("World name and key cannot be null");
}
if (!worldKey.equals(defaultWorldKey(levelName))) {
throw new UnsupportedOperationException("Custom world keys not yet implemented");
}
this.name = levelName;
this.seed = (new Random()).nextLong();
this.key = worldKey;
Expand Down Expand Up @@ -104,7 +106,6 @@ public static WorldCreator ofNameAndKey(@NotNull String levelName, @NotNull Name
public static WorldCreator ofKey(@NotNull NamespacedKey worldKey) {
return new WorldCreator(worldKey);
}
// Paper end

/**
* Copies the options from the specified world
Expand Down Expand Up @@ -589,7 +590,6 @@ public static BiomeProvider getBiomeProviderForName(@NotNull String world, @Null
return result;
}

// Paper start - keep spawn loaded tristate
/**
* Returns the current intent to keep the world loaded, @see {@link WorldCreator#keepSpawnLoaded(net.kyori.adventure.util.TriState)}
*
Expand All @@ -615,5 +615,4 @@ public net.kyori.adventure.util.TriState keepSpawnLoaded() {
public WorldCreator keepSpawnLoaded(@NotNull net.kyori.adventure.util.TriState keepSpawnLoaded) {
return this;
}
// Paper end - keep spawn loaded tristate
}
2 changes: 1 addition & 1 deletion paper-server/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ paperweight {
gitFilePatches = false

updatingMinecraft {
oldPaperCommit = "7e80cef5198561d0db53406127e5b8bc7af51577"
// oldPaperCommit = "7e80cef5198561d0db53406127e5b8bc7af51577"
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,10 @@ index 728ec122b7af090427cc7511a168336d539835a1..a60a417432cab517fd2fbfd4447c7cb7
+ // Paper end
}
diff --git a/net/minecraft/world/level/chunk/storage/RegionFileStorage.java b/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
index 7c6f16fa3de0d344202ec456c648aaebf24a69ca..6b265cc308a14846c9ef3c96aa5daf06e246b8a8 100644
index 4473503da2459016859b2d72ecd7825df23f4be4..76f83dfa2acbd0840718a022102d820bf65ac1be 100644
--- a/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
+++ b/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
@@ -48,6 +48,43 @@ public final class RegionFileStorage implements AutoCloseable {
@@ -49,6 +49,43 @@ public final class RegionFileStorage implements AutoCloseable {
}
}

Expand Down Expand Up @@ -166,7 +166,7 @@ index 7c6f16fa3de0d344202ec456c648aaebf24a69ca..6b265cc308a14846c9ef3c96aa5daf06
public @Nullable CompoundTag read(final ChunkPos pos) throws IOException {
// CraftBukkit start - SPIGOT-5680: There's no good reason to preemptively create files on read, save that for writing
RegionFile region = this.getRegionFile(pos, true);
@@ -55,6 +92,12 @@ public final class RegionFileStorage implements AutoCloseable {
@@ -56,6 +93,12 @@ public final class RegionFileStorage implements AutoCloseable {
return null;
}
// CraftBukkit end
Expand All @@ -179,7 +179,7 @@ index 7c6f16fa3de0d344202ec456c648aaebf24a69ca..6b265cc308a14846c9ef3c96aa5daf06

CompoundTag var4;
try (DataInputStream regionChunkInputStream = region.getChunkDataInputStream(pos)) {
@@ -91,6 +134,7 @@ public final class RegionFileStorage implements AutoCloseable {
@@ -92,6 +135,7 @@ public final class RegionFileStorage implements AutoCloseable {
} else {
try (DataOutputStream output = region.getChunkDataOutputStream(pos)) {
NbtIo.write(value, output);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -354,18 +354,18 @@ index 0000000000000000000000000000000000000000..c18823746ab2edcab536cb1589b7720e
+ }
+}
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
index 4f31c92c8c3b2757a4103a1b2a0ae158117eebd1..43c47bdd2fdb7731eec5301e20f923d0703a36fc 100644
index 71446ef19c560f67d22697941973326e2b81bb60..6ea8d1c04afdaf2136dfd5fb3ab1899e8e62fc70 100644
--- a/net/minecraft/server/level/ServerLevel.java
+++ b/net/minecraft/server/level/ServerLevel.java
@@ -591,6 +591,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ServerEntityGet
@@ -599,6 +599,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ServerEntityGet
profiler.pop();
}

+ io.papermc.paper.entity.activation.ActivationRange.activateEntities(this); // Paper - EAR
this.entityTickList
.forEach(
entity -> {
@@ -1064,12 +1065,15 @@ public class ServerLevel extends Level implements WorldGenLevel, ServerEntityGet
@@ -1072,12 +1073,15 @@ public class ServerLevel extends Level implements WorldGenLevel, ServerEntityGet
entity.totalEntityAge++; // Paper - age-like counter for all entities
profiler.push(entity.typeHolder()::getRegisteredName);
profiler.incrementCounter("tickNonPassenger");
Expand All @@ -382,7 +382,7 @@ index 4f31c92c8c3b2757a4103a1b2a0ae158117eebd1..43c47bdd2fdb7731eec5301e20f923d0
}
// Paper start - log detailed entity tick information
} finally {
@@ -1080,7 +1084,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ServerEntityGet
@@ -1088,7 +1092,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ServerEntityGet
// Paper end - log detailed entity tick information
}

Expand All @@ -391,7 +391,7 @@ index 4f31c92c8c3b2757a4103a1b2a0ae158117eebd1..43c47bdd2fdb7731eec5301e20f923d0
if (entity.isRemoved() || entity.getVehicle() != vehicle) {
entity.stopRiding();
} else if (entity instanceof Player || this.entityTickList.contains(entity)) {
@@ -1090,12 +1094,21 @@ public class ServerLevel extends Level implements WorldGenLevel, ServerEntityGet
@@ -1098,12 +1102,21 @@ public class ServerLevel extends Level implements WorldGenLevel, ServerEntityGet
ProfilerFiller profiler = Profiler.get();
profiler.push(entity.typeHolder()::getRegisteredName);
profiler.incrementCounter("tickPassenger");
Expand Down Expand Up @@ -462,7 +462,7 @@ index 6309a615ba2525437758b1fe39c43060ec42d6f8..677b0cadec2270537d868aac7d0acaf7
public void tick() {
super.tick();
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
index 931a886ab969009c1dc672e3108a0e65f888e0f4..83602c8ee3e2d6064fea66a915f427ffe1584b5a 100644
index a480a35b23f38680598cb428bd09b7d1db07af6e..9ea33286ac0d4691dbc6b607a18b6688ca1724e9 100644
--- a/net/minecraft/world/entity/Entity.java
+++ b/net/minecraft/world/entity/Entity.java
@@ -426,6 +426,15 @@ public abstract class Entity
Expand Down Expand Up @@ -521,7 +521,7 @@ index 931a886ab969009c1dc672e3108a0e65f888e0f4..83602c8ee3e2d6064fea66a915f427ff
delta = this.maybeBackOffFromEdge(delta, moverType);
Vec3 movement = this.collide(delta);
diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java
index e0e6c0f1ab9609fb64db4dfd436414d7ce12dd12..cbcef6d9d4113e318237df4501839d6870042c8d 100644
index 9d579b7f17dc38c9e92447ea27ec71a8967a9964..30d518454e7a48b42242184203ab583b19b3e770 100644
--- a/net/minecraft/world/entity/LivingEntity.java
+++ b/net/minecraft/world/entity/LivingEntity.java
@@ -3385,6 +3385,14 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
Expand All @@ -540,7 +540,7 @@ index e0e6c0f1ab9609fb64db4dfd436414d7ce12dd12..cbcef6d9d4113e318237df4501839d68
public void tick() {
super.tick();
diff --git a/net/minecraft/world/entity/Mob.java b/net/minecraft/world/entity/Mob.java
index dab431458aa93349a9f09e8e3502a8b8b11a1653..2c7efcc76da5c2d1596bd15128fa27d77acc152d 100644
index c7c53ef16e104ebc48aeb8719783fb4c45d39fc2..90eaa775dc134041647618c3b965334a9bb9fd3b 100644
--- a/net/minecraft/world/entity/Mob.java
+++ b/net/minecraft/world/entity/Mob.java
@@ -211,6 +211,19 @@ public abstract class Mob extends LivingEntity implements Targeting, EquipmentUs
Expand Down Expand Up @@ -673,7 +673,7 @@ index a4f719c1b1b6a8920068ed8969a9e780420eade1..3791ffa6a14a1b2304780382e19f0e38
public void tick() {
if (this.getItem().isEmpty()) {
diff --git a/net/minecraft/world/entity/npc/villager/Villager.java b/net/minecraft/world/entity/npc/villager/Villager.java
index e7df6fb302abc958608090e84052eccb3190ed95..df50e6ac986cd388f02d405186f2855e42638eac 100644
index a80e6a23cf29cb44943339101f15565dbc19af1f..f481fd661440f77c98940cbde4a8b95818e4a22c 100644
--- a/net/minecraft/world/entity/npc/villager/Villager.java
+++ b/net/minecraft/world/entity/npc/villager/Villager.java
@@ -244,11 +244,35 @@ public class Villager extends AbstractVillager implements VillagerDataHolder, Re
Expand Down Expand Up @@ -816,7 +816,7 @@ index 3a590d4dc980a2912e9cc043d8c8db4cf9d60803..06ab7c48b18c03af494ab10fc2b584ce
+
}
diff --git a/net/minecraft/world/level/Level.java b/net/minecraft/world/level/Level.java
index 8c5725b83a82b4297aecebc5220e9b3160746923..ad39c0822f757216d817934ba18440c228dc6be3 100644
index 16ca35249e2248500073bb2b12447d2a0e545b95..00be50d2b8de3b5084c14c2e02eaf97f76ed5e49 100644
--- a/net/minecraft/world/level/Level.java
+++ b/net/minecraft/world/level/Level.java
@@ -153,6 +153,12 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2326,18 +2326,18 @@ index 0000000000000000000000000000000000000000..298076a0db4e6ee6e4775ac43bf749d9
+ }
+}
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
index 43c47bdd2fdb7731eec5301e20f923d0703a36fc..75068c07d1892882a85e27e30da8ac9906cf16e7 100644
index 6ea8d1c04afdaf2136dfd5fb3ab1899e8e62fc70..59ccc7a7c3a93a69e78061d4c091705658f38f48 100644
--- a/net/minecraft/server/level/ServerLevel.java
+++ b/net/minecraft/server/level/ServerLevel.java
@@ -232,6 +232,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ServerEntityGet
public final net.minecraft.world.level.storage.LevelDataAndDimensions.WorldDataAndGenSettings worldDataAndGenSettings;
public final WorldGenSettings worldGenSettings;
public boolean hasPhysicsEvent = true; // Paper - BlockPhysicsEvent
public boolean hasEntityMoveEvent; // Paper - Add EntityMoveEvent
+ private final alternate.current.wire.WireHandler wireHandler = new alternate.current.wire.WireHandler(this); // Paper - optimize redstone (Alternate Current)

@Override
public @Nullable LevelChunk getChunkIfLoaded(int x, int z) {
@@ -2434,6 +2435,13 @@ public class ServerLevel extends Level implements WorldGenLevel, ServerEntityGet
@@ -2432,6 +2433,13 @@ public class ServerLevel extends Level implements WorldGenLevel, ServerEntityGet
return this.debugSynchronizers;
}

Expand All @@ -2352,10 +2352,10 @@ index 43c47bdd2fdb7731eec5301e20f923d0703a36fc..75068c07d1892882a85e27e30da8ac99
return toLevel.dimension() != Level.NETHER || this.getGameRules().get(GameRules.ALLOW_ENTERING_NETHER_USING_PORTALS);
}
diff --git a/net/minecraft/world/level/Level.java b/net/minecraft/world/level/Level.java
index ad39c0822f757216d817934ba18440c228dc6be3..52e870443337adbd7a573cbc49a0b094a84a905d 100644
index 00be50d2b8de3b5084c14c2e02eaf97f76ed5e49..f56bf11ef2202b78635951f511f468231fd7e13a 100644
--- a/net/minecraft/world/level/Level.java
+++ b/net/minecraft/world/level/Level.java
@@ -1446,6 +1446,17 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@@ -1447,6 +1447,17 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
return this.palettedContainerFactory;
}

Expand Down

This file was deleted.

Loading
Loading