geforkt von Mirrors/Paper
even even even even even even even more work
Dieser Commit ist enthalten in:
Ursprung
42458fbca4
Commit
9da160169a
@ -4,6 +4,8 @@ Date: Wed, 23 Nov 2016 08:31:45 -0500
|
|||||||
Subject: [PATCH] Cache user authenticator threads
|
Subject: [PATCH] Cache user authenticator threads
|
||||||
|
|
||||||
|
|
||||||
|
TODO it looks like someone royally messed this one up, patch name doesn't remotely
|
||||||
|
describe contents. Good thing this patch is no longer relevant at all
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||||
index 0597c0c3e881dd43cf91bd3088ed30dfecfe8098..175bf535066afc42de8a3f0d11c46af66f3e3e52 100644
|
index 0597c0c3e881dd43cf91bd3088ed30dfecfe8098..175bf535066afc42de8a3f0d11c46af66f3e3e52 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
@ -4,6 +4,7 @@ Date: Thu, 19 Jul 2018 01:05:00 -0400
|
|||||||
Subject: [PATCH] Don't change the Entity Random seed for squids
|
Subject: [PATCH] Don't change the Entity Random seed for squids
|
||||||
|
|
||||||
|
|
||||||
|
Rebased into the patch to add the shared entity random
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/Squid.java b/src/main/java/net/minecraft/world/entity/animal/Squid.java
|
diff --git a/src/main/java/net/minecraft/world/entity/animal/Squid.java b/src/main/java/net/minecraft/world/entity/animal/Squid.java
|
||||||
index 5a7582fd4f8e883d2f08a0227932c17d7576b957..2e5a35565b6b7c4d3f7fdab45095f789c33f8937 100644
|
index 5a7582fd4f8e883d2f08a0227932c17d7576b957..2e5a35565b6b7c4d3f7fdab45095f789c33f8937 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/animal/Squid.java
|
--- a/src/main/java/net/minecraft/world/entity/animal/Squid.java
|
@ -40,3 +40,16 @@ index e9e87dc8c80d83dc7c472b0611077d8f9f4e5fcf..eceaeed527f34860e1c55b9f96863f14
|
|||||||
this.remainingFireTicks = -this.getFireImmuneTicks();
|
this.remainingFireTicks = -this.getFireImmuneTicks();
|
||||||
this.fluidHeight = new Object2DoubleArrayMap(2);
|
this.fluidHeight = new Object2DoubleArrayMap(2);
|
||||||
this.firstTick = true;
|
this.firstTick = true;
|
||||||
|
diff --git a/src/main/java/net/minecraft/world/entity/animal/Squid.java b/src/main/java/net/minecraft/world/entity/animal/Squid.java
|
||||||
|
index 2b88f5be9bd0766f28e07251175aa353242cf11f..5faa9e05e041a8bdcac88f3c3af7620353c10c3a 100644
|
||||||
|
--- a/src/main/java/net/minecraft/world/entity/animal/Squid.java
|
||||||
|
+++ b/src/main/java/net/minecraft/world/entity/animal/Squid.java
|
||||||
|
@@ -50,7 +50,7 @@ public class Squid extends WaterAnimal {
|
||||||
|
|
||||||
|
public Squid(EntityType<? extends Squid> type, Level world) {
|
||||||
|
super(type, world);
|
||||||
|
- this.random.setSeed((long) this.getId());
|
||||||
|
+ //this.random.setSeed((long) this.getId()); // Paper - we set the random to shared, do not clobber the seed
|
||||||
|
this.tentacleSpeed = 1.0F / (this.random.nextFloat() + 1.0F) * 0.2F;
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -5,18 +5,10 @@ Subject: [PATCH] Filter bad data from ArmorStand and SpawnEgg items
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||||
index 622affa0dc3cc1eadaed400511f2ca2cde3fca2a..e83216be5a00d5b927d8c2fc364551bd3077c974 100644
|
index 96247356d7888d5681bff60567add1188aedb18b..e83216be5a00d5b927d8c2fc364551bd3077c974 100644
|
||||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||||
@@ -2,6 +2,7 @@ package com.destroystokyo.paper;
|
@@ -306,4 +306,12 @@ public class PaperWorldConfig {
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
+import org.bukkit.Bukkit;
|
|
||||||
import org.bukkit.configuration.file.YamlConfiguration;
|
|
||||||
import org.spigotmc.SpigotWorldConfig;
|
|
||||||
|
|
||||||
@@ -305,4 +306,12 @@ public class PaperWorldConfig {
|
|
||||||
private void removeCorruptTEs() {
|
private void removeCorruptTEs() {
|
||||||
removeCorruptTEs = getBoolean("remove-corrupt-tile-entities", false);
|
removeCorruptTEs = getBoolean("remove-corrupt-tile-entities", false);
|
||||||
}
|
}
|
||||||
@ -30,20 +22,25 @@ index 622affa0dc3cc1eadaed400511f2ca2cde3fca2a..e83216be5a00d5b927d8c2fc364551bd
|
|||||||
+ }
|
+ }
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
||||||
index 1d87717cc9002ea202ee2ca614aaa8a4c7ea3cb2..ff8f7e4569a889ead1512b7c9908f9c5cad9eed5 100644
|
index eb838fcad0593573f536d5e043cbd3f4bbe25d74..2332a00780edcf054ec63a60a42962033d0cc74a 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
--- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
+++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
||||||
@@ -270,6 +270,13 @@ public class FallingBlockEntity extends Entity {
|
@@ -308,6 +308,18 @@ public class FallingBlockEntity extends Entity {
|
||||||
@Override
|
@Override
|
||||||
protected void readAdditionalSaveData(CompoundTag tag) {
|
protected void readAdditionalSaveData(CompoundTag nbt) {
|
||||||
this.blockState = NbtUtils.readBlockState(tag.getCompound("BlockState"));
|
this.blockState = NbtUtils.readBlockState(nbt.getCompound("BlockState"));
|
||||||
+ // Paper start - Block FallingBlocks with Command Blocks
|
+ // Paper start - Block FallingBlocks with Command Blocks
|
||||||
+ // Check mappings on update - dc = "repeating_command_block" - dd = "chain_command_block"
|
|
||||||
+ final Block b = this.blockState.getBlock();
|
+ final Block b = this.blockState.getBlock();
|
||||||
+ if (this.level.paperConfig.filterNBTFromSpawnEgg && (b == Blocks.COMMAND_BLOCK || b == Blocks.REPEATING_COMMAND_BLOCK || b == Blocks.CHAIN_COMMAND_BLOCK)) {
|
+ if (this.level.paperConfig.filterNBTFromSpawnEgg
|
||||||
|
+ && (b == Blocks.COMMAND_BLOCK
|
||||||
|
+ || b == Blocks.REPEATING_COMMAND_BLOCK
|
||||||
|
+ || b == Blocks.CHAIN_COMMAND_BLOCK
|
||||||
|
+ || b == Blocks.JIGSAW
|
||||||
|
+ || b == Blocks.STRUCTURE_BLOCK
|
||||||
|
+ || b instanceof net.minecraft.world.level.block.GameMasterBlock)) {
|
||||||
+ this.blockState = Blocks.STONE.defaultBlockState();
|
+ this.blockState = Blocks.STONE.defaultBlockState();
|
||||||
+ }
|
+ }
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
this.time = tag.getInt("Time");
|
this.time = nbt.getInt("Time");
|
||||||
if (tag.contains("HurtEntities", 99)) {
|
if (nbt.contains("HurtEntities", 99)) {
|
||||||
this.hurtEntities = tag.getBoolean("HurtEntities");
|
this.hurtEntities = nbt.getBoolean("HurtEntities");
|
@ -1,27 +1,33 @@
|
|||||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
From: Alfie Cleveland <alfeh@me.com>
|
From: Alfie Cleveland <alfeh@me.com>
|
||||||
Date: Fri, 25 Nov 2016 13:22:40 +0000
|
Date: Fri, 25 Nov 2016 13:22:40 +0000
|
||||||
Subject: [PATCH] Optimise removeQueue
|
Subject: [PATCH] Cache user authenticator threads
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||||
index 9dbb3bb79ae2de6635f71e5ee5bebeb5e57b624e..e3c1460c580ea348ee6d436018244441a5a1206e 100644
|
index 11c0da9b36aecc1a7d3acb2dccdae962426dd2e7..3e57eb2e50f94085fd23b54a54d4cf7a0b7919c7 100644
|
||||||
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||||
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||||
@@ -114,6 +114,12 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener
|
@@ -117,6 +117,18 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
+ // Paper start - Cache authenticator threads
|
+ // Paper start - Cache authenticator threads
|
||||||
+ private static final AtomicInteger threadId = new AtomicInteger(0);
|
+ private static final AtomicInteger threadId = new AtomicInteger(0);
|
||||||
+ private static final java.util.concurrent.ExecutorService authenticatorPool = java.util.concurrent.Executors.newCachedThreadPool(
|
+ private static final java.util.concurrent.ExecutorService authenticatorPool = java.util.concurrent.Executors.newCachedThreadPool(
|
||||||
+ r -> new Thread(r, "User Authenticator #" + threadId.incrementAndGet())
|
+ r -> {
|
||||||
|
+ Thread ret = new Thread(r, "User Authenticator #" + threadId.incrementAndGet());
|
||||||
|
+
|
||||||
|
+ ret.setUncaughtExceptionHandler(new DefaultUncaughtExceptionHandler(LOGGER));
|
||||||
|
+
|
||||||
|
+ return ret;
|
||||||
|
+ }
|
||||||
+ );
|
+ );
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
// Spigot start
|
// Spigot start
|
||||||
public void initUUID()
|
public void initUUID()
|
||||||
{
|
{
|
||||||
@@ -193,8 +199,8 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener
|
@@ -209,8 +221,8 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener
|
||||||
this.connection.send(new ClientboundHelloPacket("", this.server.getKeyPair().getPublic().getEncoded(), this.nonce));
|
this.connection.send(new ClientboundHelloPacket("", this.server.getKeyPair().getPublic().getEncoded(), this.nonce));
|
||||||
} else {
|
} else {
|
||||||
// Spigot start
|
// Spigot start
|
||||||
@ -32,8 +38,8 @@ index 9dbb3bb79ae2de6635f71e5ee5bebeb5e57b624e..e3c1460c580ea348ee6d436018244441
|
|||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
try {
|
try {
|
||||||
@@ -205,7 +211,8 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener
|
@@ -221,7 +233,8 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener
|
||||||
server.server.getLogger().log(java.util.logging.Level.WARNING, "Exception verifying " + gameProfile.getName(), ex);
|
server.server.getLogger().log(java.util.logging.Level.WARNING, "Exception verifying " + ServerLoginPacketListenerImpl.this.gameProfile.getName(), ex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
- }.start();
|
- }.start();
|
||||||
@ -42,7 +48,7 @@ index 9dbb3bb79ae2de6635f71e5ee5bebeb5e57b624e..e3c1460c580ea348ee6d436018244441
|
|||||||
// Spigot end
|
// Spigot end
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -234,7 +241,8 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener
|
@@ -250,7 +263,8 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener
|
||||||
throw new IllegalStateException("Protocol error", cryptographyexception);
|
throw new IllegalStateException("Protocol error", cryptographyexception);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -52,7 +58,7 @@ index 9dbb3bb79ae2de6635f71e5ee5bebeb5e57b624e..e3c1460c580ea348ee6d436018244441
|
|||||||
public void run() {
|
public void run() {
|
||||||
GameProfile gameprofile = ServerLoginPacketListenerImpl.this.gameProfile;
|
GameProfile gameprofile = ServerLoginPacketListenerImpl.this.gameProfile;
|
||||||
|
|
||||||
@@ -279,10 +287,8 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener
|
@@ -295,10 +309,8 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener
|
||||||
|
|
||||||
return ServerLoginPacketListenerImpl.this.server.getPreventProxyConnections() && socketaddress instanceof InetSocketAddress ? ((InetSocketAddress) socketaddress).getAddress() : null;
|
return ServerLoginPacketListenerImpl.this.server.getPreventProxyConnections() && socketaddress instanceof InetSocketAddress ? ((InetSocketAddress) socketaddress).getAddress() : null;
|
||||||
}
|
}
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren