Skip to content

Commit 7700716

Browse files
committed
25w44a init
server/notifications world/entity server/level level/block GameRules MinecraftGameRuleServiceImpl DispenseItemBehavior GameRuleCommand EnderDragon ServerStatsCounter PlayerList DedicatedServer Connection Llama HopperBlockEntity TestEnvironmentDefinition EatBlockGoal MinecraftServer JsonRpcNotificationService PathNavigation LargeFireball AbstractNautilus, ServerGamePacketListenerImpl Start fixing type annotation issues Misc compile fixes
1 parent 1eb13b0 commit 7700716

File tree

392 files changed

+2581
-2786
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

392 files changed

+2581
-2786
lines changed

gradle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
group=io.papermc.paper
2-
version=25w43a-R0.1-SNAPSHOT
3-
mcVersion=25w43a
2+
version=25w44a-R0.1-SNAPSHOT
3+
mcVersion=25w44a
44
# This is the current API version for use in (paper-)plugin.yml files
55
# During snapshot cycles this should be the anticipated version of the release target
66
apiVersion=1.21.11

paper-server/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ plugins {
1414
val paperMavenPublicUrl = "https://repo.papermc.io/repository/maven-public/"
1515

1616
dependencies {
17-
mache("io.papermc:mache:25w43a+build.6")
17+
mache("io.papermc:mache:25w44a+build.2")
1818
paperclip("io.papermc:paperclip:3.0.3")
1919
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
2020
}
@@ -42,7 +42,7 @@ paperweight {
4242
)
4343

4444
updatingMinecraft {
45-
//oldPaperCommit = "474d54da728306598f93b4a779578eee5cf54423"
45+
// oldPaperCommit = "1eb13b0290e7617407e6bde0e59570ebde61d2ed"
4646
}
4747
}
4848

paper-server/patches/sources/com/mojang/math/OctahedralGroup.java.patch

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
--- a/com/mojang/math/OctahedralGroup.java
22
+++ b/com/mojang/math/OctahedralGroup.java
3-
@@ -116,6 +_,12 @@
3+
@@ -115,6 +_,12 @@
44
}
55
);
66

@@ -13,7 +13,7 @@
1313
private OctahedralGroup(final String name, final SymmetricGroup3 permutation, final boolean invertX, final boolean invertY, final boolean invertZ) {
1414
this.name = name;
1515
this.invertX = invertX;
16-
@@ -156,7 +_,7 @@
16+
@@ -155,7 +_,7 @@
1717
return this.name;
1818
}
1919

@@ -22,7 +22,7 @@
2222
if (this.rotatedDirections == null) {
2323
this.rotatedDirections = Util.makeEnumMap(Direction.class, direction1 -> {
2424
Direction.Axis axis = direction1.getAxis();
25-
@@ -167,6 +_,11 @@
25+
@@ -166,6 +_,11 @@
2626
});
2727
}
2828

paper-server/patches/sources/net/minecraft/ChatFormatting.java.patch

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
--- a/net/minecraft/ChatFormatting.java
22
+++ b/net/minecraft/ChatFormatting.java
3-
@@ -118,6 +_,19 @@
3+
@@ -114,6 +_,19 @@
44
return friendlyName == null ? null : FORMATTING_BY_NAME.get(cleanName(friendlyName));
55
}
66

@@ -17,6 +17,6 @@
1717
+ }
1818
+ // Paper end - add method to get by hex value
1919
+
20-
@Nullable
21-
public static ChatFormatting getById(int index) {
20+
public static @Nullable ChatFormatting getById(int index) {
2221
if (index < 0) {
22+
return RESET;

paper-server/patches/sources/net/minecraft/CrashReport.java.patch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
--- a/net/minecraft/CrashReport.java
22
+++ b/net/minecraft/CrashReport.java
3-
@@ -32,8 +_,10 @@
3+
@@ -31,8 +_,10 @@
44
private final SystemReport systemReport = new SystemReport();
55

66
public CrashReport(String title, Throwable exception) {
@@ -11,7 +11,7 @@
1111
}
1212

1313
public String getTitle() {
14-
@@ -218,7 +_,7 @@
14+
@@ -216,7 +_,7 @@
1515
}
1616

1717
public static void preload() {

paper-server/patches/sources/net/minecraft/Util.java.patch

Lines changed: 89 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
--- a/net/minecraft/Util.java
22
+++ b/net/minecraft/Util.java
3-
@@ -89,9 +_,25 @@
3+
@@ -90,9 +_,25 @@
44
private static final int DEFAULT_MAX_THREADS = 255;
55
private static final int DEFAULT_SAFE_FILE_OPERATION_RETRIES = 10;
66
private static final String MAX_THREADS_SYSTEM_PROPERTY = "max.bg.threads";
@@ -28,15 +28,15 @@
2828
private static final DateTimeFormatter FILENAME_DATE_TIME_FORMATTER = DateTimeFormatter.ofPattern("yyyy-MM-dd_HH.mm.ss", Locale.ROOT);
2929
public static final int LINEAR_LOOKUP_THRESHOLD = 8;
3030
private static final Set<String> ALLOWED_UNTRUSTED_LINK_PROTOCOLS = Set.of("http", "https");
31-
@@ -110,6 +_,7 @@
31+
@@ -111,6 +_,7 @@
3232
.findFirst()
3333
.orElseThrow(() -> new IllegalStateException("No jar file system provider found"));
3434
private static Consumer<String> thePauser = string -> {};
3535
+ public static final double COLLISION_EPSILON = 1.0E-7; // Paper - Check distance in entity interactions
3636

3737
public static <K, V> Collector<Entry<? extends K, ? extends V>, ?, Map<K, V>> toMap() {
3838
return Collectors.toMap(Entry::getKey, Entry::getValue);
39-
@@ -132,7 +_,7 @@
39+
@@ -133,7 +_,7 @@
4040
}
4141

4242
public static long getNanos() {
@@ -45,7 +45,7 @@
4545
}
4646

4747
public static long getEpochMillis() {
48-
@@ -143,9 +_,10 @@
48+
@@ -144,9 +_,10 @@
4949
return FILENAME_DATE_TIME_FORMATTER.format(ZonedDateTime.now());
5050
}
5151

@@ -58,7 +58,7 @@
5858
if (i <= 0) {
5959
directExecutorService = MoreExecutors.newDirectExecutorService();
6060
} else {
61-
@@ -170,16 +_,30 @@
61+
@@ -171,16 +_,30 @@
6262
super.onTermination(throwOnTermination);
6363
}
6464
};
@@ -91,11 +91,10 @@
9191
}
9292

9393
private static int getMaxThreads() {
94-
@@ -229,6 +_,21 @@
95-
return thread;
94+
@@ -231,6 +_,21 @@
9695
}));
9796
}
98-
+
97+
9998
+ // Paper start - Separate dimension data IO pool
10099
+ private static TracingExecutor makeExtraIoExecutor(String namePrefix) {
101100
+ AtomicInteger atomicInteger = new AtomicInteger(1);
@@ -110,6 +109,87 @@
110109
+ }));
111110
+ }
112111
+ // Paper end - Separate dimension data IO pool
113-
112+
+
114113
public static void throwAsRuntime(Throwable throwable) {
115114
throw throwable instanceof RuntimeException ? (RuntimeException)throwable : new RuntimeException(throwable);
115+
}
116+
@@ -297,6 +_,19 @@
117+
return input -> true;
118+
}
119+
120+
+ @SafeVarargs
121+
+ public static <T> Predicate<T> allOf(Predicate<? super T>... predicates) {
122+
+ return input -> {
123+
+ for (Predicate<? super T> predicate : predicates) {
124+
+ if (!predicate.test(input)) {
125+
+ return false;
126+
+ }
127+
+ }
128+
+
129+
+ return true;
130+
+ };
131+
+ }
132+
+
133+
public static <T> Predicate<T> allOf(Predicate<? super T> predicate) {
134+
return (Predicate<T>)predicate;
135+
}
136+
@@ -325,19 +_,6 @@
137+
return input -> predicate1.test(input) && predicate2.test(input) && predicate3.test(input) && predicate4.test(input) && predicate5.test(input);
138+
}
139+
140+
- @SafeVarargs
141+
- public static <T> Predicate<T> allOf(Predicate<? super T>... predicates) {
142+
- return input -> {
143+
- for (Predicate<? super T> predicate : predicates) {
144+
- if (!predicate.test(input)) {
145+
- return false;
146+
- }
147+
- }
148+
-
149+
- return true;
150+
- };
151+
- }
152+
-
153+
public static <T> Predicate<T> allOf(List<? extends Predicate<? super T>> predicates) {
154+
return switch (predicates.size()) {
155+
case 0 -> allOf();
156+
@@ -368,6 +_,19 @@
157+
return input -> false;
158+
}
159+
160+
+ @SafeVarargs
161+
+ public static <T> Predicate<T> anyOf(Predicate<? super T>... predicates) {
162+
+ return input -> {
163+
+ for (Predicate<? super T> predicate : predicates) {
164+
+ if (predicate.test(input)) {
165+
+ return true;
166+
+ }
167+
+ }
168+
+
169+
+ return false;
170+
+ };
171+
+ }
172+
+
173+
public static <T> Predicate<T> anyOf(Predicate<? super T> predicate) {
174+
return (Predicate<T>)predicate;
175+
}
176+
@@ -394,19 +_,6 @@
177+
Predicate<? super T> predicate5
178+
) {
179+
return input -> predicate1.test(input) || predicate2.test(input) || predicate3.test(input) || predicate4.test(input) || predicate5.test(input);
180+
- }
181+
-
182+
- @SafeVarargs
183+
- public static <T> Predicate<T> anyOf(Predicate<? super T>... predicates) {
184+
- return input -> {
185+
- for (Predicate<? super T> predicate : predicates) {
186+
- if (predicate.test(input)) {
187+
- return true;
188+
- }
189+
- }
190+
-
191+
- return false;
192+
- };
193+
}
194+
195+
public static <T> Predicate<T> anyOf(List<? extends Predicate<? super T>> predicates) {

paper-server/patches/sources/net/minecraft/advancements/AdvancementTree.java.patch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
--- a/net/minecraft/advancements/AdvancementTree.java
22
+++ b/net/minecraft/advancements/AdvancementTree.java
3-
@@ -26,7 +_,7 @@
3+
@@ -25,7 +_,7 @@
44
this.remove(advancementNode);
55
}
66

@@ -9,7 +9,7 @@
99
this.nodes.remove(node.holder().id());
1010
if (node.parent() == null) {
1111
this.roots.remove(node);
12-
@@ -62,7 +_,7 @@
12+
@@ -61,7 +_,7 @@
1313
}
1414
}
1515

paper-server/patches/sources/net/minecraft/commands/CommandSourceStack.java.patch

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
--- a/net/minecraft/commands/CommandSourceStack.java
22
+++ b/net/minecraft/commands/CommandSourceStack.java
33
@@ -48,7 +_,7 @@
4-
import net.minecraft.world.phys.Vec2;
54
import net.minecraft.world.phys.Vec3;
5+
import org.jspecify.annotations.Nullable;
66

77
-public class CommandSourceStack implements ExecutionCommandSource<CommandSourceStack>, SharedSuggestionProvider {
88
+public class CommandSourceStack implements ExecutionCommandSource<CommandSourceStack>, SharedSuggestionProvider, io.papermc.paper.command.brigadier.PaperCommandSourceStack { // Paper - Brigadier API
99
public static final SimpleCommandExceptionType ERROR_NOT_PLAYER = new SimpleCommandExceptionType(Component.translatable("permissions.requires.player"));
1010
public static final SimpleCommandExceptionType ERROR_NOT_ENTITY = new SimpleCommandExceptionType(Component.translatable("permissions.requires.entity"));
1111
public final CommandSource source;
12-
@@ -66,6 +_,7 @@
12+
@@ -65,6 +_,7 @@
1313
private final Vec2 rotation;
1414
private final CommandSigningContext signingContext;
1515
private final TaskChainer chatMessageChainer;
1616
+ public boolean bypassSelectorPermissions = false; // Paper - add bypass for selector permissions
1717

1818
public CommandSourceStack(
1919
CommandSource source,
20-
@@ -191,6 +_,30 @@
20+
@@ -190,6 +_,30 @@
2121
);
2222
}
2323

@@ -48,7 +48,7 @@
4848
public CommandSourceStack withRotation(Vec2 rotation) {
4949
return this.rotation.equals(rotation)
5050
? this
51-
@@ -380,6 +_,32 @@
51+
@@ -379,6 +_,32 @@
5252
return this.permissions;
5353
}
5454

@@ -81,9 +81,9 @@
8181
public Vec3 getPosition() {
8282
return this.worldPosition;
8383
}
84-
@@ -485,20 +_,25 @@
84+
@@ -482,20 +_,25 @@
8585
GameRules gameRules = this.level.getGameRules();
86-
if (gameRules.getBoolean(GameRules.RULE_SENDCOMMANDFEEDBACK)) {
86+
if (gameRules.get(GameRules.SEND_COMMAND_FEEDBACK)) {
8787
for (ServerPlayer serverPlayer : this.server.getPlayerList().getPlayers()) {
8888
- if (serverPlayer.commandSource() != this.source && this.server.getPlayerList().isOp(serverPlayer.nameAndId())) {
8989
+ if (serverPlayer.commandSource() != this.source && serverPlayer.getBukkitEntity().hasPermission("minecraft.admin.command_feedback")) { // CraftBukkit
@@ -92,8 +92,8 @@
9292
}
9393
}
9494

95-
- if (this.source != this.server && gameRules.getBoolean(GameRules.RULE_LOGADMINCOMMANDS)) {
96-
+ if (this.source != this.server && gameRules.getBoolean(GameRules.RULE_LOGADMINCOMMANDS) && !org.spigotmc.SpigotConfig.silentCommandBlocks) { // Spigot
95+
- if (this.source != this.server && gameRules.get(GameRules.LOG_ADMIN_COMMANDS)) {
96+
+ if (this.source != this.server && gameRules.get(GameRules.LOG_ADMIN_COMMANDS) && !org.spigotmc.SpigotConfig.silentCommandBlocks) { // Spigot
9797
this.server.sendSystemMessage(component);
9898
}
9999
}
@@ -110,7 +110,7 @@
110110
}
111111
}
112112

113-
@@ -509,7 +_,7 @@
113+
@@ -506,7 +_,7 @@
114114

115115
@Override
116116
public Collection<String> getOnlinePlayerNames() {
@@ -119,7 +119,7 @@
119119
}
120120

121121
@Override
122-
@@ -589,4 +_,16 @@
122+
@@ -586,4 +_,16 @@
123123
public boolean isSilent() {
124124
return this.silent;
125125
}

paper-server/patches/sources/net/minecraft/commands/Commands.java.patch

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@
66
public class Commands {
77
+ public interface RestrictedMarker { } // Paper - restricted api
88
public static final String COMMAND_PREFIX = "/";
9-
private static final ThreadLocal<ExecutionContext<CommandSourceStack>> CURRENT_EXECUTION_CONTEXT = new ThreadLocal<>();
9+
private static final ThreadLocal<@Nullable ExecutionContext<CommandSourceStack>> CURRENT_EXECUTION_CONTEXT = new ThreadLocal<>();
1010
private static final Logger LOGGER = LogUtils.getLogger();
11-
@@ -180,6 +_,7 @@
11+
@@ -179,6 +_,7 @@
1212

1313
@Override
1414
public boolean isRestricted(CommandNode<CommandSourceStack> node) {
1515
+ if (node.getRequirement() instanceof RestrictedMarker) return true; // Paper - restricted api
1616
Predicate<CommandSourceStack> requirement = node.getRequirement();
1717
return !requirement.test(this.noPermissionSource);
1818
}
19-
@@ -187,6 +_,11 @@
19+
@@ -186,6 +_,11 @@
2020
private final CommandDispatcher<CommandSourceStack> dispatcher = new CommandDispatcher<>();
2121

2222
public Commands(Commands.CommandSelection selection, CommandBuildContext context) {
@@ -28,7 +28,7 @@
2828
AdvancementCommands.register(this.dispatcher);
2929
AttributeCommand.register(this.dispatcher, context);
3030
ExecuteCommand.register(this.dispatcher, context);
31-
@@ -297,6 +_,42 @@
31+
@@ -296,6 +_,42 @@
3232
PublishCommand.register(this.dispatcher);
3333
}
3434

@@ -71,7 +71,7 @@
7171
this.dispatcher.setConsumer(ExecutionCommandSource.resultConsumer());
7272
}
7373

74-
@@ -316,6 +_,13 @@
74+
@@ -315,6 +_,13 @@
7575
}
7676

7777
public void performCommand(ParseResults<CommandSourceStack> parseResults, String command) {
@@ -85,7 +85,7 @@
8585
CommandSourceStack commandSourceStack = parseResults.getContext().getSource();
8686
Profiler.get().push(() -> "/" + command);
8787
ContextChain<CommandSourceStack> contextChain = finishParsing(parseResults, command, commandSourceStack);
88-
@@ -329,10 +_,13 @@
88+
@@ -328,10 +_,13 @@
8989
)
9090
);
9191
}
@@ -102,14 +102,17 @@
102102
StackTraceElement[] stackTrace = var12.getStackTrace();
103103

104104
for (int i = 0; i < Math.min(stackTrace.length, 3); i++) {
105-
@@ -358,13 +_,17 @@
105+
@@ -356,7 +_,8 @@
106+
}
106107
}
107108

108-
@Nullable
109-
- private static ContextChain<CommandSourceStack> finishParsing(ParseResults<CommandSourceStack> parseResults, String command, CommandSourceStack source) {
110-
+ private ContextChain<CommandSourceStack> finishParsing(ParseResults<CommandSourceStack> parseResults, String command, CommandSourceStack source) {
109+
- private static @Nullable ContextChain<CommandSourceStack> finishParsing(
110+
+
111+
+ private ContextChain<CommandSourceStack> finishParsing(
112+
ParseResults<CommandSourceStack> parseResults, String command, CommandSourceStack source
113+
) {
111114
try {
112-
validateParseResults(parseResults);
115+
@@ -364,7 +_,11 @@
113116
return ContextChain.tryFlatten(parseResults.getContext().build(command))
114117
.orElseThrow(() -> CommandSyntaxException.BUILT_IN_EXCEPTIONS.dispatcherUnknownCommand().createWithContext(parseResults.getReader()));
115118
} catch (CommandSyntaxException var7) {

0 commit comments

Comments
 (0)