fix compilation issues

This commit is contained in:
granny
2025-01-07 17:52:15 -08:00
committed by granny
parent c81d37b664
commit ceb127eaec
9 changed files with 51 additions and 40 deletions

View File

@@ -5,7 +5,7 @@
} else if (this.selector != null && !this.selector.test(target, level)) {
return false;
+ // Purpur start - AFK API
+ } else if (!world.purpurConfig.idleTimeoutTargetPlayer && target instanceof net.minecraft.server.level.ServerPlayer player && player.isAfk()) {
+ } else if (!level.purpurConfig.idleTimeoutTargetPlayer && target instanceof net.minecraft.server.level.ServerPlayer player && player.isAfk()) {
+ return false;
+ // Purpur end - AFK API
} else {

View File

@@ -92,8 +92,8 @@
this.broadcastChanges();
+
+ // Purpur start - Anvil API
+ if (this.canDoUnsafeEnchants && itemstack1 != ItemStack.EMPTY) {
+ ((ServerPlayer) this.player).connection.send(new ClientboundContainerSetSlotPacket(this.containerId, this.incrementStateId(), 2, itemstack1));
+ if (this.canDoUnsafeEnchants && itemStack != ItemStack.EMPTY) {
+ ((ServerPlayer) this.player).connection.send(new ClientboundContainerSetSlotPacket(this.containerId, this.incrementStateId(), 2, itemStack));
+ ((ServerPlayer) this.player).connection.send(new ClientboundContainerSetDataPacket(this.containerId, 0, this.cost.get()));
+ }
+ // Purpur end - Anvil API