mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-22 08:57:35 +01:00
More more more more more patches
This commit is contained in:
parent
7d7779a667
commit
addf9c9155
@ -8,12 +8,12 @@ This API has more capabilities than .dropItem with the Consumer function
|
||||
Item can be set inside of the Consumer pre spawn function.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java
|
||||
index 8fb3e18303abbedb9c07319d11619c39743cbaf8..9d247664e5867a31376b3681b7ed0c3404ea46d8 100644
|
||||
index c4f8d2c090e3cde562a2ab6103da53ded666599b..e395628ccf59c1b7a4efcabb3c38e8a879b95e38 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java
|
||||
@@ -543,6 +543,10 @@ public abstract class CraftRegionAccessor implements RegionAccessor {
|
||||
if (Boat.class.isAssignableFrom(clazz)) {
|
||||
entity = new net.minecraft.world.entity.vehicle.Boat(world, x, y, z);
|
||||
@@ -560,6 +560,10 @@ public abstract class CraftRegionAccessor implements RegionAccessor {
|
||||
entity = net.minecraft.world.entity.EntityType.BOAT.create(world);
|
||||
}
|
||||
entity.moveTo(x, y, z, yaw, pitch);
|
||||
+ // Paper start
|
||||
+ } else if (org.bukkit.entity.Item.class.isAssignableFrom(clazz)) {
|
@ -6,7 +6,7 @@ Subject: [PATCH] ItemStack#getMaxItemUseDuration
|
||||
Allows you to determine how long it takes to use a usable/consumable item
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
||||
index ba70ac49222c517a38e20e86cee1fd38aecb6318..967555b6a3ef833ca75215391b20744ab6f04359 100644
|
||||
index 3745033afb8923ce06cbf13b55c4e96f2a89573f..8b7d9ac312200b82b741a2c0ac26ec0710ea3cbc 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
||||
@@ -173,6 +173,13 @@ public final class CraftItemStack extends ItemStack {
|
@ -5,7 +5,7 @@ Subject: [PATCH] Implement EntityTeleportEndGatewayEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java
|
||||
index d336cf8f845a4d35a2d0a4cbe3b1b373fb00a970..4e47b641a2aae8e82890cda1bdb209803472b1d4 100644
|
||||
index 8a65d379a67630967d07d97fdc528838453763a9..befd35b0edf4a76b119f711f8536369a02abc1ba 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java
|
||||
@@ -224,9 +224,20 @@ public class TheEndGatewayBlockEntity extends TheEndPortalBlockEntity {
|
@ -21,10 +21,10 @@ check is essentially the same as this.getHandle() == other.getHandle()
|
||||
However, replaced it too to make it clearer of intent.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
index 5cc9370d31434f28730a44263e013e474413d534..20c753f5819652430e4fe7b9e3fd4a4b16fc3647 100644
|
||||
index e8922397c26617e8051ddfe6d80667b5c1041032..1adc2ad30b174465989c628c4306df011356c93c 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
@@ -795,14 +795,15 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
@@ -807,14 +807,15 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
return false;
|
||||
}
|
||||
final CraftEntity other = (CraftEntity) obj;
|
@ -19,10 +19,10 @@ index 0129a469d991225a0cef281e0e0eeb069fe4cfb5..ecb00a7fb5146296fe3087b1c7eedc34
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 2449cd753ec52b7e2d2213fcd3979d616a33c677..1610cf860b7f72a1ca8a1df69115d2f4bedc5d1b 100644
|
||||
index fc63d202e8cc28d5664c0f5749b195e3c1220cc9..51f7f1ee4242fc6bd8ff57c76052e1e75232bc34 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -3658,12 +3658,24 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -3697,12 +3697,24 @@ public abstract class LivingEntity extends Entity {
|
||||
if (this.isUsingItem() && !this.useItem.isEmpty()) {
|
||||
Item item = this.useItem.getItem();
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Improve EntityShootBowEvent
|
||||
Adds missing call to Illagers and also adds Arrow ItemStack to skeltons
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/AbstractSkeleton.java b/src/main/java/net/minecraft/world/entity/monster/AbstractSkeleton.java
|
||||
index 8829af99f0b4d7307e92cc1d91a01265dba17568..609380af4de4118a543b6ec94feb176e6f6870ed 100644
|
||||
index 3799834a1531cd7575ca5d8ea9f3429175b8384d..60064770f08cbee19eeb43bf7c144b6eefbc4888 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/AbstractSkeleton.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/AbstractSkeleton.java
|
||||
@@ -195,7 +195,7 @@ public abstract class AbstractSkeleton extends Monster implements RangedAttackMo
|
||||
@@ -198,7 +198,7 @@ public abstract class AbstractSkeleton extends Monster implements RangedAttackMo
|
||||
|
||||
entityarrow.shoot(d0, d1 + d3 * 0.20000000298023224D, d2, 1.6F, (float) (14 - this.level.getDifficulty().getId() * 4));
|
||||
// CraftBukkit start
|
@ -7,10 +7,10 @@ Called when a player is firing a bow and the server is choosing an arrow to use.
|
||||
Plugins can skip selection of certain arrows and control which is used.
|
||||
|
||||
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 7b81d77649997aeb97cd819f380bdfe848702164..61fb16c1a2a70d96b3d20708321d1984f7592494 100644
|
||||
index ff91d886f26dbce576ae70ab010ee99888595b85..0183d170f4a776eb0424adca6c57b37e96975db8 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
@@ -2204,6 +2204,17 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -2247,6 +2247,17 @@ public abstract class Player extends LivingEntity {
|
||||
return ImmutableList.of(Pose.STANDING, Pose.CROUCHING, Pose.SWIMMING);
|
||||
}
|
||||
|
||||
@ -28,7 +28,7 @@ index 7b81d77649997aeb97cd819f380bdfe848702164..61fb16c1a2a70d96b3d20708321d1984
|
||||
@Override
|
||||
public ItemStack getProjectile(ItemStack stack) {
|
||||
if (!(stack.getItem() instanceof ProjectileWeaponItem)) {
|
||||
@@ -2220,7 +2231,7 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -2263,7 +2274,7 @@ public abstract class Player extends LivingEntity {
|
||||
for (int i = 0; i < this.inventory.getContainerSize(); ++i) {
|
||||
ItemStack itemstack2 = this.inventory.getItem(i);
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Implement EntityKnockbackByEntityEvent
|
||||
This event is called when an entity receives knockback by another entity.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 1610cf860b7f72a1ca8a1df69115d2f4bedc5d1b..1cf4c80d03b8843be9abbb72baba8cde0bbd329b 100644
|
||||
index 51f7f1ee4242fc6bd8ff57c76052e1e75232bc34..eb9d45fd330ad4ed194ed593ca15ed579ddb2c54 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -1433,7 +1433,7 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -1456,7 +1456,7 @@ public abstract class LivingEntity extends Entity {
|
||||
}
|
||||
|
||||
this.hurtDir = (float) (Mth.atan2(d1, d0) * 57.2957763671875D - (double) this.getYRot());
|
||||
@ -18,7 +18,7 @@ index 1610cf860b7f72a1ca8a1df69115d2f4bedc5d1b..1cf4c80d03b8843be9abbb72baba8cde
|
||||
} else {
|
||||
this.hurtDir = (float) ((int) (Math.random() * 2.0D) * 180);
|
||||
}
|
||||
@@ -1481,7 +1481,7 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -1504,7 +1504,7 @@ public abstract class LivingEntity extends Entity {
|
||||
}
|
||||
|
||||
protected void blockedByShield(LivingEntity target) {
|
||||
@ -27,7 +27,7 @@ index 1610cf860b7f72a1ca8a1df69115d2f4bedc5d1b..1cf4c80d03b8843be9abbb72baba8cde
|
||||
}
|
||||
|
||||
private boolean checkTotemDeathProtection(DamageSource source) {
|
||||
@@ -1734,6 +1734,11 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -1757,6 +1757,11 @@ public abstract class LivingEntity extends Entity {
|
||||
}
|
||||
|
||||
public void knockback(double strength, double x, double z) {
|
||||
@ -39,7 +39,7 @@ index 1610cf860b7f72a1ca8a1df69115d2f4bedc5d1b..1cf4c80d03b8843be9abbb72baba8cde
|
||||
strength *= 1.0D - this.getAttributeValue(Attributes.KNOCKBACK_RESISTANCE);
|
||||
if (strength > 0.0D) {
|
||||
this.hasImpulse = true;
|
||||
@@ -1741,6 +1746,15 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -1764,6 +1769,15 @@ public abstract class LivingEntity extends Entity {
|
||||
Vec3 vec3d1 = (new Vec3(x, 0.0D, z)).normalize().scale(strength);
|
||||
|
||||
this.setDeltaMovement(vec3d.x / 2.0D - vec3d1.x, this.onGround ? Math.min(0.4D, vec3d.y / 2.0D + strength) : vec3d.y, vec3d.z / 2.0D - vec3d1.z);
|
||||
@ -56,10 +56,10 @@ index 1610cf860b7f72a1ca8a1df69115d2f4bedc5d1b..1cf4c80d03b8843be9abbb72baba8cde
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
index 09b2ac6b071fd7c55db6c940beab650ddc9d7f7e..c9d566750d3dc4660f17d3191637e256720bbe52 100644
|
||||
index 932f54d8a6db9455d9fd947baad0de7850ccd563..2bec7466fcd61731d4da1cefdea8c375def0be12 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
@@ -1553,7 +1553,7 @@ public abstract class Mob extends LivingEntity {
|
||||
@@ -1573,7 +1573,7 @@ public abstract class Mob extends LivingEntity {
|
||||
|
||||
if (flag) {
|
||||
if (f1 > 0.0F && target instanceof LivingEntity) {
|
||||
@ -69,23 +69,23 @@ index 09b2ac6b071fd7c55db6c940beab650ddc9d7f7e..c9d566750d3dc4660f17d3191637e256
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/ai/behavior/RamTarget.java b/src/main/java/net/minecraft/world/entity/ai/behavior/RamTarget.java
|
||||
index f6fd39823f04f8071c616d40a838b01e7159c5a1..e1cdf3ce38404d3f40be59e4cd3ad2b997d63310 100644
|
||||
index 3380b95e0eff5a6b1b683b8233b8991eb817b638..b6e1e2034edc771a3c67d1477e1b9a26af639db3 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/ai/behavior/RamTarget.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/ai/behavior/RamTarget.java
|
||||
@@ -75,7 +75,7 @@ public class RamTarget<E extends PathfinderMob> extends Behavior<E> {
|
||||
@@ -78,7 +78,7 @@ public class RamTarget extends Behavior<Goat> {
|
||||
float f = 0.25F * (float)(i - j);
|
||||
float g = Mth.clamp(pathfinderMob.getSpeed() * 1.65F, 0.2F, 3.0F) + f;
|
||||
float h = livingEntity.isDamageSourceBlocked(DamageSource.mobAttack(pathfinderMob)) ? 0.5F : 1.0F;
|
||||
- livingEntity.knockback((double)(h * g) * this.getKnockbackForce.applyAsDouble(pathfinderMob), this.ramDirection.x(), this.ramDirection.z());
|
||||
+ livingEntity.knockback((double)(h * g) * this.getKnockbackForce.applyAsDouble(pathfinderMob), this.ramDirection.x(), this.ramDirection.z(), pathfinderMob); // Paper
|
||||
this.finishRam(serverLevel, pathfinderMob);
|
||||
serverLevel.playSound((Player)null, pathfinderMob, this.getImpactSound.apply(pathfinderMob), SoundSource.HOSTILE, 1.0F, 1.0F);
|
||||
} else {
|
||||
float g = Mth.clamp(goat.getSpeed() * 1.65F, 0.2F, 3.0F) + f;
|
||||
float h = livingEntity.isDamageSourceBlocked(DamageSource.mobAttack(goat)) ? 0.5F : 1.0F;
|
||||
- livingEntity.knockback((double)(h * g) * this.getKnockbackForce.applyAsDouble(goat), this.ramDirection.x(), this.ramDirection.z());
|
||||
+ livingEntity.knockback((double)(h * g) * this.getKnockbackForce.applyAsDouble(goat), this.ramDirection.x(), this.ramDirection.z(), pathfinderMob); // Paper
|
||||
this.finishRam(serverLevel, goat);
|
||||
serverLevel.playSound((Player)null, goat, this.getImpactSound.apply(goat), SoundSource.HOSTILE, 1.0F, 1.0F);
|
||||
} else if (this.hasRammedHornBreakingBlock(serverLevel, goat)) {
|
||||
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 61fb16c1a2a70d96b3d20708321d1984f7592494..1a264c6f18235580bd1fba4e5243554b56503253 100644
|
||||
index 0183d170f4a776eb0424adca6c57b37e96975db8..11e7443bfdd178f23b08529d6c90988113b4ea5e 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
@@ -1252,7 +1252,7 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -1298,7 +1298,7 @@ public abstract class Player extends LivingEntity {
|
||||
if (flag5) {
|
||||
if (i > 0) {
|
||||
if (target instanceof LivingEntity) {
|
||||
@ -94,7 +94,7 @@ index 61fb16c1a2a70d96b3d20708321d1984f7592494..1a264c6f18235580bd1fba4e5243554b
|
||||
} else {
|
||||
target.push((double) (-Mth.sin(this.getYRot() * 0.017453292F) * (float) i * 0.5F), 0.1D, (double) (Mth.cos(this.getYRot() * 0.017453292F) * (float) i * 0.5F));
|
||||
}
|
||||
@@ -1276,7 +1276,7 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -1322,7 +1322,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
|
||||
if (entityliving.hurt(DamageSource.playerAttack(this).sweep(), f4)) {
|
@ -6,10 +6,10 @@ Subject: [PATCH] Expand Explosions API
|
||||
Add Entity as a Source capability, and add more API choices, and on Location.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index 4a83fa80d11a5ef840cd556f845b4de84b3ad5f1..ffcaf40f8e310ef4ed292dac673a4e1da6dff0ea 100644
|
||||
index d0835690571063ee40f05f897a526c3bffd6274b..65c0ba9b38df848646ddd2719850f955334abd7a 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -707,6 +707,12 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@@ -708,6 +708,12 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
public boolean createExplosion(double x, double y, double z, float power, boolean setFire, boolean breakBlocks, Entity source) {
|
||||
return !this.world.explode(source == null ? null : ((CraftEntity) source).getHandle(), x, y, z, power, setFire, breakBlocks ? Explosion.BlockInteraction.BREAK : Explosion.BlockInteraction.NONE).wasCanceled;
|
||||
}
|
@ -19,10 +19,10 @@ index ecb00a7fb5146296fe3087b1c7eedc34e7249e2c..f0b2c5ae854ee7f3321b2b39a3680af5
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java b/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java
|
||||
index 794a26485850626964a6ce968577348b60fe0042..f713a1fefb0d8505672d653cf67ead13e321144f 100644
|
||||
index fd2d78d8794c7f90abfbff4901cbe51513dbef0a..ec51369448a7f84ee65915ca97a0f22093126caa 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java
|
||||
@@ -88,6 +88,10 @@ public class EndDragonFight {
|
||||
@@ -89,6 +89,10 @@ public class EndDragonFight {
|
||||
private List<EndCrystal> respawnCrystals;
|
||||
|
||||
public EndDragonFight(ServerLevel world, long gatewaysSeed, CompoundTag nbt) {
|
@ -5,10 +5,10 @@ Subject: [PATCH] Implement World.getEntity(UUID) API
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index ffcaf40f8e310ef4ed292dac673a4e1da6dff0ea..b456bb99db2cd0e48e44796063dc7da7eee64451 100644
|
||||
index 65c0ba9b38df848646ddd2719850f955334abd7a..41e2102d79ac6f8c3dad4b1f85d1c98e296a2730 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -1041,6 +1041,15 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@@ -1042,6 +1042,15 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
return list;
|
||||
}
|
||||
|
@ -7,10 +7,10 @@ Allows you to determine why an inventory was closed, enabling plugin developers
|
||||
to "confirm" things based on if it was player triggered close or not.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 3cb4a84a08cbf76e39da5f25fea490c26c77a289..1d29f6c12d2c9de7918669ec03da7307a899e9ab 100644
|
||||
index abbb28560e1a4c1175ea431d55f903f2b5241830..efd06327b3cbe15d6a4c8b2f1082bc43798de311 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1137,7 +1137,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1155,7 +1155,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
for (net.minecraft.world.level.block.entity.BlockEntity tileentity : chunk.getBlockEntities().values()) {
|
||||
if (tileentity instanceof net.minecraft.world.Container) {
|
||||
for (org.bukkit.entity.HumanEntity h : Lists.newArrayList(((net.minecraft.world.Container) tileentity).getViewers())) {
|
||||
@ -19,7 +19,7 @@ index 3cb4a84a08cbf76e39da5f25fea490c26c77a289..1d29f6c12d2c9de7918669ec03da7307
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2080,7 +2080,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -2159,7 +2159,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
// Spigot Start
|
||||
if (entity.getBukkitEntity() instanceof org.bukkit.inventory.InventoryHolder && (!(entity instanceof ServerPlayer) || entity.getRemovalReason() != Entity.RemovalReason.KILLED)) { // SPIGOT-6876: closeInventory clears death message
|
||||
for (org.bukkit.entity.HumanEntity h : Lists.newArrayList(((org.bukkit.inventory.InventoryHolder) entity.getBukkitEntity()).getInventory().getViewers())) {
|
||||
@ -29,10 +29,10 @@ index 3cb4a84a08cbf76e39da5f25fea490c26c77a289..1d29f6c12d2c9de7918669ec03da7307
|
||||
}
|
||||
// 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 3c780c0679ba004577393b3d801ee18ac7e847b9..495acba272889277768a6673d7b2b2b691d93477 100644
|
||||
index 23bf128cb5b7598a9d4c145b14f8fe692660be0d..9e010074c289abd939cd9743307579bee7583b5c 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -601,7 +601,7 @@ public class ServerPlayer extends Player {
|
||||
@@ -608,7 +608,7 @@ public class ServerPlayer extends Player {
|
||||
}
|
||||
// Paper end
|
||||
if (!this.level.isClientSide && !this.containerMenu.stillValid(this)) {
|
||||
@ -41,7 +41,7 @@ index 3c780c0679ba004577393b3d801ee18ac7e847b9..495acba272889277768a6673d7b2b2b6
|
||||
this.containerMenu = this.inventoryMenu;
|
||||
}
|
||||
|
||||
@@ -793,7 +793,7 @@ public class ServerPlayer extends Player {
|
||||
@@ -801,7 +801,7 @@ public class ServerPlayer extends Player {
|
||||
|
||||
// SPIGOT-943 - only call if they have an inventory open
|
||||
if (this.containerMenu != this.inventoryMenu) {
|
||||
@ -50,7 +50,7 @@ index 3c780c0679ba004577393b3d801ee18ac7e847b9..495acba272889277768a6673d7b2b2b6
|
||||
}
|
||||
|
||||
net.kyori.adventure.text.Component deathMessage = event.deathMessage() != null ? event.deathMessage() : net.kyori.adventure.text.Component.empty(); // Paper - Adventure
|
||||
@@ -1433,7 +1433,7 @@ public class ServerPlayer extends Player {
|
||||
@@ -1442,7 +1442,7 @@ public class ServerPlayer extends Player {
|
||||
}
|
||||
// CraftBukkit end
|
||||
if (this.containerMenu != this.inventoryMenu) {
|
||||
@ -59,7 +59,7 @@ index 3c780c0679ba004577393b3d801ee18ac7e847b9..495acba272889277768a6673d7b2b2b6
|
||||
}
|
||||
|
||||
// this.nextContainerCounter(); // CraftBukkit - moved up
|
||||
@@ -1461,7 +1461,13 @@ public class ServerPlayer extends Player {
|
||||
@@ -1470,7 +1470,13 @@ public class ServerPlayer extends Player {
|
||||
|
||||
@Override
|
||||
public void closeContainer() {
|
||||
@ -75,10 +75,10 @@ index 3c780c0679ba004577393b3d801ee18ac7e847b9..495acba272889277768a6673d7b2b2b6
|
||||
this.doCloseContainer();
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index ba368d11aac5f440dfb45d0c283013390bb2aeff..67ec90f47e7d8bb4a642f3bf9b56bb686fc8cee9 100644
|
||||
index 6b96d3e39fb6de4ce1c82eb36c881331d885fec8..c8b729f19ece0eccac953f3344eefb73a04ce06e 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -188,6 +188,7 @@ import org.bukkit.event.inventory.ClickType;
|
||||
@@ -204,6 +204,7 @@ import org.bukkit.event.inventory.ClickType;
|
||||
import org.bukkit.event.inventory.CraftItemEvent;
|
||||
import org.bukkit.event.inventory.InventoryAction;
|
||||
import org.bukkit.event.inventory.InventoryClickEvent;
|
||||
@ -86,7 +86,7 @@ index ba368d11aac5f440dfb45d0c283013390bb2aeff..67ec90f47e7d8bb4a642f3bf9b56bb68
|
||||
import org.bukkit.event.inventory.InventoryCreativeEvent;
|
||||
import org.bukkit.event.inventory.InventoryType.SlotType;
|
||||
import org.bukkit.event.inventory.SmithItemEvent;
|
||||
@@ -2350,10 +2351,15 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -2540,10 +2541,15 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
|
||||
@Override
|
||||
public void handleContainerClose(ServerboundContainerClosePacket packet) {
|
||||
@ -105,10 +105,10 @@ index ba368d11aac5f440dfb45d0c283013390bb2aeff..67ec90f47e7d8bb4a642f3bf9b56bb68
|
||||
this.player.doCloseContainer();
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 2b7a9e6a5098aabbe62ea74c1f4eb5a9e5111e19..58ef89a8a3ee74814a0e77e2a28271c2cf4266ca 100644
|
||||
index a9821199bd953ad5d16ed663f367556b099e999a..50a3148628229a0c10c0982e2540ed655777ba5a 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -502,7 +502,7 @@ public abstract class PlayerList {
|
||||
@@ -506,7 +506,7 @@ public abstract class PlayerList {
|
||||
// CraftBukkit start - Quitting must be before we do final save of data, in case plugins need to modify it
|
||||
// See SPIGOT-5799, SPIGOT-6145
|
||||
if (entityplayer.containerMenu != entityplayer.inventoryMenu) {
|
||||
@ -118,10 +118,10 @@ index 2b7a9e6a5098aabbe62ea74c1f4eb5a9e5111e19..58ef89a8a3ee74814a0e77e2a28271c2
|
||||
|
||||
PlayerQuitEvent playerQuitEvent = new PlayerQuitEvent(entityplayer.getBukkitEntity(), net.kyori.adventure.text.Component.translatable("multiplayer.player.left", net.kyori.adventure.text.format.NamedTextColor.YELLOW, com.destroystokyo.paper.PaperConfig.useDisplayNameInQuit ? entityplayer.getBukkitEntity().displayName() : net.kyori.adventure.text.Component.text(entityplayer.getScoreboardName())));
|
||||
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 1a264c6f18235580bd1fba4e5243554b56503253..64a887de47b26d2dfa27b0ed3c4d8c0e00db163b 100644
|
||||
index 11e7443bfdd178f23b08529d6c90988113b4ea5e..8215717bd7267fe553319b03d73416732a07485b 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
@@ -263,7 +263,7 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -273,7 +273,7 @@ public abstract class Player extends LivingEntity {
|
||||
this.updateIsUnderwater();
|
||||
super.tick();
|
||||
if (!this.level.isClientSide && this.containerMenu != null && !this.containerMenu.stillValid(this)) {
|
||||
@ -130,7 +130,7 @@ index 1a264c6f18235580bd1fba4e5243554b56503253..64a887de47b26d2dfa27b0ed3c4d8c0e
|
||||
this.containerMenu = this.inventoryMenu;
|
||||
}
|
||||
|
||||
@@ -486,6 +486,13 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -497,6 +497,13 @@ public abstract class Player extends LivingEntity {
|
||||
|
||||
}
|
||||
|
||||
@ -174,10 +174,10 @@ index 6c708f65b3a3718c7b53e0c2cc12ee8ad62ff2b9..a6ac2fdcda24ec031d5d2ea9e4492614
|
||||
@Override
|
||||
public boolean isBlocking() {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 4fd3b8d55edd44cfc0cfb58f5e623a04426d7edf..ca1a812ee0ac316299004437e86d696f9bacb350 100644
|
||||
index de76f01f39c44517487c86133d9914994c1c9d7b..1f66387bc95e70ddeaffd2850e8e1d4a93d4ce4f 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -1063,7 +1063,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -1061,7 +1061,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
|
||||
// Close any foreign inventory
|
||||
if (this.getHandle().containerMenu != this.getHandle().inventoryMenu) {
|
@ -16,10 +16,10 @@ Refresh the player inventory when PlayerInteractEntityEvent is
|
||||
cancelled to avoid this problem.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 67ec90f47e7d8bb4a642f3bf9b56bb686fc8cee9..ffa4dbe3565a5aeccded6add79a1d783ec13ae61 100644
|
||||
index c8b729f19ece0eccac953f3344eefb73a04ce06e..79d9af684d331c5e656697353559d4b3ce70a368 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2235,6 +2235,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -2425,6 +2425,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
}
|
||||
|
||||
if (event.isCancelled()) {
|
@ -5,10 +5,10 @@ Subject: [PATCH] Avoid item merge if stack size above max stack size
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
||||
index 430809523d02801088c247e11bce351a99b8bc05..df5064e69f10bb366572e5f1da197514f3067faf 100644
|
||||
index a0b27bdeabcabd0bd07b1b495105f9b6af998092..ab48f572c778924354f30ff05bb45f3b235817af 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
||||
@@ -222,6 +222,10 @@ public class ItemEntity extends Entity {
|
||||
@@ -232,6 +232,10 @@ public class ItemEntity extends Entity {
|
||||
|
||||
private void mergeWithNeighbours() {
|
||||
if (this.isMergable()) {
|
@ -5,13 +5,13 @@ Subject: [PATCH] Use AsyncAppender to keep logging IO off main thread
|
||||
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index 244529d90f0d98cff31743e8934ba63c41ffd1a2..004b37cddc8e5e4cb4643f52eb58254796886fe7 100644
|
||||
index e1cc5d05d9826ce897e5c2f71ddfe4811c010c38..344787b84f91627e4f33288c75eacd2bca7bcc3f 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -24,6 +24,7 @@ dependencies {
|
||||
implementation("org.ow2.asm:asm-commons:9.2") // Paper - ASM event executor generation
|
||||
@@ -25,6 +25,7 @@ dependencies {
|
||||
implementation("commons-lang:commons-lang:2.6")
|
||||
runtimeOnly("org.xerial:sqlite-jdbc:3.36.0.3")
|
||||
runtimeOnly("mysql:mysql-connector-java:8.0.27")
|
||||
runtimeOnly("mysql:mysql-connector-java:8.0.29")
|
||||
+ runtimeOnly("com.lmax:disruptor:3.4.4") // Paper
|
||||
|
||||
runtimeOnly("org.apache.maven:maven-resolver-provider:3.8.4")
|
@ -6,10 +6,10 @@ Subject: [PATCH] add more information to Entity.toString()
|
||||
UUID, ticks lived, valid, dead
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 5d6ff0810b3939217e8bd54a88815809e8beff76..0fe90a47a73266e929022d807d6586e2a76dfb0e 100644
|
||||
index 44bcf4477ab7b6ee231a774fb2e03544af9305c3..119e9e645ec8d9a730e84e29e8c045acd4d13785 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -2818,7 +2818,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -2865,7 +2865,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
public String toString() {
|
||||
String s = this.level == null ? "~NULL~" : this.level.toString();
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Add CraftMagicNumbers.isSupportedApiVersion()
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
index a47f81c690b9d2a63c21f126ca2727a1d23e626c..7fed3c5cbc48fb8de7af006720aa2a6fbe16c556 100644
|
||||
index 0c040073b004fdbb2daa8e9d2aebdfffad405397..ab1bcb17d88b032c091a2237d0f1559b82bcd43f 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
@@ -426,6 +426,11 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
@ -5,10 +5,10 @@ Subject: [PATCH] PlayerElytraBoostEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/item/FireworkRocketItem.java b/src/main/java/net/minecraft/world/item/FireworkRocketItem.java
|
||||
index 10385dcb851bb435821afba322ed11f59e7ad3e6..561f98b442788814cbc6cbb7e144207d14f67ff8 100644
|
||||
index 766af1f45b14654d3655a06ae0bfb0d4cfbdff7a..e927eaaaf79cd5cdc150a9db10d730c7b17601fc 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/FireworkRocketItem.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/FireworkRocketItem.java
|
||||
@@ -61,12 +61,19 @@ public class FireworkRocketItem extends Item {
|
||||
@@ -59,12 +59,19 @@ public class FireworkRocketItem extends Item {
|
||||
if (!world.isClientSide) {
|
||||
FireworkRocketEntity fireworkRocketEntity = new FireworkRocketEntity(world, itemStack, user);
|
||||
fireworkRocketEntity.spawningEntity = user.getUUID(); // Paper
|
@ -132,18 +132,18 @@ index 72dfb7b652f515bf9df201d524a851ab56706544..b80bedb5f27b474d7f66e9e1cc38ca3b
|
||||
return InteractionResultHolder.sidedSuccess(itemStack, world.isClientSide());
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/item/FireworkRocketItem.java b/src/main/java/net/minecraft/world/item/FireworkRocketItem.java
|
||||
index 561f98b442788814cbc6cbb7e144207d14f67ff8..543a08f920319a2547258640bafebb1e70af65c4 100644
|
||||
index e927eaaaf79cd5cdc150a9db10d730c7b17601fc..88306f54c0f8ee83020d94f20b62762910c9e9b2 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/FireworkRocketItem.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/FireworkRocketItem.java
|
||||
@@ -13,6 +13,7 @@ import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.network.chat.TextComponent;
|
||||
import net.minecraft.network.chat.TranslatableComponent;
|
||||
@@ -11,6 +11,7 @@ import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.nbt.ListTag;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.stats.Stats;
|
||||
+import net.minecraft.server.level.ServerPlayer;
|
||||
import net.minecraft.world.InteractionHand;
|
||||
import net.minecraft.world.InteractionResult;
|
||||
import net.minecraft.world.InteractionResultHolder;
|
||||
@@ -47,8 +48,12 @@ public class FireworkRocketItem extends Item {
|
||||
@@ -45,8 +46,12 @@ public class FireworkRocketItem extends Item {
|
||||
Direction direction = context.getClickedFace();
|
||||
FireworkRocketEntity fireworkRocketEntity = new FireworkRocketEntity(level, context.getPlayer(), vec3.x + (double)direction.getStepX() * 0.15D, vec3.y + (double)direction.getStepY() * 0.15D, vec3.z + (double)direction.getStepZ() * 0.15D, itemStack);
|
||||
fireworkRocketEntity.spawningEntity = context.getPlayer() == null ? null : context.getPlayer().getUUID(); // Paper
|
@ -19,10 +19,10 @@ index f0b2c5ae854ee7f3321b2b39a3680af5c747732e..7372f826b346bf684eb5987dedb4b907
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
|
||||
index 138422903dcb3056cd011a72e0625a1a225b4280..b92c2d5f9ad3936f619b51c79379983e3231e700 100644
|
||||
index ed698f3e3f9ed6003fe621c5f6f7e3a151a1a559..0923867d4730c9a7ed08d52bbc39b09871c8c806 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
|
||||
@@ -338,6 +338,7 @@ public class ArmorStand extends LivingEntity {
|
||||
@@ -336,6 +336,7 @@ public class ArmorStand extends LivingEntity {
|
||||
|
||||
@Override
|
||||
protected void pushEntities() {
|
||||
@ -31,10 +31,10 @@ index 138422903dcb3056cd011a72e0625a1a225b4280..b92c2d5f9ad3936f619b51c79379983e
|
||||
|
||||
for (int i = 0; i < list.size(); ++i) {
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index 46168d119d10231b8b946015245a476e0b56d567..e80a9a5df0e4722a12c65c57592879621571a13f 100644
|
||||
index 1569c9249804de05b2650463f32a94d599ffd427..502734a44ee9f40eae983fed74348f3aa5a8f8b6 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -774,6 +774,13 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -731,6 +731,13 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
// Paper end
|
||||
}
|
||||
}
|
@ -5,10 +5,10 @@ Subject: [PATCH] Vanished players don't have rights
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
|
||||
index bdefda914a7f93b8393a06f112ea9239d9685d51..54dfc45f9b350a9d4c2872ded5199ad13c797c80 100644
|
||||
index 5cb04230e22e7e9463d4e89792fca569970e10b7..cadcd3060e1c0e459ea064d2ac7a3ab5a4214d1d 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
|
||||
@@ -209,7 +209,14 @@ public abstract class Projectile extends Entity {
|
||||
@@ -211,7 +211,14 @@ public abstract class Projectile extends Entity {
|
||||
if (!entity.isSpectator() && entity.isAlive() && entity.isPickable()) {
|
||||
Entity entity1 = this.getOwner();
|
||||
|
||||
@ -24,7 +24,7 @@ index bdefda914a7f93b8393a06f112ea9239d9685d51..54dfc45f9b350a9d4c2872ded5199ad1
|
||||
return false;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/item/BlockItem.java b/src/main/java/net/minecraft/world/item/BlockItem.java
|
||||
index c3fb7d41688855010c643b91c8d9496486dae089..8175bb6331727440da2232998bdad068a1c47ae8 100644
|
||||
index 0d7c4be0c4abefecab367334408594afa7998b5e..78cac63e5bd7c84f59b8e00ee40899be78e8cdb1 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/BlockItem.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/BlockItem.java
|
||||
@@ -195,7 +195,8 @@ public class BlockItem extends Item {
|
||||
@ -38,10 +38,10 @@ index c3fb7d41688855010c643b91c8d9496486dae089..8175bb6331727440da2232998bdad068
|
||||
|
||||
BlockCanBuildEvent event = new BlockCanBuildEvent(CraftBlock.at(context.getLevel(), context.getClickedPos()), player, CraftBlockData.fromData(state), defaultReturn);
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index e80a9a5df0e4722a12c65c57592879621571a13f..67566e5f95f7452d31bea485bdb91a4e1a32e5d5 100644
|
||||
index 502734a44ee9f40eae983fed74348f3aa5a8f8b6..b71dffee6c24c4ec2daf70bcfee21e8c0c532390 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -72,6 +72,10 @@ import net.minecraft.world.level.saveddata.maps.MapItemSavedData;
|
||||
@@ -74,6 +74,10 @@ import net.minecraft.world.level.saveddata.maps.MapItemSavedData;
|
||||
import net.minecraft.world.level.storage.LevelData;
|
||||
import net.minecraft.world.level.storage.WritableLevelData;
|
||||
import net.minecraft.world.phys.AABB;
|
||||
@ -52,7 +52,7 @@ index e80a9a5df0e4722a12c65c57592879621571a13f..67566e5f95f7452d31bea485bdb91a4e
|
||||
import net.minecraft.world.scores.Scoreboard;
|
||||
|
||||
// CraftBukkit start
|
||||
@@ -250,6 +254,45 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -261,6 +265,45 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
this.tileLimiter = new org.spigotmc.TickLimiter(spigotConfig.tileMaxTickTime);
|
||||
}
|
||||
|
@ -20,7 +20,7 @@ index 7372f826b346bf684eb5987dedb4b907076ef2c0..6e7eb2134186e530f31eef6f86e30e8d
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
|
||||
index b92c2d5f9ad3936f619b51c79379983e3231e700..91cf7728aee475cb36f2c02bbfb7e3d2e0d00576 100644
|
||||
index 0923867d4730c9a7ed08d52bbc39b09871c8c806..b2a64c75a9ef3ad2f1129cd7dc59d713c4768539 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
|
||||
@@ -92,9 +92,16 @@ public class ArmorStand extends LivingEntity {
|
||||
@ -40,15 +40,15 @@ index b92c2d5f9ad3936f619b51c79379983e3231e700..91cf7728aee475cb36f2c02bbfb7e3d2
|
||||
this.handItems = NonNullList.withSize(2, ItemStack.EMPTY);
|
||||
this.armorItems = NonNullList.withSize(4, ItemStack.EMPTY);
|
||||
this.headPose = ArmorStand.DEFAULT_HEAD_POSE;
|
||||
@@ -191,6 +198,7 @@ public class ArmorStand extends LivingEntity {
|
||||
this.armorItems.set(enumitemslot.getIndex(), itemstack);
|
||||
@@ -189,6 +196,7 @@ public class ArmorStand extends LivingEntity {
|
||||
this.onEquipItem(enumitemslot, (ItemStack) this.armorItems.set(enumitemslot.getIndex(), itemstack), itemstack, silent); // CraftBukkit
|
||||
}
|
||||
|
||||
+ this.noTickEquipmentDirty = true; // Paper - Allow equipment to be updated even when tick disabled
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -241,6 +249,7 @@ public class ArmorStand extends LivingEntity {
|
||||
@@ -239,6 +247,7 @@ public class ArmorStand extends LivingEntity {
|
||||
}
|
||||
|
||||
nbt.put("Pose", this.writePose());
|
||||
@ -56,7 +56,7 @@ index b92c2d5f9ad3936f619b51c79379983e3231e700..91cf7728aee475cb36f2c02bbfb7e3d2
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -272,6 +281,12 @@ public class ArmorStand extends LivingEntity {
|
||||
@@ -270,6 +279,12 @@ public class ArmorStand extends LivingEntity {
|
||||
this.setNoBasePlate(nbt.getBoolean("NoBasePlate"));
|
||||
this.setMarker(nbt.getBoolean("Marker"));
|
||||
this.noPhysics = !this.hasPhysics();
|
||||
@ -69,7 +69,7 @@ index b92c2d5f9ad3936f619b51c79379983e3231e700..91cf7728aee475cb36f2c02bbfb7e3d2
|
||||
CompoundTag nbttagcompound1 = nbt.getCompound("Pose");
|
||||
|
||||
this.readPose(nbttagcompound1);
|
||||
@@ -653,7 +668,29 @@ public class ArmorStand extends LivingEntity {
|
||||
@@ -651,7 +666,29 @@ public class ArmorStand extends LivingEntity {
|
||||
|
||||
@Override
|
||||
public void tick() {
|
||||
@ -99,7 +99,7 @@ index b92c2d5f9ad3936f619b51c79379983e3231e700..91cf7728aee475cb36f2c02bbfb7e3d2
|
||||
Rotations vector3f = (Rotations) this.entityData.get(ArmorStand.DATA_HEAD_POSE);
|
||||
|
||||
if (!this.headPose.equals(vector3f)) {
|
||||
@@ -776,31 +813,37 @@ public class ArmorStand extends LivingEntity {
|
||||
@@ -775,31 +812,37 @@ public class ArmorStand extends LivingEntity {
|
||||
public void setHeadPose(Rotations angle) {
|
||||
this.headPose = angle;
|
||||
this.entityData.set(ArmorStand.DATA_HEAD_POSE, angle);
|
@ -5,7 +5,7 @@ Subject: [PATCH] SkeletonHorse Additions
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/horse/SkeletonTrapGoal.java b/src/main/java/net/minecraft/world/entity/animal/horse/SkeletonTrapGoal.java
|
||||
index cad754d6b75c3c16db4fd847fdf6cb8c0ec82dde..5c70fdefeb940837950e8a9692b1ac3a72e7c623 100644
|
||||
index 114352b9e8aeea7c728b6b58047e38e2530401a9..68887c1a475c119d061c8325136c5245011cdcbb 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/horse/SkeletonTrapGoal.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/horse/SkeletonTrapGoal.java
|
||||
@@ -17,6 +17,7 @@ import net.minecraft.world.item.enchantment.EnchantmentHelper;
|
@ -11,10 +11,10 @@ Returns true if getDamage() == 0 or has damage tag or other tag is set.
|
||||
Check the `ItemMetaTest#testTaggedButNotMeta` method to see how this method behaves.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
||||
index 967555b6a3ef833ca75215391b20744ab6f04359..14da2997b5fff4434b1fe8d5a1b3109dde143740 100644
|
||||
index 8b7d9ac312200b82b741a2c0ac26ec0710ea3cbc..04aabec62f0c89e70681af3846d73659f4c81360 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
||||
@@ -580,7 +580,7 @@ public final class CraftItemStack extends ItemStack {
|
||||
@@ -584,7 +584,7 @@ public final class CraftItemStack extends ItemStack {
|
||||
|
||||
@Override
|
||||
public boolean hasItemMeta() {
|
@ -5,7 +5,7 @@ Subject: [PATCH] AnvilDamageEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/inventory/AnvilMenu.java b/src/main/java/net/minecraft/world/inventory/AnvilMenu.java
|
||||
index 61b33ba6f0c4770971b632e5adf36b294f9d5a5e..a91c26fcf33b39b81a077d42ac0183616e213292 100644
|
||||
index c5f1076a758b396a9d5726754cbfb470ff912f8b..eb22059fe008c3d3fc0364a7f85f91b4cca8b328 100644
|
||||
--- a/src/main/java/net/minecraft/world/inventory/AnvilMenu.java
|
||||
+++ b/src/main/java/net/minecraft/world/inventory/AnvilMenu.java
|
||||
@@ -89,6 +89,16 @@ public class AnvilMenu extends ItemCombinerMenu {
|
@ -18,10 +18,10 @@ index 0f601ad4629bda75ec90612ad27fdec9ce62f83d..425c6da0de40983b0870c9fd1b53f16b
|
||||
if (event.isCancelled()) {
|
||||
return InteractionResult.PASS;
|
||||
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 8017953b623454593fbddbbcf90806c6e07c0974..8618790938f182e4aa0e27ea79dea1d35a36ec6e 100644
|
||||
index bfd81531cb5f3e7335e4b75cba31371450a9e731..1935db7bd6d0976fd0bb9e482cd8044b79b0a452 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
|
||||
@@ -177,7 +177,7 @@ public class Goat extends Animal {
|
||||
@@ -199,7 +199,7 @@ public class Goat extends Animal {
|
||||
|
||||
if (itemstack.is(Items.BUCKET) && !this.isBaby()) {
|
||||
// CraftBukkit start - Got milk?
|
||||
@ -31,10 +31,10 @@ index 8017953b623454593fbddbbcf90806c6e07c0974..8618790938f182e4aa0e27ea79dea1d3
|
||||
if (event.isCancelled()) {
|
||||
return InteractionResult.PASS;
|
||||
diff --git a/src/main/java/net/minecraft/world/item/BucketItem.java b/src/main/java/net/minecraft/world/item/BucketItem.java
|
||||
index 25f1567660682a122fcb63318f51ec45ffdf0d3b..5406acd65d4e1146f3bd7340ff9a1954a5c39ddb 100644
|
||||
index 90c8ef9995e834c245cc33f5e59ffdabd5a0b8cd..7c6c928da4e0f3ac54fa9b9ddce7b0e0bf3cce4b 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/BucketItem.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/BucketItem.java
|
||||
@@ -70,7 +70,7 @@ public class BucketItem extends Item implements DispensibleContainerItem {
|
||||
@@ -71,7 +71,7 @@ public class BucketItem extends Item implements DispensibleContainerItem {
|
||||
// CraftBukkit start
|
||||
ItemStack dummyFluid = ifluidsource.pickupBlock(DummyGeneratorAccess.INSTANCE, blockposition, iblockdata);
|
||||
if (dummyFluid.isEmpty()) return InteractionResultHolder.fail(itemstack); // Don't fire event if the bucket won't be filled.
|
||||
@ -43,7 +43,7 @@ index 25f1567660682a122fcb63318f51ec45ffdf0d3b..5406acd65d4e1146f3bd7340ff9a1954
|
||||
|
||||
if (event.isCancelled()) {
|
||||
((ServerPlayer) user).connection.send(new ClientboundBlockUpdatePacket(world, blockposition)); // SPIGOT-5163 (see PlayerInteractManager)
|
||||
@@ -101,7 +101,7 @@ public class BucketItem extends Item implements DispensibleContainerItem {
|
||||
@@ -102,7 +102,7 @@ public class BucketItem extends Item implements DispensibleContainerItem {
|
||||
iblockdata = world.getBlockState(blockposition);
|
||||
BlockPos blockposition2 = iblockdata.getBlock() instanceof LiquidBlockContainer && this.content == Fluids.WATER ? blockposition : blockposition1;
|
||||
|
||||
@ -52,7 +52,7 @@ index 25f1567660682a122fcb63318f51ec45ffdf0d3b..5406acd65d4e1146f3bd7340ff9a1954
|
||||
this.checkExtraContent(user, world, itemstack, blockposition2);
|
||||
if (user instanceof ServerPlayer) {
|
||||
CriteriaTriggers.PLACED_BLOCK.trigger((ServerPlayer) user, blockposition2, itemstack);
|
||||
@@ -128,10 +128,12 @@ public class BucketItem extends Item implements DispensibleContainerItem {
|
||||
@@ -129,10 +129,12 @@ public class BucketItem extends Item implements DispensibleContainerItem {
|
||||
|
||||
@Override
|
||||
public boolean emptyContents(@Nullable Player player, Level world, BlockPos pos, @Nullable BlockHitResult hitResult) {
|
||||
@ -67,7 +67,7 @@ index 25f1567660682a122fcb63318f51ec45ffdf0d3b..5406acd65d4e1146f3bd7340ff9a1954
|
||||
// CraftBukkit end
|
||||
if (!(this.content instanceof FlowingFluid)) {
|
||||
return false;
|
||||
@@ -144,7 +146,7 @@ public class BucketItem extends Item implements DispensibleContainerItem {
|
||||
@@ -145,7 +147,7 @@ public class BucketItem extends Item implements DispensibleContainerItem {
|
||||
|
||||
// CraftBukkit start
|
||||
if (flag1 && entityhuman != null) {
|
||||
@ -76,7 +76,7 @@ index 25f1567660682a122fcb63318f51ec45ffdf0d3b..5406acd65d4e1146f3bd7340ff9a1954
|
||||
if (event.isCancelled()) {
|
||||
((ServerPlayer) entityhuman).connection.send(new ClientboundBlockUpdatePacket(world, blockposition)); // SPIGOT-4238: needed when looking through entity
|
||||
((ServerPlayer) entityhuman).getBukkitEntity().updateInventory(); // SPIGOT-4541
|
||||
@@ -153,7 +155,7 @@ public class BucketItem extends Item implements DispensibleContainerItem {
|
||||
@@ -154,7 +156,7 @@ public class BucketItem extends Item implements DispensibleContainerItem {
|
||||
}
|
||||
// CraftBukkit end
|
||||
if (!flag1) {
|
@ -5,12 +5,12 @@ Subject: [PATCH] Add TNTPrimeEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
|
||||
index 139c98ab86589027873418601dbc7f4ed6358906..7eebecf836d21fc4ee901d23d7061db64486c0d5 100644
|
||||
index dc2e57bfc5e85c9ef548cb895b3fcd1c09c4dacb..21d26be5edbc05ac78c2f4a092594d772d98c982 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
|
||||
@@ -533,6 +533,11 @@ public class EnderDragon extends Mob implements Enemy {
|
||||
@@ -532,6 +532,11 @@ public class EnderDragon extends Mob implements Enemy {
|
||||
});
|
||||
craftBlock.getNMS().spawnAfterBreak((ServerLevel) level, blockposition, ItemStack.EMPTY);
|
||||
craftBlock.getNMS().spawnAfterBreak((ServerLevel) level, blockposition, ItemStack.EMPTY, false);
|
||||
}
|
||||
+ // Paper start - TNTPrimeEvent
|
||||
+ org.bukkit.block.Block tntBlock = level.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ());
|
||||
@ -21,10 +21,10 @@ index 139c98ab86589027873418601dbc7f4ed6358906..7eebecf836d21fc4ee901d23d7061db6
|
||||
|
||||
this.level.removeBlock(blockposition, false);
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/FireBlock.java b/src/main/java/net/minecraft/world/level/block/FireBlock.java
|
||||
index 55e35c210c21e8ff1222859fafe4d5d58aea0bc7..33752432af861a708e0dbb1afafcd5968d795931 100644
|
||||
index 037902b3addd34dfc6b751ca225373a06c2d6a89..2188cfc34ab4bd67fac9aedd861a597c137a5c40 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/FireBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/FireBlock.java
|
||||
@@ -290,7 +290,7 @@ public class FireBlock extends BaseFireBlock {
|
||||
@@ -290,12 +290,19 @@ public class FireBlock extends BaseFireBlock {
|
||||
|
||||
world.setBlock(blockposition, this.getStateWithAge(world, blockposition, l), 3);
|
||||
} else {
|
||||
@ -33,10 +33,8 @@ index 55e35c210c21e8ff1222859fafe4d5d58aea0bc7..33752432af861a708e0dbb1afafcd596
|
||||
}
|
||||
|
||||
Block block = iblockdata.getBlock();
|
||||
@@ -298,6 +298,13 @@ public class FireBlock extends BaseFireBlock {
|
||||
if (block instanceof TntBlock) {
|
||||
TntBlock blocktnt = (TntBlock) block;
|
||||
|
||||
if (block instanceof TntBlock) {
|
||||
+ // Paper start - TNTPrimeEvent
|
||||
+ org.bukkit.block.Block tntBlock = net.minecraft.server.MCUtil.toBukkitBlock(world, blockposition);
|
||||
+ if (!new com.destroystokyo.paper.event.block.TNTPrimeEvent(tntBlock, com.destroystokyo.paper.event.block.TNTPrimeEvent.PrimeReason.FIRE, null).callEvent()) {
|
||||
@ -48,7 +46,7 @@ index 55e35c210c21e8ff1222859fafe4d5d58aea0bc7..33752432af861a708e0dbb1afafcd596
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/TntBlock.java b/src/main/java/net/minecraft/world/level/block/TntBlock.java
|
||||
index b7bdeb40ec988b41ba602cea695fc14b7146bc4d..96cf2a42c9836a86541029f9d674ee5478d47b0c 100644
|
||||
index 9fcad0eb55a4a91a89ab8bce1f22d91127a94fb2..355448a08cca780f4f0b95e2abcdc87eb61de6dc 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/TntBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/TntBlock.java
|
||||
@@ -38,6 +38,11 @@ public class TntBlock extends Block {
|
||||
@ -65,7 +63,7 @@ index b7bdeb40ec988b41ba602cea695fc14b7146bc4d..96cf2a42c9836a86541029f9d674ee54
|
||||
}
|
||||
@@ -48,6 +53,11 @@ public class TntBlock extends Block {
|
||||
@Override
|
||||
public void neighborChanged(BlockState state, Level world, BlockPos pos, Block block, BlockPos fromPos, boolean notify) {
|
||||
public void neighborChanged(BlockState state, Level world, BlockPos pos, Block sourceBlock, BlockPos sourcePos, boolean notify) {
|
||||
if (world.hasNeighborSignal(pos)) {
|
||||
+ // Paper start - TNTPrimeEvent
|
||||
+ org.bukkit.block.Block tntBlock = net.minecraft.server.MCUtil.toBukkitBlock(world, pos);;
|
@ -45,10 +45,10 @@ index b46b10c726b53b1106cc74ec9a5d6ca6f45c96fe..c3539fabda1887cca6e82abce26dff08
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index ffa4dbe3565a5aeccded6add79a1d783ec13ae61..0680946b445b0727ab66f201ee08cf1b5927f550 100644
|
||||
index 79d9af684d331c5e656697353559d4b3ce70a368..a6add84c2bae068263b0ae9fe4bd66c569884be5 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -227,6 +227,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -245,6 +245,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
private long keepAliveChallenge;
|
||||
// CraftBukkit start - multithreaded fields
|
||||
private final AtomicInteger chatSpamTickCount = new AtomicInteger();
|
||||
@ -56,7 +56,7 @@ index ffa4dbe3565a5aeccded6add79a1d783ec13ae61..0680946b445b0727ab66f201ee08cf1b
|
||||
// CraftBukkit end
|
||||
private int dropSpamTickCount;
|
||||
private double firstGoodX;
|
||||
@@ -358,6 +359,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -384,6 +385,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
this.server.getProfiler().pop();
|
||||
// CraftBukkit start
|
||||
for (int spam; (spam = this.chatSpamTickCount.get()) > 0 && !this.chatSpamTickCount.compareAndSet(spam, spam - 1); ) ;
|
||||
@ -64,12 +64,12 @@ index ffa4dbe3565a5aeccded6add79a1d783ec13ae61..0680946b445b0727ab66f201ee08cf1b
|
||||
/* Use thread-safe field access instead
|
||||
if (this.chatSpamTickCount > 0) {
|
||||
--this.chatSpamTickCount;
|
||||
@@ -711,7 +713,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -743,7 +745,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
public void handleCustomCommandSuggestions(ServerboundCommandSuggestionPacket packet) {
|
||||
// PlayerConnectionUtils.ensureMainThread(packetplayintabcomplete, this, this.player.getWorldServer()); // Paper - run this async
|
||||
// CraftBukkit start
|
||||
- if (this.chatSpamTickCount.addAndGet(1) > 500 && !this.server.getPlayerList().isOp(this.player.getGameProfile())) {
|
||||
+ if (this.chatSpamTickCount.addAndGet(com.destroystokyo.paper.PaperConfig.tabSpamIncrement) > com.destroystokyo.paper.PaperConfig.tabSpamLimit && !this.server.getPlayerList().isOp(this.player.getGameProfile())) { // Paper start - split and make configurable
|
||||
server.scheduleOnMain(() -> this.disconnect(new TranslatableComponent("disconnect.spam", new Object[0]))); // Paper
|
||||
server.scheduleOnMain(() -> this.disconnect(Component.translatable("disconnect.spam", new Object[0]))); // Paper
|
||||
return;
|
||||
}
|
@ -12,10 +12,10 @@ This allows the client to render multiple skull textures from the same user,
|
||||
for when different skins were used when skull was made.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/network/FriendlyByteBuf.java b/src/main/java/net/minecraft/network/FriendlyByteBuf.java
|
||||
index 303b877bc467de7c046cc221d061fac841c1d9f3..896a4237f871d46cf39b0721e909c2cc3b5fc728 100644
|
||||
index 70631b3fe080320dfea0d1a4deb23e87448da250..9bffc37939586bcca0ae3d1c4aa3b0b96ad2b20d 100644
|
||||
--- a/src/main/java/net/minecraft/network/FriendlyByteBuf.java
|
||||
+++ b/src/main/java/net/minecraft/network/FriendlyByteBuf.java
|
||||
@@ -496,9 +496,18 @@ public class FriendlyByteBuf extends ByteBuf {
|
||||
@@ -579,9 +579,18 @@ public class FriendlyByteBuf extends ByteBuf {
|
||||
if (item.canBeDepleted() || item.shouldOverrideMultiplayerNbt()) {
|
||||
// Spigot start - filter
|
||||
stack = stack.copy();
|
||||
@ -35,7 +35,7 @@ index 303b877bc467de7c046cc221d061fac841c1d9f3..896a4237f871d46cf39b0721e909c2cc
|
||||
}
|
||||
|
||||
this.writeNbt(nbttagcompound);
|
||||
@@ -518,7 +527,16 @@ public class FriendlyByteBuf extends ByteBuf {
|
||||
@@ -601,7 +610,16 @@ public class FriendlyByteBuf extends ByteBuf {
|
||||
itemstack.setTag(this.readNbt());
|
||||
// CraftBukkit start
|
||||
if (itemstack.getTag() != null) {
|
||||
@ -54,10 +54,10 @@ index 303b877bc467de7c046cc221d061fac841c1d9f3..896a4237f871d46cf39b0721e909c2cc
|
||||
// CraftBukkit end
|
||||
return itemstack;
|
||||
diff --git a/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkPacketData.java b/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkPacketData.java
|
||||
index aec78b6079c3404d934d2b46bc0d2f9d2a871b6d..36d9308a11bde0a631de037cf1bcae1062eaa5d9 100644
|
||||
index cc2f53fba1e5f6b6d4d31081ddaca1ace70abf99..56cc2169077fed1fe820d08dc14b3add63289add 100644
|
||||
--- a/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkPacketData.java
|
||||
+++ b/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkPacketData.java
|
||||
@@ -152,6 +152,7 @@ public class ClientboundLevelChunkPacketData {
|
||||
@@ -151,6 +151,7 @@ public class ClientboundLevelChunkPacketData {
|
||||
static ClientboundLevelChunkPacketData.BlockEntityInfo create(BlockEntity blockEntity) {
|
||||
CompoundTag compoundTag = blockEntity.getUpdateTag();
|
||||
BlockPos blockPos = blockEntity.getBlockPos();
|
||||
@ -66,7 +66,7 @@ index aec78b6079c3404d934d2b46bc0d2f9d2a871b6d..36d9308a11bde0a631de037cf1bcae10
|
||||
return new ClientboundLevelChunkPacketData.BlockEntityInfo(i, blockPos.getY(), blockEntity.getType(), compoundTag.isEmpty() ? null : compoundTag);
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/SkullBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/SkullBlockEntity.java
|
||||
index 2a49aa1d387949e33708f5f13261e5257ea4aa2f..e3efea8623c7d34915069a6b9b7da9f2b1694c28 100644
|
||||
index 0c7e29b589ab106013d979a20edc415b4b32a677..170f051d820ee1add1b61a20dbd1f18f758717dc 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/entity/SkullBlockEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/SkullBlockEntity.java
|
||||
@@ -11,6 +11,7 @@ import javax.annotation.Nullable;
|
||||
@ -76,8 +76,8 @@ index 2a49aa1d387949e33708f5f13261e5257ea4aa2f..e3efea8623c7d34915069a6b9b7da9f2
|
||||
+import net.minecraft.nbt.ListTag;
|
||||
import net.minecraft.nbt.NbtUtils;
|
||||
import net.minecraft.network.protocol.game.ClientboundBlockEntityDataPacket;
|
||||
import net.minecraft.server.players.GameProfileCache;
|
||||
@@ -93,9 +94,37 @@ public class SkullBlockEntity extends BlockEntity {
|
||||
import net.minecraft.server.Services;
|
||||
@@ -94,9 +95,37 @@ public class SkullBlockEntity extends BlockEntity {
|
||||
|
||||
@Override
|
||||
public ClientboundBlockEntityDataPacket getUpdatePacket() {
|
@ -8,10 +8,10 @@ Add -Ddebug.entities=true to your JVM flags to gain more information
|
||||
1.17: Needs to be reworked for new entity storage system
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
index 81eb73e9fde37e3b196bd899ecd4d614897d1a98..4206e1c96cdc7b7e324331681215f735688dd558 100644
|
||||
index f9ef45635b731cafc9b6879603cac34c146833b0..29482bebf5b878c698283720d1452ef237da5516 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
@@ -1353,6 +1353,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -1389,6 +1389,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
} else {
|
||||
ChunkMap.TrackedEntity playerchunkmap_entitytracker = new ChunkMap.TrackedEntity(entity, i, j, entitytypes.trackDeltas());
|
||||
|
||||
@ -19,7 +19,7 @@ index 81eb73e9fde37e3b196bd899ecd4d614897d1a98..4206e1c96cdc7b7e324331681215f735
|
||||
this.entityMap.put(entity.getId(), playerchunkmap_entitytracker);
|
||||
playerchunkmap_entitytracker.updatePlayers(this.level.players());
|
||||
if (entity instanceof ServerPlayer) {
|
||||
@@ -1395,7 +1396,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -1431,7 +1432,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
if (playerchunkmap_entitytracker1 != null) {
|
||||
playerchunkmap_entitytracker1.broadcastRemoved();
|
||||
}
|
||||
@ -29,10 +29,10 @@ index 81eb73e9fde37e3b196bd899ecd4d614897d1a98..4206e1c96cdc7b7e324331681215f735
|
||||
|
||||
protected void tick() {
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 1d29f6c12d2c9de7918669ec03da7307a899e9ab..e09638b0ac68a685bf71ae3a84475bde19669b1e 100644
|
||||
index efd06327b3cbe15d6a4c8b2f1082bc43798de311..8c00f5d064106cca5722bdd41287ba4e99afe227 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -209,6 +209,9 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -214,6 +214,9 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
public final LevelStorageSource.LevelStorageAccess convertable;
|
||||
public final UUID uuid;
|
||||
public boolean hasPhysicsEvent = true; // Paper
|
||||
@ -42,7 +42,7 @@ index 1d29f6c12d2c9de7918669ec03da7307a899e9ab..e09638b0ac68a685bf71ae3a84475bde
|
||||
|
||||
@Override public LevelChunk getChunkIfLoaded(int x, int z) { // Paper - this was added in world too but keeping here for NMS ABI
|
||||
return this.chunkSource.getChunk(x, z, false);
|
||||
@@ -1099,7 +1102,28 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1117,7 +1120,28 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
// CraftBukkit start
|
||||
private boolean addEntity(Entity entity, CreatureSpawnEvent.SpawnReason spawnReason) {
|
||||
org.spigotmc.AsyncCatcher.catchOp("entity add"); // Spigot
|
||||
@ -72,10 +72,10 @@ index 1d29f6c12d2c9de7918669ec03da7307a899e9ab..e09638b0ac68a685bf71ae3a84475bde
|
||||
return false;
|
||||
} else {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 0fe90a47a73266e929022d807d6586e2a76dfb0e..513331442058ee61a08f4ad69b8912fa3e0d6868 100644
|
||||
index 119e9e645ec8d9a730e84e29e8c045acd4d13785..a279b7473a4e3397898707bf232c7866aacee9d1 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -173,6 +173,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -194,6 +194,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
public com.destroystokyo.paper.loottable.PaperLootableInventoryData lootableData; // Paper
|
||||
private CraftEntity bukkitEntity;
|
||||
|
||||
@ -85,10 +85,10 @@ index 0fe90a47a73266e929022d807d6586e2a76dfb0e..513331442058ee61a08f4ad69b8912fa
|
||||
if (this.bukkitEntity == null) {
|
||||
this.bukkitEntity = CraftEntity.getEntity(this.level.getCraftServer(), this);
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index 67566e5f95f7452d31bea485bdb91a4e1a32e5d5..dc2235824853a0d7ccbff51dd26a71e97fe90ba7 100644
|
||||
index b71dffee6c24c4ec2daf70bcfee21e8c0c532390..36264caae95b4ab69412a60f24e1e926df424fa0 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -142,6 +142,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -148,6 +148,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
public boolean pvpMode;
|
||||
public boolean keepSpawnInMemory = true;
|
||||
public org.bukkit.generator.ChunkGenerator generator;
|
@ -36,22 +36,22 @@ index c3539fabda1887cca6e82abce26dff088cdc4251..924b890d34c113ce804244dbb6635ff7
|
||||
public static int tabSpamLimit = 500;
|
||||
private static void tabSpamLimiters() {
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index c7881eebb02424ce488d2c04aa736f17402109a0..4f070d2a7ff5dfe9890e79c30911a1fe1ec9983b 100644
|
||||
index b031d4340dbee22108f8cbc15729337c50160a29..87970a1291b6c01bcb94a87fbbb0877a9d6b350f 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1096,6 +1096,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.updateStatusIcon(this.status);
|
||||
@@ -1057,6 +1057,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.updateStatusIcon(this.status);
|
||||
|
||||
// Spigot start
|
||||
// Spigot start
|
||||
+ org.spigotmc.WatchdogThread.hasStarted = true; // Paper
|
||||
Arrays.fill( recentTps, 20 );
|
||||
Arrays.fill( recentTps, 20 );
|
||||
long start = System.nanoTime(), curTime, tickSection = start; // Paper - Further improve server tick loop
|
||||
lastTick = start - TICK_TIME; // Paper
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 8d888beec17bdea0621116d3038bb3d72e4b3c5d..ee25c3a9f499017dcd2adbc789030bd2d7cce7c4 100644
|
||||
index 3f4556e3f8c7665c64d96109030a669a308ba4a9..8e52146e5fcdb85a1e5c6f69eafb0adc52e5288d 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -905,6 +905,7 @@ public final class CraftServer implements Server {
|
||||
@@ -900,6 +900,7 @@ public final class CraftServer implements Server {
|
||||
|
||||
@Override
|
||||
public void reload() {
|
||||
@ -59,7 +59,7 @@ index 8d888beec17bdea0621116d3038bb3d72e4b3c5d..ee25c3a9f499017dcd2adbc789030bd2
|
||||
this.reloadCount++;
|
||||
this.configuration = YamlConfiguration.loadConfiguration(this.getConfigFile());
|
||||
this.commandsConfiguration = YamlConfiguration.loadConfiguration(this.getCommandsConfigFile());
|
||||
@@ -994,6 +995,7 @@ public final class CraftServer implements Server {
|
||||
@@ -989,6 +990,7 @@ public final class CraftServer implements Server {
|
||||
this.enablePlugins(PluginLoadOrder.STARTUP);
|
||||
this.enablePlugins(PluginLoadOrder.POSTWORLD);
|
||||
this.getPluginManager().callEvent(new ServerLoadEvent(ServerLoadEvent.LoadType.RELOAD));
|
@ -23,18 +23,18 @@ Modified isEmpty to use the isEmpty() method instead of the slightly confusing s
|
||||
The point of this is readability, but does have a side-benefit of a small microptimization
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 58ef89a8a3ee74814a0e77e2a28271c2cf4266ca..12451cc9eca34baa5d5ef6e55f4e4a63356365c6 100644
|
||||
index 50a3148628229a0c10c0982e2540ed655777ba5a..838a12ed1ea78dbe82a5fe1e0b1b313ac3b03cf9 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -618,7 +618,7 @@ public abstract class PlayerList {
|
||||
} else if (!this.isWhitelisted(gameprofile, event)) { // Paper
|
||||
//chatmessage = new ChatMessage("multiplayer.disconnect.not_whitelisted"); // Paper
|
||||
//event.disallow(PlayerLoginEvent.Result.KICK_WHITELIST, org.spigotmc.SpigotConfig.whitelistMessage); // Spigot // Paper - moved to isWhitelisted
|
||||
@@ -622,7 +622,7 @@ public abstract class PlayerList {
|
||||
} else if (!this.isWhiteListed(gameprofile, event)) { // Paper
|
||||
//ichatmutablecomponent = Component.translatable("multiplayer.disconnect.not_whitelisted"); // Paper
|
||||
//event.disallow(PlayerLoginEvent.Result.KICK_WHITELIST, net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(org.spigotmc.SpigotConfig.whitelistMessage)); // Spigot // Paper - Adventure - moved to isWhitelisted
|
||||
- } else if (this.getIpBans().isBanned(socketaddress) && !this.getIpBans().get(socketaddress).hasExpired()) {
|
||||
+ } else if (this.getIpBans().isBanned(socketaddress) && getIpBans().get(socketaddress) != null && !this.getIpBans().get(socketaddress).hasExpired()) { // Paper - fix NPE with temp ip bans
|
||||
IpBanListEntry ipbanentry = this.ipBans.get(socketaddress);
|
||||
|
||||
chatmessage = new TranslatableComponent("multiplayer.disconnect.banned_ip.reason", new Object[]{ipbanentry.getReason()});
|
||||
ichatmutablecomponent = Component.translatable("multiplayer.disconnect.banned_ip.reason", ipbanentry.getReason());
|
||||
diff --git a/src/main/java/net/minecraft/server/players/StoredUserList.java b/src/main/java/net/minecraft/server/players/StoredUserList.java
|
||||
index 097a25fd4ae5438161158a1018c707886cfbb959..91899909abd83611ac63633fef701be542cf64bf 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/StoredUserList.java
|
@ -6,19 +6,19 @@ Subject: [PATCH] Use a Queue for Queueing Commands
|
||||
Lists are bad as Queues mmmkay.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index 39a24292f215920bc3121f4ac903040dd73a9978..4357d5c7c66d9490a34f2d591ddc3d58d36cadd1 100644
|
||||
index 7364612dfb789659f6e28d4b2e379142bd0f5ea0..0cd6e4fbcc97ab6b64333860d56946268c1f5064 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -78,7 +78,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@@ -74,7 +74,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
static final Logger LOGGER = LogUtils.getLogger();
|
||||
private static final int CONVERSION_RETRY_DELAY_MS = 5000;
|
||||
private static final int CONVERSION_RETRIES = 2;
|
||||
private static final Pattern SHA1 = Pattern.compile("^[a-fA-F0-9]{40}$");
|
||||
- private final List<ConsoleInput> consoleInput = Collections.synchronizedList(Lists.newArrayList());
|
||||
+ private final java.util.Queue<ConsoleInput> serverCommandQueue = new java.util.concurrent.ConcurrentLinkedQueue<>(); // Paper - use a proper queuemmands
|
||||
@Nullable
|
||||
private QueryThreadGs4 queryThreadGs4;
|
||||
public final RconConsoleSource rconConsoleSource;
|
||||
@@ -456,13 +456,15 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@@ -421,13 +421,15 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
}
|
||||
|
||||
public void handleConsoleInput(String command, CommandSourceStack commandSource) {
|
@ -5,7 +5,7 @@ Subject: [PATCH] Ability to get Tile Entities from a chunk without snapshots
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java
|
||||
index 404bd3389aaa75ca23f04d23ecea9093443c3976..f3c67a815c570beb14136905cbf5aa4046ee8394 100644
|
||||
index 0a72475c241e0392993c3e501f891b74c7f72019..63d4277d9d62cc26cf96af21f11015e003f9eb26 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java
|
||||
@@ -4,8 +4,10 @@ import com.google.common.base.Preconditions;
|
||||
@ -19,7 +19,7 @@ index 404bd3389aaa75ca23f04d23ecea9093443c3976..f3c67a815c570beb14136905cbf5aa40
|
||||
import java.util.Objects;
|
||||
import java.util.concurrent.locks.LockSupport;
|
||||
import java.util.function.BooleanSupplier;
|
||||
@@ -176,6 +178,13 @@ public class CraftChunk implements Chunk {
|
||||
@@ -177,6 +179,13 @@ public class CraftChunk implements Chunk {
|
||||
|
||||
@Override
|
||||
public BlockState[] getTileEntities() {
|
||||
@ -33,7 +33,7 @@ index 404bd3389aaa75ca23f04d23ecea9093443c3976..f3c67a815c570beb14136905cbf5aa40
|
||||
if (!this.isLoaded()) {
|
||||
this.getWorld().getChunkAt(x, z); // Transient load for this tick
|
||||
}
|
||||
@@ -190,7 +199,29 @@ public class CraftChunk implements Chunk {
|
||||
@@ -191,7 +200,29 @@ public class CraftChunk implements Chunk {
|
||||
}
|
||||
|
||||
BlockPos position = (BlockPos) obj;
|
@ -6,7 +6,7 @@ Subject: [PATCH] Optimize BlockPosition helper methods
|
||||
Resolves #1338
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/core/BlockPos.java b/src/main/java/net/minecraft/core/BlockPos.java
|
||||
index d425adc1f37b9f926d6ee0c90d2237d89355e1a6..a1060bd5ee1f2f6ce34cfcf2e76a89cddc425c5f 100644
|
||||
index abd6fcab220d5616131e5bdd2f6a68a9105b7891..f8361dcf9d0378497ec5a34ea53b4e0019700851 100644
|
||||
--- a/src/main/java/net/minecraft/core/BlockPos.java
|
||||
+++ b/src/main/java/net/minecraft/core/BlockPos.java
|
||||
@@ -130,67 +130,84 @@ public class BlockPos extends Vec3i {
|
@ -5,12 +5,12 @@ Subject: [PATCH] Slime Pathfinder Events
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/Slime.java b/src/main/java/net/minecraft/world/entity/monster/Slime.java
|
||||
index 990f2e17aad4a1116482b3aa534686cf8dc3669a..8d03466e2f546aae705c1d4dd2d562d3db2f2671 100644
|
||||
index 61304f83aff18ae20316db7e16b673a652eb73a4..aee0180c554949eb16fe1785344c28c4ecc1e0a0 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/Slime.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/Slime.java
|
||||
@@ -42,6 +42,12 @@ import net.minecraft.world.level.biome.Biomes;
|
||||
@@ -41,6 +41,12 @@ import net.minecraft.world.level.ServerLevelAccessor;
|
||||
import net.minecraft.world.level.WorldGenLevel;
|
||||
import net.minecraft.world.level.levelgen.WorldgenRandom;
|
||||
import net.minecraft.world.level.storage.loot.BuiltInLootTables;
|
||||
import net.minecraft.world.phys.Vec3;
|
||||
+// Paper start
|
||||
+import com.destroystokyo.paper.event.entity.SlimeChangeDirectionEvent;
|
||||
@ -41,7 +41,7 @@ index 990f2e17aad4a1116482b3aa534686cf8dc3669a..8d03466e2f546aae705c1d4dd2d562d3
|
||||
this.wasOnGround = nbt.getBoolean("wasOnGround");
|
||||
}
|
||||
|
||||
@@ -452,7 +464,7 @@ public class Slime extends Mob implements Enemy {
|
||||
@@ -448,7 +460,7 @@ public class Slime extends Mob implements Enemy {
|
||||
|
||||
@Override
|
||||
public boolean canUse() {
|
||||
@ -50,7 +50,7 @@ index 990f2e17aad4a1116482b3aa534686cf8dc3669a..8d03466e2f546aae705c1d4dd2d562d3
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -484,7 +496,15 @@ public class Slime extends Mob implements Enemy {
|
||||
@@ -480,7 +492,15 @@ public class Slime extends Mob implements Enemy {
|
||||
public boolean canUse() {
|
||||
LivingEntity entityliving = this.slime.getTarget();
|
||||
|
||||
@ -67,7 +67,7 @@ index 990f2e17aad4a1116482b3aa534686cf8dc3669a..8d03466e2f546aae705c1d4dd2d562d3
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -497,7 +517,15 @@ public class Slime extends Mob implements Enemy {
|
||||
@@ -493,7 +513,15 @@ public class Slime extends Mob implements Enemy {
|
||||
public boolean canContinueToUse() {
|
||||
LivingEntity entityliving = this.slime.getTarget();
|
||||
|
||||
@ -84,7 +84,7 @@ index 990f2e17aad4a1116482b3aa534686cf8dc3669a..8d03466e2f546aae705c1d4dd2d562d3
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -515,6 +543,13 @@ public class Slime extends Mob implements Enemy {
|
||||
@@ -511,6 +539,13 @@ public class Slime extends Mob implements Enemy {
|
||||
|
||||
((Slime.SlimeMoveControl) this.slime.getMoveControl()).setDirection(this.slime.getYRot(), this.slime.isDealsDamage());
|
||||
}
|
||||
@ -98,7 +98,7 @@ index 990f2e17aad4a1116482b3aa534686cf8dc3669a..8d03466e2f546aae705c1d4dd2d562d3
|
||||
}
|
||||
|
||||
private static class SlimeRandomDirectionGoal extends Goal {
|
||||
@@ -530,7 +565,7 @@ public class Slime extends Mob implements Enemy {
|
||||
@@ -526,7 +561,7 @@ public class Slime extends Mob implements Enemy {
|
||||
|
||||
@Override
|
||||
public boolean canUse() {
|
||||
@ -107,7 +107,7 @@ index 990f2e17aad4a1116482b3aa534686cf8dc3669a..8d03466e2f546aae705c1d4dd2d562d3
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -538,6 +573,11 @@ public class Slime extends Mob implements Enemy {
|
||||
@@ -534,6 +569,11 @@ public class Slime extends Mob implements Enemy {
|
||||
if (--this.nextRandomizeTime <= 0) {
|
||||
this.nextRandomizeTime = this.adjustedTickDelay(40 + this.slime.getRandom().nextInt(60));
|
||||
this.chosenDegrees = (float) this.slime.getRandom().nextInt(360);
|
||||
@ -119,7 +119,7 @@ index 990f2e17aad4a1116482b3aa534686cf8dc3669a..8d03466e2f546aae705c1d4dd2d562d3
|
||||
}
|
||||
|
||||
((Slime.SlimeMoveControl) this.slime.getMoveControl()).setDirection(this.chosenDegrees, false);
|
||||
@@ -555,7 +595,7 @@ public class Slime extends Mob implements Enemy {
|
||||
@@ -551,7 +591,7 @@ public class Slime extends Mob implements Enemy {
|
||||
|
||||
@Override
|
||||
public boolean canUse() {
|
||||
@ -128,7 +128,7 @@ index 990f2e17aad4a1116482b3aa534686cf8dc3669a..8d03466e2f546aae705c1d4dd2d562d3
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -563,4 +603,15 @@ public class Slime extends Mob implements Enemy {
|
||||
@@ -559,4 +599,15 @@ public class Slime extends Mob implements Enemy {
|
||||
((Slime.SlimeMoveControl) this.slime.getMoveControl()).setWantedMovement(1.0D);
|
||||
}
|
||||
}
|
@ -20,7 +20,7 @@ index 6e7eb2134186e530f31eef6f86e30e8dbf523c4d..85ad9a1a29d0cb11f552d8f34b210f1b
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/LiquidBlock.java b/src/main/java/net/minecraft/world/level/block/LiquidBlock.java
|
||||
index c3afe362f76eed689c33d05e28b1b2b9107c90c7..8497adcba2570da8875c322e751fca2fdad057e5 100644
|
||||
index 7d180d71d5b23319b26735e0d2fe187512a14842..f0cbb9e44b9434a69ea0ee7a5b403373d3680908 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/LiquidBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/LiquidBlock.java
|
||||
@@ -23,6 +23,7 @@ import net.minecraft.world.level.block.state.properties.BlockStateProperties;
|
||||
@ -62,7 +62,7 @@ index c3afe362f76eed689c33d05e28b1b2b9107c90c7..8497adcba2570da8875c322e751fca2f
|
||||
if (state.getFluidState().isSource() || neighborState.getFluidState().isSource()) {
|
||||
@@ -123,7 +140,7 @@ public class LiquidBlock extends Block implements BucketPickup {
|
||||
@Override
|
||||
public void neighborChanged(BlockState state, Level world, BlockPos pos, Block block, BlockPos fromPos, boolean notify) {
|
||||
public void neighborChanged(BlockState state, Level world, BlockPos pos, Block sourceBlock, BlockPos sourcePos, boolean notify) {
|
||||
if (this.shouldSpreadLiquid(world, pos, state)) {
|
||||
- world.scheduleTick(pos, state.getFluidState().getType(), this.fluid.getTickDelay(world));
|
||||
+ world.scheduleTick(pos, state.getFluidState().getType(), this.getFlowSpeed(world, pos)); // Paper
|
@ -7,12 +7,12 @@ Avoids a hashmap lookup by cacheing a reference to the CraftBlockData
|
||||
and cloning it when one is needed.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
|
||||
index 2b88ea323b7e179015751e87d1a4303bffed7f51..a5b7fbd940bf180b76017442ee7224761741fe52 100644
|
||||
index 06525d7687fec5b37cd6020ad1bac998b194e89f..942dae5116840a2e8a992f0830574ab2a315bdf1 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
|
||||
@@ -680,6 +680,14 @@ public abstract class BlockBehaviour {
|
||||
this.hasPostProcess = blockbase_info.hasPostProcess;
|
||||
@@ -694,6 +694,14 @@ public abstract class BlockBehaviour {
|
||||
this.emissiveRendering = blockbase_info.emissiveRendering;
|
||||
this.offsetType = (BlockBehaviour.OffsetType) blockbase_info.offsetType.apply(this.asState());
|
||||
}
|
||||
+ // Paper start - impl cached craft block data, lazy load to fix issue with loading at the wrong time
|
||||
+ private org.bukkit.craftbukkit.block.data.CraftBlockData cachedCraftBlockData;
|
||||
@ -26,10 +26,10 @@ index 2b88ea323b7e179015751e87d1a4303bffed7f51..a5b7fbd940bf180b76017442ee722476
|
||||
// Paper start
|
||||
protected boolean shapeExceedsCube = true;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java
|
||||
index 41702f632ca89158da3d72a6135240ccb2283ad6..275401f9bf7a78e69766e0547c94c3a115a8896c 100644
|
||||
index 15aff39d8d68430cc35ab134c0ab55cf50575cce..8ec78b26d6bfbcdad443c9649e35f79dd336b095 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java
|
||||
@@ -527,7 +527,17 @@ public class CraftBlockData implements BlockData {
|
||||
@@ -533,7 +533,17 @@ public class CraftBlockData implements BlockData {
|
||||
return craft;
|
||||
}
|
||||
|
@ -8,10 +8,10 @@ Use larger initial sizes to increase bucket capacity on the BiMap
|
||||
BiMap.get was seen to be using a good bit of CPU time.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/core/MappedRegistry.java b/src/main/java/net/minecraft/core/MappedRegistry.java
|
||||
index 147a7f8114eb3b59074ad71dd26273b76f95a727..c3c0e52cfe8ef5fe9049c4582778040702131b47 100644
|
||||
index db530be96664fc45c881f7438c739109a0aace75..3ef5d440fd3ce209110543bfd36569e846a5b749 100644
|
||||
--- a/src/main/java/net/minecraft/core/MappedRegistry.java
|
||||
+++ b/src/main/java/net/minecraft/core/MappedRegistry.java
|
||||
@@ -36,13 +36,11 @@ import org.slf4j.Logger;
|
||||
@@ -37,13 +37,11 @@ import org.slf4j.Logger;
|
||||
public class MappedRegistry<T> extends WritableRegistry<T> {
|
||||
private static final Logger LOGGER = LogUtils.getLogger();
|
||||
private final ObjectList<Holder.Reference<T>> byId = new ObjectArrayList<>(256);
|
||||
@ -30,7 +30,7 @@ index 147a7f8114eb3b59074ad71dd26273b76f95a727..c3c0e52cfe8ef5fe9049c45827780407
|
||||
private Lifecycle elementsLifecycle;
|
||||
private volatile Map<TagKey<T>, HolderSet.Named<T>> tags = new IdentityHashMap<>();
|
||||
private boolean frozen;
|
||||
@@ -62,6 +60,7 @@ public class MappedRegistry<T> extends WritableRegistry<T> {
|
||||
@@ -63,6 +61,7 @@ public class MappedRegistry<T> extends WritableRegistry<T> {
|
||||
this.intrusiveHolderCache = new IdentityHashMap<>();
|
||||
}
|
||||
|
@ -48,11 +48,11 @@ index c436476b3ec442b40a7ff122e6d3947a47ae163b..84400bb44d5deb7c79295a83c4c3c6aa
|
||||
|
||||
CIRCLE, SWOOP;
|
||||
diff --git a/src/main/java/net/minecraft/world/level/levelgen/PhantomSpawner.java b/src/main/java/net/minecraft/world/level/levelgen/PhantomSpawner.java
|
||||
index 9ac3047019ab32992530786b8ea7457a97d2299b..891c12b8cfcdc7a2915955bdd08e50b5b9465e02 100644
|
||||
index 573490a7c95746c3d372d258b2e592241258f6cf..e9d25aef08103ccdbc6a35c3ab67c1d921e9f45d 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/levelgen/PhantomSpawner.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/levelgen/PhantomSpawner.java
|
||||
@@ -4,6 +4,7 @@ import java.util.Iterator;
|
||||
import java.util.Random;
|
||||
@@ -3,6 +3,7 @@ package net.minecraft.world.level.levelgen;
|
||||
import java.util.Iterator;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
+import net.minecraft.server.MCUtil;
|
||||
@ -60,7 +60,7 @@ index 9ac3047019ab32992530786b8ea7457a97d2299b..891c12b8cfcdc7a2915955bdd08e50b5
|
||||
import net.minecraft.server.level.ServerPlayer;
|
||||
import net.minecraft.stats.ServerStatsCounter;
|
||||
@@ -71,8 +72,17 @@ public class PhantomSpawner implements CustomSpawner {
|
||||
int k = 1 + random.nextInt(difficultydamagescaler.getDifficulty().getId() + 1);
|
||||
int k = 1 + randomsource.nextInt(difficultydamagescaler.getDifficulty().getId() + 1);
|
||||
|
||||
for (int l = 0; l < k; ++l) {
|
||||
+ // Paper start
|
@ -6,10 +6,10 @@ Subject: [PATCH] Make CraftWorld#loadChunk(int, int, false) load unconverted
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index b456bb99db2cd0e48e44796063dc7da7eee64451..9ba1b86cb576ae4b1a01c53dac49b836f79c62ea 100644
|
||||
index 41e2102d79ac6f8c3dad4b1f85d1c98e296a2730..a21b96ceca273543e23cdc62aa3acff314467f85 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -383,7 +383,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@@ -384,7 +384,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@Override
|
||||
public boolean loadChunk(int x, int z, boolean generate) {
|
||||
org.spigotmc.AsyncCatcher.catchOp("chunk load"); // Spigot
|
Loading…
Reference in New Issue
Block a user