remove calls to DoNotUse methods

This commit is contained in:
Jake Potrebic 2024-04-27 18:18:20 -07:00
parent dcbe8f75f2
commit 57a40dbdd3
4 changed files with 26 additions and 5 deletions

View file

@ -105,6 +105,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+
+ INVALID_PAYLOAD,
+
+ INVALID_COOKIE,
+
+ SPAM,
+
+ ILLEGAL_ACTION,

View file

@ -144,6 +144,15 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
// Paper start - adventure pack callbacks
// call the callbacks before the previously-existing event so the event has final say
@@ -0,0 +0,0 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
return;
}
// CraftBukkit end
- this.disconnect(ServerCommonPacketListenerImpl.DISCONNECT_UNEXPECTED_QUERY);
+ this.disconnect(ServerCommonPacketListenerImpl.DISCONNECT_UNEXPECTED_QUERY, org.bukkit.event.player.PlayerKickEvent.Cause.INVALID_COOKIE); // Paper - kick event cause
}
protected void keepConnectionAlive() {
@@ -0,0 +0,0 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
if (!this.isSingleplayerOwner() && elapsedTime >= KEEPALIVE_LIMIT) { // Paper - check keepalive limit, don't fire if already disconnected
if (this.keepAlivePending && !this.processedDisconnect) { // Paper

View file

@ -68,6 +68,21 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
} else {
if (this.level().isClientSide || this.isSitting() || this.isInWater()) {
return InteractionResult.PASS;
diff --git a/src/main/java/net/minecraft/world/entity/animal/armadillo/Armadillo.java b/src/main/java/net/minecraft/world/entity/animal/armadillo/Armadillo.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/world/entity/animal/armadillo/Armadillo.java
+++ b/src/main/java/net/minecraft/world/entity/animal/armadillo/Armadillo.java
@@ -0,0 +0,0 @@ public class Armadillo extends Animal {
}
@Override
- public void setInLove(@Nullable Player player) {
- super.setInLove(player);
+ public void setInLove(@Nullable Player player, @Nullable ItemStack breedItemCopy) { // Paper
+ super.setInLove(player, breedItemCopy); // Paper
this.makeSound(SoundEvents.ARMADILLO_EAT);
}
diff --git a/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java b/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java

View file

@ -471,11 +471,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
}
@@ -0,0 +0,0 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
}
}
+ @io.papermc.paper.annotation.DoNotUse // Paper - Optimize hoppers
private static boolean tryTakeInItemFromSlot(Hopper ihopper, Container iinventory, int i, Direction enumdirection, Level world) { // Spigot
ItemStack itemstack = iinventory.getItem(i);
if (!itemstack.isEmpty() && HopperBlockEntity.canTakeItemFromContainer(ihopper, iinventory, itemstack, i, enumdirection)) {