Experimental annotation changes (#12028)

This commit is contained in:
Lulu13022002
2025-01-30 20:02:14 +01:00
committed by GitHub
parent 54b2e9d973
commit d4a957849c
25 changed files with 19 additions and 59 deletions

View File

@ -938,7 +938,7 @@
- player.resetSentInfo();
+ // entityplayer.resetSentInfo();
+ player.getBukkitEntity().updateScaledHealth(); // CraftBukkit - Update scaled health on respawn and worldchange
+ player.refreshEntityData(player); // CraftBukkkit - SPIGOT-7218: sync metadata
+ player.refreshEntityData(player); // CraftBukkit - SPIGOT-7218: sync metadata
player.connection.send(new ClientboundSetHeldSlotPacket(player.getInventory().selected));
+ // CraftBukkit start - from GameRules
+ int i = player.serverLevel().getGameRules().getBoolean(GameRules.RULE_REDUCEDDEBUGINFO) ? 22 : 23;

View File

@ -9,7 +9,7 @@
int ageValue = state.getValue(AGE);
if (ageValue < 2) {
- level.setBlock(pos, state.setValue(AGE, Integer.valueOf(ageValue + 1)), 2);
+ org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockGrowEvent(level, pos, state.setValue(CocoaBlock.AGE, ageValue + 1), 2); // CraftBukkkit
+ org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockGrowEvent(level, pos, state.setValue(CocoaBlock.AGE, ageValue + 1), 2); // CraftBukkit
}
}
}

View File

@ -1,11 +1,9 @@
package io.papermc.paper.registry.data;
import com.google.common.base.Preconditions;
import com.google.common.collect.Iterables;
import com.google.common.collect.Lists;
import io.papermc.paper.registry.PaperRegistryBuilder;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.TypedKey;
import io.papermc.paper.registry.data.util.Checks;
import io.papermc.paper.registry.data.util.Conversions;
import io.papermc.paper.registry.set.PaperRegistrySets;
@ -189,7 +187,6 @@ public class PaperEnchantmentRegistryEntry implements EnchantmentRegistryEntry {
@Override
public Builder anvilCost(final @Range(from = 0, to = Integer.MAX_VALUE) int anvilCost) {
Preconditions.checkArgument(anvilCost >= 0, "anvilCost must be non-negative");
this.anvilCost = OptionalInt.of(asArgumentMin(anvilCost, "anvilCost", 0));
return this;
}

View File

@ -590,7 +590,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
e.getStringUUID()
);
} else {
// Ensure player flag is not needed
// Ensure misc flag is not needed
Preconditions.checkArgument(
nmsEntity.getType().canSerialize() || allowMiscSerialization,
"Cannot serialize misc non-saveable entity %s(%s) without the MISC flag",