signing off for now

This commit is contained in:
Jake Potrebic 2023-06-07 19:12:38 -07:00
parent 47c5d82017
commit 13ab8b77d3
No known key found for this signature in database
GPG key ID: ECE0B3C133C016C5
17 changed files with 61 additions and 62 deletions

View file

@ -81,7 +81,7 @@ index 0000000000000000000000000000000000000000..cf9d28ea97d93cec05c9fb768d59e283
+ }
+}
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
index ec47babe5f34198ae213679d4a4b2bc27bdc1eab..bb0c75d5e2e642576fb19a03e71ac692912d76b1 100644
index fea31b187fd5965bf479548835e5603e78f3f3f1..a618c80fb5a184c2a06ccb7ac3cf55d9151a9fe1 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
@@ -570,6 +570,18 @@ public final class CraftMagicNumbers implements UnsafeValues {

View file

@ -81,10 +81,10 @@ index 0000000000000000000000000000000000000000..b9c24b8d83b96d8c66cdf879650027f4
+ }
+}
diff --git a/src/main/java/net/minecraft/advancements/Advancement.java b/src/main/java/net/minecraft/advancements/Advancement.java
index 3c3a387e6693e06d5412e55a396b73028ee3330a..31ef13a708db2e4a664b30090a562eb6e4597bab 100644
index 72e09d3472af376b1b7aa50c3d9ab3d837a2bed3..81359be381fc9bcb56a9cc83e70a6afa6e838c6a 100644
--- a/src/main/java/net/minecraft/advancements/Advancement.java
+++ b/src/main/java/net/minecraft/advancements/Advancement.java
@@ -53,8 +53,16 @@ public class Advancement {
@@ -55,8 +55,16 @@ public class Advancement {
parent.addChild(this);
}
@ -103,7 +103,7 @@ index 3c3a387e6693e06d5412e55a396b73028ee3330a..31ef13a708db2e4a664b30090a562eb6
} else {
Component ichatbasecomponent = display.getTitle();
ChatFormatting enumchatformat = display.getFrame().getChatColor();
@@ -63,7 +71,7 @@ public class Advancement {
@@ -65,7 +73,7 @@ public class Advancement {
return chatmodifier.withHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, ichatmutablecomponent));
});

View file

@ -5,10 +5,10 @@ Subject: [PATCH] Add ItemFactory#getSpawnEgg API
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
index 69d5a9923d1eff576bd3058d6bcc278340d069ca..8c1bf102fea9e5441a685530155a3170becd7f9c 100644
index f5610d0746b67dfe69dc79d71c4d082c083f2ee4..b32c06b1f03751c164da7049976c473dff20e4ef 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
@@ -506,5 +506,17 @@ public final class CraftItemFactory implements ItemFactory {
@@ -508,5 +508,17 @@ public final class CraftItemFactory implements ItemFactory {
entity.getUniqueId().toString(),
new net.md_5.bungee.api.chat.TextComponent(customName));
}

View file

@ -5,7 +5,7 @@ Subject: [PATCH] Add critical damage API
diff --git a/src/main/java/net/minecraft/world/damagesource/DamageSource.java b/src/main/java/net/minecraft/world/damagesource/DamageSource.java
index 9ec30af85095a9993076dafacbecc21b580d06ce..72d62387bfdcbf8e69fe433145be81fbe3bb051a 100644
index df8c88bfa749e02f633350446101dcce05db7ac1..1a0f86b5a632469942e33c237c247d2d1dee4a3d 100644
--- a/src/main/java/net/minecraft/world/damagesource/DamageSource.java
+++ b/src/main/java/net/minecraft/world/damagesource/DamageSource.java
@@ -191,4 +191,18 @@ public class DamageSource {
@ -28,19 +28,19 @@ index 9ec30af85095a9993076dafacbecc21b580d06ce..72d62387bfdcbf8e69fe433145be81fb
+ // Paper end
}
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
index 997b2458a3e14296437e76737b837d90d4936072..6416cd9a20a40c24b3182891da04d660f9fa9aee 100644
index 8f604924b47ed4027f4212007530b6d0c39f73a9..fd39c81ab54e07630fa12e9e451dcd9b529db446 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
@@ -1261,7 +1261,7 @@ public abstract class Player extends LivingEntity {
@@ -1262,7 +1262,7 @@ public abstract class Player extends LivingEntity {
flag1 = true;
}
- boolean flag2 = flag && this.fallDistance > 0.0F && !this.onGround && !this.onClimbable() && !this.isInWater() && !this.hasEffect(MobEffects.BLINDNESS) && !this.isPassenger() && target instanceof LivingEntity;
+ boolean flag2 = flag && this.fallDistance > 0.0F && !this.onGround && !this.onClimbable() && !this.isInWater() && !this.hasEffect(MobEffects.BLINDNESS) && !this.isPassenger() && target instanceof LivingEntity; // Paper - Add critical damage API - conflict on change
- boolean flag2 = flag && this.fallDistance > 0.0F && !this.onGround() && !this.onClimbable() && !this.isInWater() && !this.hasEffect(MobEffects.BLINDNESS) && !this.isPassenger() && target instanceof LivingEntity;
+ boolean flag2 = flag && this.fallDistance > 0.0F && !this.onGround() && !this.onClimbable() && !this.isInWater() && !this.hasEffect(MobEffects.BLINDNESS) && !this.isPassenger() && target instanceof LivingEntity; // Paper - Add critical damage API - conflict on change
flag2 = flag2 && !level.paperConfig().entities.behavior.disablePlayerCrits; // Paper
flag2 = flag2 && !this.level().paperConfig().entities.behavior.disablePlayerCrits; // Paper
flag2 = flag2 && !this.isSprinting();
@@ -1301,7 +1301,7 @@ public abstract class Player extends LivingEntity {
@@ -1302,7 +1302,7 @@ public abstract class Player extends LivingEntity {
}
Vec3 vec3d = target.getDeltaMovement();
@ -49,7 +49,7 @@ index 997b2458a3e14296437e76737b837d90d4936072..6416cd9a20a40c24b3182891da04d660
if (flag5) {
if (i > 0) {
@@ -1329,7 +1329,7 @@ public abstract class Player extends LivingEntity {
@@ -1330,7 +1330,7 @@ public abstract class Player extends LivingEntity {
if (entityliving != this && entityliving != target && !this.isAlliedTo((Entity) entityliving) && (!(entityliving instanceof ArmorStand) || !((ArmorStand) entityliving).isMarker()) && this.distanceToSqr((Entity) entityliving) < 9.0D) {
// CraftBukkit start - Only apply knockback if the damage hits
@ -59,7 +59,7 @@ index 997b2458a3e14296437e76737b837d90d4936072..6416cd9a20a40c24b3182891da04d660
}
// CraftBukkit end
diff --git a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java
index 6486fa86e4bf3c90c09c0425d825bab568a68757..8257563afc3fe04c9e821da363b1f3f66de63ad7 100644
index a0d688128a1268fa1acf7c339cde15df5dce1c82..372b9ec0c8eddf4a01b4b8203a88401db22affbf 100644
--- a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java
+++ b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java
@@ -372,6 +372,7 @@ public abstract class AbstractArrow extends Projectile {
@ -71,7 +71,7 @@ index 6486fa86e4bf3c90c09c0425d825bab568a68757..8257563afc3fe04c9e821da363b1f3f6
int k = entity.getRemainingFireTicks();
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index 0e8029a9beeb8bee245f1c94c8ee596ec0131177..4c957ccae26fcad437234051481e2a1824d17f76 100644
index 7ef3e4dd903c77fd6112e90999a474ff674a5e7f..20e1efcadd4a11bab8a0db48410229e4a4d5ce57 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -988,7 +988,7 @@ public class CraftEventFactory {
@ -89,7 +89,7 @@ index 0e8029a9beeb8bee245f1c94c8ee596ec0131177..4c957ccae26fcad437234051481e2a18
- return CraftEventFactory.callEntityDamageEvent(damager, entity, cause, modifiers, modifierFunctions, cancelled);
+ return CraftEventFactory.callEntityDamageEvent(damager, entity, cause, modifiers, modifierFunctions, cancelled, source.isCritical()); // Paper - add critical damage API
} else if (source.is(DamageTypes.OUT_OF_WORLD)) {
} else if (source.is(DamageTypes.FELL_OUT_OF_WORLD)) {
EntityDamageEvent event = new EntityDamageByBlockEvent(null, entity.getBukkitEntity(), DamageCause.VOID, modifiers, modifierFunctions);
event.setCancelled(cancelled);
@@ -1090,7 +1090,7 @@ public class CraftEventFactory {

View file

@ -5,7 +5,7 @@ Subject: [PATCH] Fix issues with mob conversion
diff --git a/src/main/java/net/minecraft/world/entity/monster/Skeleton.java b/src/main/java/net/minecraft/world/entity/monster/Skeleton.java
index e799714e562d2653c75604b7331487e5f3c42067..badde621357a567965f0ef203e402e21bed09059 100644
index e88af2dcc0f7fc5190654e2640f67d706e6c8c81..8b818a7cb835512c4bd2ea9641d4bfd904150332 100644
--- a/src/main/java/net/minecraft/world/entity/monster/Skeleton.java
+++ b/src/main/java/net/minecraft/world/entity/monster/Skeleton.java
@@ -90,10 +90,15 @@ public class Skeleton extends AbstractSkeleton {
@ -13,10 +13,9 @@ index e799714e562d2653c75604b7331487e5f3c42067..badde621357a567965f0ef203e402e21
protected void doFreezeConversion() {
- this.convertTo(EntityType.STRAY, true, org.bukkit.event.entity.EntityTransformEvent.TransformReason.FROZEN, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.FROZEN); // CraftBukkit - add spawn and transform reasons
- if (!this.isSilent()) {
+ Stray stray = this.convertTo(EntityType.STRAY, true, org.bukkit.event.entity.EntityTransformEvent.TransformReason.FROZEN, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.FROZEN); // CraftBukkit - add spawn and transform reasons // Paper - track result of conversion
+ if (stray != null && !this.isSilent()) { // Paper - only send event if conversion succeeded
this.level.levelEvent((Player) null, 1048, this.blockPosition(), 0);
if (!this.isSilent()) {
this.level().levelEvent((Player) null, 1048, this.blockPosition(), 0);
}
+ // Paper start - reset conversion time to prevent event spam
+ if (stray == null) {
@ -27,7 +26,7 @@ index e799714e562d2653c75604b7331487e5f3c42067..badde621357a567965f0ef203e402e21
}
diff --git a/src/main/java/net/minecraft/world/entity/monster/hoglin/Hoglin.java b/src/main/java/net/minecraft/world/entity/monster/hoglin/Hoglin.java
index 45741410a13cffe3419e34b5607b048bbcf1c3ff..5d3b3cb3a882eb5d716f678095a65b28d0967476 100644
index 98c41e87b644f79ebfd45af2e0d7b887a3f5d00b..e8f6c34ea789136d63c0aa88aec90203ef6282b5 100644
--- a/src/main/java/net/minecraft/world/entity/monster/hoglin/Hoglin.java
+++ b/src/main/java/net/minecraft/world/entity/monster/hoglin/Hoglin.java
@@ -239,6 +239,11 @@ public class Hoglin extends Animal implements Enemy, HoglinBase {
@ -43,7 +42,7 @@ index 45741410a13cffe3419e34b5607b048bbcf1c3ff..5d3b3cb3a882eb5d716f678095a65b28
}
diff --git a/src/main/java/net/minecraft/world/entity/monster/piglin/AbstractPiglin.java b/src/main/java/net/minecraft/world/entity/monster/piglin/AbstractPiglin.java
index 5df28bd2d4e2d3c3c28bc35179e098289ecd07c5..67c012476519d93e2a4529b6cdccb0f1e53b52ad 100644
index e7282012420da3be738ad47c2b15d7455bc2503f..ed7c5c38502781325610e4d97407024e143bb7b0 100644
--- a/src/main/java/net/minecraft/world/entity/monster/piglin/AbstractPiglin.java
+++ b/src/main/java/net/minecraft/world/entity/monster/piglin/AbstractPiglin.java
@@ -113,6 +113,11 @@ public abstract class AbstractPiglin extends Monster {

View file

@ -7,12 +7,12 @@ Subject: [PATCH] Add isCollidable methods to various places
public net.minecraft.world.level.block.state.BlockBehaviour hasCollision
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
index 9fa50da214ad9a134008c91e1e07223904a8e6a3..d0102a0e7cf3a52b5a2a89f2dc0994fa463eb8c8 100644
index e7e5c9fa734072e9ae15eb5f6d75c7740ba3ba44..8131c1db3d7963121a24348575ea8a98a80a974c 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
@@ -484,6 +484,11 @@ public class CraftBlock implements Block {
public boolean isSolid() {
return getNMS().getMaterial().blocksMotion();
return this.getNMS().blocksMotion();
}
+
+ @Override
@ -39,7 +39,7 @@ index 9068557ac50cfb26e7e3ec4ac64bac583baa582e..3e1d36a8c65e6567ac3b78903a25d582
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
index bb0c75d5e2e642576fb19a03e71ac692912d76b1..c47821a81b9367e1c59d8428384bfd4752d0303e 100644
index a618c80fb5a184c2a06ccb7ac3cf55d9151a9fe1..6a048eaf63dec0d061265e639088055c60fbd834 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
@@ -582,6 +582,12 @@ public final class CraftMagicNumbers implements UnsafeValues {

View file

@ -5,7 +5,7 @@ Subject: [PATCH] Goat ram API
diff --git a/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java b/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java
index fc153a40ebdc840b92a9ec54284a4cbea25bcff4..a0a34f5db4260d77325cfbba9c736726a8f5a5db 100644
index 923ac08708de02c0e83a5745b65e901965000d65..316823ea978b9c9b6656a01254c201fdd8c11797 100644
--- a/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java
+++ b/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java
@@ -384,4 +384,15 @@ public class Goat extends Animal {

View file

@ -5,10 +5,10 @@ Subject: [PATCH] Add Raw Byte Entity Serialization
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index d2f93f6cf5ff5a0ee5de18d4e593c1423e191d14..c79f7de53d8d61044a756b2a973f71bb5af74bfc 100644
index cd57b071a7cfd6ace4457dddc82367735e64e952..77de7e9b8c4c9aa0e5138f816af57aed6d358953 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -2019,6 +2019,15 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -2054,6 +2054,15 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
}
}
@ -25,7 +25,7 @@ index d2f93f6cf5ff5a0ee5de18d4e593c1423e191d14..c79f7de53d8d61044a756b2a973f71bb
return this.isPassenger() ? false : this.saveAsPassenger(nbt);
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
index f5b199b3cdccbe7d8a3331555469c622c853fd03..b1a578f23a21303f79f443107e7a9bea903310f4 100644
index 9155af9c7e001d4cb431e74b12c9d98227011d51..4628f436e054ab79daa11b3921f66acfc0faa325 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -1367,5 +1367,15 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
@ -45,7 +45,7 @@ index f5b199b3cdccbe7d8a3331555469c622c853fd03..b1a578f23a21303f79f443107e7a9bea
// Paper end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
index c47821a81b9367e1c59d8428384bfd4752d0303e..707f50536a3915a68ee8ac09a74ecfebbd5a94dd 100644
index 6a048eaf63dec0d061265e639088055c60fbd834..a6564c7d69999c55abc4292cab9182390a52e749 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
@@ -493,6 +493,29 @@ public final class CraftMagicNumbers implements UnsafeValues {

View file

@ -33,10 +33,10 @@ index 899008b2980d13f1be6280cd8cb959c53a29bebf..f875507241ac6769545e91cd3285232b
private RedirectModifier<S> modifier = null;
private boolean forks;
diff --git a/src/main/java/net/minecraft/commands/Commands.java b/src/main/java/net/minecraft/commands/Commands.java
index 677b4a54d2a5ff9eb77d15e05582439ef3c5d3f2..01ba9dfaaa07569e1ca4bf40497070f49eae36ce 100644
index 14c78028ff51fff6f24174ae16b7c42d34d6041a..7592b592a541912f729d6b99f455cd87ebcb34b8 100644
--- a/src/main/java/net/minecraft/commands/Commands.java
+++ b/src/main/java/net/minecraft/commands/Commands.java
@@ -229,6 +229,13 @@ public class Commands {
@@ -231,6 +231,13 @@ public class Commands {
}
this.vanillaCommandNodes.addAll(this.dispatcher.getRoot().getChildren()); // Paper

View file

@ -9,10 +9,10 @@ chunk through it. This should also be OK from a leak prevention/
state desync POV because the TE is getting unloaded anyways.
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index f12d844d422ca4175d4cb2b8e3112b590a207a16..834e5d2ef6045ef703321852f988db3fbf6cbba2 100644
index ebce1f6331ab31b7dea1d4f46ff278c4907cdbea..6c6b337ecfa7ffde521b1e42e851f5f75022b755 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -1412,9 +1412,13 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -1321,9 +1321,13 @@ public class ServerLevel extends Level implements WorldGenLevel {
// Spigot Start
for (net.minecraft.world.level.block.entity.BlockEntity tileentity : chunk.getBlockEntities().values()) {
if (tileentity instanceof net.minecraft.world.Container) {
@ -28,10 +28,10 @@ index f12d844d422ca4175d4cb2b8e3112b590a207a16..834e5d2ef6045ef703321852f988db3f
}
// Spigot End
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index c966f3f2e3176b47063dec03e7aaa4e809fd4de3..e9e30baefc1feec81fbe866cf5b6e5133c848112 100644
index 096a8c7c6559bf252d8dbba09a33e97fd8a0b4af..3d3399532d97d3f62282057a18e64b643f29b7c4 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -1575,6 +1575,18 @@ public class ServerPlayer extends Player {
@@ -1573,6 +1573,18 @@ public class ServerPlayer extends Player {
this.connection.send(new ClientboundContainerClosePacket(this.containerMenu.containerId));
this.doCloseContainer();
}
@ -51,10 +51,10 @@ index c966f3f2e3176b47063dec03e7aaa4e809fd4de3..e9e30baefc1feec81fbe866cf5b6e513
@Override
public void doCloseContainer() {
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
index 6416cd9a20a40c24b3182891da04d660f9fa9aee..4f9931ecdea8742db9e1db78143168d69ee635fb 100644
index fd39c81ab54e07630fa12e9e451dcd9b529db446..b69e0cd17467752707a33540cd6113dc21554ca1 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
@@ -502,6 +502,11 @@ public abstract class Player extends LivingEntity {
@@ -503,6 +503,11 @@ public abstract class Player extends LivingEntity {
this.containerMenu = this.inventoryMenu;
}
// Paper end

View file

@ -17,10 +17,10 @@ Async catch modifications to critical entity state
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index adffa10ad47d1c2a9479ca91073a12e61538a608..f41c376b0f6d858fabe46834fff5049da48c732e 100644
index 8342fa795a4813ca5a4292c4933f01f8b4a5a4f3..8514ecee5968070cd2770d7301834bbd6d65c2bb 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1654,6 +1654,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -1646,6 +1646,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
}
public void internalTeleport(double d0, double d1, double d2, float f, float f1, Set<RelativeMovement> set) { // Paper
@ -29,10 +29,10 @@ index adffa10ad47d1c2a9479ca91073a12e61538a608..f41c376b0f6d858fabe46834fff5049d
if (player.isRemoved()) {
LOGGER.info("Attempt to teleport removed player {} restricted", player.getScoreboardName());
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index a7046e42c1935e9a4e529726072d9f88caaa703a..7d100539ffd1c52c4bf514907a0cb1d848eb0236 100644
index 3017e7a6c2685e4ab82a425025c363133209222d..dffce1de1254f0194db2f28b797155846d3beeb0 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -1102,7 +1102,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -1120,7 +1120,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
}
public boolean addEffect(MobEffectInstance mobeffect, @Nullable Entity entity, EntityPotionEffectEvent.Cause cause) {
@ -42,7 +42,7 @@ index a7046e42c1935e9a4e529726072d9f88caaa703a..7d100539ffd1c52c4bf514907a0cb1d8
this.effectsToProcess.add(new ProcessableEffect(mobeffect, cause));
return true;
diff --git a/src/main/java/net/minecraft/world/level/entity/PersistentEntitySectionManager.java b/src/main/java/net/minecraft/world/level/entity/PersistentEntitySectionManager.java
index 038abf2ac104ceecaab11b10d466ea69ec86623e..a77985b2dd7137d8eea03909403fc08e89376d73 100644
index 47bab513feec217d875192afef61f3af95b93d24..d3fb277878adb26c7d80cf21f27070380fdfacd1 100644
--- a/src/main/java/net/minecraft/world/level/entity/PersistentEntitySectionManager.java
+++ b/src/main/java/net/minecraft/world/level/entity/PersistentEntitySectionManager.java
@@ -77,6 +77,7 @@ public class PersistentEntitySectionManager<T extends EntityAccess> implements A
@ -166,7 +166,7 @@ index 038abf2ac104ceecaab11b10d466ea69ec86623e..a77985b2dd7137d8eea03909403fc08e
PersistentEntitySectionManager.LOGGER.warn("Entity {} wasn't found in section {} (destroying due to {})", new Object[]{this.entity, SectionPos.of(this.currentSectionKey), reason});
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index cbb6b437358823cd52518682f32dd597c9aeb85a..205101e301bb4ea552459fe4e1f028f252136720 100644
index 1973a8ed75f9bacebebfa74dd2d06bf7d840ea4a..8b6cae9a005a6db608be85805382704ff5dc6669 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -455,6 +455,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
@ -178,12 +178,12 @@ index cbb6b437358823cd52518682f32dd597c9aeb85a..205101e301bb4ea552459fe4e1f028f2
return true;
}
diff --git a/src/main/java/org/spigotmc/AsyncCatcher.java b/src/main/java/org/spigotmc/AsyncCatcher.java
index 5409f230fdd53b70fc03c58177438534731ad4e6..c02a04d284734b5f545b64307ed4aea337c1465f 100644
index 7585a30e8f063ac2656b5de519b1e9edaceffbc7..0c41413ad32f8f6a094462fcd637dd3229abda45 100644
--- a/src/main/java/org/spigotmc/AsyncCatcher.java
+++ b/src/main/java/org/spigotmc/AsyncCatcher.java
@@ -12,6 +12,7 @@ public class AsyncCatcher
{
if ( !io.papermc.paper.util.TickThread.isTickThread() ) // Paper // Paper - rewrite chunk system
if ( (AsyncCatcher.enabled || io.papermc.paper.util.TickThread.STRICT_THREAD_CHECKS) && Thread.currentThread() != MinecraftServer.getServer().serverThread ) // Paper
{
+ MinecraftServer.LOGGER.error("Thread " + Thread.currentThread().getName() + " failed main thread check: " + reason, new Throwable()); // Paper
throw new IllegalStateException( "Asynchronous " + reason + "!" );

View file

@ -10,11 +10,11 @@ Also has a hover text on each mob category listing what entity types are
in said category
diff --git a/src/main/java/io/papermc/paper/command/PaperCommand.java b/src/main/java/io/papermc/paper/command/PaperCommand.java
index 6d56c812262f7f109598ef4a941d0226b1eb638a..db9567711f7e0ad1778d41e79b59e31916aa9f09 100644
index 65209c7d15fc1b51e20c4f18cd44d1f61c769d09..3d94b2e7187ce56dd615d8f30233597712ca3931 100644
--- a/src/main/java/io/papermc/paper/command/PaperCommand.java
+++ b/src/main/java/io/papermc/paper/command/PaperCommand.java
@@ -43,6 +43,7 @@ public final class PaperCommand extends Command {
commands.put(Set.of("debug", "chunkinfo", "holderinfo"), new ChunkDebugCommand());
@@ -42,6 +42,7 @@ public final class PaperCommand extends Command {
commands.put(Set.of("fixlight"), new FixLightCommand());
commands.put(Set.of("syncloadinfo"), new SyncLoadInfoCommand());
commands.put(Set.of("dumpitem"), new DumpItemCommand());
+ commands.put(Set.of("mobcaps", "playermobcaps"), new MobcapsCommand());
@ -257,7 +257,7 @@ index 0000000000000000000000000000000000000000..99c41a39cdad0271d089c6e03bebfdaf
+ }
+}
diff --git a/src/main/java/net/minecraft/world/level/NaturalSpawner.java b/src/main/java/net/minecraft/world/level/NaturalSpawner.java
index a1770e5ae4b3014c3538b52d4912c60864e186a8..906def91bba96bab7c7aea9b87d9ec56374e6588 100644
index a3461824fd2162d509facf6f64c5008e3f0fd42b..d4f99f4592a86e2d8344bc2c44711fef1543acdf 100644
--- a/src/main/java/net/minecraft/world/level/NaturalSpawner.java
+++ b/src/main/java/net/minecraft/world/level/NaturalSpawner.java
@@ -192,6 +192,16 @@ public final class NaturalSpawner {
@ -278,10 +278,10 @@ index a1770e5ae4b3014c3538b52d4912c60864e186a8..906def91bba96bab7c7aea9b87d9ec56
// Paper start - add parameters and int ret type
spawnCategoryForChunk(group, world, chunk, checker, runner, Integer.MAX_VALUE, null);
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index a77453e8390d6c9f656c7ae0ea413abfc7381070..084e107e8714c59182d9b4ae73c0c0f01622b191 100644
index 3e8266fce7fec1185620125874d8349dd180b727..4fbcaaa0bc01950e838534aa45ed640ce40db27c 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -2184,6 +2184,11 @@ public final class CraftServer implements Server {
@@ -2182,6 +2182,11 @@ public final class CraftServer implements Server {
@Override
public int getSpawnLimit(SpawnCategory spawnCategory) {
@ -294,10 +294,10 @@ index a77453e8390d6c9f656c7ae0ea413abfc7381070..084e107e8714c59182d9b4ae73c0c0f0
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 1c0cf2bb708e4333319fd3355d937a3dcc3c1ade..fd428e74e01e0e9da330e7997c684b8e6b2c8c76 100644
index fe27f31adb000ed5de86432dc4347cd19964e6f3..069f43b08b3f0d462758522ed7a485780debfe75 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -1698,9 +1698,14 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -1703,9 +1703,14 @@ public class CraftWorld extends CraftRegionAccessor implements World {
Validate.notNull(spawnCategory, "SpawnCategory cannot be null");
Validate.isTrue(CraftSpawnCategory.isValidForLimits(spawnCategory), "SpawnCategory." + spawnCategory + " are not supported.");

View file

@ -875,10 +875,10 @@ index 33fbf72b440e0d164ecd4fb0fdec72e2394d0a1e..8db20db72cd51046213625fac46c3585
BlockPos blockPos = path.getTarget();
Optional<Holder<PoiType>> optional = poiManager.getType(blockPos);
diff --git a/src/main/java/net/minecraft/world/entity/ai/village/poi/PoiManager.java b/src/main/java/net/minecraft/world/entity/ai/village/poi/PoiManager.java
index 440e4f35e38d38e5407a6fecf09ab9511a44a670..8950b220b9a3512cd4667beb7bdec0e82e07edc6 100644
index b18b896c624d5cadc02b1db9d011d82124d61d54..a0299e87bff5f86622efcc26530b9400ab928e44 100644
--- a/src/main/java/net/minecraft/world/entity/ai/village/poi/PoiManager.java
+++ b/src/main/java/net/minecraft/world/entity/ai/village/poi/PoiManager.java
@@ -127,43 +127,62 @@ public class PoiManager extends SectionStorage<PoiSection> {
@@ -111,43 +111,62 @@ public class PoiManager extends SectionStorage<PoiSection> {
}
public Optional<BlockPos> find(Predicate<Holder<PoiType>> typePredicate, Predicate<BlockPos> posPredicate, BlockPos pos, int radius, PoiManager.Occupancy occupationStatus) {
@ -961,7 +961,7 @@ index 440e4f35e38d38e5407a6fecf09ab9511a44a670..8950b220b9a3512cd4667beb7bdec0e8
public boolean release(BlockPos pos) {
diff --git a/src/main/java/net/minecraft/world/entity/ai/village/poi/PoiSection.java b/src/main/java/net/minecraft/world/entity/ai/village/poi/PoiSection.java
index 3fc17817906876e83f040f908b8b1ba6cfa37b8b..9f138bc471b5c2a4fa813ff943dbe34018b8df74 100644
index 795a02941d7cecb58ec45b5e79c8d510ff21163a..5308c8ddb9f2413d332fe30e1c303e6260eaa1aa 100644
--- a/src/main/java/net/minecraft/world/entity/ai/village/poi/PoiSection.java
+++ b/src/main/java/net/minecraft/world/entity/ai/village/poi/PoiSection.java
@@ -26,7 +26,7 @@ import org.slf4j.Logger;
@ -972,12 +972,12 @@ index 3fc17817906876e83f040f908b8b1ba6cfa37b8b..9f138bc471b5c2a4fa813ff943dbe340
+ private final Map<Holder<PoiType>, Set<PoiRecord>> byType = Maps.newHashMap(); public final Map<Holder<PoiType>, Set<PoiRecord>> getData() { return this.byType; } // Paper - public accessor
private final Runnable setDirty;
private boolean isValid;
public final Optional<PoiSection> noAllocateOptional = Optional.of(this); // Paper - rewrite chunk system
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/SectionStorage.java b/src/main/java/net/minecraft/world/level/chunk/storage/SectionStorage.java
index fc5901a257ffd6ec878d1acbf97b9e6be664c52e..82bdb2731c561e9802497214c20ca5193739bd7d 100644
index b0c8a0e64c7a5d41c1b4cc1e39c4399c142b56af..23de63d3a6746543cd4613e24055b6a807f0b078 100644
--- a/src/main/java/net/minecraft/world/level/chunk/storage/SectionStorage.java
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/SectionStorage.java
@@ -71,11 +71,11 @@ public class SectionStorage<R> extends RegionFileStorage implements AutoCloseabl
@@ -70,11 +70,11 @@ public class SectionStorage<R> implements AutoCloseable {
}
@Nullable
@ -992,7 +992,7 @@ index fc5901a257ffd6ec878d1acbf97b9e6be664c52e..82bdb2731c561e9802497214c20ca519
return Optional.empty();
} else {
diff --git a/src/main/java/net/minecraft/world/level/portal/PortalForcer.java b/src/main/java/net/minecraft/world/level/portal/PortalForcer.java
index faaf50cb9bce254aef554ed8b402b145532e12a4..92d13c9f1ec1e5ff72c1d68f924a8d1c86c91565 100644
index 33a6fda1e8f2df61b44f0e3ddda356ffa386f2df..1c71f0e21de3a12aa251b0f1739502212ec7b02d 100644
--- a/src/main/java/net/minecraft/world/level/portal/PortalForcer.java
+++ b/src/main/java/net/minecraft/world/level/portal/PortalForcer.java
@@ -51,18 +51,39 @@ public class PortalForcer {