Update Paper

This commit is contained in:
Telesphoreo 2024-01-23 19:05:59 -06:00
parent cb2a824130
commit 6aca64966f
No known key found for this signature in database
GPG Key ID: 9D1991811E093C02
41 changed files with 70 additions and 79 deletions

View File

@ -2,7 +2,7 @@ group=me.totalfreedom.scissors
version=1.20.4-R0.1-SNAPSHOT
mcVersion=1.20.4
paperRef=106c67a811a857293b934c453752e73579c6ed8c
paperRef=8d94596e309ed6d8d00c501336b7899b7c53562f
org.gradle.caching=true
org.gradle.parallel=true

View File

@ -93,7 +93,7 @@ index 186547674894fd084bceb478bb6017b747df4173..74c880425964da042ca57c097eb93273
}
}).reduce((accumulator, current) -> {
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 92f9d55c224cd4e25060d8751ccb28a978979241..00144a02089522e24fd0b3ee847c35c954c4af2b 100644
index ef2ef6f34e2045ccbf93de123785b44886072cee..261c0f577cb88409a4b7dbec477eacde0a27aa79 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -2528,11 +2528,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S

View File

@ -414,7 +414,7 @@ index 0000000000000000000000000000000000000000..8cd2848aa6b06c5efbe797ed2d75ff4b
+}
+
diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java
index a5e6b99b95e8408136f4c665aec070c5adc448da..9558994dc312f23581654a9d54ec3576feae788a 100644
index 61840cfd64caba6595dfc99c91c76a195638d4ee..9acd9ecac6d72701835e04a17fddade74e3f78b0 100644
--- a/src/main/java/net/minecraft/server/Main.java
+++ b/src/main/java/net/minecraft/server/Main.java
@@ -141,6 +141,7 @@ public class Main {
@ -426,7 +426,7 @@ index a5e6b99b95e8408136f4c665aec070c5adc448da..9558994dc312f23581654a9d54ec3576
if (optionset.has("initSettings")) { // CraftBukkit
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
index cb7fe116a29916761299a808572f76547d143971..92f14286513c0ca536ceb8e0b6d5475bfcb6e997 100644
index cc9dff21beae4b2f80dd2db6f4cf4311706eab8b..be500a504fe94ed12c76e26ddee90ffe19857db6 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
@@ -222,6 +222,16 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
@ -447,7 +447,7 @@ index cb7fe116a29916761299a808572f76547d143971..92f14286513c0ca536ceb8e0b6d5475b
this.setFlightAllowed(dedicatedserverproperties.allowFlight);
this.setMotd(dedicatedserverproperties.motd);
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 0a5233a777294af3e7ef7844f72d47d11cd05b89..390b5302365a76ec4bcac276c0cfdfee6a9a0da2 100644
index 6067c246b3974c54e3c8f0f9178809ea3a9349ed..1f13958e86b98733ea1640bc4a1c16bcc89296df 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1036,6 +1036,7 @@ public final class CraftServer implements Server {
@ -482,7 +482,7 @@ index 0a5233a777294af3e7ef7844f72d47d11cd05b89..390b5302365a76ec4bcac276c0cfdfee
public void restart() {
org.spigotmc.RestartCommand.restart();
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index 3817c57b0a24969c0847a2c891bfe24d2ef9cafc..7a69edeaaf696be8ec441b71a94e27d981431dd8 100644
index 9faa47caa5712477a9311c1bbeac893a81d25d20..41ffc6977c8e8cbfcb9eba7db202075e2cc8e2bc 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -181,6 +181,20 @@ public class Main {

View File

@ -6,7 +6,7 @@ Subject: [PATCH] Prevent attributes with invalid namespaces from being applied
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
index 591e37648241870546b14a9732b2c94eef5f0354..45f39201acf88d715b6efea5a329701e2ea8300d 100644
index a3e4ae01dc156dc248f48b8ab6d7dcd26853eb10..97b086571c6a0e8ea829b4b52714b52cc32f9a7b 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
@@ -47,6 +47,7 @@ import net.minecraft.nbt.NbtIo;

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Fix negative death times
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 45b1a182acf6b2aef40b714d31ca125d8f74619a..5a11c89e10a9214fddc37f57c9b937494da19c9c 100644
index f0d565ac0b3c8d3c3a200348a16e7db21ff3920a..7976953ff2fcaa52cb2edcbeb686690e6f3c1953 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -628,7 +628,7 @@ public abstract class LivingEntity extends Entity implements Attackable {

View File

@ -6,7 +6,7 @@ Subject: [PATCH] Limit amount of vehicle collision checks to 3 and discard
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 c906ca07509939a06b9aaf2da0dafb172830a638..c1e91ea440202014419aa9601915f9288a41e32c 100644
index d514ec1e4cbdc579c3a61533998437903afdc8b6..99576adcba7dafeb7aaccff48b53365c930ccad7 100644
--- a/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java
+++ b/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java
@@ -8,6 +8,7 @@ import com.mojang.datafixers.util.Pair;
@ -52,7 +52,7 @@ index c906ca07509939a06b9aaf2da0dafb172830a638..c1e91ea440202014419aa9601915f928
} else {
Iterator iterator1 = this.level().getEntities(this, this.getBoundingBox().inflate(0.20000000298023224D, 0.0D, 0.20000000298023224D)).iterator();
diff --git a/src/main/java/net/minecraft/world/entity/vehicle/Boat.java b/src/main/java/net/minecraft/world/entity/vehicle/Boat.java
index c041c0b81be41cfd128c2f5ba56a5329d50b2efc..7dcbdcb30d264cf76fd975489918509e6e589127 100644
index db6aa75d642f4a7258f197933671907faf79c8f2..9b7a358d61ea5caffa5f501f2586f316cc338c00 100644
--- a/src/main/java/net/minecraft/world/entity/vehicle/Boat.java
+++ b/src/main/java/net/minecraft/world/entity/vehicle/Boat.java
@@ -5,6 +5,7 @@ import com.google.common.collect.UnmodifiableIterator;

View File

@ -59,7 +59,7 @@ index 4092c7a8c2b0d9d26e6f4d97386735236300d132..04c47cf1a920ae6c356449df801227ee
}
}
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
index d1effd5d7b9eb2d715c9a3e16adbef2541b1ccf2..622617bcfd1f41d1d055b916efd972d9f6dae083 100644
index d7d51f16396ad5539d39b7914125b559bd7dd2b4..1e161e6ee3f1214600c57f7a7df9117284892927 100644
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
@@ -23,6 +23,7 @@ import java.util.function.Predicate;
@ -105,7 +105,7 @@ index d1effd5d7b9eb2d715c9a3e16adbef2541b1ccf2..622617bcfd1f41d1d055b916efd972d9
this.processEnchantOrder(this.tag); // Paper
if (this.getItem().canBeDepleted()) {
diff --git a/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java
index 5edca8cdad2c3e3e8d2dd9f6ab02b3d63beb768d..eed465e73e073f6d741752b9bc5cfe99f1b26676 100644
index 6c725197846a3715e9e8d124635e908325d37166..366130c00b80cf03367d64ddd86f76eb40c1e997 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java
@@ -9,6 +9,7 @@ import java.util.Iterator;
@ -252,7 +252,7 @@ index 881379681c39230a00b3a1f11cd87498984396c7..d0513b72cdaec3b67b9341d251367b19
}
diff --git a/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java
index df1c1c27b7c0065f8179d59bdb9de01dde22befa..68cccd8d6dd1d8e196c9e2d4efdd15891fe48567 100644
index a61d7cd2b078fe511ff00344197b6ea11feebfb2..dd23c2ed904a3694337008207c953f7ed2a6e2ac 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java
@@ -6,6 +6,7 @@ import java.util.function.BooleanSupplier;

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Don't log invalid teams to console
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 4a0dbc927d23894d865a51dcef158899b898ed25..877de84675353c987db9dcad4a6d55ce9deeeda3 100644
index 7976953ff2fcaa52cb2edcbeb686690e6f3c1953..652c90cb5e051cdc04a3eaf482072304d3ae89ec 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -861,7 +861,7 @@ public abstract class LivingEntity extends Entity implements Attackable {

View File

@ -40,7 +40,7 @@ index 7ef14e4441a329c680a5dfe4bfb5033ffcb8f9d5..eff5bdf00b0aa7a9925ff59a62ead725
executor.performCommand(world);
} else {
diff --git a/src/main/java/net/minecraft/world/level/block/entity/JigsawBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/JigsawBlockEntity.java
index 3a210e138b6ae065fd32e1b1e0e49999e20c4667..183c47a6fbf5201c38d5eb182049643862ca0964 100644
index e2e31d6383c7de4f2eede46987d51978a5692639..9e5bb41c20e92cc39c99bfb3c801e9e432ba23cd 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/JigsawBlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/JigsawBlockEntity.java
@@ -2,6 +2,8 @@ package net.minecraft.world.level.block.entity;

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Add spectator teleport event
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index cafd0cde26a623861c7d3d01b496cb32fdc77335..4293978e1ddb789d5b9ff8f2dfbbb23bffba10ad 100644
index 6a85b44021df6226b53da478ac6f35dcfb55c3ed..cfc32007447b9eddb3cda9d870838fa330eb9368 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1,5 +1,6 @@
@ -15,7 +15,7 @@ index cafd0cde26a623861c7d3d01b496cb32fdc77335..4293978e1ddb789d5b9ff8f2dfbbb23b
import com.google.common.collect.Lists;
import com.google.common.primitives.Floats;
import com.mojang.authlib.GameProfile;
@@ -2039,6 +2040,12 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -2034,6 +2035,12 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
Entity entity = packet.getEntity(worldserver);
if (entity != null) {

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Prevent invalid container events
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 4293978e1ddb789d5b9ff8f2dfbbb23bffba10ad..e47f9527a6fe69cec500062c9b6a3a569f18d359 100644
index cfc32007447b9eddb3cda9d870838fa330eb9368..7297a195c03709028d6a9b61231279a6d8070923 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -29,6 +29,7 @@ import java.util.function.UnaryOperator;
@ -16,7 +16,7 @@ index 4293978e1ddb789d5b9ff8f2dfbbb23bffba10ad..e47f9527a6fe69cec500062c9b6a3a56
import net.minecraft.ChatFormatting;
import net.minecraft.SharedConstants;
import net.minecraft.Util;
@@ -2911,6 +2912,18 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -2906,6 +2907,18 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
return;
}

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Disable running commands in books by default
diff --git a/src/main/java/net/minecraft/world/item/WrittenBookItem.java b/src/main/java/net/minecraft/world/item/WrittenBookItem.java
index 31911c09fe15753ae32fa39417bdc9e9de552a88..b810a5afcb2343174e37efb7dd8a36b968b07c3a 100644
index 258a636a59203c4e5415a89002c6a607338f9514..dbc2993a105214d945a49e1eb5b910d28c09ae41 100644
--- a/src/main/java/net/minecraft/world/item/WrittenBookItem.java
+++ b/src/main/java/net/minecraft/world/item/WrittenBookItem.java
@@ -2,6 +2,7 @@ package net.minecraft.world.item;

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Validate block entity/entity tag query positions
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index e47f9527a6fe69cec500062c9b6a3a569f18d359..24bd79c80b1b8fadce647febcf461f564e1eae88 100644
index 7297a195c03709028d6a9b61231279a6d8070923..031afb99994e66f10d327c482cd9fb793ede9c45 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1267,7 +1267,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -1264,7 +1264,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
if (this.player.hasPermissions(2)) {
Entity entity = this.player.level().getEntity(packet.getEntityId());
@ -17,7 +17,7 @@ index e47f9527a6fe69cec500062c9b6a3a569f18d359..24bd79c80b1b8fadce647febcf461f56
CompoundTag nbttagcompound = entity.saveWithoutId(new CompoundTag());
this.player.connection.send(new ClientboundTagQueryPacket(packet.getTransactionId(), nbttagcompound));
@@ -1299,7 +1299,10 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -1296,7 +1296,10 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@Override
public void handleBlockEntityTagQuery(ServerboundBlockEntityTagQuery packet) {
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel());

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Refuse to convert legacy messages over 1k characters
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java b/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java
index 730d8e3cf2d9ca05b2d6219cf1856b8721871a37..63e71c5cb4ac4d17d2cfa5324fd842a0d3c61eb5 100644
index 753200057e74b8e2d5274894b982e6ee946a559e..25df28c8a2061a754cb576634b63d5ca6e5011d1 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java
@@ -198,6 +198,7 @@ public final class CraftChatMessage {

View File

@ -1,21 +1,21 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Allink <arclicious@vivaldi.net>
Date: Wed, 13 Jul 2022 12:13:22 +0100
From: Telesphoreo <me@telesphoreo.me>
Date: Tue, 23 Jan 2024 19:04:22 -0600
Subject: [PATCH] Fix ClickEvents on Signs bypassing permissions
diff --git a/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java
index bc01970c5ef9cde4a75394d6977837e924a38463..12ae1d0b819c2968fed903c14f9523b492a506ff 100644
index 6a883c185eb7ae228cb767044f7395ef1d08ab28..4765f141b54cc38cfe4b49b066fe2329274d5443 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java
@@ -8,8 +8,10 @@ import java.util.Objects;
import java.util.UUID;
import java.util.function.UnaryOperator;
import javax.annotation.Nullable;
+import me.totalfreedom.scissors.ScissorsConfig; // Scissors
+import me.totalfreedom.scissors.ScissorsConfig;
import net.minecraft.commands.CommandSource;
import net.minecraft.commands.CommandSourceStack;
+import net.minecraft.commands.Commands; // Scissors
+import net.minecraft.commands.Commands;
import net.minecraft.core.BlockPos;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.nbt.NbtOps;
@ -23,30 +23,23 @@ index bc01970c5ef9cde4a75394d6977837e924a38463..12ae1d0b819c2968fed903c14f9523b4
import net.minecraft.network.chat.ComponentUtils;
import net.minecraft.network.chat.Style;
import net.minecraft.network.protocol.game.ClientboundBlockEntityDataPacket;
+import net.minecraft.server.MinecraftServer; // Scissors
+import net.minecraft.server.MinecraftServer;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.server.level.ServerPlayer;
import net.minecraft.server.network.FilteredText;
@@ -32,6 +35,7 @@ import net.minecraft.world.level.block.SignBlock;
@@ -32,6 +35,8 @@ import net.minecraft.world.level.block.SignBlock;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.phys.Vec2;
import net.minecraft.world.phys.Vec3;
+import org.bukkit.craftbukkit.entity.CraftHumanEntity; // Scissors
+import org.bukkit.craftbukkit.CraftServer;
+import org.bukkit.craftbukkit.entity.CraftHumanEntity;
import org.slf4j.Logger;
import org.bukkit.block.sign.Side;
import org.bukkit.craftbukkit.block.CraftBlock;
@@ -39,6 +43,7 @@ import org.bukkit.craftbukkit.util.CraftChatMessage;
import org.bukkit.entity.Player;
import org.bukkit.event.block.SignChangeEvent;
// CraftBukkit end
+import org.bukkit.craftbukkit.CraftServer; // Scissors
public class SignBlockEntity extends BlockEntity implements CommandSource { // CraftBukkit - implements
@@ -289,6 +294,21 @@ public class SignBlockEntity extends BlockEntity implements CommandSource { // C
}
player.getServer().getCommands().performPrefixedCommand(this.createCommandSourceStack(((org.bukkit.craftbukkit.entity.CraftPlayer) event.getPlayer()).getHandle(), world, pos), event.getMessage());
// Paper end
// Paper end - Fix commands from signs not firing command events
+ // Scissors start - Add optional permissions to command signs
+ final MinecraftServer vanillaServer = player.getServer();
+ final CraftServer craftServer = vanillaServer.server;

View File

@ -40,7 +40,7 @@ index 74cf1c043beef03cfd5adf481414a5ee78bef2a6..939f4a0639c847b94cfc9acf1409a7a3
}
}
diff --git a/src/main/java/net/minecraft/network/chat/SignedMessageChain.java b/src/main/java/net/minecraft/network/chat/SignedMessageChain.java
index 22ead092ae984d1eaa052fe97981ce3c49b521d8..77be2549c1c836fd21f510ed1082cbd22ec60f09 100644
index ba12919c3f9aec34a9e64993b143ae92be5eb172..bdfa4a7f5b50e80195e79a6dd1204cb73bebd79e 100644
--- a/src/main/java/net/minecraft/network/chat/SignedMessageChain.java
+++ b/src/main/java/net/minecraft/network/chat/SignedMessageChain.java
@@ -5,6 +5,8 @@ import java.time.Instant;
@ -62,7 +62,7 @@ index 22ead092ae984d1eaa052fe97981ce3c49b521d8..77be2549c1c836fd21f510ed1082cbd2
}
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 24bd79c80b1b8fadce647febcf461f564e1eae88..e94f9879bfd06e9f45373389bbdce67ee05a9773 100644
index 031afb99994e66f10d327c482cd9fb793ede9c45..27b90469b7786eac42a743c346ea0a6576f01fbf 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1,5 +1,6 @@
@ -72,7 +72,7 @@ index 24bd79c80b1b8fadce647febcf461f564e1eae88..e94f9879bfd06e9f45373389bbdce67e
import me.totalfreedom.scissors.event.player.SpectatorTeleportEvent; // Scissors
import com.google.common.collect.Lists;
import com.google.common.primitives.Floats;
@@ -2249,7 +2250,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -2244,7 +2245,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
private void handleMessageDecodeFailure(SignedMessageChain.DecodeException exception) {
ServerGamePacketListenerImpl.LOGGER.warn("Failed to update secure chat state for {}: '{}'", this.player.getGameProfile().getName(), exception.getComponent().getString());
@ -81,7 +81,7 @@ index 24bd79c80b1b8fadce647febcf461f564e1eae88..e94f9879bfd06e9f45373389bbdce67e
this.disconnect(exception.getComponent(), exception.kickCause); // Paper - kick event causes
} else {
this.player.sendSystemMessage(exception.getComponent().copy().withStyle(ChatFormatting.RED));
@@ -2297,6 +2298,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -2292,6 +2293,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
Optional<LastSeenMessages> optional = this.lastSeenMessages.applyUpdate(acknowledgment);
if (optional.isEmpty()) {
@ -89,7 +89,7 @@ index 24bd79c80b1b8fadce647febcf461f564e1eae88..e94f9879bfd06e9f45373389bbdce67e
ServerGamePacketListenerImpl.LOGGER.warn("Failed to validate message acknowledgements from {}", this.player.getName().getString());
this.disconnect(ServerGamePacketListenerImpl.CHAT_VALIDATION_FAILED, org.bukkit.event.player.PlayerKickEvent.Cause.CHAT_VALIDATION_FAILED); // Paper - kick event causes
}
@@ -2495,6 +2497,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -2490,6 +2492,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
synchronized (this.lastSeenMessages) {
if (!this.lastSeenMessages.applyOffset(packet.offset())) {
@ -97,7 +97,7 @@ index 24bd79c80b1b8fadce647febcf461f564e1eae88..e94f9879bfd06e9f45373389bbdce67e
ServerGamePacketListenerImpl.LOGGER.warn("Failed to validate message acknowledgements from {}", this.player.getName().getString());
this.disconnect(ServerGamePacketListenerImpl.CHAT_VALIDATION_FAILED, org.bukkit.event.player.PlayerKickEvent.Cause.CHAT_VALIDATION_FAILED); // Paper - kick event causes
}
@@ -3473,6 +3476,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -3468,6 +3471,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@Override
public void handleChatSessionUpdate(ServerboundChatSessionUpdatePacket packet) {
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel());

View File

@ -33,7 +33,7 @@ index d87ffb5ed4550757016c2fabaa2845a6aaac74d7..7e8cf65ac53f595292d161da0735bf97
private Ints(Optional<Integer> min, Optional<Integer> max) {
this(min, max, min.map((i) -> {
diff --git a/src/main/java/net/minecraft/commands/arguments/selector/EntitySelector.java b/src/main/java/net/minecraft/commands/arguments/selector/EntitySelector.java
index 73c15a0c56a103ba4e62f0a51af8d42566b07245..f0a84efe86407ab3d7a9f064140c12df43265adc 100644
index 676a1499747b071515479130875157263d3a8352..6a65850101b8ea348a4bfeaeca805a39987b06fc 100644
--- a/src/main/java/net/minecraft/commands/arguments/selector/EntitySelector.java
+++ b/src/main/java/net/minecraft/commands/arguments/selector/EntitySelector.java
@@ -10,6 +10,8 @@ import java.util.function.BiConsumer;

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Patch invalid entity rotation log spam
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 2e11d0f17fc8fa4ed84c40dd9747e136675030a4..acd0dcf69a23ec6dda8e58621b8634076ba8eec1 100644
index 261c0f577cb88409a4b7dbec477eacde0a27aa79..1d18d24538d750b2a4e26b49f4625c09f1c97ff3 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -4745,7 +4745,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
@@ -4740,7 +4740,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
public void setXRot(float pitch) {
if (!Float.isFinite(pitch)) {

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Limit sculk catalyst cursor positions
diff --git a/src/main/java/net/minecraft/world/level/block/SculkSpreader.java b/src/main/java/net/minecraft/world/level/block/SculkSpreader.java
index de90a216321f7d82310a0d1c915fefe64360534c..7e52f6c26234cf6fa092151d51c0c6b70dc22ca8 100644
index 01e13e6d3ebd84cff0019f56efff16747420dc95..d4058bc31ca291cbc95eeef594fc35e1ff6a3dde 100644
--- a/src/main/java/net/minecraft/world/level/block/SculkSpreader.java
+++ b/src/main/java/net/minecraft/world/level/block/SculkSpreader.java
@@ -181,7 +181,7 @@ public class SculkSpreader {

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Limit map decorations
diff --git a/src/main/java/net/minecraft/network/protocol/game/ClientboundMapItemDataPacket.java b/src/main/java/net/minecraft/network/protocol/game/ClientboundMapItemDataPacket.java
index 81f3e64d94fa17e45411e5c1641d9c5a2fe3d2e2..bcf6e2ce9f00d1688a5fa00ec055a57389346922 100644
index 17343d515044f3678b4edf070ee7ca244adc4228..8ade519114bec879bed8e8e23707a85327da131b 100644
--- a/src/main/java/net/minecraft/network/protocol/game/ClientboundMapItemDataPacket.java
+++ b/src/main/java/net/minecraft/network/protocol/game/ClientboundMapItemDataPacket.java
@@ -65,7 +65,8 @@ public class ClientboundMapItemDataPacket implements Packet<ClientGamePacketList
@ -19,7 +19,7 @@ index 81f3e64d94fa17e45411e5c1641d9c5a2fe3d2e2..bcf6e2ce9f00d1688a5fa00ec055a573
});
if (this.colorPatch != null) {
diff --git a/src/main/java/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java b/src/main/java/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java
index e4c4948e076cd64686dfd16ae0568fafc1437140..eff53c21b18574750b691b784fb1688885d4ace7 100644
index 45269115e63cfc3bd7dc740a5694e2cc7c35bcb1..85ea95f55fd6177748edf921e2380142d93b8b06 100644
--- a/src/main/java/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java
+++ b/src/main/java/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java
@@ -361,6 +361,11 @@ public class MapItemSavedData extends SavedData {

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Prevent player banning using duplicate UUIDs
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 9801b283da75aa63d7eba33d08322285c86c241c..6375d2e00ce8dab51294fe5dc53210883c4e1153 100644
index fb3f71f9824e522df22c50f55b4d41e70a1d1c63..9940f46aa5a416919f678c87c26307e5f8c309fb 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -1672,7 +1672,13 @@ public class ServerLevel extends Level implements WorldGenLevel {

View File

@ -18,7 +18,7 @@ index c99fc118013cb3d4043638e2001a8297e79ddf9c..cdaa81e1f2167b29ec01cc25e51a8400
private final boolean trackOutput;
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 4bdd2e731102c7e3a312ad3144537042dce46923..1f7dc235f8cf848d740ef6a8cf879d253b56c1c8 100644
index 27b90469b7786eac42a743c346ea0a6576f01fbf..26bc001a8aa4bff5b5328aaa6a311cb6b5361556 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1,6 +1,8 @@
@ -47,7 +47,7 @@ index 4bdd2e731102c7e3a312ad3144537042dce46923..1f7dc235f8cf848d740ef6a8cf879d25
import org.slf4j.Logger;
// CraftBukkit start
@@ -894,6 +899,16 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -891,6 +896,16 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
this.player.level().getChunkAt(blockposition).setBlockEntity(tileentity);
}
@ -64,7 +64,7 @@ index 4bdd2e731102c7e3a312ad3144537042dce46923..1f7dc235f8cf848d740ef6a8cf879d25
commandblocklistenerabstract.setCommand(s);
commandblocklistenerabstract.setTrackOutput(flag);
if (!flag) {
@@ -925,7 +940,18 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -922,7 +937,18 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
BaseCommandBlock commandblocklistenerabstract = packet.getCommandBlock(this.player.level());
if (commandblocklistenerabstract != null) {

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Limit beacon effectRange
diff --git a/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java
index f13943db6f2fb923c52dcf9e8bf7000041d0a362..2fdcc47dd6a813d5f7a32dc58ca67b6b965c8749 100644
index 3ccc0a8d2091d45100198f2853c17edf62c27728..2e42fd8a7eb78183ceb38dc6dc9023eedc960ada 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java
@@ -87,7 +87,7 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name
@ -20,7 +20,7 @@ index f13943db6f2fb923c52dcf9e8bf7000041d0a362..2fdcc47dd6a813d5f7a32dc58ca67b6b
@@ -456,6 +456,7 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name
this.lockKey = LockCode.fromTag(nbt);
this.effectRange = nbt.contains(PAPER_RANGE_TAG, 6) ? nbt.getDouble(PAPER_RANGE_TAG) : -1; // Paper
this.effectRange = nbt.contains(PAPER_RANGE_TAG, 6) ? nbt.getDouble(PAPER_RANGE_TAG) : -1; // Paper - Custom beacon ranges
+ if (this.effectRange > 256) this.effectRange = 256; // Scissors
}

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Don't log on too many chained updates
diff --git a/src/main/java/net/minecraft/world/level/redstone/CollectingNeighborUpdater.java b/src/main/java/net/minecraft/world/level/redstone/CollectingNeighborUpdater.java
index 598dc0d3a2b9387e76d7e4e19e54c4573a24bc54..9eed28bf8bc7e2fa528729cde01a535bc7040815 100644
index 395bb163fb1d62dd2e6949e1146c337c0bbc626f..a40f014c4065fd6f7b27483ccc659bd31d5b7235 100644
--- a/src/main/java/net/minecraft/world/level/redstone/CollectingNeighborUpdater.java
+++ b/src/main/java/net/minecraft/world/level/redstone/CollectingNeighborUpdater.java
@@ -56,7 +56,7 @@ public class CollectingNeighborUpdater implements NeighborUpdater {

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Fix packet-related lag exploits
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 677ad69a4d359227c679c207225b7e6b02b93706..ee84d71b3ca60a037bd38630bcb36878489efd74 100644
index 26bc001a8aa4bff5b5328aaa6a311cb6b5361556..d0bb06e7f320766ec27995998137d8d5715f3346 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -859,7 +859,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -856,7 +856,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
this.player.sendSystemMessage(Component.translatable("advMode.notEnabled"));
} else if (!this.player.canUseGameMasterBlocks() && (!this.player.isCreative() || !this.player.getBukkitEntity().hasPermission("minecraft.commandblock"))) { // Paper - command block permission
this.player.sendSystemMessage(Component.translatable("advMode.notAllowed"));
@ -17,7 +17,7 @@ index 677ad69a4d359227c679c207225b7e6b02b93706..ee84d71b3ca60a037bd38630bcb36878
BaseCommandBlock commandblocklistenerabstract = null;
CommandBlockEntity tileentitycommand = null;
BlockPos blockposition = packet.getPos();
@@ -1028,7 +1028,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -1025,7 +1025,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@Override
public void handleSetStructureBlock(ServerboundSetStructureBlockPacket packet) {
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel());
@ -26,7 +26,7 @@ index 677ad69a4d359227c679c207225b7e6b02b93706..ee84d71b3ca60a037bd38630bcb36878
BlockPos blockposition = packet.getPos();
BlockState iblockdata = this.player.level().getBlockState(blockposition);
BlockEntity tileentity = this.player.level().getBlockEntity(blockposition);
@@ -1086,7 +1086,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -1083,7 +1083,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@Override
public void handleSetJigsawBlock(ServerboundSetJigsawBlockPacket packet) {
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel());
@ -35,7 +35,7 @@ index 677ad69a4d359227c679c207225b7e6b02b93706..ee84d71b3ca60a037bd38630bcb36878
BlockPos blockposition = packet.getPos();
BlockState iblockdata = this.player.level().getBlockState(blockposition);
BlockEntity tileentity = this.player.level().getBlockEntity(blockposition);
@@ -1111,7 +1111,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -1108,7 +1108,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@Override
public void handleJigsawGenerate(ServerboundJigsawGeneratePacket packet) {
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel());

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Mute invalid attributes
diff --git a/src/main/java/net/minecraft/world/entity/ai/attributes/AttributeMap.java b/src/main/java/net/minecraft/world/entity/ai/attributes/AttributeMap.java
index 7204b973c3ad9239e82355513f6d538107102e48..2463444778f19f937b18173798c04d9d9788a824 100644
index 897d7632ecfea40890433474870dd7a5e534d8ab..7c522cf74bd86a73a08ebd1b2de69b5b9da6559b 100644
--- a/src/main/java/net/minecraft/world/entity/ai/attributes/AttributeMap.java
+++ b/src/main/java/net/minecraft/world/entity/ai/attributes/AttributeMap.java
@@ -147,7 +147,7 @@ public class AttributeMap {

View File

@ -1,14 +1,14 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Telesphoreo <me@telesphoreo.me>
Date: Sat, 26 Mar 2022 21:51:07 -0500
Date: Tue, 23 Jan 2024 19:01:02 -0600
Subject: [PATCH] Change version fetcher to AMG
diff --git a/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java b/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java
index 9d687da5bdf398bb3f6c84cdf1249a7213d09f2e..bc5ed619e05f24f3ad50a6a81306d120869f57a1 100644
index 9d687da5bdf398bb3f6c84cdf1249a7213d09f2e..48dd50d0e443a59835e92616874c9856c7cbc401 100644
--- a/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java
+++ b/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java
@@ -4,11 +4,13 @@ import com.destroystokyo.paper.util.VersionFetcher;
@@ -4,6 +4,7 @@ import com.destroystokyo.paper.util.VersionFetcher;
import com.google.common.base.Charsets;
import com.google.common.io.Resources;
import com.google.gson.*;
@ -16,14 +16,12 @@ index 9d687da5bdf398bb3f6c84cdf1249a7213d09f2e..bc5ed619e05f24f3ad50a6a81306d120
import net.kyori.adventure.text.Component;
import net.kyori.adventure.text.event.ClickEvent;
import net.kyori.adventure.text.format.NamedTextColor;
import net.kyori.adventure.text.format.TextDecoration;
import net.kyori.adventure.text.TextComponent;
@@ -16,11 +17,12 @@ import java.io.*;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.stream.StreamSupport;
+import org.bukkit.Bukkit; // Scissors
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
@@ -19,8 +21,8 @@ import java.util.stream.StreamSupport;
public class PaperVersionFetcher implements VersionFetcher {
private static final java.util.regex.Pattern VER_PATTERN = java.util.regex.Pattern.compile("^([0-9\\.]*)\\-.*R"); // R is an anchor, will always give '-R' at end
- private static final String GITHUB_BRANCH_NAME = "master";
@ -77,15 +75,15 @@ index 9d687da5bdf398bb3f6c84cdf1249a7213d09f2e..bc5ed619e05f24f3ad50a6a81306d120
switch (distance) {
case -1:
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index c737c5d62407337d3db2899cfc01713a058a6467..54891c5d7ca19a4fdab74a8729814a6fecee3fda 100644
index 41ffc6977c8e8cbfcb9eba7db202075e2cc8e2bc..5a0ac2025bbed41c207964a28d963dccb41a623e 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -301,7 +301,7 @@ public class Main {
@@ -315,7 +315,7 @@ public class Main {
if (buildDate.before(deadline.getTime())) {
// Paper start - This is some stupid bullshit
System.err.println("*** Warning, you've not updated in a while! ***");
- System.err.println("*** Please download a new build as per instructions from https://papermc.io/downloads/paper ***"); // Paper
+ System.err.println("*** Please download a new build from https://ci.scissors.gg/job/Scissors ***"); // Scissors > // Paper
+ System.err.println("*** Please download a new build as per instructions from https://ci.scissors.gg/job/Scissors ***"); // Paper
//System.err.println("*** Server will start in 20 seconds ***");
//Thread.sleep(TimeUnit.SECONDS.toMillis(20));
// Paper End
// Paper end