i love jmp
This commit is contained in:
parent
87ca0fa790
commit
32c195bd4f
|
@ -21,15 +21,15 @@ index 5def23f470c9737884bdf7551e426faf887bca9c..51dd358137d37eb078aff036ccf12db7
|
||||||
Object val = config.get("settings.save-player-data");
|
Object val = config.get("settings.save-player-data");
|
||||||
if (val instanceof Boolean) {
|
if (val instanceof Boolean) {
|
||||||
diff --git a/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java
|
diff --git a/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java
|
||||||
index a95b2ee0e80832f786bdb8f3d0bc00cbfae26fd4..86f99fbe3eb7a6c7ef288d7bff1d653df6f34790 100644
|
index 4170bda451df3db43e7d57d87d1abb81934d7dad..941a9d8addd44e95c467b34f77658592b9f4ef06 100644
|
||||||
--- a/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java
|
--- a/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java
|
||||||
+++ b/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java
|
+++ b/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java
|
||||||
@@ -50,7 +50,7 @@ public class ServerHandshakePacketListenerImpl implements ServerHandshakePacketL
|
@@ -49,7 +49,7 @@ public class ServerHandshakePacketListenerImpl implements ServerHandshakePacketL
|
||||||
synchronized (ServerHandshakePacketListenerImpl.throttleTracker) {
|
synchronized (ServerHandshakePacketListenerImpl.throttleTracker) {
|
||||||
if (ServerHandshakePacketListenerImpl.throttleTracker.containsKey(address) && !"127.0.0.1".equals(address.getHostAddress()) && currentTime - ServerHandshakePacketListenerImpl.throttleTracker.get(address) < connectionThrottle) {
|
if (ServerHandshakePacketListenerImpl.throttleTracker.containsKey(address) && !"127.0.0.1".equals(address.getHostAddress()) && currentTime - ServerHandshakePacketListenerImpl.throttleTracker.get(address) < connectionThrottle) {
|
||||||
ServerHandshakePacketListenerImpl.throttleTracker.put(address, currentTime);
|
ServerHandshakePacketListenerImpl.throttleTracker.put(address, currentTime);
|
||||||
- TranslatableComponent chatmessage = new TranslatableComponent("Connection throttled! Please wait before reconnecting.");
|
- MutableComponent chatmessage = Component.literal("Connection throttled! Please wait before reconnecting.");
|
||||||
+ TranslatableComponent chatmessage = new TranslatableComponent(com.destroystokyo.paper.PaperConfig.connectionThrottleKickMessage); // Paper - Configurable connection throttle kick message
|
+ MutableComponent chatmessage = Component.literal(com.destroystokyo.paper.PaperConfig.connectionThrottleKickMessage); // Paper - Configurable connection throttle kick message
|
||||||
this.connection.send(new ClientboundLoginDisconnectPacket(chatmessage));
|
this.connection.send(new ClientboundLoginDisconnectPacket(chatmessage));
|
||||||
this.connection.disconnect(chatmessage);
|
this.connection.disconnect(chatmessage);
|
||||||
return;
|
return;
|
|
@ -9,10 +9,10 @@ SpawnerSpawnEvent gets called instead of the CreatureSpawnEvent for
|
||||||
spawners.
|
spawners.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/BaseSpawner.java b/src/main/java/net/minecraft/world/level/BaseSpawner.java
|
diff --git a/src/main/java/net/minecraft/world/level/BaseSpawner.java b/src/main/java/net/minecraft/world/level/BaseSpawner.java
|
||||||
index 18b1b7c05665ee1fb06670ceded719b19f3a4ee3..1c76a59eb25148bf2523e9d68cc165b6cd3e1d23 100644
|
index 031bb42a1921966e8dd45c9e57dcd09f2dece7fb..3e8848cbf22902b1a0e015ecf9e330c9235bc638 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/BaseSpawner.java
|
--- a/src/main/java/net/minecraft/world/level/BaseSpawner.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/BaseSpawner.java
|
+++ b/src/main/java/net/minecraft/world/level/BaseSpawner.java
|
||||||
@@ -128,11 +128,11 @@ public abstract class BaseSpawner {
|
@@ -130,11 +130,11 @@ public abstract class BaseSpawner {
|
||||||
|
|
||||||
org.bukkit.entity.EntityType type = org.bukkit.entity.EntityType.fromName(key);
|
org.bukkit.entity.EntityType type = org.bukkit.entity.EntityType.fromName(key);
|
||||||
if (type != null) {
|
if (type != null) {
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add LivingEntity#getTargetEntity
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
index 681ca7f6049016f7661215e4d5ee56257a32a9b2..1d679a04a49af796074c27d56e8ab07f0b09b002 100644
|
index 260f51f6a3d3a6da4ff9a0a3a67193abccb31e56..370ec54f5c6741e7c9f3630e7f42ea7d7a7d1423 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
@@ -115,6 +115,7 @@ import net.minecraft.world.level.storage.loot.LootTable;
|
@@ -116,6 +116,7 @@ import net.minecraft.world.level.storage.loot.LootTable;
|
||||||
import net.minecraft.world.level.storage.loot.parameters.LootContextParamSets;
|
import net.minecraft.world.level.storage.loot.parameters.LootContextParamSets;
|
||||||
import net.minecraft.world.level.storage.loot.parameters.LootContextParams;
|
import net.minecraft.world.level.storage.loot.parameters.LootContextParams;
|
||||||
import net.minecraft.world.phys.AABB;
|
import net.minecraft.world.phys.AABB;
|
||||||
|
@ -16,7 +16,7 @@ index 681ca7f6049016f7661215e4d5ee56257a32a9b2..1d679a04a49af796074c27d56e8ab07f
|
||||||
import net.minecraft.world.phys.HitResult;
|
import net.minecraft.world.phys.HitResult;
|
||||||
import net.minecraft.world.phys.Vec3;
|
import net.minecraft.world.phys.Vec3;
|
||||||
import net.minecraft.world.scores.PlayerTeam;
|
import net.minecraft.world.scores.PlayerTeam;
|
||||||
@@ -3743,6 +3744,38 @@ public abstract class LivingEntity extends Entity {
|
@@ -3781,6 +3782,38 @@ public abstract class LivingEntity extends Entity {
|
||||||
return level.clip(raytrace);
|
return level.clip(raytrace);
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add sun related API
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||||
index 3c4f06c9446dd769999e8f52bd43709cdd5cf9b0..6871ee1f69b2dced4874c0d28b27b6ba11ef1c9f 100644
|
index 5eb8aad09826c94defcc8c42bc395e6a617f60e6..4a98dc57a5d3f3e1e55ba366f38062514e85ed34 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||||
@@ -683,6 +683,13 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
@@ -684,6 +684,13 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,10 +18,10 @@ index e3983370c09e3e3445c4557fcca50dd25f29cba0..6efba52c2e5d7811ee329ed22c1c76f7
|
||||||
private final int searchRange;
|
private final int searchRange;
|
||||||
private final int verticalSearchRange;
|
private final int verticalSearchRange;
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/Turtle.java b/src/main/java/net/minecraft/world/entity/animal/Turtle.java
|
diff --git a/src/main/java/net/minecraft/world/entity/animal/Turtle.java b/src/main/java/net/minecraft/world/entity/animal/Turtle.java
|
||||||
index ea1bb6924043dfd05452b793afd7651c867de5dc..1b0be28ebfd7ec2f978b5d87f6d26e4d5913fb06 100644
|
index 37125ffe47fcd5fe93ab62ad8a46e8188f362436..69c98c2cb2fd8f149a39bbddcbfe0c5c5adc3904 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/animal/Turtle.java
|
--- a/src/main/java/net/minecraft/world/entity/animal/Turtle.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/animal/Turtle.java
|
+++ b/src/main/java/net/minecraft/world/entity/animal/Turtle.java
|
||||||
@@ -482,14 +482,17 @@ public class Turtle extends Animal {
|
@@ -480,14 +480,17 @@ public class Turtle extends Animal {
|
||||||
|
|
||||||
if (!this.turtle.isInWater() && this.isReachedTarget()) {
|
if (!this.turtle.isInWater() && this.isReachedTarget()) {
|
||||||
if (this.turtle.layEggCounter < 1) {
|
if (this.turtle.layEggCounter < 1) {
|
||||||
|
@ -42,7 +42,7 @@ index ea1bb6924043dfd05452b793afd7651c867de5dc..1b0be28ebfd7ec2f978b5d87f6d26e4d
|
||||||
}
|
}
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
this.turtle.setHasEgg(false);
|
this.turtle.setHasEgg(false);
|
||||||
@@ -557,7 +560,7 @@ public class Turtle extends Animal {
|
@@ -555,7 +558,7 @@ public class Turtle extends Animal {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean canUse() {
|
public boolean canUse() {
|
|
@ -19,10 +19,10 @@ spectate the target entity.
|
||||||
Co-authored-by: Spottedleaf <Spottedleaf@users.noreply.github.com>
|
Co-authored-by: Spottedleaf <Spottedleaf@users.noreply.github.com>
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||||
index 919fcca5d23002d1637c1f03f2255c74c6df7f5a..02ce18a1904057e74b2953e525818f772c7a5df7 100644
|
index db5f63dcb0b44a5ba0a1eae892415af73746d7e1..46c26fb9919b468409ac71cbde48419fbbe46846 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||||
@@ -1854,14 +1854,58 @@ public class ServerPlayer extends Player {
|
@@ -1880,14 +1880,58 @@ public class ServerPlayer extends Player {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setCamera(@Nullable Entity entity) {
|
public void setCamera(@Nullable Entity entity) {
|
|
@ -11,7 +11,7 @@ If the projectile fails to find the shooter in the current world, check
|
||||||
other worlds.
|
other worlds.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
|
diff --git a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
|
||||||
index 54dfc45f9b350a9d4c2872ded5199ad13c797c80..7837fb0419c94731eba618e903353ddc047bbed6 100644
|
index cadcd3060e1c0e459ea064d2ac7a3ab5a4214d1d..80fdb953d7a49b05108672e18ea326182fa7cfd6 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
|
--- a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
|
+++ b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
|
||||||
@@ -57,6 +57,18 @@ public abstract class Projectile extends Entity {
|
@@ -57,6 +57,18 @@ public abstract class Projectile extends Entity {
|
|
@ -128,18 +128,10 @@ index 0000000000000000000000000000000000000000..41d73aa91fb401612e087aa1b7278ba6
|
||||||
+ }
|
+ }
|
||||||
+}
|
+}
|
||||||
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 5ebc450432805d52457b9f8ff1e2b1981bdd78e6..4c06e62e967f28eb844d74237948834e61daeab0 100644
|
index 136ff7de4ffb91d3fc84a90560a2f5db84703cff..cbb0865b08185d1c9dc95f6dc5507cc39f92f15e 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
|
||||||
@@ -17,6 +17,7 @@ import javax.crypto.Cipher;
|
@@ -46,6 +46,7 @@ import org.bukkit.craftbukkit.util.Waitable;
|
||||||
import javax.crypto.SecretKey;
|
|
||||||
import net.minecraft.DefaultUncaughtExceptionHandler;
|
|
||||||
import net.minecraft.network.Connection;
|
|
||||||
+import net.minecraft.network.FriendlyByteBuf;
|
|
||||||
import net.minecraft.network.chat.Component;
|
|
||||||
import net.minecraft.network.chat.TextComponent;
|
|
||||||
import net.minecraft.network.chat.TranslatableComponent;
|
|
||||||
@@ -40,6 +41,7 @@ import org.bukkit.craftbukkit.util.Waitable;
|
|
||||||
import org.bukkit.event.player.AsyncPlayerPreLoginEvent;
|
import org.bukkit.event.player.AsyncPlayerPreLoginEvent;
|
||||||
import org.bukkit.event.player.PlayerPreLoginEvent;
|
import org.bukkit.event.player.PlayerPreLoginEvent;
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
@ -147,30 +139,30 @@ index 5ebc450432805d52457b9f8ff1e2b1981bdd78e6..4c06e62e967f28eb844d74237948834e
|
||||||
|
|
||||||
public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener {
|
public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener {
|
||||||
|
|
||||||
@@ -58,6 +60,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener
|
@@ -69,6 +70,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener
|
||||||
@Nullable
|
@Nullable
|
||||||
private ServerPlayer delayedAcceptPlayer;
|
private ProfilePublicKey playerProfilePublicKey;
|
||||||
public String hostname = ""; // CraftBukkit - add field
|
public String hostname = ""; // CraftBukkit - add field
|
||||||
+ private int velocityLoginMessageId = -1; // Paper - Velocity support
|
+ private int velocityLoginMessageId = -1; // Paper - Velocity support
|
||||||
|
|
||||||
public ServerLoginPacketListenerImpl(MinecraftServer server, Connection connection) {
|
public ServerLoginPacketListenerImpl(MinecraftServer server, Connection connection) {
|
||||||
this.state = ServerLoginPacketListenerImpl.State.HELLO;
|
this.state = ServerLoginPacketListenerImpl.State.HELLO;
|
||||||
@@ -231,6 +234,14 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener
|
@@ -279,6 +281,14 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener
|
||||||
this.state = ServerLoginPacketListenerImpl.State.KEY;
|
this.state = ServerLoginPacketListenerImpl.State.KEY;
|
||||||
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 {
|
||||||
+ // Paper start - Velocity support
|
+ // Paper start - Velocity support
|
||||||
+ if (com.destroystokyo.paper.PaperConfig.velocitySupport) {
|
+ if (com.destroystokyo.paper.PaperConfig.velocitySupport) {
|
||||||
+ this.velocityLoginMessageId = java.util.concurrent.ThreadLocalRandom.current().nextInt();
|
+ this.velocityLoginMessageId = java.util.concurrent.ThreadLocalRandom.current().nextInt();
|
||||||
+ net.minecraft.network.protocol.login.ClientboundCustomQueryPacket packet1 = new net.minecraft.network.protocol.login.ClientboundCustomQueryPacket(this.velocityLoginMessageId, com.destroystokyo.paper.proxy.VelocityProxy.PLAYER_INFO_CHANNEL, new FriendlyByteBuf(Unpooled.EMPTY_BUFFER));
|
+ net.minecraft.network.protocol.login.ClientboundCustomQueryPacket packet1 = new net.minecraft.network.protocol.login.ClientboundCustomQueryPacket(this.velocityLoginMessageId, com.destroystokyo.paper.proxy.VelocityProxy.PLAYER_INFO_CHANNEL, new net.minecraft.network.FriendlyByteBuf(Unpooled.EMPTY_BUFFER));
|
||||||
+ this.connection.send(packet1);
|
+ this.connection.send(packet1);
|
||||||
+ return;
|
+ return;
|
||||||
+ }
|
+ }
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
// Spigot start
|
// Spigot start
|
||||||
// Paper start - Cache authenticator threads
|
// Paper start - Cache authenticator threads
|
||||||
authenticatorPool.execute(new Runnable() {
|
authenticatorPool.execute(new Runnable() {
|
||||||
@@ -338,6 +349,12 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener
|
@@ -392,6 +402,12 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener
|
||||||
public class LoginHandler {
|
public class LoginHandler {
|
||||||
|
|
||||||
public void fireEvents() throws Exception {
|
public void fireEvents() throws Exception {
|
||||||
|
@ -183,13 +175,13 @@ index 5ebc450432805d52457b9f8ff1e2b1981bdd78e6..4c06e62e967f28eb844d74237948834e
|
||||||
String playerName = ServerLoginPacketListenerImpl.this.gameProfile.getName();
|
String playerName = ServerLoginPacketListenerImpl.this.gameProfile.getName();
|
||||||
java.net.InetAddress address = ((java.net.InetSocketAddress) ServerLoginPacketListenerImpl.this.connection.getRemoteAddress()).getAddress();
|
java.net.InetAddress address = ((java.net.InetSocketAddress) ServerLoginPacketListenerImpl.this.connection.getRemoteAddress()).getAddress();
|
||||||
java.util.UUID uniqueId = ServerLoginPacketListenerImpl.this.gameProfile.getId();
|
java.util.UUID uniqueId = ServerLoginPacketListenerImpl.this.gameProfile.getId();
|
||||||
@@ -385,6 +402,40 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener
|
@@ -439,6 +455,40 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener
|
||||||
// Spigot end
|
// Spigot end
|
||||||
|
|
||||||
public void handleCustomQueryPacket(ServerboundCustomQueryPacket packet) {
|
public void handleCustomQueryPacket(ServerboundCustomQueryPacket packet) {
|
||||||
+ // Paper start - Velocity support
|
+ // Paper start - Velocity support
|
||||||
+ if (com.destroystokyo.paper.PaperConfig.velocitySupport && packet.getTransactionId() == this.velocityLoginMessageId) {
|
+ if (com.destroystokyo.paper.PaperConfig.velocitySupport && packet.getTransactionId() == this.velocityLoginMessageId) {
|
||||||
+ FriendlyByteBuf buf = packet.getData();
|
+ net.minecraft.network.FriendlyByteBuf buf = packet.getData();
|
||||||
+ if (buf == null) {
|
+ if (buf == null) {
|
||||||
+ this.disconnect("This server requires you to connect with Velocity.");
|
+ this.disconnect("This server requires you to connect with Velocity.");
|
||||||
+ return;
|
+ return;
|
||||||
|
@ -221,14 +213,14 @@ index 5ebc450432805d52457b9f8ff1e2b1981bdd78e6..4c06e62e967f28eb844d74237948834e
|
||||||
+ return;
|
+ return;
|
||||||
+ }
|
+ }
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
this.disconnect(new TranslatableComponent("multiplayer.disconnect.unexpected_query_response"));
|
this.disconnect(Component.translatable("multiplayer.disconnect.unexpected_query_response"));
|
||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
index ee25c3a9f499017dcd2adbc789030bd2d7cce7c4..c4c7120808a42dc36fbd85d9a842792797193a55 100644
|
index 907de15edda4f9b1165d985ff6b2c2a8317f06b5..ff47276975bac1dfa83c310a8944ec6335247a54 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
@@ -760,7 +760,7 @@ public final class CraftServer implements Server {
|
@@ -755,7 +755,7 @@ public final class CraftServer implements Server {
|
||||||
@Override
|
@Override
|
||||||
public long getConnectionThrottle() {
|
public long getConnectionThrottle() {
|
||||||
// Spigot Start - Automatically set connection throttle for bungee configurations
|
// Spigot Start - Automatically set connection throttle for bungee configurations
|
|
@ -5,7 +5,7 @@ Subject: [PATCH] Check Drowned for Villager Aggression Config
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/Drowned.java b/src/main/java/net/minecraft/world/entity/monster/Drowned.java
|
diff --git a/src/main/java/net/minecraft/world/entity/monster/Drowned.java b/src/main/java/net/minecraft/world/entity/monster/Drowned.java
|
||||||
index abc88d6dcebec75d4b4336891d480a0b7b1d23df..0a318583a5fc5ecb50f858d93d357baf1edf5a93 100644
|
index 2a3e9d3b847c155ba1d18c0711210c3e41bc3eac..1b1305f5eaf5710b72c57ab4c3953e703a23f1e0 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/monster/Drowned.java
|
--- a/src/main/java/net/minecraft/world/entity/monster/Drowned.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/monster/Drowned.java
|
+++ b/src/main/java/net/minecraft/world/entity/monster/Drowned.java
|
||||||
@@ -78,7 +78,7 @@ public class Drowned extends Zombie implements RangedAttackMob {
|
@@ -78,7 +78,7 @@ public class Drowned extends Zombie implements RangedAttackMob {
|
|
@ -20,10 +20,10 @@ index 85ad9a1a29d0cb11f552d8f34b210f1bf4bdd810..0078fb8df378058a6ddeb5dbea4132c8
|
||||||
+ }
|
+ }
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
index 84403ae9d6900c3dfce4e4e9063a28275277fc2d..6c7b30c0363b7965bc71704d8432cf21c20a1cc7 100644
|
index 27725c9c1ad03f8f2263c027ebf6f175efb8b986..eea6bd6fa0e08c6242d13d2458bdcbdb67bfbb57 100644
|
||||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
@@ -498,9 +498,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
@@ -525,9 +525,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||||
double d0 = entity.getX();
|
double d0 = entity.getX();
|
||||||
double d1 = entity.getY();
|
double d1 = entity.getY();
|
||||||
double d2 = entity.getZ();
|
double d2 = entity.getZ();
|
||||||
|
@ -36,7 +36,7 @@ index 84403ae9d6900c3dfce4e4e9063a28275277fc2d..6c7b30c0363b7965bc71704d8432cf21
|
||||||
float f = Mth.wrapDegrees(packet.getYRot());
|
float f = Mth.wrapDegrees(packet.getYRot());
|
||||||
float f1 = Mth.wrapDegrees(packet.getXRot());
|
float f1 = Mth.wrapDegrees(packet.getXRot());
|
||||||
double d6 = d3 - this.vehicleFirstGoodX;
|
double d6 = d3 - this.vehicleFirstGoodX;
|
||||||
@@ -535,6 +535,16 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
@@ -562,6 +562,16 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||||
}
|
}
|
||||||
speed *= 2f; // TODO: Get the speed of the vehicle instead of the player
|
speed *= 2f; // TODO: Get the speed of the vehicle instead of the player
|
||||||
|
|
||||||
|
@ -53,7 +53,7 @@ index 84403ae9d6900c3dfce4e4e9063a28275277fc2d..6c7b30c0363b7965bc71704d8432cf21
|
||||||
if (d10 - d9 > Math.max(100.0D, Math.pow((double) (org.spigotmc.SpigotConfig.movedTooQuicklyMultiplier * (float) i * speed), 2)) && !this.isSingleplayerOwner()) {
|
if (d10 - d9 > Math.max(100.0D, Math.pow((double) (org.spigotmc.SpigotConfig.movedTooQuicklyMultiplier * (float) i * speed), 2)) && !this.isSingleplayerOwner()) {
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
ServerGamePacketListenerImpl.LOGGER.warn("{} (vehicle of {}) moved too quickly! {},{},{}", new Object[]{entity.getName().getString(), this.player.getName().getString(), d6, d7, d8});
|
ServerGamePacketListenerImpl.LOGGER.warn("{} (vehicle of {}) moved too quickly! {},{},{}", new Object[]{entity.getName().getString(), this.player.getName().getString(), d6, d7, d8});
|
||||||
@@ -1149,9 +1159,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
@@ -1179,9 +1189,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||||
this.allowedPlayerTicks = 20; // CraftBukkit
|
this.allowedPlayerTicks = 20; // CraftBukkit
|
||||||
} else {
|
} else {
|
||||||
this.awaitingTeleportTime = this.tickCount;
|
this.awaitingTeleportTime = this.tickCount;
|
||||||
|
@ -66,7 +66,7 @@ index 84403ae9d6900c3dfce4e4e9063a28275277fc2d..6c7b30c0363b7965bc71704d8432cf21
|
||||||
float f = Mth.wrapDegrees(packet.getYRot(this.player.getYRot()));
|
float f = Mth.wrapDegrees(packet.getYRot(this.player.getYRot()));
|
||||||
float f1 = Mth.wrapDegrees(packet.getXRot(this.player.getXRot()));
|
float f1 = Mth.wrapDegrees(packet.getXRot(this.player.getXRot()));
|
||||||
|
|
||||||
@@ -1207,6 +1217,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
@@ -1237,6 +1247,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||||
} else {
|
} else {
|
||||||
speed = this.player.getAbilities().walkingSpeed * 10f;
|
speed = this.player.getAbilities().walkingSpeed * 10f;
|
||||||
}
|
}
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Reset players airTicks on respawn
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||||
index 02ce18a1904057e74b2953e525818f772c7a5df7..d020dd3ce45835813a40b1432f8e203b1ea9911e 100644
|
index 46c26fb9919b468409ac71cbde48419fbbe46846..222452a5549e29ef43d183390cc41783aeb8f3e9 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||||
@@ -2256,6 +2256,7 @@ public class ServerPlayer extends Player {
|
@@ -2293,6 +2293,7 @@ public class ServerPlayer extends Player {
|
||||||
|
|
||||||
this.setHealth(this.getMaxHealth());
|
this.setHealth(this.getMaxHealth());
|
||||||
this.stopUsingItem(); // CraftBukkit - SPIGOT-6682: Clear active item on reset
|
this.stopUsingItem(); // CraftBukkit - SPIGOT-6682: Clear active item on reset
|
|
@ -12,10 +12,10 @@ server threads
|
||||||
Allow usage of a single thread executor by not using ForkJoin so single core CPU's.
|
Allow usage of a single thread executor by not using ForkJoin so single core CPU's.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/Util.java b/src/main/java/net/minecraft/Util.java
|
diff --git a/src/main/java/net/minecraft/Util.java b/src/main/java/net/minecraft/Util.java
|
||||||
index 307c930d6d295012c8ec6332314b4043befbdafd..47fcfb1e5b65ce2ae3fcdfc5eecf3a1cf4a8d67f 100644
|
index d7e22ddf89619b58516ccef1d75a4c33df61b73c..70b8b86ed827217e536e35a690160adf9e974bb5 100644
|
||||||
--- a/src/main/java/net/minecraft/Util.java
|
--- a/src/main/java/net/minecraft/Util.java
|
||||||
+++ b/src/main/java/net/minecraft/Util.java
|
+++ b/src/main/java/net/minecraft/Util.java
|
||||||
@@ -68,8 +68,8 @@ public class Util {
|
@@ -78,8 +78,8 @@ public class Util {
|
||||||
private static final int DEFAULT_MAX_THREADS = 255;
|
private static final int DEFAULT_MAX_THREADS = 255;
|
||||||
private static final String MAX_THREADS_SYSTEM_PROPERTY = "max.bg.threads";
|
private static final String MAX_THREADS_SYSTEM_PROPERTY = "max.bg.threads";
|
||||||
private static final AtomicInteger WORKER_COUNT = new AtomicInteger(1);
|
private static final AtomicInteger WORKER_COUNT = new AtomicInteger(1);
|
||||||
|
@ -26,7 +26,7 @@ index 307c930d6d295012c8ec6332314b4043befbdafd..47fcfb1e5b65ce2ae3fcdfc5eecf3a1c
|
||||||
private static final ExecutorService IO_POOL = makeIoExecutor();
|
private static final ExecutorService IO_POOL = makeIoExecutor();
|
||||||
public static LongSupplier timeSource = System::nanoTime;
|
public static LongSupplier timeSource = System::nanoTime;
|
||||||
public static final Ticker TICKER = new Ticker() {
|
public static final Ticker TICKER = new Ticker() {
|
||||||
@@ -111,14 +111,18 @@ public class Util {
|
@@ -121,14 +121,18 @@ public class Util {
|
||||||
return Instant.now().toEpochMilli();
|
return Instant.now().toEpochMilli();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@ index 307c930d6d295012c8ec6332314b4043befbdafd..47fcfb1e5b65ce2ae3fcdfc5eecf3a1c
|
||||||
@Override
|
@Override
|
||||||
protected void onTermination(Throwable throwable) {
|
protected void onTermination(Throwable throwable) {
|
||||||
if (throwable != null) {
|
if (throwable != null) {
|
||||||
@@ -134,6 +138,7 @@ public class Util {
|
@@ -144,6 +148,7 @@ public class Util {
|
||||||
return forkJoinWorkerThread;
|
return forkJoinWorkerThread;
|
||||||
}, Util::onThreadException, true);
|
}, Util::onThreadException, true);
|
||||||
}
|
}
|
||||||
|
@ -58,10 +58,10 @@ index 307c930d6d295012c8ec6332314b4043befbdafd..47fcfb1e5b65ce2ae3fcdfc5eecf3a1c
|
||||||
return executorService;
|
return executorService;
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
index 311a51f91f6f4572d56dcd700c652b2690239f75..4525b3012269a98fb825273d358d414e01119abd 100644
|
index 2ad76722a54d4cc1a4f4799d14d0148c86e93198..7af89d152b13870a8495f94dffd34c948a9148fa 100644
|
||||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
@@ -318,6 +318,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -303,6 +303,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
S s0 = serverFactory.apply(thread); // CraftBukkit - decompile error
|
S s0 = serverFactory.apply(thread); // CraftBukkit - decompile error
|
||||||
|
|
||||||
atomicreference.set(s0);
|
atomicreference.set(s0);
|
|
@ -8,10 +8,10 @@ the updates per world, so that we can re-use the same packet
|
||||||
object for every player unless they have per-player time enabled.
|
object for every player unless they have per-player time enabled.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
index 4525b3012269a98fb825273d358d414e01119abd..067fa77d706a193dd3dcb4cc58d2e1b25840e6f3 100644
|
index 7af89d152b13870a8495f94dffd34c948a9148fa..5407fea80a66c43550b0b557174d710676b5f118 100644
|
||||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
@@ -1419,12 +1419,24 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -1377,12 +1377,24 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
|
|
||||||
MinecraftTimings.timeUpdateTimer.startTiming(); // Spigot // Paper
|
MinecraftTimings.timeUpdateTimer.startTiming(); // Spigot // Paper
|
||||||
// Send time updates to everyone, it will get the right time from the world the player is in.
|
// Send time updates to everyone, it will get the right time from the world the player is in.
|
|
@ -157,7 +157,7 @@ index 0000000000000000000000000000000000000000..224d4b2cc45b0d02230a76caee9c8857
|
||||||
+ }
|
+ }
|
||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftContainer.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftContainer.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftContainer.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftContainer.java
|
||||||
index 60fa587ce17e138d2baf8959c26e25ed1db17a4a..c50813f3a3ef78ce053249ca0c93360c0bc22e8d 100644
|
index 9531a11e63b4c5beeebabc45e4a40d5d39f05c7a..a2eeaad280569c9ab2c02d2885611db50462bf2b 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftContainer.java
|
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftContainer.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftContainer.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftContainer.java
|
||||||
@@ -72,13 +72,13 @@ public class CraftContainer extends AbstractContainerMenu {
|
@@ -72,13 +72,13 @@ public class CraftContainer extends AbstractContainerMenu {
|
|
@ -6,7 +6,7 @@ Subject: [PATCH] Use Vanilla Minecart Speeds
|
||||||
CraftBukkit changed the values on flying speed, restore back to vanilla
|
CraftBukkit changed the values on flying speed, restore back to vanilla
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java b/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java
|
diff --git a/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java b/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java
|
||||||
index 24dd62ec52e2f30f816ecfcc8d99c9de14946848..46ceed03caed9015acfcc45a5afc0d0c9521c9df 100644
|
index a21bd9753ee9e86b33a66925c05e8494196729be..7d60f56b2e8206e8e546abdd06ea74a2ead6e75d 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java
|
--- a/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java
|
+++ b/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java
|
||||||
@@ -103,9 +103,9 @@ public abstract class AbstractMinecart extends Entity {
|
@@ -103,9 +103,9 @@ public abstract class AbstractMinecart extends Entity {
|
Loading…
Reference in New Issue