mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-22 08:57:35 +01:00
More more more more more more work
This commit is contained in:
parent
3fed7289ed
commit
7f384988cd
@ -25,7 +25,7 @@ index 6896ead71f87989c2fa90d0339eedfd08ac49dd1..99a7fadf87b0b081a1f5ab15a8eeb1b0
|
||||
}
|
||||
}
|
||||
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 c20753645585143421eb544a03884f0765eafb8b..5ef9abc0903fc06468c35f5a8cc450a8f6c03165 100644
|
||||
index c20753645585143421eb544a03884f0765eafb8b..11e7c30e448f192493c65330a65d89ed3e14139f 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
@@ -763,6 +763,14 @@ public abstract class Player extends LivingEntity {
|
||||
@ -34,7 +34,7 @@ index c20753645585143421eb544a03884f0765eafb8b..5ef9abc0903fc06468c35f5a8cc450a8
|
||||
// CraftBukkit end
|
||||
+ // Paper start - remove player from map on drop
|
||||
+ if (itemstack.getItem() == Items.FILLED_MAP) {
|
||||
+ net.minecraft.world.level.saveddata.maps.MapItemSavedData worldmap = net.minecraft.world.item.MapItem.getSavedData(itemstack, this.level);
|
||||
+ net.minecraft.world.level.saveddata.maps.MapItemSavedData worldmap = net.minecraft.world.item.MapItem.getSavedData(itemstack, this.level());
|
||||
+ if (worldmap != null) {
|
||||
+ worldmap.tickCarriedBy(this, itemstack);
|
||||
+ }
|
||||
|
@ -14,7 +14,7 @@ To be converted into a Paper-API event at some point in the future?
|
||||
public net.minecraft.world.entity.player.Player removeEntitiesOnShoulder()V
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index ec78328916a7cc544fea868afc904208d446739f..5f79819a8168592138e0b2297825402502c6b54d 100644
|
||||
index ec78328916a7cc544fea868afc904208d446739f..39d1304506abe361213fc6436c5ae25f000f8aee 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2322,6 +2322,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@ -23,7 +23,7 @@ index ec78328916a7cc544fea868afc904208d446739f..5f79819a8168592138e0b22978254025
|
||||
this.player.setShiftKeyDown(true);
|
||||
+
|
||||
+ // Paper start - Hang on!
|
||||
+ if (this.player.level.paperConfig().entities.behavior.parrotsAreUnaffectedByPlayerMovement) {
|
||||
+ if (this.player.level().paperConfig().entities.behavior.parrotsAreUnaffectedByPlayerMovement) {
|
||||
+ this.player.removeEntitiesOnShoulder();
|
||||
+ }
|
||||
+ // Paper end
|
||||
@ -32,7 +32,7 @@ index ec78328916a7cc544fea868afc904208d446739f..5f79819a8168592138e0b22978254025
|
||||
case RELEASE_SHIFT_KEY:
|
||||
this.player.setShiftKeyDown(false);
|
||||
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 5ef9abc0903fc06468c35f5a8cc450a8f6c03165..90aba22c91bf9950c4df2204afc3fc97e411ea9a 100644
|
||||
index 11e7c30e448f192493c65330a65d89ed3e14139f..8ef1798fe9dc42d9f09449ecc7578f4bddff1ed8 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
@@ -588,6 +588,7 @@ public abstract class Player extends LivingEntity {
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Shoulder Entities Release API
|
||||
|
||||
|
||||
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 90aba22c91bf9950c4df2204afc3fc97e411ea9a..3fb88342aeab37cc397ba80077fdf580f71bd217 100644
|
||||
index 8ef1798fe9dc42d9f09449ecc7578f4bddff1ed8..85488adc9c822c89ab5778bc1d48c58e916795c8 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
@@ -2036,20 +2036,45 @@ public abstract class Player extends LivingEntity {
|
||||
@ -14,7 +14,7 @@ index 90aba22c91bf9950c4df2204afc3fc97e411ea9a..3fb88342aeab37cc397ba80077fdf580
|
||||
|
||||
+ // Paper start
|
||||
+ public Entity releaseLeftShoulderEntity() {
|
||||
+ Entity entity = this.spawnEntityFromShoulder0(this.getShoulderEntityLeft());
|
||||
+ Entity entity = this.respawnEntityOnShoulder0(this.getShoulderEntityLeft());
|
||||
+ if (entity != null) {
|
||||
+ this.setShoulderEntityLeft(new CompoundTag());
|
||||
+ }
|
||||
@ -22,7 +22,7 @@ index 90aba22c91bf9950c4df2204afc3fc97e411ea9a..3fb88342aeab37cc397ba80077fdf580
|
||||
+ }
|
||||
+
|
||||
+ public Entity releaseRightShoulderEntity() {
|
||||
+ Entity entity = this.spawnEntityFromShoulder0(this.getShoulderEntityRight());
|
||||
+ Entity entity = this.respawnEntityOnShoulder0(this.getShoulderEntityRight());
|
||||
+ if (entity != null) {
|
||||
+ this.setShoulderEntityRight(new CompoundTag());
|
||||
+ }
|
||||
@ -32,7 +32,7 @@ index 90aba22c91bf9950c4df2204afc3fc97e411ea9a..3fb88342aeab37cc397ba80077fdf580
|
||||
+
|
||||
private boolean respawnEntityOnShoulder(CompoundTag nbttagcompound) { // CraftBukkit void->boolean
|
||||
- if (!this.level().isClientSide && !nbttagcompound.isEmpty()) {
|
||||
+ return this.spawnEntityFromShoulder0(nbttagcompound) != null;
|
||||
+ return this.respawnEntityOnShoulder0(nbttagcompound) != null;
|
||||
+ }
|
||||
+
|
||||
+ // Paper - return entity
|
||||
|
@ -6,7 +6,7 @@ Subject: [PATCH] Send attack SoundEffects only to players who can see the
|
||||
|
||||
|
||||
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 3fb88342aeab37cc397ba80077fdf580f71bd217..62112ea94bc6a022b69ab426cc2b71821b12c19e 100644
|
||||
index 85488adc9c822c89ab5778bc1d48c58e916795c8..9922ab54fa2ea3abef759aba08cca535f70030e8 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
@@ -1234,7 +1234,7 @@ public abstract class Player extends LivingEntity {
|
||||
@ -61,7 +61,7 @@ index 3fb88342aeab37cc397ba80077fdf580f71bd217..62112ea94bc6a022b69ab426cc2b7182
|
||||
}
|
||||
+ // Paper start - send SoundEffect to everyone who can see fromEntity
|
||||
+ private static void sendSoundEffect(Player fromEntity, double x, double y, double z, SoundEvent soundEffect, SoundSource soundCategory, float volume, float pitch) {
|
||||
+ fromEntity.level.playSound(fromEntity, x, y, z, soundEffect, soundCategory, volume, pitch); // This will not send the effect to the entity himself
|
||||
+ fromEntity.level().playSound(fromEntity, x, y, z, soundEffect, soundCategory, volume, pitch); // This will not send the effect to the entity himself
|
||||
+ if (fromEntity instanceof ServerPlayer) {
|
||||
+ ((ServerPlayer) fromEntity).connection.send(new net.minecraft.network.protocol.game.ClientboundSoundPacket(net.minecraft.core.registries.BuiltInRegistries.SOUND_EVENT.wrapAsHolder(soundEffect), soundCategory, x, y, z, volume, pitch, fromEntity.random.nextLong()));
|
||||
+ }
|
||||
|
@ -5,14 +5,14 @@ Subject: [PATCH] Toggleable player crits, helps mitigate hacked clients.
|
||||
|
||||
|
||||
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 62112ea94bc6a022b69ab426cc2b71821b12c19e..0bf9425d001660816b36674c2757ec9e85cbd296 100644
|
||||
index 9922ab54fa2ea3abef759aba08cca535f70030e8..a668a62da9fb7fc013f078c030580b13a62db3ca 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
@@ -1241,6 +1241,7 @@ public abstract class Player extends LivingEntity {
|
||||
|
||||
boolean flag2 = flag && this.fallDistance > 0.0F && !this.onGround() && !this.onClimbable() && !this.isInWater() && !this.hasEffect(MobEffects.BLINDNESS) && !this.isPassenger() && target instanceof LivingEntity;
|
||||
|
||||
+ flag2 = flag2 && !level.paperConfig().entities.behavior.disablePlayerCrits; // Paper
|
||||
+ flag2 = flag2 && !this.level().paperConfig().entities.behavior.disablePlayerCrits; // Paper
|
||||
flag2 = flag2 && !this.isSprinting();
|
||||
if (flag2) {
|
||||
f *= 1.5F;
|
||||
|
@ -6,7 +6,7 @@ Subject: [PATCH] Configurable sprint interruption on attack
|
||||
If the sprint interruption is disabled players continue sprinting when they attack entities.
|
||||
|
||||
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 0bf9425d001660816b36674c2757ec9e85cbd296..f5662c9b8dfd3251be6bf57e7bc13aeb54fe30c2 100644
|
||||
index a668a62da9fb7fc013f078c030580b13a62db3ca..10dd06a23b34b7c8515c9ccc3988a9e8182c460d 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
@@ -1290,7 +1290,11 @@ public abstract class Player extends LivingEntity {
|
||||
@ -15,7 +15,7 @@ index 0bf9425d001660816b36674c2757ec9e85cbd296..f5662c9b8dfd3251be6bf57e7bc13aeb
|
||||
this.setDeltaMovement(this.getDeltaMovement().multiply(0.6D, 1.0D, 0.6D));
|
||||
- this.setSprinting(false);
|
||||
+ // Paper start - Configuration option to disable automatic sprint interruption
|
||||
+ if (!level.paperConfig().misc.disableSprintInterruptionOnAttack) {
|
||||
+ if (!this.level().paperConfig().misc.disableSprintInterruptionOnAttack) {
|
||||
+ this.setSprinting(false);
|
||||
+ }
|
||||
+ // Paper end
|
||||
|
@ -5,17 +5,17 @@ Subject: [PATCH] Use AsyncAppender to keep logging IO off main thread
|
||||
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index 8af9299c67ad2a1746bb340287b3373b208568ee..03095720795b994d0d97e7f65d350552792d71a8 100644
|
||||
index 967b675eb600282b881d966f95c9d3cde3edc4e8..89bdaf0da412eb13c33039599df90b9ac86b02bf 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -27,6 +27,7 @@ dependencies {
|
||||
implementation("commons-lang:commons-lang:2.6")
|
||||
runtimeOnly("org.xerial:sqlite-jdbc:3.41.2.2")
|
||||
runtimeOnly("com.mysql:mysql-connector-j:8.0.32")
|
||||
runtimeOnly("org.xerial:sqlite-jdbc:3.42.0.0")
|
||||
runtimeOnly("com.mysql:mysql-connector-j:8.0.33")
|
||||
+ runtimeOnly("com.lmax:disruptor:3.4.4") // Paper
|
||||
|
||||
runtimeOnly("org.apache.maven:maven-resolver-provider:3.8.5")
|
||||
runtimeOnly("org.apache.maven.resolver:maven-resolver-connector-basic:1.7.3")
|
||||
runtimeOnly("org.apache.maven:maven-resolver-provider:3.9.2")
|
||||
runtimeOnly("org.apache.maven.resolver:maven-resolver-connector-basic:1.9.10")
|
||||
diff --git a/src/main/resources/log4j2.xml b/src/main/resources/log4j2.xml
|
||||
index 476f4a5cbe664ddd05474cb88553018bd334a5b8..3dc317e466e1b93dff030794dd7f29ca1b266778 100644
|
||||
--- a/src/main/resources/log4j2.xml
|
@ -6,12 +6,12 @@ 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 8b3beb78cf48ea7a23865ddc16c8421ecb047aba..8d3712314a1674470bad90895e86bb34d923dcaa 100644
|
||||
index 2032b98a1571846b28fd18cdb3ae96f2640a11c9..96a4fb8f0fe5e8c3ec8172e5c1f49f16455f3853 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -3025,7 +3025,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -3096,7 +3096,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
public String toString() {
|
||||
String s = this.level == null ? "~NULL~" : this.level.toString();
|
||||
String s = this.level() == null ? "~NULL~" : this.level().toString();
|
||||
|
||||
- return this.removalReason != null ? String.format(Locale.ROOT, "%s['%s'/%d, l='%s', x=%.2f, y=%.2f, z=%.2f, removed=%s]", this.getClass().getSimpleName(), this.getName().getString(), this.id, s, this.getX(), this.getY(), this.getZ(), this.removalReason) : String.format(Locale.ROOT, "%s['%s'/%d, l='%s', x=%.2f, y=%.2f, z=%.2f]", this.getClass().getSimpleName(), this.getName().getString(), this.id, s, this.getX(), this.getY(), this.getZ());
|
||||
+ return this.removalReason != null ? String.format(Locale.ROOT, "%s['%s'/%d, uuid='%s', l='%s', x=%.2f, y=%.2f, z=%.2f, cpos=%s, tl=%d, v=%b, removed=%s]", this.getClass().getSimpleName(), this.getName().getString(), this.id, this.uuid, s, this.getX(), this.getY(), this.getZ(), this.chunkPosition(), this.tickCount, this.valid, this.removalReason) : String.format(Locale.ROOT, "%s['%s'/%d, uuid='%s', l='%s', x=%.2f, y=%.2f, z=%.2f, cpos=%s, tl=%d, v=%b]", this.getClass().getSimpleName(), this.getName().getString(), this.id, this.uuid, s, this.getX(), this.getY(), this.getZ(), this.chunkPosition(), this.tickCount, this.valid);
|
@ -5,7 +5,7 @@ Subject: [PATCH] EnderDragon Events
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonSittingFlamingPhase.java b/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonSittingFlamingPhase.java
|
||||
index 68e27569f44efd7fa234c19c7fd51da709a06a43..f18830d9d0f821e5603992846c335bba04ab640f 100644
|
||||
index f72ad2e7d0d5953c906d0d9f8adb9ba74d1841be..7b96cf748b69db98cb1bc3dc0430e39b9ffc93f2 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonSittingFlamingPhase.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonSittingFlamingPhase.java
|
||||
@@ -83,7 +83,13 @@ public class DragonSittingFlamingPhase extends AbstractDragonSittingPhase {
|
||||
@ -13,7 +13,7 @@ index 68e27569f44efd7fa234c19c7fd51da709a06a43..f18830d9d0f821e5603992846c335bba
|
||||
this.flame.setParticle(ParticleTypes.DRAGON_BREATH);
|
||||
this.flame.addEffect(new MobEffectInstance(MobEffects.HARM));
|
||||
+ if (new com.destroystokyo.paper.event.entity.EnderDragonFlameEvent((org.bukkit.entity.EnderDragon) this.dragon.getBukkitEntity(), (org.bukkit.entity.AreaEffectCloud) this.flame.getBukkitEntity()).callEvent()) { // Paper
|
||||
this.dragon.level.addFreshEntity(this.flame);
|
||||
this.dragon.level().addFreshEntity(this.flame);
|
||||
+ // Paper start
|
||||
+ } else {
|
||||
+ this.end();
|
||||
@ -23,21 +23,21 @@ index 68e27569f44efd7fa234c19c7fd51da709a06a43..f18830d9d0f821e5603992846c335bba
|
||||
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonStrafePlayerPhase.java b/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonStrafePlayerPhase.java
|
||||
index 62b4b9a63452e8af7425c4d8ea4b4bada441c563..c2a14305cb737fbc6447c555d8a15e2d3977e3fa 100644
|
||||
index f54576f6450e24f574bfe7f4b8e2ad5d8c9f1ba3..a3456b35db4e938f91d6bc32d4d202a011bf13c4 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonStrafePlayerPhase.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonStrafePlayerPhase.java
|
||||
@@ -74,7 +74,9 @@ public class DragonStrafePlayerPhase extends AbstractDragonPhaseInstance {
|
||||
|
||||
DragonFireball dragonFireball = new DragonFireball(this.dragon.level, this.dragon, r, s, t);
|
||||
DragonFireball dragonFireball = new DragonFireball(this.dragon.level(), this.dragon, r, s, t);
|
||||
dragonFireball.moveTo(o, p, q, 0.0F, 0.0F);
|
||||
+ if (new com.destroystokyo.paper.event.entity.EnderDragonShootFireballEvent((org.bukkit.entity.EnderDragon) dragon.getBukkitEntity(), (org.bukkit.entity.DragonFireball) dragonFireball.getBukkitEntity()).callEvent()) // Paper
|
||||
this.dragon.level.addFreshEntity(dragonFireball);
|
||||
this.dragon.level().addFreshEntity(dragonFireball);
|
||||
+ else dragonFireball.discard(); // Paper
|
||||
this.fireballCharge = 0;
|
||||
if (this.currentPath != null) {
|
||||
while(!this.currentPath.isDone()) {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/projectile/DragonFireball.java b/src/main/java/net/minecraft/world/entity/projectile/DragonFireball.java
|
||||
index a7935042497a108a21814c28b01a0ab27aefbbc4..6afe37e42d88701af38df5793a9ea9d7d2cda5c5 100644
|
||||
index 796a2a88134eee4021423fef132537a5e0680bc5..9652e3385ad10e5d825dd141f6be3522c596916d 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/projectile/DragonFireball.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/projectile/DragonFireball.java
|
||||
@@ -52,8 +52,10 @@ public class DragonFireball extends AbstractHurtingProjectile {
|
||||
@ -45,8 +45,8 @@ index a7935042497a108a21814c28b01a0ab27aefbbc4..6afe37e42d88701af38df5793a9ea9d7
|
||||
}
|
||||
|
||||
+ if (new com.destroystokyo.paper.event.entity.EnderDragonFireballHitEvent((org.bukkit.entity.DragonFireball) this.getBukkitEntity(), list.stream().map(LivingEntity::getBukkitLivingEntity).collect(java.util.stream.Collectors.toList()), (org.bukkit.entity.AreaEffectCloud) areaEffectCloud.getBukkitEntity()).callEvent()) { // Paper
|
||||
this.level.levelEvent(2006, this.blockPosition(), this.isSilent() ? -1 : 1);
|
||||
this.level.addFreshEntity(areaEffectCloud);
|
||||
this.level().levelEvent(2006, this.blockPosition(), this.isSilent() ? -1 : 1);
|
||||
this.level().addFreshEntity(areaEffectCloud);
|
||||
+ } else areaEffectCloud.discard(); // Paper
|
||||
this.discard();
|
||||
}
|
@ -267,7 +267,7 @@ index 0673f62f25532955f3552b64f122e644d42027e4..de5bdceb4c8578fb972a2fd5ee0dfdae
|
||||
return InteractionResultHolder.sidedSuccess(itemStack, world.isClientSide());
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/item/TridentItem.java b/src/main/java/net/minecraft/world/item/TridentItem.java
|
||||
index 998758be827efbcb7693ed36ab1dffc0ef0369bf..9365f886a23a71c41091b22d46896ff18a5a0635 100644
|
||||
index 216ae3fbc6d64538255ad404ad7e9915d6694f81..8078f127ff4b6e0aafb5804b9c02e237f79445b5 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/TridentItem.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/TridentItem.java
|
||||
@@ -83,21 +83,25 @@ public class TridentItem extends Item implements Vanishable {
|
@ -5,22 +5,22 @@ Subject: [PATCH] Option to prevent armor stands from doing entity lookups
|
||||
|
||||
|
||||
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 8de5a556d364f29706e3391825288c8a3a75c9c8..51acb26076d7de1f365f7aaf6a2ab274a4b87cdc 100644
|
||||
index 68ac3ffae5d800bde3c5b5163a52768a43bb5963..a59381646031a1a99c98c8c6ad9de7efc96b774a 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
|
||||
@@ -337,6 +337,7 @@ public class ArmorStand extends LivingEntity {
|
||||
|
||||
@Override
|
||||
protected void pushEntities() {
|
||||
+ if (!level.paperConfig().entities.armorStands.doCollisionEntityLookups) return; // Paper
|
||||
List<Entity> list = this.level.getEntities((Entity) this, this.getBoundingBox(), ArmorStand.RIDABLE_MINECARTS);
|
||||
+ if (!this.level().paperConfig().entities.armorStands.doCollisionEntityLookups) return; // Paper
|
||||
List<Entity> list = this.level().getEntities((Entity) this, this.getBoundingBox(), ArmorStand.RIDABLE_MINECARTS);
|
||||
|
||||
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 7c8069e237a41bf5d9fc09199ff1ac247e245d9d..f07e70ab26fffaec5055a7dd2571dc4d29c66d35 100644
|
||||
index eb2f9464b15f4e6e25c419761c055b6ee4c03279..823121fdfe99db01e3e995a50dbc8e241bcebe9c 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -772,6 +772,13 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -760,6 +760,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 ad5c96e9a7577df1729533ec9a709387b7232844..621ecd0f3cac52d3e4cecd003c67401ec7f0a6f7 100644
|
||||
index e9ae25a70c747c173ebd2e393818d205527d5314..f49dd279ba9e8970f116f956466feb072c4f8420 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
|
||||
@@ -216,6 +216,15 @@ public abstract class Projectile extends Entity implements TraceableEntity {
|
||||
@@ -217,6 +217,15 @@ public abstract class Projectile extends Entity implements TraceableEntity {
|
||||
} else {
|
||||
Entity entity1 = this.getOwner();
|
||||
|
||||
@ -39,10 +39,10 @@ index a6638e626600e4304a973497a39e3fac52203b16..e68b7a1b03783e4f9de24c5ae8773fc3
|
||||
|
||||
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 f07e70ab26fffaec5055a7dd2571dc4d29c66d35..754e1667aadef89bbaccebc0f437197b1331b7f8 100644
|
||||
index 823121fdfe99db01e3e995a50dbc8e241bcebe9c..99bc511425cf079303716a5b12c913bc48ce775a 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -274,6 +274,45 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -273,6 +273,45 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
this.tileLimiter = new org.spigotmc.TickLimiter(spigotConfig.tileMaxTickTime);
|
||||
}
|
||||
|
||||
@ -89,7 +89,7 @@ index f07e70ab26fffaec5055a7dd2571dc4d29c66d35..754e1667aadef89bbaccebc0f437197b
|
||||
public boolean isClientSide() {
|
||||
return this.isClientSide;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index c50cfe19bd40fb75fc66767d2760eb3b5852c4c8..ff1108579b9f8bb867be02a07784c645d0f4d037 100644
|
||||
index 116d3af618351cfec7dc172ba8e5170453b7226d..b77fefc9cf30fd438f557e5b56efb4c0251cb17a 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -1298,6 +1298,14 @@ public class CraftEventFactory {
|
@ -5,7 +5,7 @@ Subject: [PATCH] Allow disabling armour stand ticking
|
||||
|
||||
|
||||
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 51acb26076d7de1f365f7aaf6a2ab274a4b87cdc..e38cbdff34479673f1640c46d727f1a807a609c7 100644
|
||||
index a59381646031a1a99c98c8c6ad9de7efc96b774a..719f68f96e58ddcdd3592131c691d21263c81915 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
|
||||
@@ -93,9 +93,16 @@ public class ArmorStand extends LivingEntity {
|
||||
@ -54,7 +54,7 @@ index 51acb26076d7de1f365f7aaf6a2ab274a4b87cdc..e38cbdff34479673f1640c46d727f1a8
|
||||
CompoundTag nbttagcompound1 = nbt.getCompound("Pose");
|
||||
|
||||
this.readPose(nbttagcompound1);
|
||||
@@ -669,7 +684,29 @@ public class ArmorStand extends LivingEntity {
|
||||
@@ -663,7 +678,29 @@ public class ArmorStand extends LivingEntity {
|
||||
|
||||
@Override
|
||||
public void tick() {
|
||||
@ -84,7 +84,7 @@ index 51acb26076d7de1f365f7aaf6a2ab274a4b87cdc..e38cbdff34479673f1640c46d727f1a8
|
||||
Rotations vector3f = (Rotations) this.entityData.get(ArmorStand.DATA_HEAD_POSE);
|
||||
|
||||
if (!this.headPose.equals(vector3f)) {
|
||||
@@ -793,31 +830,37 @@ public class ArmorStand extends LivingEntity {
|
||||
@@ -792,31 +829,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 17fda4857f74d2994525262472700e7788dec383..3b452b960a5e5e5d6582d7b64fe034402fb5fc2b 100644
|
||||
index 8f20239f3ef7ebe41fac8ee6e024c36dafec33c4..d00fb16ae3b94dfcb10fd1a7c1671595e2ff1855 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
|
||||
@@ -18,6 +18,7 @@ import net.minecraft.world.item.enchantment.EnchantmentHelper;
|
||||
@ -20,22 +20,22 @@ index 17fda4857f74d2994525262472700e7788dec383..3b452b960a5e5e5d6582d7b64fe03440
|
||||
|
||||
@Override
|
||||
public boolean canUse() {
|
||||
- return this.horse.level.hasNearbyAlivePlayerThatAffectsSpawning(this.horse.getX(), this.horse.getY(), this.horse.getZ(), 10.0D); // Paper - Affects Spawning API
|
||||
+ return !(eligiblePlayers = this.horse.level.findNearbyBukkitPlayers(this.horse.getX(), this.horse.getY(), this.horse.getZ(), 10.0D, net.minecraft.world.entity.EntitySelector.PLAYER_AFFECTS_SPAWNING)).isEmpty(); // Paper - Affects Spawning API & SkeletonHorseTrapEvent
|
||||
- return this.horse.level().hasNearbyAlivePlayerThatAffectsSpawning(this.horse.getX(), this.horse.getY(), this.horse.getZ(), 10.0D); // Paper - Affects Spawning API
|
||||
+ return !(eligiblePlayers = this.horse.level().findNearbyBukkitPlayers(this.horse.getX(), this.horse.getY(), this.horse.getZ(), 10.0D, net.minecraft.world.entity.EntitySelector.PLAYER_AFFECTS_SPAWNING)).isEmpty(); // Paper - Affects Spawning API & SkeletonHorseTrapEvent
|
||||
}
|
||||
|
||||
@Override
|
||||
public void tick() {
|
||||
ServerLevel worldserver = (ServerLevel) this.horse.level;
|
||||
ServerLevel worldserver = (ServerLevel) this.horse.level();
|
||||
+ if (!new com.destroystokyo.paper.event.entity.SkeletonHorseTrapEvent((org.bukkit.entity.SkeletonHorse) this.horse.getBukkitEntity(), eligiblePlayers).callEvent()) return; // Paper
|
||||
DifficultyInstance difficultydamagescaler = worldserver.getCurrentDifficultyAt(this.horse.blockPosition());
|
||||
|
||||
this.horse.setTrap(false);
|
||||
diff --git a/src/main/java/net/minecraft/world/level/EntityGetter.java b/src/main/java/net/minecraft/world/level/EntityGetter.java
|
||||
index ea98625fe7c00743b8df74a24e6d4b75df4189a5..66a5783e2a83c75ca46d1fd6f97d9de733c01a09 100644
|
||||
index 5e19b91e6fb7e5e354f55ea206b3d59e8767e714..625de1355efddf97f0fd3a0225081867c8a3fa7c 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/EntityGetter.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/EntityGetter.java
|
||||
@@ -105,6 +105,28 @@ public interface EntityGetter {
|
||||
@@ -93,6 +93,28 @@ public interface EntityGetter {
|
||||
return player;
|
||||
}
|
||||
|
@ -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 4f350770fe90166f59c14e88abb34a3e3f494d22..16dd2e9951cf34af0c5bd4891d013423b9fad8b9 100644
|
||||
index e9ea9c85544a895dcf4220d907744996e6e077d4..5388a07fd8b5c8a4ea604996fb41e526e0d7c16c 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
||||
@@ -654,7 +654,7 @@ public final class CraftItemStack extends ItemStack {
|
||||
@@ -656,7 +656,7 @@ public final class CraftItemStack extends ItemStack {
|
||||
|
||||
@Override
|
||||
public boolean hasItemMeta() {
|
@ -5,10 +5,10 @@ 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 e0d7fffdda14038907792fd73251d5dc41f94b3f..0a132fbbc58f52e51f50a44e887a3f20d2e0a61c 100644
|
||||
index b3d4b8a1a3fecd58edeed6562ffabe123569c139..d15f01f5a4f14d25ded9de015c70cbc7977a6a77 100644
|
||||
--- a/src/main/java/net/minecraft/world/inventory/AnvilMenu.java
|
||||
+++ b/src/main/java/net/minecraft/world/inventory/AnvilMenu.java
|
||||
@@ -105,6 +105,16 @@ public class AnvilMenu extends ItemCombinerMenu {
|
||||
@@ -108,6 +108,16 @@ public class AnvilMenu extends ItemCombinerMenu {
|
||||
if (!player.getAbilities().instabuild && iblockdata.is(BlockTags.ANVIL) && player.getRandom().nextFloat() < 0.12F) {
|
||||
BlockState iblockdata1 = AnvilBlock.damage(iblockdata);
|
||||
|
@ -5,23 +5,23 @@ 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 55a8ab31a26a16adbe78b3b34366dc81851c02d4..da1e60206f300d64f68f5aedeba52a164829676e 100644
|
||||
index 9d5d03a913366c0f60557e39523c30df7e2fde33..655f23ab6d594db838acca7baede45594ce1fd79 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
|
||||
@@ -534,6 +534,11 @@ public class EnderDragon extends Mob implements Enemy {
|
||||
@@ -567,6 +567,11 @@ public class EnderDragon extends Mob implements Enemy {
|
||||
});
|
||||
craftBlock.getNMS().spawnAfterBreak((ServerLevel) level, blockposition, ItemStack.EMPTY, false);
|
||||
craftBlock.getNMS().spawnAfterBreak((ServerLevel) this.level(), blockposition, ItemStack.EMPTY, false);
|
||||
}
|
||||
+ // Paper start - TNTPrimeEvent
|
||||
+ org.bukkit.block.Block tntBlock = level.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ());
|
||||
+ if(!new com.destroystokyo.paper.event.block.TNTPrimeEvent(tntBlock, com.destroystokyo.paper.event.block.TNTPrimeEvent.PrimeReason.EXPLOSION, explosionSource.getIndirectSourceEntity().getBukkitEntity()).callEvent())
|
||||
+ continue;
|
||||
+ // Paper end
|
||||
nmsBlock.wasExploded(level, blockposition, explosionSource);
|
||||
nmsBlock.wasExploded(this.level(), blockposition, explosionSource);
|
||||
|
||||
this.level.removeBlock(blockposition, false);
|
||||
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 9b3764fb06c186d1f971f6c7468bed4d7159987f..d16bec52ad650670927093efb9943da1dd5eac3f 100644
|
||||
index 49df94d8a5d1d4020e7e9f5457f117ebaa581b43..945d8b0f58f6a5b2281f136d3afbba3b34e0e6b5 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/FireBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/FireBlock.java
|
||||
@@ -295,12 +295,19 @@ public class FireBlock extends BaseFireBlock {
|
@ -22,7 +22,7 @@ to take the burden of this into their own hand without having to rely on
|
||||
plugins doing unsafe things.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 7f7b897e3633df849b764b7e7f94cc588b55046d..2c3b91cb401880353ca77ce6237214d7068a518e 100644
|
||||
index 225274027b6db1138f7d28bff967f26b2544be18..1aec3ec3debe3adfd5fda424761b559614dfdc84 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -265,6 +265,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@ -41,9 +41,9 @@ index 7f7b897e3633df849b764b7e7f94cc588b55046d..2c3b91cb401880353ca77ce6237214d7
|
||||
/* Use thread-safe field access instead
|
||||
if (this.chatSpamTickCount > 0) {
|
||||
--this.chatSpamTickCount;
|
||||
@@ -789,7 +791,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -797,7 +799,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
public void handleCustomCommandSuggestions(ServerboundCommandSuggestionPacket packet) {
|
||||
// PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel()); // Paper - run this async
|
||||
// PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel()); // Paper - run this async
|
||||
// CraftBukkit start
|
||||
- if (this.chatSpamTickCount.addAndGet(1) > 500 && !this.server.getPlayerList().isOp(this.player.getGameProfile())) {
|
||||
+ if (this.chatSpamTickCount.addAndGet(io.papermc.paper.configuration.GlobalConfiguration.get().spamLimiter.tabSpamIncrement) > io.papermc.paper.configuration.GlobalConfiguration.get().spamLimiter.tabSpamLimit && !this.server.getPlayerList().isOp(this.player.getGameProfile())) { // Paper start - split and make configurable
|
@ -8,10 +8,10 @@ Addresses two issues:
|
||||
- Allay duplication cooldown is saved and exposed as a long, but loaded as an int
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
|
||||
index c0c0090ab271dba1cc367e216fea3d9f73e5b887..a9f20e6a73e2e1875abd1e122a5d08c4ef44f9d8 100644
|
||||
index 74e86c76631f779d7edb92de4d2a94c4ccca4afb..600acd102086050d63b1471b30fed0468cecfaf9 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
|
||||
@@ -288,7 +288,7 @@ public class ExperienceOrb extends Entity {
|
||||
@@ -293,7 +293,7 @@ public class ExperienceOrb extends Entity {
|
||||
public void addAdditionalSaveData(CompoundTag nbt) {
|
||||
nbt.putShort("Health", (short) this.health);
|
||||
nbt.putShort("Age", (short) this.age);
|
||||
@ -20,7 +20,7 @@ index c0c0090ab271dba1cc367e216fea3d9f73e5b887..a9f20e6a73e2e1875abd1e122a5d08c4
|
||||
nbt.putInt("Count", this.count);
|
||||
this.savePaperNBT(nbt); // Paper
|
||||
}
|
||||
@@ -297,7 +297,7 @@ public class ExperienceOrb extends Entity {
|
||||
@@ -302,7 +302,7 @@ public class ExperienceOrb extends Entity {
|
||||
public void readAdditionalSaveData(CompoundTag nbt) {
|
||||
this.health = nbt.getShort("Health");
|
||||
this.age = nbt.getShort("Age");
|
||||
@ -30,10 +30,10 @@ index c0c0090ab271dba1cc367e216fea3d9f73e5b887..a9f20e6a73e2e1875abd1e122a5d08c4
|
||||
this.loadPaperNBT(nbt); // Paper
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/allay/Allay.java b/src/main/java/net/minecraft/world/entity/animal/allay/Allay.java
|
||||
index cc8c99e8f260ffe5c2e3f81f928e15efdece6228..9b57d2b766f2de2d3fb4a3b5ef4df8d6756a1942 100644
|
||||
index 33a058474cd9d5e089a39e04cf5176eb9df62603..339c70f101d026a100a801e66cf514b3329a89d2 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/allay/Allay.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/allay/Allay.java
|
||||
@@ -516,7 +516,7 @@ public class Allay extends PathfinderMob implements InventoryCarrier {
|
||||
@@ -514,7 +514,7 @@ public class Allay extends PathfinderMob implements InventoryCarrier, VibrationS
|
||||
});
|
||||
}
|
||||
|
@ -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 526ffddc27d85237dd2f8a1028945fa58ffaefb2..27b646341bdae8918649c5e9fdf05708638ad835 100644
|
||||
index ab01080c3b00a3988f2dd48fd4ecf1488bfcce8b..74fcf9debaebd5c99c2c06dfc5e169261da284de 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
@@ -899,6 +899,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -1431,6 +1431,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 526ffddc27d85237dd2f8a1028945fa58ffaefb2..27b646341bdae8918649c5e9fdf05708
|
||||
this.entityMap.put(entity.getId(), playerchunkmap_entitytracker);
|
||||
playerchunkmap_entitytracker.updatePlayers(this.level.players());
|
||||
if (entity instanceof ServerPlayer) {
|
||||
@@ -941,7 +942,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -1473,7 +1474,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
if (playerchunkmap_entitytracker1 != null) {
|
||||
playerchunkmap_entitytracker1.broadcastRemoved();
|
||||
}
|
||||
@ -29,10 +29,10 @@ index 526ffddc27d85237dd2f8a1028945fa58ffaefb2..27b646341bdae8918649c5e9fdf05708
|
||||
|
||||
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 718a403799246228e085280cb539236b01720d4b..e46f18e342f2e682c4d5bbac22187a171df8eb33 100644
|
||||
index 0612151976fe8bca5bdda27980d7e35e0aea1547..7a1587ef175e075d7748604cf33db7e3d514479f 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -217,6 +217,9 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -221,6 +221,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 718a403799246228e085280cb539236b01720d4b..e46f18e342f2e682c4d5bbac22187a17
|
||||
|
||||
@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);
|
||||
@@ -1270,7 +1273,28 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1179,7 +1182,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,7 +72,7 @@ index 718a403799246228e085280cb539236b01720d4b..e46f18e342f2e682c4d5bbac22187a17
|
||||
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 8d3712314a1674470bad90895e86bb34d923dcaa..bb926384659194501bfdbed01b1f66d0909a592a 100644
|
||||
index 96a4fb8f0fe5e8c3ec8172e5c1f49f16455f3853..b1697cf2501f75620bf82d3b9eb8ca81491baff0 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -238,6 +238,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@ -85,10 +85,10 @@ index 8d3712314a1674470bad90895e86bb34d923dcaa..bb926384659194501bfdbed01b1f66d0
|
||||
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 754e1667aadef89bbaccebc0f437197b1331b7f8..e7e069ea6b5fc20225e6fabd98e0ffb6de497ce2 100644
|
||||
index 99bc511425cf079303716a5b12c913bc48ce775a..9f64020550a721ae01f9ffbe870b75762bfbd423 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -151,6 +151,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -150,6 +150,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
public boolean pvpMode;
|
||||
public boolean keepSpawnInMemory = true;
|
||||
public org.bukkit.generator.ChunkGenerator generator;
|
@ -9,10 +9,10 @@ thread dumps at an interval until the point of crash.
|
||||
This will help diagnose what was going on in that time before the crash.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 274f3a213e60c9b67dbc43c8b53efb676b8bd41e..387c423dfe69a3310f8e7aa3dbb7faafc9501e50 100644
|
||||
index 646d6d3833ab7e40165502f29b0522562d6b8a71..a6d0d3b4f9d69391fb33c4d13388ad573939a36f 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1052,6 +1052,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1067,6 +1067,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.status = this.buildServerStatus();
|
||||
|
||||
// Spigot start
|
||||
@ -21,7 +21,7 @@ index 274f3a213e60c9b67dbc43c8b53efb676b8bd41e..387c423dfe69a3310f8e7aa3dbb7faaf
|
||||
long start = System.nanoTime(), curTime, tickSection = start; // Paper - Further improve server tick loop
|
||||
lastTick = start - TICK_TIME; // Paper
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index e6826cd0a596f063e8737dcde3c8c6c5b3f71970..1a2607d1b257cea65c82c661a6b3d46c1526a775 100644
|
||||
index 95f39630c9b4d2a41d8469d0d53da92e5578c347..f93664b2d27f74c26dc4618bcd09fb1494b99542 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -197,6 +197,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@ -33,7 +33,7 @@ index e6826cd0a596f063e8737dcde3c8c6c5b3f71970..1a2607d1b257cea65c82c661a6b3d46c
|
||||
com.destroystokyo.paper.Metrics.PaperMetrics.startMetrics();
|
||||
com.destroystokyo.paper.VersionHistoryManager.INSTANCE.getClass(); // load version history now
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index cb70820fd96624c2378e98d48ac31a11dc9e25e3..195b3f20617f9ad1e1fa522d138be3b570aa49a4 100644
|
||||
index 3798a78a48047bde4e78072b271ba0a22c0ba579..56d090f5635a790bc856438edc16153b2e1f66f9 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -924,6 +924,7 @@ public final class CraftServer implements Server {
|
||||
@ -66,10 +66,10 @@ index ddc5f2d9aa7dda6aff132392927e3d7e3674dbff..3ac48dafe2300ff4cf4591569fec9ce4
|
||||
|
||||
public static boolean bungee;
|
||||
diff --git a/src/main/java/org/spigotmc/WatchdogThread.java b/src/main/java/org/spigotmc/WatchdogThread.java
|
||||
index a9897c494b3dc56d900356d74030359832febbaa..b47d043144c499b1499f6b4be5a16a3f75c9fcb8 100644
|
||||
index 6e1fa4f0616ccfd258acd1b4f5b08fc0ad4c9529..06efdd7aa6d35a670e81c4f303618a7ba301396a 100644
|
||||
--- a/src/main/java/org/spigotmc/WatchdogThread.java
|
||||
+++ b/src/main/java/org/spigotmc/WatchdogThread.java
|
||||
@@ -14,6 +14,10 @@ public final class WatchdogThread extends io.papermc.paper.util.TickThread // Pa
|
||||
@@ -14,6 +14,10 @@ public class WatchdogThread extends Thread
|
||||
private static WatchdogThread instance;
|
||||
private long timeoutTime;
|
||||
private boolean restart;
|
||||
@ -80,7 +80,7 @@ index a9897c494b3dc56d900356d74030359832febbaa..b47d043144c499b1499f6b4be5a16a3f
|
||||
private volatile long lastTick;
|
||||
private volatile boolean stopping;
|
||||
|
||||
@@ -22,6 +26,8 @@ public final class WatchdogThread extends io.papermc.paper.util.TickThread // Pa
|
||||
@@ -22,6 +26,8 @@ public class WatchdogThread extends Thread
|
||||
super( "Paper Watchdog Thread" );
|
||||
this.timeoutTime = timeoutTime;
|
||||
this.restart = restart;
|
||||
@ -89,7 +89,7 @@ index a9897c494b3dc56d900356d74030359832febbaa..b47d043144c499b1499f6b4be5a16a3f
|
||||
}
|
||||
|
||||
private static long monotonicMillis()
|
||||
@@ -61,9 +67,18 @@ public final class WatchdogThread extends io.papermc.paper.util.TickThread // Pa
|
||||
@@ -61,9 +67,18 @@ public class WatchdogThread extends Thread
|
||||
while ( !this.stopping )
|
||||
{
|
||||
//
|
||||
@ -110,7 +110,7 @@ index a9897c494b3dc56d900356d74030359832febbaa..b47d043144c499b1499f6b4be5a16a3f
|
||||
log.log( Level.SEVERE, "------------------------------" );
|
||||
log.log( Level.SEVERE, "The server has stopped responding! This is (probably) not a Paper bug." ); // Paper
|
||||
log.log( Level.SEVERE, "If you see a plugin in the Server thread dump below, then please report it to that author" );
|
||||
@@ -93,30 +108,46 @@ public final class WatchdogThread extends io.papermc.paper.util.TickThread // Pa
|
||||
@@ -93,29 +108,45 @@ public class WatchdogThread extends Thread
|
||||
}
|
||||
}
|
||||
// Paper end
|
||||
@ -122,7 +122,6 @@ index a9897c494b3dc56d900356d74030359832febbaa..b47d043144c499b1499f6b4be5a16a3f
|
||||
+ // Paper end - Different message for short timeout
|
||||
log.log( Level.SEVERE, "------------------------------" );
|
||||
log.log( Level.SEVERE, "Server thread dump (Look for plugins here before reporting to Paper!):" ); // Paper
|
||||
io.papermc.paper.chunk.system.scheduling.ChunkTaskScheduler.dumpAllChunkLoadInfo(isLongTimeout); // Paper // Paper - rewrite chunk system
|
||||
WatchdogThread.dumpThread( ManagementFactory.getThreadMXBean().getThreadInfo( MinecraftServer.getServer().serverThread.getId(), Integer.MAX_VALUE ), log );
|
||||
log.log( Level.SEVERE, "------------------------------" );
|
||||
//
|
@ -23,10 +23,10 @@ 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 bfc81327f0c64ef3bd2e8ba218f6a4970553a309..952e0735bf1e66a812c90f283203c4f73e3905a5 100644
|
||||
index 58a808e2ccf366eca8358529ed7c02080a4948b0..2167303e425b5921240e35757dc634c561875e8b 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -642,7 +642,7 @@ public abstract class PlayerList {
|
||||
@@ -649,7 +649,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
|
@ -6,7 +6,7 @@ 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 1a2607d1b257cea65c82c661a6b3d46c1526a775..338841804a92bea5ca074300eaea9374d1b77020 100644
|
||||
index f93664b2d27f74c26dc4618bcd09fb1494b99542..d05bed7b96c1d833041a31c00161ee377c088ee1 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -69,7 +69,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@ -18,10 +18,10 @@ index 1a2607d1b257cea65c82c661a6b3d46c1526a775..338841804a92bea5ca074300eaea9374
|
||||
@Nullable
|
||||
private QueryThreadGs4 queryThreadGs4;
|
||||
public final RconConsoleSource rconConsoleSource;
|
||||
@@ -440,13 +440,15 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
return;
|
||||
}
|
||||
// Paper end - rewrite chunk system
|
||||
@@ -413,13 +413,15 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
}
|
||||
|
||||
public void handleConsoleInput(String command, CommandSourceStack commandSource) {
|
||||
- this.consoleInput.add(new ConsoleInput(command, commandSource));
|
||||
+ this.serverCommandQueue.add(new ConsoleInput(command, commandSource)); // Paper - use proper queue
|
||||
}
|
@ -5,10 +5,10 @@ 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 08bfd6d07383e2e92d1e46d95fafab76a8c1410b..8f79bcd6132b7064167edb883593873d78b9fe63 100644
|
||||
index f07a6b1d782426581c84ffa19447c1375c4cbc07..719730451635d418b3f5024c35620412add42b7f 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java
|
||||
@@ -125,6 +125,13 @@ public class CraftChunk implements Chunk {
|
||||
@@ -169,6 +169,13 @@ public class CraftChunk implements Chunk {
|
||||
|
||||
@Override
|
||||
public BlockState[] getTileEntities() {
|
||||
@ -22,7 +22,7 @@ index 08bfd6d07383e2e92d1e46d95fafab76a8c1410b..8f79bcd6132b7064167edb883593873d
|
||||
if (!this.isLoaded()) {
|
||||
this.getWorld().getChunkAt(x, z); // Transient load for this tick
|
||||
}
|
||||
@@ -134,7 +141,29 @@ public class CraftChunk implements Chunk {
|
||||
@@ -178,7 +185,29 @@ public class CraftChunk implements Chunk {
|
||||
BlockState[] entities = new BlockState[chunk.blockEntities.size()];
|
||||
|
||||
for (BlockPos position : chunk.blockEntities.keySet()) {
|
@ -6,10 +6,10 @@ 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 4dffce4dc3434ef6adef7dc3cfac867ad89d9a5d..cf7b12993090e72802a966b3cb40e5d33c1bc5ed 100644
|
||||
index 1834f3efb05fd70c8c1c67733bff514829ae1154..fbdbf61f49bd6867eea609d5572fb31ece094944 100644
|
||||
--- a/src/main/java/net/minecraft/core/BlockPos.java
|
||||
+++ b/src/main/java/net/minecraft/core/BlockPos.java
|
||||
@@ -125,67 +125,84 @@ public class BlockPos extends Vec3i {
|
||||
@@ -132,67 +132,84 @@ public class BlockPos extends Vec3i {
|
||||
|
||||
@Override
|
||||
public BlockPos above() {
|
@ -6,7 +6,7 @@ Subject: [PATCH] Restore vanilla default mob-spawn-range and water animals
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
||||
index 3b7724a8ad8b9df0bbbca7fd2f8328e9885c5a73..70b3ff4a6a9aea24e28d99997a936e850d46b05e 100644
|
||||
index afe68aa28f8b39fd490f650a335c90818e1c9a8d..e873a311e2918e1cb72f190e14d088a3ed540aa8 100644
|
||||
--- a/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
||||
+++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
||||
@@ -190,7 +190,7 @@ public class SpigotWorldConfig
|
@ -5,7 +5,7 @@ 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 02aca470c3b41114204da54e2365ee29adad7554..9196c51474741eb1015f7daac640b83e6c7b66e4 100644
|
||||
index 476a9b2db5deac803f1cb3c2cbe88b69cc3da8e5..30779b817db6f8e392036b4ec66e1c5cf50cd0f5 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/Slime.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/Slime.java
|
||||
@@ -41,6 +41,12 @@ import net.minecraft.world.level.ServerLevelAccessor;
|
||||
@ -102,8 +102,8 @@ index 02aca470c3b41114204da54e2365ee29adad7554..9196c51474741eb1015f7daac640b83e
|
||||
|
||||
@Override
|
||||
public boolean canUse() {
|
||||
- return this.slime.getTarget() == null && (this.slime.onGround || this.slime.isInWater() || this.slime.isInLava() || this.slime.hasEffect(MobEffects.LEVITATION)) && this.slime.getMoveControl() instanceof Slime.SlimeMoveControl;
|
||||
+ return this.slime.getTarget() == null && (this.slime.onGround || this.slime.isInWater() || this.slime.isInLava() || this.slime.hasEffect(MobEffects.LEVITATION)) && this.slime.getMoveControl() instanceof Slime.SlimeMoveControl && this.slime.canWander; // Paper - add canWander
|
||||
- return this.slime.getTarget() == null && (this.slime.onGround() || this.slime.isInWater() || this.slime.isInLava() || this.slime.hasEffect(MobEffects.LEVITATION)) && this.slime.getMoveControl() instanceof Slime.SlimeMoveControl;
|
||||
+ return this.slime.getTarget() == null && (this.slime.onGround() || this.slime.isInWater() || this.slime.isInLava() || this.slime.hasEffect(MobEffects.LEVITATION)) && this.slime.getMoveControl() instanceof Slime.SlimeMoveControl && this.slime.canWander; // Paper - add canWander
|
||||
}
|
||||
|
||||
@Override
|
@ -5,7 +5,7 @@ Subject: [PATCH] Configurable speed for water flowing over lava
|
||||
|
||||
|
||||
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 7d180d71d5b23319b26735e0d2fe187512a14842..43e8ef1d6a65d4fd3fe53a587639ffb814368217 100644
|
||||
index fd7a7772eef7e2e4418539a11cefa98046b087e1..1530c664d0f6f55acf5292bd8fbb4f97bf7fadd3 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/LiquidBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/LiquidBlock.java
|
||||
@@ -106,11 +106,27 @@ public class LiquidBlock extends Block implements BucketPickup {
|
@ -7,11 +7,11 @@ 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 0eb877c80c6492d03681c70f7866ad705a62454e..7cc6dcb128f2792fc32bb8f50e4c94d600255207 100644
|
||||
index 803f3ebaa9fe43c88f461168ee43fc6ba920a764..2451bb61e304fbe5cdfd6bbb248575e9e1135075 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
|
||||
@@ -753,6 +753,14 @@ public abstract class BlockBehaviour implements FeatureElement {
|
||||
this.spawnParticlesOnBreak = blockbase_info.spawnParticlesOnBreak;
|
||||
@@ -809,6 +809,14 @@ public abstract class BlockBehaviour implements FeatureElement {
|
||||
this.replaceable = blockbase_info.replaceable;
|
||||
this.conditionallyFullOpaque = this.isOpaque() & this.isTransparentOnSomeFaces(); // Paper
|
||||
}
|
||||
+ // Paper start - impl cached craft block data, lazy load to fix issue with loading at the wrong time
|
||||
@ -23,13 +23,13 @@ index 0eb877c80c6492d03681c70f7866ad705a62454e..7cc6dcb128f2792fc32bb8f50e4c94d6
|
||||
+ }
|
||||
+ // Paper end
|
||||
|
||||
// Paper start
|
||||
protected boolean shapeExceedsCube = true;
|
||||
private boolean calculateSolid() {
|
||||
if (((Block) this.owner).properties.forceSolidOn) {
|
||||
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 b47fdd7d54ca0fafb8b56b64ae1ab96b6fcf0818..d4a204cdd035d1af2fc5a05036a3374ac89974c5 100644
|
||||
index 3ebdd30d0090f744b09bd1ecab95c294f4dfd989..12ea3a50126cd324dd3ee25a0f6c17deb05bd3a1 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java
|
||||
@@ -554,7 +554,17 @@ public class CraftBlockData implements BlockData {
|
||||
@@ -558,7 +558,17 @@ public class CraftBlockData implements BlockData {
|
||||
return craft;
|
||||
}
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Add PhantomPreSpawnEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/Phantom.java b/src/main/java/net/minecraft/world/entity/monster/Phantom.java
|
||||
index 4ba55cba98d5525eaafeed4026352851637da9b0..a3663ea031f3a243f670bf1c98272a49daed71b0 100644
|
||||
index 7582efc69928718a164f704a54bce026ad6f7dd9..9bd6e71ea38bf050832f0f7bbed4a5db6ddcef71 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/Phantom.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/Phantom.java
|
||||
@@ -171,6 +171,11 @@ public class Phantom extends FlyingMob implements Enemy {
|
||||
@ -48,7 +48,7 @@ index 4ba55cba98d5525eaafeed4026352851637da9b0..a3663ea031f3a243f670bf1c98272a49
|
||||
|
||||
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 5e534aceb532a113f63bad36dc77b487962ad4b7..df7f23bb039a61ed26e117df934aad9ec5df3f58 100644
|
||||
index 61ba99d99cc4e7782450ee6aa8b6c87b1a42cb3a..55b6e16d8a0671c7e897d42bbbe1e02b7e47e736 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/levelgen/PhantomSpawner.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/levelgen/PhantomSpawner.java
|
||||
@@ -3,6 +3,7 @@ package net.minecraft.world.level.levelgen;
|
||||
@ -59,7 +59,7 @@ index 5e534aceb532a113f63bad36dc77b487962ad4b7..df7f23bb039a61ed26e117df934aad9e
|
||||
import net.minecraft.server.level.ServerLevel;
|
||||
import net.minecraft.server.level.ServerPlayer;
|
||||
import net.minecraft.stats.ServerStatsCounter;
|
||||
@@ -71,9 +72,19 @@ public class PhantomSpawner implements CustomSpawner {
|
||||
@@ -70,9 +71,19 @@ public class PhantomSpawner implements CustomSpawner {
|
||||
int k = 1 + randomsource.nextInt(difficultydamagescaler.getDifficulty().getId() + 1);
|
||||
|
||||
for (int l = 0; l < k; ++l) {
|
@ -5,7 +5,7 @@ Subject: [PATCH] Add More Creeper API
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/Creeper.java b/src/main/java/net/minecraft/world/entity/monster/Creeper.java
|
||||
index d34945bc60d2b1734ec65be444ae8745cba2029d..29c62525241e2e03686d1bceee740d4f54f33c54 100644
|
||||
index 2480c128f6b7c4ba7af1f06f4e01b972587c08ba..71587510ef1b6cbd95cb55556cd93c6c194ea5f5 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/Creeper.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/Creeper.java
|
||||
@@ -132,7 +132,7 @@ public class Creeper extends Monster implements PowerableMob {
|
@ -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 020049ba110ec10d7dfca9117dcc6de190cd6785..ba4f1012c2046921c2c48583a5384fd7e4c05af7 100644
|
||||
index 896ca23731663570c98ecd3eb20f984577f82d99..d88464af8b98ad12e90c423abe5e483ab0455666 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -401,7 +401,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@@ -398,7 +398,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
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add ray tracing methods to LivingEntity
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index dd82cef26160a1794c47494c99c59eb329879b7b..d29519bd75e6e5a97b06aae86c485b49c4415fb8 100644
|
||||
index eeeaf05cb49e3440bfa3ab94048653f75e6a42da..04926662cdb3feba1ea9ceea51be0c41f3ff227e 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -3732,6 +3732,20 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -3781,6 +3781,20 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
}
|
||||
|
||||
// Paper start
|
@ -5,10 +5,10 @@ Subject: [PATCH] Expose attack cooldown methods for Player
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 931ad65bc199a3d5089c9f52d7b8b5d29b115285..31c75a7b7a947626417421287be0f0e2097acbd9 100644
|
||||
index 8a3b62dd565ed69132af3c0d3fb0919aebe58c7e..e193632f4b795d16a62e074e082a2fd5f10b1330 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -2801,6 +2801,21 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -2732,6 +2732,21 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
|
||||
return this.adventure$pointers;
|
||||
}
|
@ -19,7 +19,7 @@ public net.minecraft.world.entity.LivingEntity getDeathSound()Lnet/minecraft/sou
|
||||
public net.minecraft.world.entity.LivingEntity getSoundVolume()F
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index 57ab89118811cb0825435b9bdde8f5aeee681d75..3f9ae61ac16a4ec13c6a571ab3d5188f37d205f2 100644
|
||||
index 4885dd69d6f63666a38b6d8d859c1dd858d38ad0..e41abf22992d9348cc3c63866b01a5dbf02d6a2c 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -243,6 +243,10 @@ public class ServerPlayer extends Player {
|
||||
@ -33,7 +33,7 @@ index 57ab89118811cb0825435b9bdde8f5aeee681d75..3f9ae61ac16a4ec13c6a571ab3d5188f
|
||||
|
||||
// CraftBukkit start
|
||||
public String displayName;
|
||||
@@ -831,6 +835,15 @@ public class ServerPlayer extends Player {
|
||||
@@ -830,6 +834,15 @@ public class ServerPlayer extends Player {
|
||||
String deathmessage = defaultMessage.getString();
|
||||
this.keepLevel = keepInventory; // SPIGOT-2222: pre-set keepLevel
|
||||
org.bukkit.event.entity.PlayerDeathEvent event = CraftEventFactory.callPlayerDeathEvent(this, loot, PaperAdventure.asAdventure(defaultMessage), defaultMessage.getString(), keepInventory); // Paper - Adventure
|
||||
@ -49,7 +49,7 @@ index 57ab89118811cb0825435b9bdde8f5aeee681d75..3f9ae61ac16a4ec13c6a571ab3d5188f
|
||||
|
||||
// SPIGOT-943 - only call if they have an inventory open
|
||||
if (this.containerMenu != this.inventoryMenu) {
|
||||
@@ -982,8 +995,17 @@ public class ServerPlayer extends Player {
|
||||
@@ -981,8 +994,17 @@ public class ServerPlayer extends Player {
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -70,10 +70,10 @@ index 57ab89118811cb0825435b9bdde8f5aeee681d75..3f9ae61ac16a4ec13c6a571ab3d5188f
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 7c0e1963383a1a2862930cf77844e5c8c80e70e3..4c1992bcffd629ef53f14c5a0146eab2ddcb563c 100644
|
||||
index 04926662cdb3feba1ea9ceea51be0c41f3ff227e..e1780e5eec0171cc39b0bc27d48c0ce167ebec5d 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -258,6 +258,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -261,6 +261,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
public Set<UUID> collidableExemptions = new HashSet<>();
|
||||
public boolean bukkitPickUpLoot;
|
||||
public org.bukkit.craftbukkit.entity.CraftLivingEntity getBukkitLivingEntity() { return (org.bukkit.craftbukkit.entity.CraftLivingEntity) super.getBukkitEntity(); } // Paper
|
||||
@ -81,7 +81,7 @@ index 7c0e1963383a1a2862930cf77844e5c8c80e70e3..4c1992bcffd629ef53f14c5a0146eab2
|
||||
|
||||
@Override
|
||||
public float getBukkitYaw() {
|
||||
@@ -1455,13 +1456,12 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -1504,13 +1505,12 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
if (knockbackCancelled) this.level.broadcastEntityEvent(this, (byte) 2); // Paper - Disable explosion knockback
|
||||
if (this.isDeadOrDying()) {
|
||||
if (!this.checkTotemDeathProtection(source)) {
|
||||
@ -99,7 +99,7 @@ index 7c0e1963383a1a2862930cf77844e5c8c80e70e3..4c1992bcffd629ef53f14c5a0146eab2
|
||||
}
|
||||
} else if (flag1) {
|
||||
this.playHurtSound(source);
|
||||
@@ -1613,7 +1613,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -1662,7 +1662,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
if (!this.isRemoved() && !this.dead) {
|
||||
Entity entity = damageSource.getEntity();
|
||||
LivingEntity entityliving = this.getKillCredit();
|
||||
@ -108,8 +108,8 @@ index 7c0e1963383a1a2862930cf77844e5c8c80e70e3..4c1992bcffd629ef53f14c5a0146eab2
|
||||
if (this.deathScore >= 0 && entityliving != null) {
|
||||
entityliving.awardKillScore(this, this.deathScore, damageSource);
|
||||
}
|
||||
@@ -1625,20 +1625,53 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
if (!this.level.isClientSide && this.hasCustomName()) {
|
||||
@@ -1674,24 +1674,56 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
if (!this.level().isClientSide && this.hasCustomName()) {
|
||||
if (org.spigotmc.SpigotConfig.logNamedDeaths) LivingEntity.LOGGER.info("Named entity {} died: {}", this, this.getCombatTracker().getDeathMessage().getString()); // Spigot
|
||||
}
|
||||
+ */ // Paper - move down to make death event cancellable - this is the awardKillScore below
|
||||
@ -117,8 +117,10 @@ index 7c0e1963383a1a2862930cf77844e5c8c80e70e3..4c1992bcffd629ef53f14c5a0146eab2
|
||||
this.dead = true;
|
||||
- this.getCombatTracker().recheckStatus();
|
||||
+ // Paper - moved into if below
|
||||
if (this.level instanceof ServerLevel) {
|
||||
- if (entity == null || entity.wasKilled((ServerLevel) this.level, this)) {
|
||||
Level world = this.level();
|
||||
|
||||
if (world instanceof ServerLevel) {
|
||||
ServerLevel worldserver = (ServerLevel) world;
|
||||
+ // Paper - move below into if for onKill
|
||||
+
|
||||
+ // Paper start
|
||||
@ -139,45 +141,45 @@ index 7c0e1963383a1a2862930cf77844e5c8c80e70e3..4c1992bcffd629ef53f14c5a0146eab2
|
||||
+ if (this.isSleeping()) {
|
||||
+ this.stopSleeping();
|
||||
+ }
|
||||
+
|
||||
+ if (!this.level.isClientSide && this.hasCustomName()) {
|
||||
|
||||
- if (entity == null || entity.killedEntity(worldserver, this)) {
|
||||
+ if (!this.level().isClientSide && this.hasCustomName()) {
|
||||
+ if (org.spigotmc.SpigotConfig.logNamedDeaths) LivingEntity.LOGGER.info("Named entity {} died: {}", this, this.getCombatTracker().getDeathMessage().getString()); // Spigot
|
||||
+ }
|
||||
+
|
||||
+ this.getCombatTracker().recheckStatus();
|
||||
+ if (entity != null) {
|
||||
+ entity.wasKilled((ServerLevel) this.level, this);
|
||||
+ entity.wasKilled((ServerLevel) this.level(), this);
|
||||
+ }
|
||||
this.gameEvent(GameEvent.ENTITY_DIE);
|
||||
- this.dropAllDeathLoot(damageSource);
|
||||
- this.createWitherRose(entityliving);
|
||||
+ } else {
|
||||
+ this.dead = false;
|
||||
+ this.setHealth((float) deathEvent.getReviveHealth());
|
||||
}
|
||||
-
|
||||
- this.level.broadcastEntityEvent(this, (byte) 3);
|
||||
|
||||
- this.level().broadcastEntityEvent(this, (byte) 3);
|
||||
+ // Paper end
|
||||
+ this.createWitherRose(entityliving);
|
||||
}
|
||||
|
||||
+ // Paper start
|
||||
+ if (this.dead) { // Paper
|
||||
+ this.level.broadcastEntityEvent(this, (byte) 3);
|
||||
+ this.level().broadcastEntityEvent(this, (byte) 3);
|
||||
this.setPose(Pose.DYING);
|
||||
+ } // Paper
|
||||
+ }
|
||||
+ // Paper end
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1646,7 +1679,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
if (!this.level.isClientSide) {
|
||||
@@ -1699,7 +1731,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
if (!this.level().isClientSide) {
|
||||
boolean flag = false;
|
||||
|
||||
- if (adversary instanceof WitherBoss) {
|
||||
+ if (this.dead && adversary instanceof WitherBoss) { // Paper
|
||||
if (this.level.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING)) {
|
||||
if (this.level().getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING)) {
|
||||
BlockPos blockposition = this.blockPosition();
|
||||
BlockState iblockdata = Blocks.WITHER_ROSE.defaultBlockState();
|
||||
@@ -1675,7 +1708,11 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -1728,7 +1760,11 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
}
|
||||
}
|
||||
|
||||
@ -190,9 +192,9 @@ index 7c0e1963383a1a2862930cf77844e5c8c80e70e3..4c1992bcffd629ef53f14c5a0146eab2
|
||||
Entity entity = source.getEntity();
|
||||
int i;
|
||||
|
||||
@@ -1690,18 +1727,27 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -1743,18 +1779,27 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
this.dropEquipment(); // CraftBukkit - from below
|
||||
if (this.shouldDropLoot() && this.level.getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT)) {
|
||||
if (this.shouldDropLoot() && this.level().getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT)) {
|
||||
this.dropFromLootTable(source, flag);
|
||||
+ // Paper start
|
||||
+ final boolean prev = this.clearEquipmentSlots;
|
||||
@ -220,10 +222,10 @@ index 7c0e1963383a1a2862930cf77844e5c8c80e70e3..4c1992bcffd629ef53f14c5a0146eab2
|
||||
// CraftBukkit start
|
||||
public int getExpReward() {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
index 984a33d5e1f790a9c78ba57f2dc21fb072a44b3d..dbf442e9686e59723ed0456f97e472cc663f8cc7 100644
|
||||
index 8151da761dd2dd561384181576321c71197a84e1..b60714796725ba3dc0a17ff4ca7df8b344e838da 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
@@ -1065,7 +1065,13 @@ public abstract class Mob extends LivingEntity implements Targeting {
|
||||
@@ -1068,7 +1068,13 @@ public abstract class Mob extends LivingEntity implements Targeting {
|
||||
}
|
||||
|
||||
this.spawnAtLocation(itemstack);
|
||||
@ -238,7 +240,7 @@ index 984a33d5e1f790a9c78ba57f2dc21fb072a44b3d..dbf442e9686e59723ed0456f97e472cc
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/Fox.java b/src/main/java/net/minecraft/world/entity/animal/Fox.java
|
||||
index 13061aed29649acfc52d13207aaebcd8ba339ebe..73510697455d891af6858b9a8ad8ca0c9b74880f 100644
|
||||
index c2a87255178917a9555ec48ff7e705efef2da7ab..1526ca0063da0962ae781b7aa877d8cf5e1ffd73 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/Fox.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/Fox.java
|
||||
@@ -706,15 +706,25 @@ public class Fox extends Animal implements VariantHolder<Fox.Type> {
|
||||
@ -271,7 +273,7 @@ index 13061aed29649acfc52d13207aaebcd8ba339ebe..73510697455d891af6858b9a8ad8ca0c
|
||||
|
||||
public static boolean isPathClear(Fox fox, LivingEntity chasedEntity) {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/horse/AbstractChestedHorse.java b/src/main/java/net/minecraft/world/entity/animal/horse/AbstractChestedHorse.java
|
||||
index e763421e263d9ed7a67106495fda4b74745a67fc..36f949f6a66edab8373439ff450ad34fff6bae2d 100644
|
||||
index ebe207e2c4d8b7e125fec8a5182fe4882c9339e3..8ac82d3efc0f6d8ff40226e4f8084435c136eba4 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/horse/AbstractChestedHorse.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/horse/AbstractChestedHorse.java
|
||||
@@ -69,11 +69,19 @@ public abstract class AbstractChestedHorse extends AbstractHorse {
|
||||
@ -296,10 +298,10 @@ index e763421e263d9ed7a67106495fda4b74745a67fc..36f949f6a66edab8373439ff450ad34f
|
||||
public void addAdditionalSaveData(CompoundTag nbt) {
|
||||
super.addAdditionalSaveData(nbt);
|
||||
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 e38cbdff34479673f1640c46d727f1a807a609c7..dbb4bfb3d1f1ce2e435ca531be36ea448c0e3212 100644
|
||||
index 719f68f96e58ddcdd3592131c691d21263c81915..4413b609f1250cf9477fcb3fecd7b67afee0b896 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
|
||||
@@ -542,8 +542,9 @@ public class ArmorStand extends LivingEntity {
|
||||
@@ -536,8 +536,9 @@ public class ArmorStand extends LivingEntity {
|
||||
this.gameEvent(GameEvent.ENTITY_DAMAGE, source.getEntity());
|
||||
this.lastHit = i;
|
||||
} else {
|
||||
@ -310,7 +312,7 @@ index e38cbdff34479673f1640c46d727f1a807a609c7..dbb4bfb3d1f1ce2e435ca531be36ea44
|
||||
this.discard(); // CraftBukkit - SPIGOT-4890: remain as this.discard() since above damagesource method will call death event
|
||||
}
|
||||
|
||||
@@ -605,7 +606,7 @@ public class ArmorStand extends LivingEntity {
|
||||
@@ -599,7 +600,7 @@ public class ArmorStand extends LivingEntity {
|
||||
|
||||
}
|
||||
|
||||
@ -319,7 +321,7 @@ index e38cbdff34479673f1640c46d727f1a807a609c7..dbb4bfb3d1f1ce2e435ca531be36ea44
|
||||
ItemStack itemstack = new ItemStack(Items.ARMOR_STAND);
|
||||
|
||||
if (this.hasCustomName()) {
|
||||
@@ -613,10 +614,10 @@ public class ArmorStand extends LivingEntity {
|
||||
@@ -607,10 +608,10 @@ public class ArmorStand extends LivingEntity {
|
||||
}
|
||||
|
||||
drops.add(org.bukkit.craftbukkit.inventory.CraftItemStack.asBukkitCopy(itemstack)); // CraftBukkit - add to drops
|
||||
@ -332,7 +334,7 @@ index e38cbdff34479673f1640c46d727f1a807a609c7..dbb4bfb3d1f1ce2e435ca531be36ea44
|
||||
this.playBrokenSound();
|
||||
// this.dropAllDeathLoot(damagesource); // CraftBukkit - moved down
|
||||
|
||||
@@ -638,7 +639,7 @@ public class ArmorStand extends LivingEntity {
|
||||
@@ -632,7 +633,7 @@ public class ArmorStand extends LivingEntity {
|
||||
this.armorItems.set(i, ItemStack.EMPTY);
|
||||
}
|
||||
}
|
||||
@ -341,7 +343,7 @@ index e38cbdff34479673f1640c46d727f1a807a609c7..dbb4bfb3d1f1ce2e435ca531be36ea44
|
||||
|
||||
}
|
||||
|
||||
@@ -770,7 +771,8 @@ public class ArmorStand extends LivingEntity {
|
||||
@@ -764,7 +765,8 @@ public class ArmorStand extends LivingEntity {
|
||||
|
||||
@Override
|
||||
public void kill() {
|
||||
@ -352,10 +354,10 @@ index e38cbdff34479673f1640c46d727f1a807a609c7..dbb4bfb3d1f1ce2e435ca531be36ea44
|
||||
this.gameEvent(GameEvent.ENTITY_DIE);
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 31c75a7b7a947626417421287be0f0e2097acbd9..f3d532ea98264c233cacde042d6af0957ca6f31d 100644
|
||||
index e193632f4b795d16a62e074e082a2fd5f10b1330..a33262e0bcc98321cb7acef533973629de5278a6 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -2321,7 +2321,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -2252,7 +2252,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
}
|
||||
|
||||
public void sendHealthUpdate() {
|
||||
@ -372,7 +374,7 @@ index 31c75a7b7a947626417421287be0f0e2097acbd9..f3d532ea98264c233cacde042d6af095
|
||||
|
||||
public void injectScaledMaxHealth(Collection<AttributeInstance> collection, boolean force) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index ff1108579b9f8bb867be02a07784c645d0f4d037..f77bb8401f0d4b5acc64c8b707083bc251caf8e5 100644
|
||||
index b77fefc9cf30fd438f557e5b56efb4c0251cb17a..17a5d568e9ac367917e40c554aa7354088f66114 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -824,9 +824,16 @@ public class CraftEventFactory {
|
@ -5,10 +5,10 @@ Subject: [PATCH] Allow chests to be placed with NBT data
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
index a598b6522ce4d41575f04425d189319fa12a7b70..57661672d02b19c864bb267c09b2fa433e716b7b 100644
|
||||
index 0db25566c47eb5b7e970dafea0ed186592fea38c..441fbeb3226b698648788de5ad58b94a66499a41 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
@@ -372,6 +372,7 @@ public final class ItemStack {
|
||||
@@ -376,6 +376,7 @@ public final class ItemStack {
|
||||
enuminteractionresult = InteractionResult.FAIL; // cancel placement
|
||||
// PAIL: Remove this when MC-99075 fixed
|
||||
placeEvent.getPlayer().updateInventory();
|
Loading…
Reference in New Issue
Block a user