mirror of
https://github.com/AtlasMediaGroup/Scissors.git
synced 2024-11-26 22:55:39 +00:00
Update Paper
This commit is contained in:
parent
3bf9c85578
commit
af86fbc465
@ -1,8 +1,8 @@
|
|||||||
plugins {
|
plugins {
|
||||||
java
|
java
|
||||||
`maven-publish`
|
`maven-publish`
|
||||||
id("com.github.johnrengelman.shadow") version "8.1.0" apply false
|
id("com.github.johnrengelman.shadow") version "8.1.1" apply false
|
||||||
id("io.papermc.paperweight.patcher") version "1.5.4"
|
id("io.papermc.paperweight.patcher") version "1.5.5"
|
||||||
}
|
}
|
||||||
|
|
||||||
val paperMavenPublicUrl = "https://repo.papermc.io/repository/maven-public/"
|
val paperMavenPublicUrl = "https://repo.papermc.io/repository/maven-public/"
|
||||||
|
@ -2,7 +2,7 @@ group=me.totalfreedom.scissors
|
|||||||
version=1.19.4-R0.1-SNAPSHOT
|
version=1.19.4-R0.1-SNAPSHOT
|
||||||
|
|
||||||
mcVersion=1.19.4
|
mcVersion=1.19.4
|
||||||
paperRef=936205beae24652acf56c6e765072bc6a0156ed3
|
paperRef=bcec5b11e6728f3eb3078aa4fcc8e87f3d545ec2
|
||||||
|
|
||||||
org.gradle.caching=true
|
org.gradle.caching=true
|
||||||
org.gradle.parallel=true
|
org.gradle.parallel=true
|
||||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Block server side chunkbans
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/network/PacketEncoder.java b/src/main/java/net/minecraft/network/PacketEncoder.java
|
diff --git a/src/main/java/net/minecraft/network/PacketEncoder.java b/src/main/java/net/minecraft/network/PacketEncoder.java
|
||||||
index ebee957fb048da6ffcd2a5ba2ed989ed1a6634e9..889342fac2903f16846e9303631a64df6fcfc589 100644
|
index fbfadeb83719b81f42724e79c59e92ed88fdece7..d9ed02aa0dcec82bdf9d42c224694773b9307cfe 100644
|
||||||
--- a/src/main/java/net/minecraft/network/PacketEncoder.java
|
--- a/src/main/java/net/minecraft/network/PacketEncoder.java
|
||||||
+++ b/src/main/java/net/minecraft/network/PacketEncoder.java
|
+++ b/src/main/java/net/minecraft/network/PacketEncoder.java
|
||||||
@@ -6,9 +6,26 @@ import io.netty.channel.ChannelHandlerContext;
|
@@ -6,9 +6,26 @@ import io.netty.channel.ChannelHandlerContext;
|
||||||
@ -48,7 +48,7 @@ index ebee957fb048da6ffcd2a5ba2ed989ed1a6634e9..889342fac2903f16846e9303631a64df
|
|||||||
+ packet.write(friendlyByteBuf);
|
+ packet.write(friendlyByteBuf);
|
||||||
+ int k = friendlyByteBuf.writerIndex() - j;
|
+ int k = friendlyByteBuf.writerIndex() - j;
|
||||||
+ int packetLength = friendlyByteBuf.readableBytes();
|
+ int packetLength = friendlyByteBuf.readableBytes();
|
||||||
+ if (k > 8388608 || packetLength > MAX_PACKET_SIZE) {
|
+ if (k > 8388608 || packetLength > MAX_PACKET_SIZE) {
|
||||||
+ throw new SkipPacketException(new IllegalArgumentException("Packet too big (is " + k + "): " + packet));
|
+ throw new SkipPacketException(new IllegalArgumentException("Packet too big (is " + k + "): " + packet));
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
@ -72,7 +72,7 @@ index ebee957fb048da6ffcd2a5ba2ed989ed1a6634e9..889342fac2903f16846e9303631a64df
|
|||||||
- int j = friendlyByteBuf.writerIndex();
|
- int j = friendlyByteBuf.writerIndex();
|
||||||
- packet.write(friendlyByteBuf);
|
- packet.write(friendlyByteBuf);
|
||||||
- int k = friendlyByteBuf.writerIndex() - j;
|
- int k = friendlyByteBuf.writerIndex() - j;
|
||||||
- if (k > 8388608) {
|
- if (false && k > 8388608) { // Paper - disable
|
||||||
- throw new IllegalArgumentException("Packet too big (is " + k + ", should be less than 8388608): " + packet);
|
- throw new IllegalArgumentException("Packet too big (is " + k + ", should be less than 8388608): " + packet);
|
||||||
- } else {
|
- } else {
|
||||||
- int l = channelHandlerContext.channel().attr(Connection.ATTRIBUTE_PROTOCOL).get().getId();
|
- int l = channelHandlerContext.channel().attr(Connection.ATTRIBUTE_PROTOCOL).get().getId();
|
||||||
@ -168,7 +168,7 @@ index ebee957fb048da6ffcd2a5ba2ed989ed1a6634e9..889342fac2903f16846e9303631a64df
|
|||||||
+ // Scissors end
|
+ // Scissors end
|
||||||
+
|
+
|
||||||
// Paper start
|
// Paper start
|
||||||
private static int MAX_PACKET_SIZE = 2097152;
|
private static int MAX_PACKET_SIZE = 8388608;
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/network/protocol/game/ClientboundBlockEntityDataPacket.java b/src/main/java/net/minecraft/network/protocol/game/ClientboundBlockEntityDataPacket.java
|
diff --git a/src/main/java/net/minecraft/network/protocol/game/ClientboundBlockEntityDataPacket.java b/src/main/java/net/minecraft/network/protocol/game/ClientboundBlockEntityDataPacket.java
|
||||||
index 3944852921335c78a04a9dc301882ab5b152b1ed..96ee53c7cc862e059328c5cdf5e07f309df6a79e 100644
|
index 3944852921335c78a04a9dc301882ab5b152b1ed..96ee53c7cc862e059328c5cdf5e07f309df6a79e 100644
|
||||||
|
Loading…
Reference in New Issue
Block a user