Skip to content

Commit cb7de08

Browse files
committed
drop redundant gamerule check and add back kqueue support
1 parent 926cff8 commit cb7de08

File tree

3 files changed

+15
-11
lines changed

3 files changed

+15
-11
lines changed

paper-server/patches/sources/net/minecraft/server/dedicated/Settings.java.patch

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,10 @@
9292
}
9393

9494
protected <V> @Nullable V getLegacy(String key, Function<String, V> serializer) {
95-
@@ -106,7 +_,16 @@
96-
}
95+
@@ -107,6 +_,15 @@
9796
}
9897

99-
- protected <V> V get(String key, Function<String, @Nullable V> serializer, Function<V, String> deserializer, V defaultValue) {
100-
+ protected <V> V get(String key, Function<String, V> serializer, Function<V, String> deserializer, V defaultValue) {
98+
protected <V> V get(String key, Function<String, @Nullable V> serializer, Function<V, String> deserializer, V defaultValue) {
10199
+ // CraftBukkit start
102100
+ try {
103101
+ return this.get0(key, serializer, deserializer, defaultValue);

paper-server/patches/sources/net/minecraft/server/network/EventLoopGroupHolder.java.patch

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,24 @@
2121
public static EventLoopGroupHolder remote(boolean tryNativeTransport) {
2222
if (tryNativeTransport) {
2323
if (KQueue.isAvailable()) {
24-
@@ -66,6 +_,19 @@
24+
@@ -66,6 +_,25 @@
2525

2626
return NIO;
2727
}
2828
+
2929
+ // Paper start - Unix domain socket support
3030
+ public static EventLoopGroupHolder remote(java.net.SocketAddress address, boolean tryNativeTransport) {
31-
+ if (tryNativeTransport && Epoll.isAvailable()) {
32-
+ if (address instanceof io.netty.channel.unix.DomainSocketAddress) {
33-
+ return EPOLL_UNIX_DOMAIN;
34-
+ } else {
35-
+ return EPOLL;
31+
+ if (tryNativeTransport) {
32+
+ if (KQueue.isAvailable()) {
33+
+ return KQUEUE;
34+
+ }
35+
+
36+
+ if (Epoll.isAvailable()) {
37+
+ if (address instanceof io.netty.channel.unix.DomainSocketAddress) {
38+
+ return EPOLL_UNIX_DOMAIN;
39+
+ } else {
40+
+ return EPOLL;
41+
+ }
3642
+ }
3743
+ }
3844
+ return NIO;

paper-server/patches/sources/net/minecraft/world/entity/LightningBolt.java.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353

5454
private void spawnFire(int extraIgnitions) {
5555
- if (!this.visualOnly && this.level() instanceof ServerLevel serverLevel) {
56-
+ if (!this.visualOnly && !this.isEffect && this.level() instanceof ServerLevel serverLevel && serverLevel.getGameRules().get(net.minecraft.world.level.gamerules.GameRules.FIRE_DAMAGE)) { // Paper - prevent any fire if only effect
56+
+ if (!this.visualOnly && !this.isEffect && this.level() instanceof ServerLevel serverLevel) { // Paper - Properly handle lightning effects api
5757
BlockPos var7 = this.blockPosition();
5858
if (serverLevel.canSpreadFireAround(var7)) {
5959
BlockState state = BaseFireBlock.getState(serverLevel, var7);

0 commit comments

Comments
 (0)