More more more more more more work
This commit is contained in:
parent
6f3591fd6d
commit
105034367d
|
@ -9,3 +9,4 @@
|
|||
# minecraft net.minecraft.world.level.entity.LevelEntityGetterAdapter
|
||||
# minecraft net/minecraft/world/level/entity/LevelEntityGetter.java
|
||||
|
||||
|
||||
|
|
|
@ -74,7 +74,7 @@ index 58313929f81509030216a0e5e3869da63e11108e..6cf05fed701c67a2c797a4e0839c7958
|
|||
/**
|
||||
* Checks if this player is whitelisted or not
|
||||
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
||||
index b2fdf015b8a86ca96eb5c92aa85d7e36ee21aaad..83bd47744d3e056264e6bf024b45cc86fcd5ea42 100644
|
||||
index 0dabd6f69e85b21f7ec6e6a2ac46d7fc58af24f6..ac529faeb4e4be2e62228cc931a793f2ff0a28af 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -5,6 +5,10 @@ import java.util.UUID;
|
|
@ -6,7 +6,7 @@ Subject: [PATCH] Additional world.getNearbyEntities API's
|
|||
Provides more methods to get nearby entities, and filter by types and predicates
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
|
||||
index 98c74a6b4f126f2a3e65f95e55561f652c10c4b9..8e434b7048cd650245c6b522807e2f8a6dc497e9 100644
|
||||
index cec39714294127478b6e73452354ba7ccab78b25..e8b94ae777cad907dbb31c9ea5a3c1690b178777 100644
|
||||
--- a/src/main/java/org/bukkit/World.java
|
||||
+++ b/src/main/java/org/bukkit/World.java
|
||||
@@ -1,6 +1,9 @@
|
|
@ -522,7 +522,7 @@ index dc5142460a711ee79aed30276382b92c82cbef00..40a3a54fc82252692fc8710cabb243d0
|
|||
* Options which can be applied to redstone dust particles - a particle
|
||||
* color and size.
|
||||
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
|
||||
index fbf8eb17630dfc43be8cf7ba92193e3da8aad1a4..73d0e05c7f8dbab81cdaacb8111fc4681a631ad3 100644
|
||||
index e8b94ae777cad907dbb31c9ea5a3c1690b178777..6156fb9827400cb6c1c0a96e0b6fed180a12d610 100644
|
||||
--- a/src/main/java/org/bukkit/World.java
|
||||
+++ b/src/main/java/org/bukkit/World.java
|
||||
@@ -2637,7 +2637,57 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
|
@ -106,7 +106,7 @@ index bbc636baef2e2b0586c7d517be428438ca26ab66..a8d4f7972d07ddde171b4a1ec470a4c6
|
|||
* Returns a list of entities within a bounding box centered around a Location.
|
||||
*
|
||||
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
|
||||
index 8ed7fadf1375b80b338e2493405a41957b104b8e..2bc0d5d6c81c21fd2c9318e968c3807f3e5474e0 100644
|
||||
index 6156fb9827400cb6c1c0a96e0b6fed180a12d610..1e29c0e69973a1f7422852a04f97a6e7c19a3e54 100644
|
||||
--- a/src/main/java/org/bukkit/World.java
|
||||
+++ b/src/main/java/org/bukkit/World.java
|
||||
@@ -1419,6 +1419,88 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
|
@ -5,7 +5,7 @@ Subject: [PATCH] Add World.getEntity(UUID) API
|
|||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
|
||||
index 2bc0d5d6c81c21fd2c9318e968c3807f3e5474e0..e0c2ce5ad528ee1dd6293d0ed5ac3d6474c6d106 100644
|
||||
index 1e29c0e69973a1f7422852a04f97a6e7c19a3e54..91755d27b84abad516d891d4b0b7869124cb263e 100644
|
||||
--- a/src/main/java/org/bukkit/World.java
|
||||
+++ b/src/main/java/org/bukkit/World.java
|
||||
@@ -939,6 +939,17 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
|
@ -6,7 +6,7 @@ Subject: [PATCH] Entity#getChunk API
|
|||
Get the chunk the entity is currently registered to
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java
|
||||
index d794ed97bd14c67584af9190bad7d0cd07001b05..0f1e456c8b278d0fb45871e6f57baf2c6234ed51 100644
|
||||
index 71f519b8f03d2a52f2c5a9283a18c74c1ca52328..c0d6dc1b584c34c541bf9a2549016b4e29818d45 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Entity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Entity.java
|
||||
@@ -3,6 +3,7 @@ package org.bukkit.entity;
|
|
@ -45,7 +45,7 @@ index 4de959bbd1270d7d6ea8e5e69521bcca6abe2138..1aa58c59e1e8738bbdc77752885ff3b1
|
|||
if (plugin.getDescription().getProvides().size() > 0) {
|
||||
pluginList.append(" (").append(String.join(", ", plugin.getDescription().getProvides())).append(")");
|
||||
diff --git a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
|
||||
index 816c2b1797447ab315ceb6eda89d25f27d2bce98..f26303315c9c93356f0b04440136855dd54d32b7 100644
|
||||
index 7483ceff298cafa244bd99316a0338aa075267d4..4e8e828e70a9dde41d274440bef9d7c72f5891b3 100644
|
||||
--- a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
|
||||
+++ b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
|
||||
@@ -306,7 +306,14 @@ public final class JavaPluginLoader implements PluginLoader {
|
|
@ -44,7 +44,7 @@ index 5fd6030b2693d793951ed632ad4870e1a6f909aa..40ddeb7abd49eeece531a8e90b4508f3
|
|||
* Gets the world containing this chunk
|
||||
*
|
||||
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
|
||||
index e0c2ce5ad528ee1dd6293d0ed5ac3d6474c6d106..33558b6acc861f8b9986122c7c553f9dde22a45d 100644
|
||||
index 91755d27b84abad516d891d4b0b7869124cb263e..d3d0e4448135f6c0440c15e0dd3fc15c2616263a 100644
|
||||
--- a/src/main/java/org/bukkit/World.java
|
||||
+++ b/src/main/java/org/bukkit/World.java
|
||||
@@ -207,6 +207,22 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
|
@ -9,10 +9,10 @@ e.g. servers which allow and support the usage of mod packs.
|
|||
provide an optional flag to disable this check, at your own risk.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 95a1d83fb7cb9947beb56b951b0081e4db2de6c9..c07916e07e09f1491c9bad7d13b127960dd167a6 100644
|
||||
index a9bd48e4670aa44a964891c25cd147c006081b60..5d4499a79fe6bd6a2c9f6896a40491ecadfd4f6c 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -150,6 +150,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -153,6 +153,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
// Paper start
|
||||
private org.bukkit.event.player.PlayerResourcePackStatusEvent.Status resourcePackStatus;
|
||||
private String resourcePackHash;
|
||||
|
@ -20,7 +20,7 @@ index 95a1d83fb7cb9947beb56b951b0081e4db2de6c9..c07916e07e09f1491c9bad7d13b12796
|
|||
// Paper end
|
||||
|
||||
public CraftPlayer(CraftServer server, ServerPlayer entity) {
|
||||
@@ -1616,7 +1617,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -1620,7 +1621,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
}
|
||||
|
||||
public void addChannel(String channel) {
|
|
@ -5,7 +5,7 @@ Subject: [PATCH] Add method to open already placed sign
|
|||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
||||
index 54947f02f29dd3dc546ee0d0f4600630242f003d..f1b1d1881d0598503a7ec1022ef5e00f848fb247 100644
|
||||
index cc1caa32ea430f69d0dcfb76e1a08fb78650877d..87bc05f2eef1555ad3346d1d1bda72d4feb0fa1b 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
||||
@@ -610,6 +610,17 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
|
|
@ -6,24 +6,29 @@ 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/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
index 0e08f6e566d1c93cc89a179583d0b0939127de8b..4e0f61179e3b2ae91811746d32b24998173a922c 100644
|
||||
index 9d7d9c800710fff5cf41c973463b9c2d72a3e32a..4e0f61179e3b2ae91811746d32b24998173a922c 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -393,4 +393,9 @@ public class PaperWorldConfig {
|
||||
private void squidMaxSpawnHeight() {
|
||||
squidMaxSpawnHeight = getDouble("squid-spawn-height.maximum", 0.0D);
|
||||
@@ -388,4 +388,14 @@ public class PaperWorldConfig {
|
||||
disableCreeperLingeringEffect = getBoolean("disable-creeper-lingering-effect", false);
|
||||
log("Creeper lingering effect: " + disableCreeperLingeringEffect);
|
||||
}
|
||||
+
|
||||
+ public double squidMaxSpawnHeight;
|
||||
+ private void squidMaxSpawnHeight() {
|
||||
+ squidMaxSpawnHeight = getDouble("squid-spawn-height.maximum", 0.0D);
|
||||
+ }
|
||||
+
|
||||
+ public boolean disableSprintInterruptionOnAttack;
|
||||
+ private void disableSprintInterruptionOnAttack() {
|
||||
+ disableSprintInterruptionOnAttack = getBoolean("game-mechanics.disable-sprint-interruption-on-attack", 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 0ef9c95d40cd0cdff0d150121511e6f9efd65f4d..f7ee9ce075720ed59cf761463bae997a141a7be8 100644
|
||||
index 85b50297d92c45872942effb770d0e85d864681e..74ef6bdcb193081ca5e46841200857b6491aeeff 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
@@ -1238,7 +1238,11 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -1236,7 +1236,11 @@ public abstract class Player extends LivingEntity {
|
||||
}
|
||||
|
||||
this.setDeltaMovement(this.getDeltaMovement().multiply(0.6D, 1.0D, 0.6D));
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Fix exploit that allowed colored signs to be created
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 25ea7a94407dfdb613ee15de4eb2a9c3252c6b27..e83232f18871a04fadbc053b1e1e7f94d2492159 100644
|
||||
index f97125ad82bc1ec850af9bdd92973942fc470bc1..77323b363573e770bbb4ae98911d5a922ad315c2 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2777,9 +2777,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -2782,9 +2782,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
TextFilter.FilteredText currentLine = signText.get(i);
|
||||
|
||||
if (this.player.isTextFilteringEnabled()) {
|
|
@ -8,11 +8,11 @@ Fires an event anytime an enderman intends to teleport away from the player
|
|||
You may cancel this, enabling ranged attacks to damage the enderman for example.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/EnderMan.java b/src/main/java/net/minecraft/world/entity/monster/EnderMan.java
|
||||
index 568c3a43a41c6bde521580b3890aa21d28e03036..d2c64a3909e77ed3f9d5fb5d4c47a756eab82eee 100644
|
||||
index 186054f529cb743e1407fca027792ddb06645d79..18dbf2ad08b835c6e2be9062c0833b440e872e46 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/EnderMan.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/EnderMan.java
|
||||
@@ -109,6 +109,12 @@ public class EnderMan extends Monster implements NeutralMob {
|
||||
this.setGoalTarget(target, org.bukkit.event.entity.EntityTargetEvent.TargetReason.UNKNOWN, true);
|
||||
@@ -114,6 +114,12 @@ public class EnderMan extends Monster implements NeutralMob {
|
||||
this.setTarget(target, org.bukkit.event.entity.EntityTargetEvent.TargetReason.UNKNOWN, true);
|
||||
}
|
||||
|
||||
+ // Paper start
|
||||
|
@ -22,9 +22,9 @@ index 568c3a43a41c6bde521580b3890aa21d28e03036..d2c64a3909e77ed3f9d5fb5d4c47a756
|
|||
+ // Paper end
|
||||
+
|
||||
@Override
|
||||
public boolean setGoalTarget(LivingEntity entityliving, org.bukkit.event.entity.EntityTargetEvent.TargetReason reason, boolean fireEvent) {
|
||||
if (!super.setGoalTarget(entityliving, reason, fireEvent)) {
|
||||
@@ -262,7 +268,7 @@ public class EnderMan extends Monster implements NeutralMob {
|
||||
public boolean setTarget(LivingEntity entityliving, org.bukkit.event.entity.EntityTargetEvent.TargetReason reason, boolean fireEvent) {
|
||||
if (!super.setTarget(entityliving, reason, fireEvent)) {
|
||||
@@ -268,7 +274,7 @@ public class EnderMan extends Monster implements NeutralMob {
|
||||
if (this.level.isDay() && this.tickCount >= this.targetChangeTime + 600) {
|
||||
float f = this.getBrightness();
|
||||
|
||||
|
@ -33,10 +33,10 @@ index 568c3a43a41c6bde521580b3890aa21d28e03036..d2c64a3909e77ed3f9d5fb5d4c47a756
|
|||
this.setTarget((LivingEntity) null);
|
||||
this.teleport();
|
||||
}
|
||||
@@ -360,17 +366,19 @@ public class EnderMan extends Monster implements NeutralMob {
|
||||
if (this.isInvulnerableTo(source)) {
|
||||
return false;
|
||||
} else if (source instanceof IndirectEntityDamageSource) {
|
||||
@@ -375,17 +381,19 @@ public class EnderMan extends Monster implements NeutralMob {
|
||||
flag = false;
|
||||
}
|
||||
|
||||
+ if (this.tryEscape(com.destroystokyo.paper.event.entity.EndermanEscapeEvent.Reason.INDIRECT)) { // Paper start
|
||||
for (int i = 0; i < 64; ++i) {
|
||||
if (this.teleport()) {
|
||||
|
@ -45,16 +45,16 @@ index 568c3a43a41c6bde521580b3890aa21d28e03036..d2c64a3909e77ed3f9d5fb5d4c47a756
|
|||
}
|
||||
+ } // Paper end
|
||||
|
||||
return false;
|
||||
return flag;
|
||||
} else {
|
||||
boolean flag = super.hurt(source, amount);
|
||||
boolean flag1 = super.hurt(source, amount);
|
||||
|
||||
- if (!this.level.isClientSide() && !(source.getEntity() instanceof LivingEntity) && this.random.nextInt(10) != 0) {
|
||||
+ if (!this.level.isClientSide() && !(source.getEntity() instanceof LivingEntity) && this.random.nextInt(10) != 0 && this.tryEscape(source == DamageSource.DROWN ? com.destroystokyo.paper.event.entity.EndermanEscapeEvent.Reason.DROWN : com.destroystokyo.paper.event.entity.EndermanEscapeEvent.Reason.INDIRECT)) { // Paper - use to be critical hits as else, but mojang removed critical hits in 1.16.2 due to MC-185684
|
||||
this.teleport();
|
||||
}
|
||||
|
||||
@@ -579,7 +587,7 @@ public class EnderMan extends Monster implements NeutralMob {
|
||||
@@ -605,7 +613,7 @@ public class EnderMan extends Monster implements NeutralMob {
|
||||
} else {
|
||||
if (this.target != null && !this.enderman.isPassenger()) {
|
||||
if (this.enderman.isLookingAtMe((Player) this.target)) {
|
|
@ -6,10 +6,10 @@ Subject: [PATCH] Enderman.teleportRandomly()
|
|||
Ability to trigger the vanilla "teleport randomly" mechanic of an enderman.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/EnderMan.java b/src/main/java/net/minecraft/world/entity/monster/EnderMan.java
|
||||
index d2c64a3909e77ed3f9d5fb5d4c47a756eab82eee..02f691a2217bea2df23b7b412eba90ee99c3b8c9 100644
|
||||
index 18dbf2ad08b835c6e2be9062c0833b440e872e46..d427276e3556f1c8580ea15095424f76e07f0a99 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/EnderMan.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/EnderMan.java
|
||||
@@ -277,7 +277,7 @@ public class EnderMan extends Monster implements NeutralMob {
|
||||
@@ -283,7 +283,7 @@ public class EnderMan extends Monster implements NeutralMob {
|
||||
super.customServerAiStep();
|
||||
}
|
||||
|
|
@ -27,7 +27,7 @@ index 4e0f61179e3b2ae91811746d32b24998173a922c..a0937dd52e4a2aa1bfadcbd1ac0dc2cb
|
|||
+ }
|
||||
}
|
||||
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 4306db7db2c5b4eb1529dc3e9f0659ead2688fa5..8af1571c614a39c9673e0dc90e3aa9a89a367e34 100644
|
||||
index d4aa7e6dd54ed896187db96d19490ae9d55355f1..3b2322e359ea0fa8cf6c256054c4d0dcd3f43d73 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
|
||||
@@ -88,6 +88,7 @@ public abstract class Projectile extends Entity {
|
||||
|
@ -39,7 +39,7 @@ index 4306db7db2c5b4eb1529dc3e9f0659ead2688fa5..8af1571c614a39c9673e0dc90e3aa9a8
|
|||
|
||||
this.leftOwner = nbt.getBoolean("LeftOwner");
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/projectile/ThrownEnderpearl.java b/src/main/java/net/minecraft/world/entity/projectile/ThrownEnderpearl.java
|
||||
index 541ca82405d0b4d1457dcd63b58dc61eb67482d6..1b2ada3663cc0739782ac591f2ee1f6d0fb94841 100644
|
||||
index 23f77dfc6df93ef6a70e14a7e410263d39fae2cb..834ba402decb556a5f77809b37fa00578b67432e 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/projectile/ThrownEnderpearl.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/projectile/ThrownEnderpearl.java
|
||||
@@ -108,6 +108,16 @@ public class ThrownEnderpearl extends ThrowableItemProjectile {
|
|
@ -10,10 +10,10 @@ Adds an option to control the force mode of the particle.
|
|||
This adds a new Builder API which is much friendlier to use.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 26c25b103f08a2e66179d1ed8f450778aa2e539a..86a5a4456be65b94b0c27a0355c3844cbd296a20 100644
|
||||
index 94a64e0e7a0ea147ae008f91a0787c8840566f4f..a734416fd80f0b367300c179e90fb51e206ca36c 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1333,12 +1333,17 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1361,12 +1361,17 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
}
|
||||
|
||||
public <T extends ParticleOptions> int sendParticles(ServerPlayer sender, T t0, double d0, double d1, double d2, int i, double d3, double d4, double d5, double d6, boolean force) {
|
||||
|
@ -34,7 +34,7 @@ index 26c25b103f08a2e66179d1ed8f450778aa2e539a..86a5a4456be65b94b0c27a0355c3844c
|
|||
|
||||
if (this.sendParticles(entityplayer, force, d0, d1, d2, packetplayoutworldparticles)) { // CraftBukkit
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index 1f4880cd6abc68731abd5943619a9bf7e7ddb02f..7fbd068cbf96332b6ea45411f45e9e0910693c57 100644
|
||||
index 8579696f971824688500c8837f9451d23f84dae2..90fe854921dfea883c6420c765d13518a42080d2 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -1748,11 +1748,17 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
|
@ -6,7 +6,7 @@ Subject: [PATCH] Prevent Frosted Ice from loading/holding chunks
|
|||
1.17: Shouldn't be needed as blocks no longer tick without at least 1 radius chunk loaded.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/FrostedIceBlock.java b/src/main/java/net/minecraft/world/level/block/FrostedIceBlock.java
|
||||
index 54eb7ba0265bb155dd1c753661242fa9d299ff80..5b5d606a794c885267b6f5e2bbfe9b0a318ad767 100644
|
||||
index 48776edab1479b5e861eca8146da04ebee01c46a..e0903ecf7a478d0a341d6ad6d94f06aef9836cc9 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/FrostedIceBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/FrostedIceBlock.java
|
||||
@@ -38,7 +38,8 @@ public class FrostedIceBlock extends IceBlock {
|
||||
|
@ -17,7 +17,7 @@ index 54eb7ba0265bb155dd1c753661242fa9d299ff80..5b5d606a794c885267b6f5e2bbfe9b0a
|
|||
+ BlockState blockState = world.getTypeIfLoaded(mutableBlockPos); // Paper
|
||||
+ if (blockState == null) { continue; } // Paper
|
||||
if (blockState.is(this) && !this.slightlyMelt(blockState, world, mutableBlockPos)) {
|
||||
world.getBlockTicks().scheduleTick(mutableBlockPos, this, Mth.nextInt(random, world.paperConfig.frostedIceDelayMin, world.paperConfig.frostedIceDelayMax)); // Paper - use configurable min/max delay
|
||||
world.scheduleTick(mutableBlockPos, this, Mth.nextInt(random, world.paperConfig.frostedIceDelayMin, world.paperConfig.frostedIceDelayMax)); // Paper - use configurable min/max delay
|
||||
}
|
||||
@@ -75,7 +76,10 @@ public class FrostedIceBlock extends IceBlock {
|
||||
|
|
@ -8,10 +8,10 @@ Allow control over whether or not an enderman aggros a player.
|
|||
This allows you to override/extend the pumpkin/stare logic.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/EnderMan.java b/src/main/java/net/minecraft/world/entity/monster/EnderMan.java
|
||||
index 02f691a2217bea2df23b7b412eba90ee99c3b8c9..de167655a556a700bdc7d92fa54b802924b2a61a 100644
|
||||
index d427276e3556f1c8580ea15095424f76e07f0a99..c7714824d8e85087397047cf9bcb0528968b1f93 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/EnderMan.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/EnderMan.java
|
||||
@@ -220,7 +220,15 @@ public class EnderMan extends Monster implements NeutralMob {
|
||||
@@ -226,7 +226,15 @@ public class EnderMan extends Monster implements NeutralMob {
|
||||
this.readPersistentAngerSaveData(this.level, nbt);
|
||||
}
|
||||
|
|
@ -6,10 +6,10 @@ Subject: [PATCH] WitchConsumePotionEvent
|
|||
Fires when a witch consumes the potion in their hand
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/Witch.java b/src/main/java/net/minecraft/world/entity/monster/Witch.java
|
||||
index d3cb46250d3f72a3d0f0e42eddee3ea30e8cabcc..fcfa4d3b0cb257804500864847f35650f4cb7602 100644
|
||||
index 2ea39decbd22c57952cded4c368ab475e6a37230..cf6f38b8d76e319c299bbcc960b860eb404a13ab 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/Witch.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/Witch.java
|
||||
@@ -124,7 +124,11 @@ public class Witch extends Raider implements RangedAttackMob {
|
||||
@@ -123,7 +123,11 @@ public class Witch extends Raider implements RangedAttackMob {
|
||||
|
||||
this.setItemSlot(EquipmentSlot.MAINHAND, ItemStack.EMPTY);
|
||||
if (itemstack.is(Items.POTION)) {
|
|
@ -6,10 +6,10 @@ Subject: [PATCH] WitchThrowPotionEvent
|
|||
Fired when a witch throws a potion at a player
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/Witch.java b/src/main/java/net/minecraft/world/entity/monster/Witch.java
|
||||
index fcfa4d3b0cb257804500864847f35650f4cb7602..4bb000af5964adec59741de56eb3bbd7b38ad237 100644
|
||||
index cf6f38b8d76e319c299bbcc960b860eb404a13ab..bab4988c3170429f5b050d0c7aa96a70002680c5 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/Witch.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/Witch.java
|
||||
@@ -236,9 +236,16 @@ public class Witch extends Raider implements RangedAttackMob {
|
||||
@@ -235,9 +235,16 @@ public class Witch extends Raider implements RangedAttackMob {
|
||||
potionregistry = Potions.WEAKNESS;
|
||||
}
|
||||
|
|
@ -8,10 +8,10 @@ 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 d0873200aa8f66648e23fc2954a27a83289e748c..0d1421555a98b97c30dbb4d95491308e433a81a3 100644
|
||||
index 7c00bae9082d02f712c6e80f5ed69a55eb01d8da..60c3d17f35a044d30be587df98fce329752b2ba2 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java
|
||||
@@ -530,6 +530,10 @@ public abstract class CraftRegionAccessor implements RegionAccessor {
|
||||
@@ -531,6 +531,10 @@ public abstract class CraftRegionAccessor implements RegionAccessor {
|
||||
if (Boat.class.isAssignableFrom(clazz)) {
|
||||
entity = new net.minecraft.world.entity.vehicle.Boat(world, x, y, z);
|
||||
entity.moveTo(x, y, z, yaw, pitch);
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] WitchReadyPotionEvent
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/Witch.java b/src/main/java/net/minecraft/world/entity/monster/Witch.java
|
||||
index 4bb000af5964adec59741de56eb3bbd7b38ad237..94bd20db7ffea00579225e6887b8c78a3da3ff1a 100644
|
||||
index bab4988c3170429f5b050d0c7aa96a70002680c5..75c863c2cf365c321e401e05f564518be3a7b949 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/Witch.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/Witch.java
|
||||
@@ -157,7 +157,11 @@ public class Witch extends Raider implements RangedAttackMob {
|
||||
@@ -156,7 +156,11 @@ public class Witch extends Raider implements RangedAttackMob {
|
||||
}
|
||||
|
||||
if (potionregistry != null) {
|
|
@ -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 84f11780a22b3369519fc8f80d6c274360045df7..4b43e6a1b628e2060d1095dab892efd9d1dfc485 100644
|
||||
index ba70ac49222c517a38e20e86cee1fd38aecb6318..967555b6a3ef833ca75215391b20744ab6f04359 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,10 +5,10 @@ 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 d6f67a87c46c95bd4c2dfad4c1c13cbfd263ef30..f41dfe8bff59d17000f3eb17670c524102adb276 100644
|
||||
index 8af71dd1b916be666ee163904118db46fd3c9850..1d8af8475d0aac71a4ed8a2fed9861dd89d8319b 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
|
||||
@@ -225,9 +225,20 @@ public class TheEndGatewayBlockEntity extends TheEndPortalBlockEntity {
|
||||
@@ -223,9 +223,20 @@ public class TheEndGatewayBlockEntity extends TheEndPortalBlockEntity {
|
||||
|
||||
}
|
||||
// CraftBukkit end
|
|
@ -6,7 +6,7 @@ Subject: [PATCH] Unset Ignited flag on cancel of Explosion Event
|
|||
Otherwise the creeper infinite explodes
|
||||
|
||||
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 aa16a81ee447e8bae274668f2240627d060398ba..dc7ad6f2a1ae71c411fb39460b52cd1129c928c4 100644
|
||||
index 638b80006138ca7be44abfa69f31eccb2035ffac..bf7ddca34c8d9834a5b923fab30a605afa5f337a 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/Creeper.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/Creeper.java
|
||||
@@ -272,6 +272,7 @@ public class Creeper extends Monster implements PowerableMob {
|
|
@ -21,7 +21,7 @@ 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 21edae1b8d91341621155897d4da36bc06d2b2e5..473dc5e5ee3458e605ecf5e2b2dadb3573fd685b 100644
|
||||
index a83d15178f71b1c4c6d8d49f7621eddd66577251..ec11cf974222a2719aeea86ab425fdddb38928a8 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
@@ -792,14 +792,15 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
|
@ -19,10 +19,10 @@ index a0937dd52e4a2aa1bfadcbd1ac0dc2cb26d59cf0..4dce401da0e0fdf985ecb90f37b92e16
|
|||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 669e621fdb0d05ee61dea5f212eb228f8be008ae..d1d3c11e105b65a4b7d300ef3c08d4f4f5b3dbfc 100644
|
||||
index 5c9f9b6a1bd66d33fd194ad1d78a907b005a101c..4ca6feea7910d613ffcf4339d809f98f34e17ffb 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -3669,12 +3669,24 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -3668,12 +3668,24 @@ public abstract class LivingEntity extends Entity {
|
||||
if (this.isUsingItem() && !this.useItem.isEmpty()) {
|
||||
Item item = this.useItem.getItem();
|
||||
|
||||
|
@ -49,7 +49,7 @@ index 669e621fdb0d05ee61dea5f212eb228f8be008ae..d1d3c11e105b65a4b7d300ef3c08d4f4
|
|||
return this.isShiftKeyDown();
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
index 3977069ccc96114ddae8d2f8f6578f74d8854127..a6e1edad4acd20b25f5e27afbbf580482efe29af 100644
|
||||
index 6455a81fea0de79173419587171b5ed025c30592..bbb7d6bcdc280236a583056cf9ccfc7b8de37706 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
@@ -739,5 +739,15 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
|
@ -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 d7bca8fa71e325ba1967537d4102ccb207c4d717..3d8f3e22223e4effeaf52cb18c14c60276d4689c 100644
|
||||
index 8829af99f0b4d7307e92cc1d91a01265dba17568..609380af4de4118a543b6ec94feb176e6f6870ed 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/AbstractSkeleton.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/AbstractSkeleton.java
|
||||
@@ -196,7 +196,7 @@ public abstract class AbstractSkeleton extends Monster implements RangedAttackMo
|
||||
@@ -195,7 +195,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
|
||||
|
@ -19,7 +19,7 @@ index d7bca8fa71e325ba1967537d4102ccb207c4d717..3d8f3e22223e4effeaf52cb18c14c602
|
|||
event.getProjectile().remove();
|
||||
return;
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/Illusioner.java b/src/main/java/net/minecraft/world/entity/monster/Illusioner.java
|
||||
index 73dbf08002e6b90e6dfc01369de7c53531dae43b..e1b8d9c0acfc248b9a24efc21aefc88e3caeb605 100644
|
||||
index 7b3a931353e2ead4e5caade8fb12d70f290b67e4..86f7fdd42461db151221d2c0d5cff6953392fa80 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/Illusioner.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/Illusioner.java
|
||||
@@ -196,8 +196,18 @@ public class Illusioner extends SpellcasterIllager implements RangedAttackMob {
|
|
@ -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 f7ee9ce075720ed59cf761463bae997a141a7be8..ea4e8680fc85d6c88078667b96e4412503713a37 100644
|
||||
index 74ef6bdcb193081ca5e46841200857b6491aeeff..2909db2666c653a940830f29435b82480dc6825e 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
@@ -2184,6 +2184,17 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -2182,6 +2182,17 @@ public abstract class Player extends LivingEntity {
|
||||
return ImmutableList.of(Pose.STANDING, Pose.CROUCHING, Pose.SWIMMING);
|
||||
}
|
||||
|
||||
|
@ -28,7 +28,7 @@ index f7ee9ce075720ed59cf761463bae997a141a7be8..ea4e8680fc85d6c88078667b96e44125
|
|||
@Override
|
||||
public ItemStack getProjectile(ItemStack stack) {
|
||||
if (!(stack.getItem() instanceof ProjectileWeaponItem)) {
|
||||
@@ -2200,7 +2211,7 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -2198,7 +2209,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 a7f6127aae3c35d3570cba31cbf7a9be34e303b2..85aae87d03219a53e5aec2b9983dac2831aff82e 100644
|
||||
index 4ca6feea7910d613ffcf4339d809f98f34e17ffb..a1de99f07f47e4b378b0c36ea158ce0693ee2686 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -1437,7 +1437,7 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -1432,7 +1432,7 @@ public abstract class LivingEntity extends Entity {
|
||||
}
|
||||
|
||||
this.hurtDir = (float) (Mth.atan2(d1, d0) * 57.2957763671875D - (double) this.getYRot());
|
||||
|
@ -18,7 +18,7 @@ index a7f6127aae3c35d3570cba31cbf7a9be34e303b2..85aae87d03219a53e5aec2b9983dac28
|
|||
} else {
|
||||
this.hurtDir = (float) ((int) (Math.random() * 2.0D) * 180);
|
||||
}
|
||||
@@ -1485,7 +1485,7 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -1480,7 +1480,7 @@ public abstract class LivingEntity extends Entity {
|
||||
}
|
||||
|
||||
protected void blockedByShield(LivingEntity target) {
|
||||
|
@ -27,7 +27,7 @@ index a7f6127aae3c35d3570cba31cbf7a9be34e303b2..85aae87d03219a53e5aec2b9983dac28
|
|||
}
|
||||
|
||||
private boolean checkTotemDeathProtection(DamageSource source) {
|
||||
@@ -1738,6 +1738,11 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -1733,6 +1733,11 @@ public abstract class LivingEntity extends Entity {
|
||||
}
|
||||
|
||||
public void knockback(double strength, double x, double z) {
|
||||
|
@ -39,7 +39,7 @@ index a7f6127aae3c35d3570cba31cbf7a9be34e303b2..85aae87d03219a53e5aec2b9983dac28
|
|||
strength *= 1.0D - this.getAttributeValue(Attributes.KNOCKBACK_RESISTANCE);
|
||||
if (strength > 0.0D) {
|
||||
this.hasImpulse = true;
|
||||
@@ -1745,6 +1750,15 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -1740,6 +1745,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 a7f6127aae3c35d3570cba31cbf7a9be34e303b2..85aae87d03219a53e5aec2b9983dac28
|
|||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
index 4f3613e8232df3b4d9e10970b9faf9fbdd3b34a2..6e5682fed08a41c7e573e6611fca93bf85019b9f 100644
|
||||
index 3eda6821d12bf616037f6c00815602428afbcdaf..ad2ef9460d85b2182f6af35733daadcedbd15e4c 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
@@ -1537,7 +1537,7 @@ public abstract class Mob extends LivingEntity {
|
||||
@@ -1552,7 +1552,7 @@ public abstract class Mob extends LivingEntity {
|
||||
|
||||
if (flag) {
|
||||
if (f1 > 0.0F && target instanceof LivingEntity) {
|
||||
|
@ -82,10 +82,10 @@ index f6fd39823f04f8071c616d40a838b01e7159c5a1..e1cdf3ce38404d3f40be59e4cd3ad2b9
|
|||
serverLevel.playSound((Player)null, pathfinderMob, this.getImpactSound.apply(pathfinderMob), SoundSource.HOSTILE, 1.0F, 1.0F);
|
||||
} else {
|
||||
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 ea4e8680fc85d6c88078667b96e4412503713a37..7d09d12fe4d8a01ae5849f967afcef1dcc773a04 100644
|
||||
index 2909db2666c653a940830f29435b82480dc6825e..ca87d9e2543f7bca8d1c2b0c455cf55b82c9b4c0 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
@@ -1232,7 +1232,7 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -1230,7 +1230,7 @@ public abstract class Player extends LivingEntity {
|
||||
if (flag5) {
|
||||
if (i > 0) {
|
||||
if (target instanceof LivingEntity) {
|
||||
|
@ -94,8 +94,8 @@ index ea4e8680fc85d6c88078667b96e4412503713a37..7d09d12fe4d8a01ae5849f967afcef1d
|
|||
} 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));
|
||||
}
|
||||
@@ -1256,7 +1256,7 @@ public abstract class Player extends LivingEntity {
|
||||
if (entityliving != this && entityliving != target && !this.isAlliedTo(entityliving) && (!(entityliving instanceof ArmorStand) || !((ArmorStand) entityliving).isMarker()) && this.distanceToSqr((Entity) entityliving) < 9.0D) {
|
||||
@@ -1254,7 +1254,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)) {
|
||||
- entityliving.knockback(0.4000000059604645D, (double) Mth.sin(this.getYRot() * 0.017453292F), (double) (-Mth.cos(this.getYRot() * 0.017453292F)));
|
|
@ -6,7 +6,7 @@ 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 7fbd068cbf96332b6ea45411f45e9e0910693c57..4f9487ac3535b2609ad57f7c1d9504801e8aa2a6 100644
|
||||
index 90fe854921dfea883c6420c765d13518a42080d2..478a1864079c72c670480a0dbb0a78eae2165dca 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -688,6 +688,12 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
|
@ -6,7 +6,7 @@ Subject: [PATCH] LivingEntity Hand Raised/Item Use API
|
|||
How long an entity has raised hands to charge an attack or use an item
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
index a6e1edad4acd20b25f5e27afbbf580482efe29af..db3123b4a6582ad1667b24b9ff03caf671287857 100644
|
||||
index bbb7d6bcdc280236a583056cf9ccfc7b8de37706..5c517025576461b426b4a73eea4369f00aeeee41 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
@@ -749,5 +749,30 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
|
@ -19,10 +19,10 @@ index 4dce401da0e0fdf985ecb90f37b92e16cf210d25..35c6978eaf25ed505f99e42a58d388c6
|
|||
+ }
|
||||
}
|
||||
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 758af2c2d66073aeaee766adb672c465d2993eab..711be01abe9d47bdc9bfe8b09a2719d666b986fb 100644
|
||||
index 2b7ffbc125d01db093a31ed6147fc1d736a01e80..9a6b2c75b8622b0f9eda85011ef6f2f1dca574c9 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
|
||||
@@ -84,6 +84,10 @@ public class EndDragonFight {
|
||||
@@ -88,6 +88,10 @@ public class EndDragonFight {
|
||||
private List<EndCrystal> respawnCrystals;
|
||||
|
||||
public EndDragonFight(ServerLevel world, long gatewaysSeed, CompoundTag nbt) {
|
|
@ -5,7 +5,7 @@ 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 4f9487ac3535b2609ad57f7c1d9504801e8aa2a6..375c3adac2dc80f15d06e8acb11c8c451ec579e5 100644
|
||||
index 478a1864079c72c670480a0dbb0a78eae2165dca..d72bfc263798797ca83e529c26bd2a1733c65eb4 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -1022,6 +1022,15 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
|
@ -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 d09556a6559a6984a7aec341eb5678222ed67da3..b524db142fdc9596e9a10bf0208877c556c5ecbe 100644
|
||||
index a734416fd80f0b367300c179e90fb51e206ca36c..5d63b8843beaeb6f6d42d1c122c89ea57ed44e36 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1107,7 +1107,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1128,7 +1128,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 d09556a6559a6984a7aec341eb5678222ed67da3..b524db142fdc9596e9a10bf0208877c5
|
|||
}
|
||||
}
|
||||
}
|
||||
@@ -1993,7 +1993,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -2027,7 +2027,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
// Spigot Start
|
||||
if (entity.getBukkitEntity() instanceof org.bukkit.inventory.InventoryHolder) {
|
||||
for (org.bukkit.entity.HumanEntity h : Lists.newArrayList(((org.bukkit.inventory.InventoryHolder) entity.getBukkitEntity()).getInventory().getViewers())) {
|
||||
|
@ -29,10 +29,10 @@ index d09556a6559a6984a7aec341eb5678222ed67da3..b524db142fdc9596e9a10bf0208877c5
|
|||
}
|
||||
// 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 3bcb8ae7391f405c11cf1c117848eeb9aae7bcaa..3d5db5ce2e60ca72ad202caebe49f3fc80d1af37 100644
|
||||
index 90bff0dd400a67bcb84f8576bd8326793420919a..fd1937f49312204d38510996a5be43b731f38bde 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -597,7 +597,7 @@ public class ServerPlayer extends Player {
|
||||
@@ -601,7 +601,7 @@ public class ServerPlayer extends Player {
|
||||
}
|
||||
// Paper end
|
||||
if (!this.level.isClientSide && !this.containerMenu.stillValid(this)) {
|
||||
|
@ -41,7 +41,7 @@ index 3bcb8ae7391f405c11cf1c117848eeb9aae7bcaa..3d5db5ce2e60ca72ad202caebe49f3fc
|
|||
this.containerMenu = this.inventoryMenu;
|
||||
}
|
||||
|
||||
@@ -751,7 +751,7 @@ public class ServerPlayer extends Player {
|
||||
@@ -789,7 +789,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 3bcb8ae7391f405c11cf1c117848eeb9aae7bcaa..3d5db5ce2e60ca72ad202caebe49f3fc
|
|||
}
|
||||
|
||||
net.kyori.adventure.text.Component deathMessage = event.deathMessage() != null ? event.deathMessage() : net.kyori.adventure.text.Component.empty(); // Paper - Adventure
|
||||
@@ -1402,7 +1402,7 @@ public class ServerPlayer extends Player {
|
||||
@@ -1429,7 +1429,7 @@ public class ServerPlayer extends Player {
|
||||
}
|
||||
// CraftBukkit end
|
||||
if (this.containerMenu != this.inventoryMenu) {
|
||||
|
@ -59,7 +59,7 @@ index 3bcb8ae7391f405c11cf1c117848eeb9aae7bcaa..3d5db5ce2e60ca72ad202caebe49f3fc
|
|||
}
|
||||
|
||||
// this.nextContainerCounter(); // CraftBukkit - moved up
|
||||
@@ -1431,7 +1431,13 @@ public class ServerPlayer extends Player {
|
||||
@@ -1457,7 +1457,13 @@ public class ServerPlayer extends Player {
|
||||
|
||||
@Override
|
||||
public void closeContainer() {
|
||||
|
@ -75,10 +75,10 @@ index 3bcb8ae7391f405c11cf1c117848eeb9aae7bcaa..3d5db5ce2e60ca72ad202caebe49f3fc
|
|||
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 23bd778a4b784c93115924afdd97852ca27cbdd5..e1123f0523fbf1e07cdc44d029c7837ada31194b 100644
|
||||
index 77323b363573e770bbb4ae98911d5a922ad315c2..930f71861b1ee2fe210bd0e987a6b304b25f19dc 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -187,6 +187,7 @@ import org.bukkit.event.inventory.ClickType;
|
||||
@@ -186,6 +186,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 23bd778a4b784c93115924afdd97852ca27cbdd5..e1123f0523fbf1e07cdc44d029c7837a
|
|||
import org.bukkit.event.inventory.InventoryCreativeEvent;
|
||||
import org.bukkit.event.inventory.InventoryType.SlotType;
|
||||
import org.bukkit.event.inventory.SmithItemEvent;
|
||||
@@ -2320,10 +2321,15 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -2330,10 +2331,15 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
|
||||
@Override
|
||||
public void handleContainerClose(ServerboundContainerClosePacket packet) {
|
||||
|
@ -105,7 +105,7 @@ index 23bd778a4b784c93115924afdd97852ca27cbdd5..e1123f0523fbf1e07cdc44d029c7837a
|
|||
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 17f56157d60d33695c4eac0e4fc94120a2101214..c4940b2538e8adfe5f19cb5f1a5373319a1cb89b 100644
|
||||
index 4f56bb45b9bdaf3de02c5f331760339f4397eafc..04cf38bbb62b6b9b46ba32ae0d4e66423cdfbea0 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 {
|
||||
|
@ -118,10 +118,10 @@ index 17f56157d60d33695c4eac0e4fc94120a2101214..c4940b2538e8adfe5f19cb5f1a537331
|
|||
|
||||
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 7d09d12fe4d8a01ae5849f967afcef1dcc773a04..f5bc151aae4f8335994507c89a094177347dfce1 100644
|
||||
index ca87d9e2543f7bca8d1c2b0c455cf55b82c9b4c0..37b65c7a12b4dc8ff4e9017015abbb86890dbf5e 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
@@ -264,7 +264,7 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -262,7 +262,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 7d09d12fe4d8a01ae5849f967afcef1dcc773a04..f5bc151aae4f8335994507c89a094177
|
|||
this.containerMenu = this.inventoryMenu;
|
||||
}
|
||||
|
||||
@@ -487,6 +487,13 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -485,6 +485,13 @@ public abstract class Player extends LivingEntity {
|
||||
|
||||
}
|
||||
|
||||
|
@ -145,7 +145,7 @@ index 7d09d12fe4d8a01ae5849f967afcef1dcc773a04..f5bc151aae4f8335994507c89a094177
|
|||
this.containerMenu = this.inventoryMenu;
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
||||
index f1b1d1881d0598503a7ec1022ef5e00f848fb247..460828d29583ee21a7c5b716f9687a8243911a7e 100644
|
||||
index 87bc05f2eef1555ad3346d1d1bda72d4feb0fa1b..76a08aaf5106a5e8d0a24e9d966817574ec26068 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
||||
@@ -373,7 +373,7 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
|
||||
|
@ -174,10 +174,10 @@ index f1b1d1881d0598503a7ec1022ef5e00f848fb247..460828d29583ee21a7c5b716f9687a82
|
|||
@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 c07916e07e09f1491c9bad7d13b127960dd167a6..7d87be1eb79045226cad3b7e62ff5d265160b866 100644
|
||||
index 5d4499a79fe6bd6a2c9f6896a40491ecadfd4f6c..b415f0760bd1027dcc9cd987d06421cbc50fbfaa 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -935,7 +935,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -939,7 +939,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 897a950a5a0b669aff05387efb9c403764a0e8ea..857fa3a4f2d5afd27df7ce943359705b3ea131d3 100644
|
||||
index 930f71861b1ee2fe210bd0e987a6b304b25f19dc..843e0c6bf53ccbb92efe14a3d32fed3013a6a53e 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2205,6 +2205,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -2215,6 +2215,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 54025e401eb02fceb47afb182f0ede620ca23a8d..0741dcbd06395b4696eb6083128a5d9b679cb3fb 100644
|
||||
index db42d22f58df5daefc41720206405dda4f7ad633..2716fb59e83e2e2bca845bd1b58c5aefb7aa89a0 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
||||
@@ -223,6 +223,10 @@ public class ItemEntity extends Entity {
|
||||
@@ -222,6 +222,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 fc8ffeea3e808eb1381f85972adffc614937ef6d..c981944f4a5d40ec14ade9aaa22041887a317e1f 100644
|
||||
index ef5af1965d54e9ba9ff84d4f22ae77e4ccfa461c..80849d9b582916be238ba8c8e79de5832eff3c9a 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -37,6 +37,7 @@ dependencies {
|
||||
@@ -36,6 +36,7 @@ dependencies {
|
||||
}
|
||||
runtimeOnly("org.xerial:sqlite-jdbc:3.34.0")
|
||||
runtimeOnly("mysql:mysql-connector-java:8.0.23") // Paper
|
||||
runtimeOnly("org.xerial:sqlite-jdbc:3.36.0.3")
|
||||
runtimeOnly("mysql:mysql-connector-java:8.0.27")
|
||||
+ runtimeOnly("com.lmax:disruptor:3.4.4") // Paper
|
||||
|
||||
runtimeOnly("org.apache.maven:maven-resolver-provider:3.8.1")
|
|
@ -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 3b2334e9ba44205a4e0ec12045eab4fad91bb15a..2a6954e3c9ff82d68647bf8f4c4803184fab0bbe 100644
|
||||
index 31c502705ed3daef86df6e81215c0c7f9e8d22f8..9cf4f75f61179229e652ae56108626ba8c968121 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -2815,7 +2815,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
|
||||
@@ -2852,7 +2852,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i
|
||||
}
|
||||
|
||||
public String 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 2b54c6980166cb7378e3db42d3a68005ebf451a1..f8cb210390958ddba9f9685f2ec1f8bb91690162 100644
|
||||
index c7a5c9102b0cadeeefdd0dbd0de609f921460485..db33d1eb9bee8178072cc3b430b88b044a66cd92 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
@@ -373,6 +373,11 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
|
@ -5,10 +5,10 @@ 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 df44bfce8cc492cd901dfa86331b9be7f1e13837..7490674d59d152a70e24a790bdbc717998ed2c52 100644
|
||||
index 68e27569f44efd7fa234c19c7fd51da709a06a43..f18830d9d0f821e5603992846c335bba04ab640f 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
|
||||
@@ -81,7 +81,13 @@ public class DragonSittingFlamingPhase extends AbstractDragonSittingPhase {
|
||||
@@ -83,7 +83,13 @@ public class DragonSittingFlamingPhase extends AbstractDragonSittingPhase {
|
||||
this.flame.setDuration(200);
|
||||
this.flame.setParticle(ParticleTypes.DRAGON_BREATH);
|
||||
this.flame.addEffect(new MobEffectInstance(MobEffects.HARM));
|
||||
|
@ -23,10 +23,10 @@ index df44bfce8cc492cd901dfa86331b9be7f1e13837..7490674d59d152a70e24a790bdbc7179
|
|||
|
||||
}
|
||||
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 974895ef23e9d2b8c520abd262a2e80d28be5860..318a288a9170254b682955d96a150e99ca89b345 100644
|
||||
index f4a219f8e9f0fe698185e8ba9a4489c681d82c9e..075c27924a137adbb110f5751569c3ebd89e3fc0 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
|
||||
@@ -71,7 +71,9 @@ public class DragonStrafePlayerPhase extends AbstractDragonPhaseInstance {
|
||||
@@ -74,7 +74,9 @@ public class DragonStrafePlayerPhase extends AbstractDragonPhaseInstance {
|
||||
|
||||
DragonFireball dragonFireball = new DragonFireball(this.dragon.level, this.dragon, r, s, t);
|
||||
dragonFireball.moveTo(o, p, q, 0.0F, 0.0F);
|
|
@ -5,7 +5,7 @@ Subject: [PATCH] PlayerLaunchProjectileEvent
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/item/EggItem.java b/src/main/java/net/minecraft/world/item/EggItem.java
|
||||
index c33210c18445a93ca6445812471aaf1e55bcc44d..98b353f5cc05da5ee5a6c6110a08e43e819fe6d2 100644
|
||||
index 32b63407b943fb00d765dbf4e0eefb4b06f801b6..58cb992c5defec2f092755cbde661ff10f38bf9d 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/EggItem.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/EggItem.java
|
||||
@@ -25,21 +25,33 @@ public class EggItem extends Item {
|
||||
|
@ -177,7 +177,7 @@ index db0492f6337de562210ef062f46e98992c908200..f2d1b4e3fc08f6a06beb391bc6e60f62
|
|||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/item/SnowballItem.java b/src/main/java/net/minecraft/world/item/SnowballItem.java
|
||||
index 516afa893035539a879a71eb327eed0596c31d48..717f90a2ca41734f7ee09401f21474820fa1cf48 100644
|
||||
index d60e57e84f7d66e1858ab50ac33777feedf1c54d..ef3f90a5bcdd7b9815a4053cff166f9d2552f55d 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/SnowballItem.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/SnowballItem.java
|
||||
@@ -26,18 +26,26 @@ public class SnowballItem extends Item {
|
||||
|
@ -212,7 +212,7 @@ index 516afa893035539a879a71eb327eed0596c31d48..717f90a2ca41734f7ee09401f2147482
|
|||
// CraftBukkit start - moved up
|
||||
/*
|
||||
@@ -45,6 +53,7 @@ public class SnowballItem extends Item {
|
||||
itemstack.subtract(1);
|
||||
itemstack.shrink(1);
|
||||
}
|
||||
*/
|
||||
+ // Paper end
|
|
@ -21,10 +21,10 @@ This is based upon conclusions drawn from inspecting the assenmbly generated byt
|
|||
They had 'callq' (invoke) instead of 'mov' (get from memory) instructions.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/core/Vec3i.java b/src/main/java/net/minecraft/core/Vec3i.java
|
||||
index f924f2b20800dfde93eeafea3614203661d35389..dc7598a011c2b290a42df35593de0b6689c99c57 100644
|
||||
index c33bac27edfdab4c3ee618c9ed39c629b1513f09..6de2ea6641433206027015695a0d10c80fe0e2f5 100644
|
||||
--- a/src/main/java/net/minecraft/core/Vec3i.java
|
||||
+++ b/src/main/java/net/minecraft/core/Vec3i.java
|
||||
@@ -41,7 +41,7 @@ public class Vec3i implements Comparable<Vec3i> {
|
||||
@@ -53,7 +53,7 @@ public class Vec3i implements Comparable<Vec3i> {
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -33,7 +33,7 @@ index f924f2b20800dfde93eeafea3614203661d35389..dc7598a011c2b290a42df35593de0b66
|
|||
if (this == object) {
|
||||
return true;
|
||||
} else if (!(object instanceof Vec3i)) {
|
||||
@@ -59,7 +59,7 @@ public class Vec3i implements Comparable<Vec3i> {
|
||||
@@ -71,7 +71,7 @@ public class Vec3i implements Comparable<Vec3i> {
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -42,7 +42,7 @@ index f924f2b20800dfde93eeafea3614203661d35389..dc7598a011c2b290a42df35593de0b66
|
|||
return (this.getY() + this.getZ() * 31) * 31 + this.getX();
|
||||
}
|
||||
|
||||
@@ -72,15 +72,15 @@ public class Vec3i implements Comparable<Vec3i> {
|
||||
@@ -84,15 +84,15 @@ public class Vec3i implements Comparable<Vec3i> {
|
||||
}
|
||||
}
|
||||
|
|
@ -8,25 +8,24 @@ Optimizes CrudeIncrementalIntIdentityHashBiMap#nextId()
|
|||
This is a frequent hotspot for world loading/saving.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/util/CrudeIncrementalIntIdentityHashBiMap.java b/src/main/java/net/minecraft/util/CrudeIncrementalIntIdentityHashBiMap.java
|
||||
index feaa9572a450b88a26659d850a269d09465259ee..62440dbb35263cddc90ba594c3d5777d7643e527 100644
|
||||
index dc7528b41aa9a55807a2b3e33d5668e1be681e79..a002218caed08bf4a4072d934e1094c22ee35534 100644
|
||||
--- a/src/main/java/net/minecraft/util/CrudeIncrementalIntIdentityHashBiMap.java
|
||||
+++ b/src/main/java/net/minecraft/util/CrudeIncrementalIntIdentityHashBiMap.java
|
||||
@@ -16,12 +16,14 @@ public class CrudeIncrementalIntIdentityHashBiMap<K> implements IdMap<K> {
|
||||
@@ -16,11 +16,13 @@ public class CrudeIncrementalIntIdentityHashBiMap<K> implements IdMap<K> {
|
||||
private K[] byId;
|
||||
private int nextId;
|
||||
private int size;
|
||||
+ private java.util.BitSet usedIds; // Paper
|
||||
|
||||
public CrudeIncrementalIntIdentityHashBiMap(int size) {
|
||||
size = (int)((float)size / 0.8F);
|
||||
private CrudeIncrementalIntIdentityHashBiMap(int size) {
|
||||
this.keys = (K[])(new Object[size]);
|
||||
this.values = new int[size];
|
||||
this.byId = (K[])(new Object[size]);
|
||||
+ this.usedIds = new java.util.BitSet(); // Paper
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -54,9 +56,13 @@ public class CrudeIncrementalIntIdentityHashBiMap<K> implements IdMap<K> {
|
||||
public static <A> CrudeIncrementalIntIdentityHashBiMap<A> create(int expectedSize) {
|
||||
@@ -57,9 +59,13 @@ public class CrudeIncrementalIntIdentityHashBiMap<K> implements IdMap<K> {
|
||||
}
|
||||
|
||||
private int nextId() {
|
||||
|
@ -40,15 +39,15 @@ index feaa9572a450b88a26659d850a269d09465259ee..62440dbb35263cddc90ba594c3d5777d
|
|||
|
||||
return this.nextId;
|
||||
}
|
||||
@@ -69,6 +75,7 @@ public class CrudeIncrementalIntIdentityHashBiMap<K> implements IdMap<K> {
|
||||
this.byId = (K[])(new Object[newSize]);
|
||||
this.nextId = 0;
|
||||
this.size = 0;
|
||||
@@ -80,6 +86,7 @@ public class CrudeIncrementalIntIdentityHashBiMap<K> implements IdMap<K> {
|
||||
this.byId = crudeIncrementalIntIdentityHashBiMap.byId;
|
||||
this.nextId = crudeIncrementalIntIdentityHashBiMap.nextId;
|
||||
this.size = crudeIncrementalIntIdentityHashBiMap.size;
|
||||
+ this.usedIds.clear(); // Paper
|
||||
}
|
||||
|
||||
for(int i = 0; i < objects.length; ++i) {
|
||||
if (objects[i] != null) {
|
||||
@@ -92,6 +99,7 @@ public class CrudeIncrementalIntIdentityHashBiMap<K> implements IdMap<K> {
|
||||
public void addMapping(K value, int id) {
|
||||
@@ -96,6 +103,7 @@ public class CrudeIncrementalIntIdentityHashBiMap<K> implements IdMap<K> {
|
||||
this.keys[k] = value;
|
||||
this.values[k] = id;
|
||||
this.byId[id] = value;
|
||||
|
@ -56,11 +55,11 @@ index feaa9572a450b88a26659d850a269d09465259ee..62440dbb35263cddc90ba594c3d5777d
|
|||
++this.size;
|
||||
if (id == this.nextId) {
|
||||
++this.nextId;
|
||||
@@ -153,6 +161,7 @@ public class CrudeIncrementalIntIdentityHashBiMap<K> implements IdMap<K> {
|
||||
@@ -157,6 +165,7 @@ public class CrudeIncrementalIntIdentityHashBiMap<K> implements IdMap<K> {
|
||||
Arrays.fill(this.byId, (Object)null);
|
||||
this.nextId = 0;
|
||||
this.size = 0;
|
||||
+ this.usedIds.clear(); // Paper
|
||||
}
|
||||
|
||||
public int size() {
|
||||
@Override
|
|
@ -19,22 +19,22 @@ index 35c6978eaf25ed505f99e42a58d388c62fde8319..0fd29d5854d9d6155ea590f86d4492d8
|
|||
+ }
|
||||
}
|
||||
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 04ee36326b16e2aa070fd3318bd4a30bce67e49a..9a63260b20903eb4600f098c81ae660029f7c345 100644
|
||||
index 138422903dcb3056cd011a72e0625a1a225b4280..b92c2d5f9ad3936f619b51c79379983e3231e700 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
|
||||
@@ -339,6 +339,7 @@ public class ArmorStand extends LivingEntity {
|
||||
@@ -338,6 +338,7 @@ public class ArmorStand extends LivingEntity {
|
||||
|
||||
@Override
|
||||
protected void pushEntities() {
|
||||
+ if (!level.paperConfig.armorStandEntityLookups) return; // Paper
|
||||
List<Entity> list = this.level.getEntities(this, this.getBoundingBox(), ArmorStand.RIDABLE_MINECARTS);
|
||||
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 233a8fcfae4ac568ad1f73cc61d8ae5b66a01ac2..e8d1a17b8e65e1af03ad36afd98b3e6ebab2592a 100644
|
||||
index 21491224a8383cef2d41b0da2e7de9362fe1d27f..0e71e1cb15640d397b4da9a8cfef4fdf0a61ec51 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 {
|
||||
@@ -775,6 +775,13 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
// Paper end
|
||||
}
|
||||
}
|
||||
|
@ -46,5 +46,5 @@ index 233a8fcfae4ac568ad1f73cc61d8ae5b66a01ac2..e8d1a17b8e65e1af03ad36afd98b3e6e
|
|||
+ }
|
||||
+ // Paper end
|
||||
|
||||
public Explosion explode(@Nullable Entity entity, double x, double y, double z, float power, Explosion.BlockInteraction destructionType) {
|
||||
return this.explode(entity, (DamageSource) null, (ExplosionDamageCalculator) null, x, y, z, power, false, destructionType);
|
||||
public boolean shouldTickDeath(Entity entity) {
|
||||
return true;
|
|
@ -5,7 +5,7 @@ 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 8af1571c614a39c9673e0dc90e3aa9a89a367e34..daa55eed9cf385c7e2cdd0a5dceaf0a719652213 100644
|
||||
index 3b2322e359ea0fa8cf6c256054c4d0dcd3f43d73..1382a16d21133b368158914509eb9ef3e0694ffd 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 {
|
||||
|
@ -24,12 +24,12 @@ index 8af1571c614a39c9673e0dc90e3aa9a89a367e34..daa55eed9cf385c7e2cdd0a5dceaf0a7
|
|||
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 8cf2dc21bcc2547b5af5501e60be39ca18a0e9f2..d36e73cfab79960bf4d778ea01a684b9b6af39d7 100644
|
||||
index 5eb5dde9c2a6c7e54f91f66eb40c3ad9821c96cb..0269c264f6137ade22c9e3f89fc780f6a9632087 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 {
|
||||
@@ -194,7 +194,8 @@ public class BlockItem extends Item {
|
||||
Player entityhuman = context.getPlayer();
|
||||
CollisionContext voxelshapecollision = entityhuman == null ? CollisionContext.empty() : CollisionContext.of((Entity) entityhuman);
|
||||
CollisionContext voxelshapecollision = entityhuman == null ? CollisionContext.empty() : CollisionContext.of(entityhuman);
|
||||
// CraftBukkit start - store default return
|
||||
- boolean defaultReturn = (!this.mustSurvive() || state.canSurvive(context.getLevel(), context.getClickedPos())) && context.getLevel().isUnobstructed(state, context.getClickedPos(), voxelshapecollision);
|
||||
+ Level world = context.getLevel(); // Paper
|
||||
|
@ -38,10 +38,10 @@ index 8cf2dc21bcc2547b5af5501e60be39ca18a0e9f2..d36e73cfab79960bf4d778ea01a684b9
|
|||
|
||||
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 e8d1a17b8e65e1af03ad36afd98b3e6ebab2592a..b5aa61cecf15e38105cf4bef92b6859aaa450dbd 100644
|
||||
index 0e71e1cb15640d397b4da9a8cfef4fdf0a61ec51..44251a6aaaeb508e8b9ed50b6b51b3b78c67d833 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -71,6 +71,10 @@ import net.minecraft.world.level.saveddata.maps.MapItemSavedData;
|
||||
@@ -72,6 +72,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 e8d1a17b8e65e1af03ad36afd98b3e6ebab2592a..b5aa61cecf15e38105cf4bef92b6859a
|
|||
import net.minecraft.world.scores.Scoreboard;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
@@ -251,6 +255,45 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -252,6 +256,45 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
this.tileLimiter = new org.spigotmc.TickLimiter(spigotConfig.tileMaxTickTime);
|
||||
}
|
||||
|
|
@ -20,10 +20,10 @@ index 0fd29d5854d9d6155ea590f86d4492d86afab433..ff6cf94dec708c6d3cac837ca03be2fe
|
|||
+ }
|
||||
}
|
||||
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 9a63260b20903eb4600f098c81ae660029f7c345..f9375dbbeda6fdc92406fe5d93df0467e6e70672 100644
|
||||
index b92c2d5f9ad3936f619b51c79379983e3231e700..91cf7728aee475cb36f2c02bbfb7e3d2e0d00576 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 {
|
||||
@@ -92,9 +92,16 @@ public class ArmorStand extends LivingEntity {
|
||||
public Rotations leftLegPose;
|
||||
public Rotations rightLegPose;
|
||||
public boolean canMove = true; // Paper
|
||||
|
@ -40,7 +40,7 @@ index 9a63260b20903eb4600f098c81ae660029f7c345..f9375dbbeda6fdc92406fe5d93df0467
|
|||
this.handItems = NonNullList.withSize(2, ItemStack.EMPTY);
|
||||
this.armorItems = NonNullList.withSize(4, ItemStack.EMPTY);
|
||||
this.headPose = ArmorStand.DEFAULT_HEAD_POSE;
|
||||
@@ -192,6 +199,7 @@ public class ArmorStand extends LivingEntity {
|
||||
@@ -191,6 +198,7 @@ public class ArmorStand extends LivingEntity {
|
||||
this.armorItems.set(enumitemslot.getIndex(), itemstack);
|
||||
}
|
||||
|
||||
|
@ -48,7 +48,7 @@ index 9a63260b20903eb4600f098c81ae660029f7c345..f9375dbbeda6fdc92406fe5d93df0467
|
|||
}
|
||||
|
||||
@Override
|
||||
@@ -242,6 +250,7 @@ public class ArmorStand extends LivingEntity {
|
||||
@@ -241,6 +249,7 @@ public class ArmorStand extends LivingEntity {
|
||||
}
|
||||
|
||||
nbt.put("Pose", this.writePose());
|
||||
|
@ -56,7 +56,7 @@ index 9a63260b20903eb4600f098c81ae660029f7c345..f9375dbbeda6fdc92406fe5d93df0467
|
|||
}
|
||||
|
||||
@Override
|
||||
@@ -273,6 +282,12 @@ public class ArmorStand extends LivingEntity {
|
||||
@@ -272,6 +281,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 9a63260b20903eb4600f098c81ae660029f7c345..f9375dbbeda6fdc92406fe5d93df0467
|
|||
CompoundTag nbttagcompound1 = nbt.getCompound("Pose");
|
||||
|
||||
this.readPose(nbttagcompound1);
|
||||
@@ -654,7 +669,29 @@ public class ArmorStand extends LivingEntity {
|
||||
@@ -653,7 +668,29 @@ public class ArmorStand extends LivingEntity {
|
||||
|
||||
@Override
|
||||
public void tick() {
|
||||
|
@ -99,7 +99,7 @@ index 9a63260b20903eb4600f098c81ae660029f7c345..f9375dbbeda6fdc92406fe5d93df0467
|
|||
Rotations vector3f = (Rotations) this.entityData.get(ArmorStand.DATA_HEAD_POSE);
|
||||
|
||||
if (!this.headPose.equals(vector3f)) {
|
||||
@@ -777,31 +814,37 @@ public class ArmorStand extends LivingEntity {
|
||||
@@ -776,31 +813,37 @@ public class ArmorStand extends LivingEntity {
|
||||
public void setHeadPose(Rotations angle) {
|
||||
this.headPose = angle;
|
||||
this.entityData.set(ArmorStand.DATA_HEAD_POSE, angle);
|
|
@ -5,10 +5,10 @@ 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 67afaab789041f49407233ca8a856a3b0131fcf6..1b874f8a72f5b1ac64dd66621b039295f5dc1f18 100644
|
||||
index cad754d6b75c3c16db4fd847fdf6cb8c0ec82dde..5c70fdefeb940837950e8a9692b1ac3a72e7c623 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.level.Level;
|
||||
@@ -17,6 +17,7 @@ import net.minecraft.world.item.enchantment.EnchantmentHelper;
|
||||
public class SkeletonTrapGoal extends Goal {
|
||||
|
||||
private final SkeletonHorse horse;
|
||||
|
@ -16,7 +16,7 @@ index 67afaab789041f49407233ca8a856a3b0131fcf6..1b874f8a72f5b1ac64dd66621b039295
|
|||
|
||||
public SkeletonTrapGoal(SkeletonHorse skeletonHorse) {
|
||||
this.horse = skeletonHorse;
|
||||
@@ -25,12 +26,13 @@ public class SkeletonTrapGoal extends Goal {
|
||||
@@ -24,12 +25,13 @@ public class SkeletonTrapGoal extends Goal {
|
||||
|
||||
@Override
|
||||
public boolean canUse() {
|
||||
|
@ -32,7 +32,7 @@ index 67afaab789041f49407233ca8a856a3b0131fcf6..1b874f8a72f5b1ac64dd66621b039295
|
|||
|
||||
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 849616d9ad140285f7aa4d2ffafd6371f3904bd5..325e244c46ec208a2e7e18d71ccbbfcc25fc1bce 100644
|
||||
index 0dc46471f7247e5d36c3896a0c87473072362fe6..bc3bfe8d3c2f87e2e9f167b9ff34d9ca8a696391 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/EntityGetter.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/EntityGetter.java
|
||||
@@ -89,6 +89,28 @@ public interface EntityGetter {
|
|
@ -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 6acd18521bde95183bf3910328559a2a5829c03d..2ed4930648411ccd52fc970b069e57eba9bceef8 100644
|
||||
index 57c2806543e8a183033170bfb7746cfa8f14b448..6b9c39b85e3a21fc0073fc15c8a76c92f75d2487 100644
|
||||
--- a/src/main/java/net/minecraft/world/inventory/AnvilMenu.java
|
||||
+++ b/src/main/java/net/minecraft/world/inventory/AnvilMenu.java
|
||||
@@ -90,6 +90,16 @@ public class AnvilMenu extends ItemCombinerMenu {
|
||||
@@ -89,6 +89,16 @@ public class AnvilMenu extends ItemCombinerMenu {
|
||||
if (!player.getAbilities().instabuild && iblockdata.is((Tag) BlockTags.ANVIL) && player.getRandom().nextFloat() < 0.12F) {
|
||||
BlockState iblockdata1 = AnvilBlock.damage(iblockdata);
|
||||
|
|
@ -5,7 +5,7 @@ Subject: [PATCH] Add hand to bucket events
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/Cow.java b/src/main/java/net/minecraft/world/entity/animal/Cow.java
|
||||
index 0cf990f220fad6e945bda590263b78ea2e5a3b03..a43349c47292154dfc56c72c58ba9f29f6765d83 100644
|
||||
index 0f601ad4629bda75ec90612ad27fdec9ce62f83d..425c6da0de40983b0870c9fd1b53f16b6a11c34c 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/Cow.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/Cow.java
|
||||
@@ -87,7 +87,7 @@ public class Cow extends Animal {
|
||||
|
@ -18,10 +18,10 @@ index 0cf990f220fad6e945bda590263b78ea2e5a3b03..a43349c47292154dfc56c72c58ba9f29
|
|||
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 68b116697d6cf3dbb1fa25d6e9ca9bbb10f346a3..32d0387b6c66462ca965add78a562dec3c4b95a9 100644
|
||||
index dc1ef737267aa826d1d2fb10f923fe294a67be83..d3c4f93ee2aa1902eeca197c72eb17199fc41fb2 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
|
||||
@@ -180,7 +180,7 @@ public class Goat extends Animal {
|
||||
@@ -182,7 +182,7 @@ public class Goat extends Animal {
|
||||
|
||||
if (itemstack.is(Items.BUCKET) && !this.isBaby()) {
|
||||
// CraftBukkit start - Got milk?
|
||||
|
@ -31,10 +31,10 @@ index 68b116697d6cf3dbb1fa25d6e9ca9bbb10f346a3..32d0387b6c66462ca965add78a562dec
|
|||
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 5870023250ed2dba16b2fa5c6a8be6f36cebc640..650b59b69eb12112bc71e5ff164767e3118e1c2a 100644
|
||||
index 25f1567660682a122fcb63318f51ec45ffdf0d3b..5406acd65d4e1146f3bd7340ff9a1954a5c39ddb 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/BucketItem.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/BucketItem.java
|
||||
@@ -72,7 +72,7 @@ public class BucketItem extends Item implements DispensibleContainerItem {
|
||||
@@ -70,7 +70,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,31 +43,31 @@ index 5870023250ed2dba16b2fa5c6a8be6f36cebc640..650b59b69eb12112bc71e5ff164767e3
|
|||
|
||||
if (event.isCancelled()) {
|
||||
((ServerPlayer) user).connection.send(new ClientboundBlockUpdatePacket(world, blockposition)); // SPIGOT-5163 (see PlayerInteractManager)
|
||||
@@ -103,7 +103,7 @@ public class BucketItem extends Item implements DispensibleContainerItem {
|
||||
@@ -101,7 +101,7 @@ public class BucketItem extends Item implements DispensibleContainerItem {
|
||||
iblockdata = world.getBlockState(blockposition);
|
||||
BlockPos blockposition2 = iblockdata.getBlock() instanceof LiquidBlockContainer && this.content == Fluids.WATER ? blockposition : blockposition1;
|
||||
|
||||
- if (this.a(user, world, blockposition2, movingobjectpositionblock, movingobjectpositionblock.getDirection(), blockposition, itemstack)) { // CraftBukkit
|
||||
- if (this.emptyContents(user, world, blockposition2, movingobjectpositionblock, movingobjectpositionblock.getDirection(), blockposition, itemstack)) { // CraftBukkit
|
||||
+ if (this.emptyContents(user, world, blockposition2, movingobjectpositionblock, movingobjectpositionblock.getDirection(), blockposition, itemstack, hand)) { // CraftBukkit // Paper - add enumhand
|
||||
this.checkExtraContent(user, world, itemstack, blockposition2);
|
||||
if (user instanceof ServerPlayer) {
|
||||
CriteriaTriggers.PLACED_BLOCK.trigger((ServerPlayer) user, blockposition2, itemstack);
|
||||
@@ -130,10 +130,12 @@ public class BucketItem extends Item implements DispensibleContainerItem {
|
||||
@@ -128,10 +128,12 @@ public class BucketItem extends Item implements DispensibleContainerItem {
|
||||
|
||||
@Override
|
||||
public boolean emptyContents(@Nullable Player player, Level world, BlockPos pos, @Nullable BlockHitResult hitResult) {
|
||||
- return this.a(player, world, pos, hitResult, null, null, null);
|
||||
- return this.emptyContents(player, world, pos, hitResult, null, null, null);
|
||||
+ // Paper start - add enumHand
|
||||
+ return emptyContents(player, world, pos, hitResult, null, null, null, null);
|
||||
}
|
||||
|
||||
- public boolean a(Player entityhuman, Level world, BlockPos blockposition, @Nullable BlockHitResult movingobjectpositionblock, Direction enumdirection, BlockPos clicked, ItemStack itemstack) {
|
||||
- public boolean emptyContents(Player entityhuman, Level world, BlockPos blockposition, @Nullable BlockHitResult movingobjectpositionblock, Direction enumdirection, BlockPos clicked, ItemStack itemstack) {
|
||||
+ public boolean emptyContents(Player entityhuman, Level world, BlockPos blockposition, @Nullable BlockHitResult movingobjectpositionblock, Direction enumdirection, BlockPos clicked, ItemStack itemstack, InteractionHand enumhand) {
|
||||
+ // Paper end
|
||||
// CraftBukkit end
|
||||
if (!(this.content instanceof FlowingFluid)) {
|
||||
return false;
|
||||
@@ -146,7 +148,7 @@ public class BucketItem extends Item implements DispensibleContainerItem {
|
||||
@@ -144,7 +146,7 @@ public class BucketItem extends Item implements DispensibleContainerItem {
|
||||
|
||||
// CraftBukkit start
|
||||
if (flag1 && entityhuman != null) {
|
||||
|
@ -76,13 +76,13 @@ index 5870023250ed2dba16b2fa5c6a8be6f36cebc640..650b59b69eb12112bc71e5ff164767e3
|
|||
if (event.isCancelled()) {
|
||||
((ServerPlayer) entityhuman).connection.send(new ClientboundBlockUpdatePacket(world, blockposition)); // SPIGOT-4238: needed when looking through entity
|
||||
((ServerPlayer) entityhuman).getBukkitEntity().updateInventory(); // SPIGOT-4541
|
||||
@@ -155,7 +157,7 @@ public class BucketItem extends Item implements DispensibleContainerItem {
|
||||
@@ -153,7 +155,7 @@ public class BucketItem extends Item implements DispensibleContainerItem {
|
||||
}
|
||||
// CraftBukkit end
|
||||
if (!flag1) {
|
||||
- return movingobjectpositionblock != null && this.a(entityhuman, world, movingobjectpositionblock.getBlockPos().relative(movingobjectpositionblock.getDirection()), (BlockHitResult) null, enumdirection, clicked, itemstack); // CraftBukkit
|
||||
+ return movingobjectpositionblock != null && this.emptyContents(entityhuman, world, movingobjectpositionblock.getBlockPos().relative(movingobjectpositionblock.getDirection()), (BlockHitResult) null, enumdirection, clicked, itemstack, enumhand); // CraftBukkit // Paper - add enumhand
|
||||
} else if (world.dimensionType().ultraWarm() && this.content.is((Tag) FluidTags.WATER)) {
|
||||
- return movingobjectpositionblock != null && this.emptyContents(entityhuman, world, movingobjectpositionblock.getBlockPos().relative(movingobjectpositionblock.getDirection()), (BlockHitResult) null, enumdirection, clicked, itemstack); // CraftBukkit
|
||||
+ return movingobjectpositionblock != null && this.emptyContents(entityhuman, world, movingobjectpositionblock.getBlockPos().relative(movingobjectpositionblock.getDirection()), (BlockHitResult) null, enumdirection, clicked, itemstack, enumhand); // CraftBukkit // Paper
|
||||
} else if (world.dimensionType().ultraWarm() && this.content.is(FluidTags.WATER)) {
|
||||
int i = blockposition.getX();
|
||||
int j = blockposition.getY();
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
|
@ -5,7 +5,7 @@ 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 3a01ffffcc37a93866b8b6774874959dfcabba26..29aa428e019681af8d6b0020c12b18660ff6af6c 100644
|
||||
index 19e594757fca90c64c4dc59233ff956e7c316da9..e17a3afa41fd628d2c4a3637ae19418e258a99b8 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
|
||||
@@ -536,6 +536,11 @@ public class EnderDragon extends Mob implements Enemy {
|
||||
|
@ -21,10 +21,10 @@ index 3a01ffffcc37a93866b8b6774874959dfcabba26..29aa428e019681af8d6b0020c12b1866
|
|||
|
||||
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 2703afdd101092c92da2eb619757271c2a5f9305..8ce3dea66a1f45bb3f416bca1765c563394ad8ed 100644
|
||||
index 55e35c210c21e8ff1222859fafe4d5d58aea0bc7..33752432af861a708e0dbb1afafcd5968d795931 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/FireBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/FireBlock.java
|
||||
@@ -291,7 +291,7 @@ public class FireBlock extends BaseFireBlock {
|
||||
@@ -290,7 +290,7 @@ public class FireBlock extends BaseFireBlock {
|
||||
|
||||
world.setBlock(blockposition, this.getStateWithAge(world, blockposition, l), 3);
|
||||
} else {
|
||||
|
@ -33,7 +33,7 @@ index 2703afdd101092c92da2eb619757271c2a5f9305..8ce3dea66a1f45bb3f416bca1765c563
|
|||
}
|
||||
|
||||
Block block = iblockdata.getBlock();
|
||||
@@ -299,6 +299,13 @@ public class FireBlock extends BaseFireBlock {
|
||||
@@ -298,6 +298,13 @@ public class FireBlock extends BaseFireBlock {
|
||||
if (block instanceof TntBlock) {
|
||||
TntBlock blocktnt = (TntBlock) block;
|
||||
|
||||
|
@ -48,7 +48,7 @@ index 2703afdd101092c92da2eb619757271c2a5f9305..8ce3dea66a1f45bb3f416bca1765c563
|
|||
}
|
||||
}
|
||||
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 390dfe9d2a148468b9ed3e3fb39fc944e7aa4d5c..151d412df2fce6e51d0297dc1c070056c31ec196 100644
|
||||
index b7bdeb40ec988b41ba602cea695fc14b7146bc4d..96cf2a42c9836a86541029f9d674ee5478d47b0c 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 {
|
||||
|
@ -97,7 +97,7 @@ index 390dfe9d2a148468b9ed3e3fb39fc944e7aa4d5c..151d412df2fce6e51d0297dc1c070056
|
|||
+ if(!new com.destroystokyo.paper.event.block.TNTPrimeEvent(tntBlock, com.destroystokyo.paper.event.block.TNTPrimeEvent.PrimeReason.ITEM, player.getBukkitEntity()).callEvent())
|
||||
+ return InteractionResult.FAIL;
|
||||
+ // Paper end
|
||||
TntBlock.explode(world, pos, (LivingEntity) player);
|
||||
TntBlock.explode(world, pos, player);
|
||||
world.setBlock(pos, Blocks.AIR.defaultBlockState(), 11);
|
||||
Item item = itemstack.getItem();
|
||||
@@ -126,6 +147,12 @@ public class TntBlock extends Block {
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue