Updated Upstream (Paper)

Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@46c6f49 Fix Registry#getKey implementation
PaperMC/Paper@4c6ea84 move junit platform dep to -server and -api
PaperMC/Paper@c31d95e remove test plugin diff accidentally committed
PaperMC/Paper@90d50aa update .editorconfig
PaperMC/Paper@8ad15d6 Update minecraft dir references
PaperMC/Paper@083c083 Fix a bunch more issues arising from mutable types (#11769)
PaperMC/Paper@eb793c3 [ci skip] more cleanup from repo reorg
PaperMC/Paper@f8bf600 Fix potion effect type removal (#11778)
PaperMC/Paper@188124b Fix totems negating incorrect item (#11776)
PaperMC/Paper@a0b3326 refactor registry entry to detach 'delayed' from other meta
PaperMC/Paper@cbf630d Move missing import into feature patches to fix pre-features compile
PaperMC/Paper@17f649d Fix PlayerTradeEvent visual issue when being cancelled (#11773)
PaperMC/Paper@976b0a4 [ci skip] Simplify and update contribution guidelines
PaperMC/Paper@63c94c9 [ci skip] Comment out update tasks, update comments
PaperMC/Paper@62d4130 [ci skip] Fix Inventory#addItem javadoc mismatch with behaviour (#11782)
PaperMC/Paper@bd4c235 Throw during plugin update folder process on failed rename/delete (#11784)
PaperMC/Paper@793d361 Fix recipe book items order (#11787)
PaperMC/Paper@c768099 Fix tripwires (#11790)
PaperMC/Paper@17d76ae Correctly die when cancelling EntityResurrectEvent (#11785)
PaperMC/Paper@aa2c52b Fix dropper inventory var
PaperMC/Paper@d0d0efe Partially revert 083c083188 for Transformation (#11798)
PaperMC/Paper@b8a0541 Fix 0 parameter in Player#applyMending (#11802)
PaperMC/Paper@9e2d39c Fix double chest identification (#11812)
PaperMC/Paper@321d17c [ci skip] Only build PRs on correct label (#11811)
PaperMC/Paper@d568e17 Port basic lookAt methods from Player to Entity (#11775)
PaperMC/Paper@25cc3d8 Fix EnchantmentView#setOffers length precondition being flipped (#11818)
PaperMC/Paper@763b32d Fix framed maps looping through all players in world (#11819)
PaperMC/Paper@946314f Remove disableTeleportationSuffocationCheck config (#11822)
PaperMC/Paper@140577b Fix broken field rename compat for instrument "feel_goat_horn" (#11824)
PaperMC/Paper@a07cec1 Add effective name to ItemStack (#11770)
PaperMC/Paper@3a479ea Add Registry#getTags (#11795)
PaperMC/Paper@d85d318 Fix NullPointerException in PlayerInteractEvent#getClickedPosition (#11827)
PaperMC/Paper@3331805 Deprecate #furnace_materials item tag (#11823)
PaperMC/Paper@c9a904e Fix keepalive logic resetting counter
PaperMC/Paper@a8f850a temporarily revert OldEnum toString changes (#11829)
PaperMC/Paper@a14c06b fix annotation test for null marked inner classes (#11826)
PaperMC/Paper@f51aa3e Fix BlockRedstoneEvent for tripwire hooks (#11791)
PaperMC/Paper@af2812f For new registry values, allow copying from existing (#11796)
PaperMC/Paper@0efd301 Fix suggestions for ResourceLocation (#11830)
PaperMC/Paper@aac246a Expand on entity serialization API (#11807)
PaperMC/Paper@953f6f9 Banner pattern registry modification (#11803)
PaperMC/Paper@a5b8df6 add tagkey file for entity type (#11832)
PaperMC/Paper@c530c39 More var name fixes
PaperMC/Paper@2b73d19 More var name fixes
PaperMC/Paper@326c687 Fix whack diff from last commit
PaperMC/Paper@13c94e4 Updated adventure to 4.18.0 (#11809)
PaperMC/Paper@ca8709b Fix more incorrect array nullability annotations (#11836)
PaperMC/Paper@e10dcbf [ci skip] Improve build workflow conditions (#11842)
PaperMC/Paper@b4051db Handle disabled vanilla registry values correctly (#11781)
PaperMC/Paper@4b89390 Fix contextual map renderer memory leak (#11841)
PaperMC/Paper@5c7537c Add DamageType RegistryEvent (#11783)
PaperMC/Paper@33411ec Properly remove UnsafeValues#getDamageEffect
PaperMC/Paper@0629524 Directly build Art (#11813)
PaperMC/Paper@e0abc5f Do not spawn fire for visual lightning (#11845)
PaperMC/Paper@dac977a Correctly force particles (#11850)
PaperMC/Paper@feb8756 Add datapack registration lifecycle event (#11804)
PaperMC/Paper@18da1ae [ci skip] update DiscoveredDatapack javadoc
PaperMC/Paper@93a3df0 Extend HumanEntity#dropItem API (#11810)
PaperMC/Paper@287eb52 Use hidden classes for event executors (#11848)
PaperMC/Paper@887f3f7 [ci skip] Replace FQN with import in EventExecutor
PaperMC/Paper@d00344a update jb annotations to 26.0.1 (#11860)
PaperMC/Paper@60edd61 [ci skip] Fix spelling of ignition's word into javadoc (#11864)
PaperMC/Paper@a81990e Update mache, fixes dev bundle use with Java 23
PaperMC/Paper@1e4669e [ci skip] Clarify loot table behavior when set to null. (#11861)
PaperMC/Paper@9298f59 Update paperweight to 2.0.0-beta.10
PaperMC/Paper@bdfad1c Add sendRich/PlainMessage methods to Server (#11872)
PaperMC/Paper@1dd52be Use playerlist whitelist status instead of properties
PaperMC/Paper@83995d7 Fix settings changes not being saved (#11881)
PaperMC/Paper@daddcf6 Fix JOML javadoc URL (#11883)
PaperMC/Paper@edde726 [ci skip] Add missing Nullable annotations for NMS DamageSource (#11875)
PaperMC/Paper@4106da7 Fix retain passengers teleport flag (#11858)
PaperMC/Paper@6ab1352 Improve performance of PoiCompetitorScan by unrolling stream (#11871)
PaperMC/Paper@33a590b Fix TargetHitEvent#getSignalStrength() post-hard-fork (#11897)
PaperMC/Paper@f367f10 Add rotation helpers to Location (#11908)
PaperMC/Paper@9f90b4c Fix ItemDamageEvents called for 0 damage (#11900)
PaperMC/Paper@486e521 Re-add droped MapLike spam fix (#11917)
PaperMC/Paper@3375570 Fix MapCanvas#drawImage (#11865)
PaperMC/Paper@49d15f6 Fix DiscoveredDatapack#getSource (#11928)
PaperMC/Paper@b34ae4f Fix wolves ignoring result of damage event (#11932)
PaperMC/Paper@efdcaa2 Fix removing the "LootTable" nbt tag from Block entities (#11929)
PaperMC/Paper@55f3f28 Reimplement ItemStack Obfuscation (#11817)
PaperMC/Paper@08fc33c Update CustomTimingsHandler Nag Message (#11923)
PaperMC/Paper@5e14504 [ci skip] Add missing deprecated docs for isEnabledByFeature (#11938)
PaperMC/Paper@4007171 Correct obfuscation of oversized items (#11944)
PaperMC/Paper@1b38f28 Fix reading recipes used on furnace (#11947)
PaperMC/Paper@b03d39b [ci skip] Update paperweight to 2.0.0-beta.13
PaperMC/Paper@6316a50 Make CraftServer#isPrimaryThread use TickThread check
PaperMC/Paper@ea7b961 Fix MapItem incorectly fetching water biomes on treasure maps (#11936)
PaperMC/Paper@b242f1e Prevent day cycle on the client when using fixed time (#11924)
PaperMC/Paper@3e42518 Fix snow accumulating in custom biomes without precipitation (#11854)
PaperMC/Paper@3d9ecc4 Log thread check parameters when the thread check fails
PaperMC/Paper@3ad3fbc Update to Concurrentutil 0.0.3
PaperMC/Paper@79ffcd1 Fix vanilla parity on enchantable items with no targets (#11896)
PaperMC/Paper@19ddbef Fix InventoryAction wrong for Bundles (#11902)
PaperMC/Paper@ac3aaa2 Don't use delayed registries in impl anywhere (#11918)
PaperMC/Paper@775002a [ci skip] Remove nullable from SyncedEntityData#packAll (#11949)
PaperMC/Paper@c949225 MenuType API addition InventoryView Builders (#11816)
PaperMC/Paper@c2f24e1 Feat: Add 'with' methods to CommandSourceStack (#11868)
PaperMC/Paper@ed75b0e Disallow calling JavaPlugin#getCommand during onEnable for Paper plugins (#11914)
PaperMC/Paper@08ac057 Rename getPotentialBedLocation to getPotentialRespawnLocation (#11950)
PaperMC/Paper@9746d73 Add back known movement check
PaperMC/Paper@e5542cf Hide unnecessary decorated pot data (#11957)
PaperMC/Paper@eb4db79 Make CommandSourceStack respect hidden players (#11898)
PaperMC/Paper@76617dd Add EntityEffectTickEvent (#11838)
PaperMC/Paper@86c6308 Fix locate command dist overflow/underflow (#11956)
PaperMC/Paper@2ea6aee Deprecate Turtle#isDigging (#11959)
PaperMC/Paper@ad74b67 Fix client visual desync if cooldown events are cancelled (#11892)
PaperMC/Paper@50c2c59 Fix unstable Suggestion comparison by sorting int suggestions before text ones (#11941)
PaperMC/Paper@3709150 Expose all possible block data states (#11958)
PaperMC/Paper@5e23d28 Remove entity tag selector tag completion fix (#11964)
PaperMC/Paper@ab1b312 Call PlayerItemDamageEvent for tridents (#11899)
PaperMC/Paper@1bb3677 Remove deprecation from EntityRemoveEvent (#11961)
PaperMC/Paper@d69981b [ci skip] Remove redundant build configuration
PaperMC/Paper@6fde26d remove .paperassetsroot
PaperMC/Paper@fe75eaf split direct holder support up from ctor accepting Holder
This commit is contained in:
granny
2025-01-14 01:19:08 -08:00
committed by granny
parent a415bf72de
commit 6e45786e29
50 changed files with 163 additions and 153 deletions

View File

@@ -37,7 +37,7 @@
// Paper start - fix DamageSource API
@Nullable
public Entity getCustomEventDamager() {
@@ -116,6 +_,8 @@
@@ -118,6 +_,8 @@
damageSource.sweep = this.isSweep();
damageSource.poison = this.isPoison();
damageSource.melting = this.isMelting();
@@ -46,7 +46,7 @@
return damageSource;
}
// CraftBukkit end
@@ -182,11 +_,20 @@
@@ -184,11 +_,20 @@
} else {
Component component = this.causingEntity == null ? this.directEntity.getDisplayName() : this.causingEntity.getDisplayName();
ItemStack itemStack = this.causingEntity instanceof LivingEntity livingEntity1 ? livingEntity1.getMainHandItem() : ItemStack.EMPTY;

View File

@@ -88,7 +88,7 @@
if (this.getVehicle() instanceof AbstractBoat abstractBoat && !abstractBoat.isUnderWater()) {
this.wasTouchingWater = false;
} else if (this.updateFluidHeightAndDoFluidPushing(FluidTags.WATER, 0.014)) {
@@ -2532,6 +_,13 @@
@@ -2525,6 +_,13 @@
compound.putBoolean("Paper.FreezeLock", true);
}
// Paper end
@@ -102,7 +102,7 @@
return compound;
} catch (Throwable var9) {
CrashReport crashReport = CrashReport.forThrowable(var9, "Saving entity NBT");
@@ -2681,6 +_,13 @@
@@ -2674,6 +_,13 @@
freezeLocked = compound.getBoolean("Paper.FreezeLock");
}
// Paper end
@@ -116,7 +116,7 @@
} catch (Throwable var17) {
CrashReport crashReport = CrashReport.forThrowable(var17, "Loading entity NBT");
CrashReportCategory crashReportCategory = crashReport.addCategory("Entity being loaded");
@@ -2922,6 +_,7 @@
@@ -2920,6 +_,7 @@
if (this.isAlive() && this instanceof Leashable leashable) {
if (leashable.getLeashHolder() == player) {
if (!this.level().isClientSide()) {
@@ -124,7 +124,7 @@
// CraftBukkit start - fire PlayerUnleashEntityEvent
// Paper start - Expand EntityUnleashEvent
org.bukkit.event.player.PlayerUnleashEntityEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerUnleashEntityEvent(this, player, hand, !player.hasInfiniteMaterials());
@@ -3247,15 +_,18 @@
@@ -3245,15 +_,18 @@
return Vec3.directionFromRotation(this.getRotationVector());
}
@@ -144,7 +144,7 @@
}
}
}
@@ -3460,7 +_,7 @@
@@ -3458,7 +_,7 @@
}
public int getMaxAirSupply() {
@@ -153,7 +153,7 @@
}
public int getAirSupply() {
@@ -3955,7 +_,7 @@
@@ -3953,7 +_,7 @@
// CraftBukkit end
public boolean canUsePortal(boolean allowPassengers) {
@@ -162,7 +162,7 @@
}
public boolean canTeleport(Level fromLevel, Level toLevel) {
@@ -4487,6 +_,12 @@
@@ -4485,6 +_,12 @@
return Mth.lerp(partialTick, this.yRotO, this.yRot);
}
@@ -175,7 +175,7 @@
// Paper start - optimise collisions
public boolean updateFluidHeightAndDoFluidPushing(final TagKey<Fluid> fluid, final double flowScale) {
if (this.touchingUnloadedChunk()) {
@@ -4885,7 +_,7 @@
@@ -4883,7 +_,7 @@
}
public float maxUpStep() {

View File

@@ -135,10 +135,10 @@
+ }
+ // Purpur end - Totems work in inventory
+
org.bukkit.inventory.EquipmentSlot handSlot = (hand != null) ? org.bukkit.craftbukkit.CraftEquipmentSlot.getHand(hand) : null;
EntityResurrectEvent event = new EntityResurrectEvent((org.bukkit.entity.LivingEntity) this.getBukkitEntity(), handSlot);
final org.bukkit.inventory.EquipmentSlot handSlot = (hand != null) ? org.bukkit.craftbukkit.CraftEquipmentSlot.getHand(hand) : null;
final EntityResurrectEvent event = new EntityResurrectEvent((org.bukkit.entity.LivingEntity) this.getBukkitEntity(), handSlot);
event.setCancelled(itemStack == null);
@@ -1788,6 +_,7 @@
@@ -1790,6 +_,7 @@
boolean flag = this.lastHurtByPlayerTime > 0;
this.dropEquipment(level); // CraftBukkit - from below
if (this.shouldDropLoot() && level.getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT)) {
@@ -146,7 +146,7 @@
this.dropFromLootTable(level, damageSource, flag);
// Paper start
final boolean prev = this.clearEquipmentSlots;
@@ -1796,6 +_,7 @@
@@ -1798,6 +_,7 @@
// Paper end
this.dropCustomDeathLoot(level, damageSource, flag);
this.clearEquipmentSlots = prev; // Paper
@@ -154,7 +154,7 @@
}
// CraftBukkit start - Call death event // Paper start - call advancement triggers with correct entity equipment
@@ -2987,6 +_,7 @@
@@ -2989,6 +_,7 @@
float f = (float)(d * 10.0 - 3.0);
if (f > 0.0F) {
this.playSound(this.getFallDamageSound((int)f), 1.0F, 1.0F);
@@ -162,7 +162,7 @@
this.hurt(this.damageSources().flyIntoWall(), f);
}
}
@@ -4396,6 +_,12 @@
@@ -4398,6 +_,12 @@
? slot == EquipmentSlot.MAINHAND && this.canUseSlot(EquipmentSlot.MAINHAND)
: slot == equippable.slot() && this.canUseSlot(equippable.slot()) && equippable.canBeEquippedBy(this.getType());
}

View File

@@ -61,7 +61,7 @@
list.add(entity);
} else if (!entity.isRemoved()) {
this.touch(entity);
@@ -1264,7 +_,7 @@
@@ -1269,7 +_,7 @@
flag2 = flag2 && !this.level().paperConfig().entities.behavior.disablePlayerCrits; // Paper - Toggleable player crits
if (flag2) {
damageSource = damageSource.critical(true); // Paper start - critical damage API
@@ -70,7 +70,7 @@
}
float f2 = f + f1;
@@ -1877,7 +_,23 @@
@@ -1882,7 +_,23 @@
@Override
protected int getBaseExperienceReward(ServerLevel level) {
@@ -95,7 +95,7 @@
}
@Override
@@ -1960,6 +_,13 @@
@@ -1965,6 +_,13 @@
public boolean canUseSlot(EquipmentSlot slot) {
return slot != EquipmentSlot.BODY;
}

View File

@@ -40,7 +40,7 @@
this.addStandardInventorySlots(playerInventory, 8, 84);
this.addDataSlot(DataSlot.shared(this.costs, 0));
this.addDataSlot(DataSlot.shared(this.costs, 1));
@@ -292,7 +_,7 @@
@@ -294,7 +_,7 @@
@Override
public void removed(Player player) {
super.removed(player);

View File

@@ -43,7 +43,7 @@
public int getDamageValue() {
return Mth.clamp(this.getOrDefault(DataComponents.DAMAGE, Integer.valueOf(0)), 0, this.getMaxDamage());
}
@@ -1232,6 +_,12 @@
@@ -1251,6 +_,12 @@
public boolean isEnchanted() {
return !this.getOrDefault(DataComponents.ENCHANTMENTS, ItemEnchantments.EMPTY).isEmpty();
}

View File

@@ -9,16 +9,16 @@
return InteractionResult.SUCCESS_SERVER;
} else if (state.getValue(OCCUPIED)) {
if (!BedBlock.canSetSpawn(level)) return this.explodeBed(state, level, pos); // Paper - check explode first
@@ -152,7 +_,7 @@
@@ -148,7 +_,7 @@
}
Vec3 vec3d = blockposition.getCenter();
- world.explode(null, world.damageSources().badRespawnPointExplosion(vec3d, blockState), null, vec3d, 5.0F, true, Level.ExplosionInteraction.BLOCK); // CraftBukkit - add state
+ if (world.purpurConfig.bedExplode) world.explode(null, world.damageSources().badRespawnPointExplosion(vec3d, blockState), null, vec3d, (float) world.purpurConfig.bedExplosionPower, world.purpurConfig.bedExplosionFire, world.purpurConfig.bedExplosionEffect); // CraftBukkit - add state // Purpur - Implement bed explosion options
return InteractionResult.SUCCESS;
}
}
@@ -175,7 +_,7 @@
Vec3 center = pos.getCenter();
- level.explode(null, level.damageSources().badRespawnPointExplosion(center, blockState), null, center, 5.0F, true, Level.ExplosionInteraction.BLOCK); // CraftBukkit - add state
+ if (level.purpurConfig.bedExplode) level.explode(null, level.damageSources().badRespawnPointExplosion(center, blockState), null, center, (float) level.purpurConfig.bedExplosionPower, level.purpurConfig.bedExplosionFire, level.purpurConfig.bedExplosionEffect); // CraftBukkit - add state // Purpur - Implement bed explosion options
return InteractionResult.SUCCESS_SERVER;
}
// CraftBukkit end
@@ -169,7 +_,7 @@
@Override
public void fallOn(Level level, BlockState state, BlockPos pos, Entity entity, float fallDistance) {

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/world/level/block/BushBlock.java
+++ b/net/minecraft/world/level/block/BushBlock.java
@@ -62,4 +_,24 @@
@@ -61,4 +_,24 @@
protected boolean isPathfindable(BlockState state, PathComputationType pathComputationType) {
return pathComputationType == PathComputationType.AIR && !this.hasCollision || super.isPathfindable(state, pathComputationType);
}

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/world/level/block/ChestBlock.java
+++ b/net/minecraft/world/level/block/ChestBlock.java
@@ -361,6 +_,7 @@
@@ -357,6 +_,7 @@
}
public static boolean isBlockedChestByBlock(BlockGetter level, BlockPos pos) {

View File

@@ -6,6 +6,6 @@
private void playNote(@Nullable Entity entity, BlockState state, Level level, BlockPos pos) {
- if (state.getValue(INSTRUMENT).worksAboveNoteBlock() || level.getBlockState(pos.above()).isAir()) {
+ if (level.purpurConfig.noteBlockIgnoreAbove || state.getValue(INSTRUMENT).worksAboveNoteBlock() || level.getBlockState(pos.above()).isAir()) { // Purpur - Config to allow Note Block sounds when blocked
// CraftBukkit start
// org.bukkit.event.block.NotePlayEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callNotePlayEvent(world, pos, state.getValue(NoteBlock.INSTRUMENT), state.getValue(NoteBlock.NOTE));
// if (event.isCancelled()) {
level.blockEvent(pos, this, 0, 0);
level.gameEvent(entity, GameEvent.NOTE_BLOCK_PLAY, pos);
}

View File

@@ -37,7 +37,7 @@
}
@@ -310,6 +_,28 @@
// CraftBukkit - this
return new CommandSourceStack(commandSource, Vec3.atCenterOf(pos), Vec2.ZERO, (ServerLevel) world, 2, string, component, world.getServer(), player); // Paper - Fix commands from signs not firing command events
return new CommandSourceStack(commandSource, Vec3.atCenterOf(pos), Vec2.ZERO, (ServerLevel)level, 2, string, component, level.getServer(), player); // Paper - Fix commands from signs not firing command events
}
+
+ // Purpur start - Signs allow color codes

View File

@@ -1,17 +1,15 @@
--- a/net/minecraft/world/level/material/WaterFluid.java
+++ b/net/minecraft/world/level/material/WaterFluid.java
@@ -74,6 +_,14 @@
@@ -74,6 +_,12 @@
protected boolean canConvertToSource(ServerLevel level) {
return level.getGameRules().getBoolean(GameRules.RULE_WATER_SOURCE_CONVERSION);
}
+
+ // Purpur start - Implement infinite liquids
+ @Override
+ protected int getRequiredSources(Level level) {
+ return level.purpurConfig.waterInfiniteRequiredSources;
+ }
+ // Purpur end - Implement infinite liquids
+
// Paper start - Add BlockBreakBlockEvent
@Override
protected void beforeDestroyingBlock(LevelAccessor world, BlockPos pos, BlockState state, BlockPos source) {
protected void beforeDestroyingBlock(LevelAccessor level, BlockPos pos, BlockState state, BlockPos source) {