mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-23 15:47:44 +01:00
More more more more more more more more work
This commit is contained in:
parent
e131aff8ad
commit
11709feb21
6 changed files with 26 additions and 26 deletions
|
@ -5,7 +5,7 @@ Subject: [PATCH] Add ray tracing methods to LivingEntity
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MCUtil.java b/src/main/java/net/minecraft/server/MCUtil.java
|
||||
index 802e0259f660c05afb2b772f0e617d819b19c7cc..1c09656bfed70ead0f0d182be4f84f1a97b3cf1e 100644
|
||||
index 4f45ac04a219e619c13b31befd2c4e452057079c..170b3cbc89793bb92e249383d86a5f0c756d5004 100644
|
||||
--- a/src/main/java/net/minecraft/server/MCUtil.java
|
||||
+++ b/src/main/java/net/minecraft/server/MCUtil.java
|
||||
@@ -487,6 +487,18 @@ public final class MCUtil {
|
||||
|
@ -28,10 +28,10 @@ index 802e0259f660c05afb2b772f0e617d819b19c7cc..1c09656bfed70ead0f0d182be4f84f1a
|
|||
switch (enumDirection) {
|
||||
case DOWN:
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 85aae87d03219a53e5aec2b9983dac2831aff82e..a44a8856d9f6a71a789a7335501abebfd23635be 100644
|
||||
index a1de99f07f47e4b378b0c36ea158ce0693ee2686..e19bfd60c9905b003ff541b6f2c3371116fe3e5b 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -3690,6 +3690,23 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -3689,6 +3689,23 @@ public abstract class LivingEntity extends Entity {
|
||||
}
|
||||
|
||||
// Paper start
|
||||
|
@ -56,7 +56,7 @@ index 85aae87d03219a53e5aec2b9983dac2831aff82e..a44a8856d9f6a71a789a7335501abebf
|
|||
|
||||
public int getShieldBlockingDelay() {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
index 918f87cc79062602e1db41d9368921c0092b1840..873b70c36d145a14632102c9e92d501745064fa4 100644
|
||||
index 5c517025576461b426b4a73eea4369f00aeeee41..9c024b46522e2984ed662538302fbac68a77fd86 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
@@ -198,6 +198,28 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
|
@ -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 7d87be1eb79045226cad3b7e62ff5d265160b866..3be9882ac1e96441f479f22099b77a25dd7cb8dd 100644
|
||||
index b415f0760bd1027dcc9cd987d06421cbc50fbfaa..91f43ce3ef083825b567079990ce6511d4ec1f4b 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -2296,6 +2296,21 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -2305,6 +2305,21 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
|
||||
return this.adventure$pointers;
|
||||
}
|
||||
|
@ -28,5 +28,5 @@ index 7d87be1eb79045226cad3b7e62ff5d265160b866..3be9882ac1e96441f479f22099b77a25
|
|||
+ getHandle().resetAttackStrengthTicker();
|
||||
+ }
|
||||
// Paper end
|
||||
|
||||
// Spigot start
|
||||
private final Player.Spigot spigot = new Player.Spigot()
|
|
@ -19,10 +19,10 @@ maybe more (please check patch overrides for drops for more):
|
|||
- players, armor stands, foxes, chested donkeys/llamas
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index 3d5db5ce2e60ca72ad202caebe49f3fc80d1af37..91f8b8e8e2ed15481ceafc8695068c8dc5853b3c 100644
|
||||
index fd1937f49312204d38510996a5be43b731f38bde..a2e2b6ea166bf64fe5b49672a6c6f86af3776638 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -219,6 +219,10 @@ public class ServerPlayer extends Player {
|
||||
@@ -222,6 +222,10 @@ public class ServerPlayer extends Player {
|
||||
public int latency;
|
||||
public boolean wonGame;
|
||||
private int containerUpdateDelay; // Paper
|
||||
|
@ -33,7 +33,7 @@ index 3d5db5ce2e60ca72ad202caebe49f3fc80d1af37..91f8b8e8e2ed15481ceafc8695068c8d
|
|||
|
||||
// CraftBukkit start
|
||||
public String displayName;
|
||||
@@ -748,6 +752,15 @@ public class ServerPlayer extends Player {
|
||||
@@ -786,6 +790,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 3d5db5ce2e60ca72ad202caebe49f3fc80d1af37..91f8b8e8e2ed15481ceafc8695068c8d
|
|||
|
||||
// SPIGOT-943 - only call if they have an inventory open
|
||||
if (this.containerMenu != this.inventoryMenu) {
|
||||
@@ -895,8 +908,17 @@ public class ServerPlayer extends Player {
|
||||
@@ -933,8 +946,17 @@ public class ServerPlayer extends Player {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -70,10 +70,10 @@ index 3d5db5ce2e60ca72ad202caebe49f3fc80d1af37..91f8b8e8e2ed15481ceafc8695068c8d
|
|||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index db366a5d81dac6748bb0b20188117266aee095d1..f4828c1bdc7d5e67941926f8d772b1bbc83031cf 100644
|
||||
index e19bfd60c9905b003ff541b6f2c3371116fe3e5b..d61375bdd0cff7dfd74dd5dc1e6803e6320aa82a 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -261,6 +261,7 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -258,6 +258,7 @@ public abstract class LivingEntity extends Entity {
|
||||
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 db366a5d81dac6748bb0b20188117266aee095d1..f4828c1bdc7d5e67941926f8d772b1bb
|
|||
|
||||
@Override
|
||||
public float getBukkitYaw() {
|
||||
@@ -1446,13 +1447,12 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -1441,13 +1442,12 @@ public abstract class LivingEntity extends Entity {
|
||||
if (knockbackCancelled) this.level.broadcastEntityEvent(this, (byte) 2); // Paper - Disable explosion knockback
|
||||
if (this.isDeadOrDying()) {
|
||||
if (!this.checkTotemDeathProtection(source)) {
|
||||
|
@ -99,7 +99,7 @@ index db366a5d81dac6748bb0b20188117266aee095d1..f4828c1bdc7d5e67941926f8d772b1bb
|
|||
}
|
||||
} else if (flag1) {
|
||||
this.playHurtSound(source);
|
||||
@@ -1601,7 +1601,7 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -1596,7 +1596,7 @@ public abstract class LivingEntity extends Entity {
|
||||
if (!this.isRemoved() && !this.dead) {
|
||||
Entity entity = source.getEntity();
|
||||
LivingEntity entityliving = this.getKillCredit();
|
||||
|
@ -108,7 +108,7 @@ index db366a5d81dac6748bb0b20188117266aee095d1..f4828c1bdc7d5e67941926f8d772b1bb
|
|||
if (this.deathScore >= 0 && entityliving != null) {
|
||||
entityliving.awardKillScore(this, this.deathScore, source);
|
||||
}
|
||||
@@ -1613,20 +1613,46 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -1608,20 +1608,46 @@ public abstract class LivingEntity extends Entity {
|
||||
if (!this.level.isClientSide && this.hasCustomName()) {
|
||||
if (org.spigotmc.SpigotConfig.logNamedDeaths) LivingEntity.LOGGER.info("Named entity {} died: {}", this, this.getCombatTracker().getDeathMessage().getString()); // Spigot
|
||||
}
|
||||
|
@ -158,7 +158,7 @@ index db366a5d81dac6748bb0b20188117266aee095d1..f4828c1bdc7d5e67941926f8d772b1bb
|
|||
}
|
||||
}
|
||||
|
||||
@@ -1634,7 +1660,7 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -1629,7 +1655,7 @@ public abstract class LivingEntity extends Entity {
|
||||
if (!this.level.isClientSide) {
|
||||
boolean flag = false;
|
||||
|
||||
|
@ -167,7 +167,7 @@ index db366a5d81dac6748bb0b20188117266aee095d1..f4828c1bdc7d5e67941926f8d772b1bb
|
|||
if (this.level.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING)) {
|
||||
BlockPos blockposition = this.blockPosition();
|
||||
BlockState iblockdata = Blocks.WITHER_ROSE.defaultBlockState();
|
||||
@@ -1663,7 +1689,7 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -1658,7 +1684,7 @@ public abstract class LivingEntity extends Entity {
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -176,7 +176,7 @@ index db366a5d81dac6748bb0b20188117266aee095d1..f4828c1bdc7d5e67941926f8d772b1bb
|
|||
Entity entity = source.getEntity();
|
||||
int i;
|
||||
|
||||
@@ -1681,15 +1707,18 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -1676,15 +1702,18 @@ public abstract class LivingEntity extends Entity {
|
||||
this.dropCustomDeathLoot(source, i, flag);
|
||||
}
|
||||
// CraftBukkit start - Call death event
|
||||
|
@ -197,10 +197,10 @@ index db366a5d81dac6748bb0b20188117266aee095d1..f4828c1bdc7d5e67941926f8d772b1bb
|
|||
// CraftBukkit start
|
||||
public int getExpReward() {
|
||||
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 7de3d73232d985ab18d7266371d301c490b79b9f..bfb042f4828e1cd47124939ca3b9caadc7fe1b39 100644
|
||||
index 2caf3aa6ca876d59deb98ee917e8228df140b414..63f0ed4c80b7afa091c4a835eefd6d709428f984 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/Fox.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/Fox.java
|
||||
@@ -691,15 +691,25 @@ public class Fox extends Animal {
|
||||
@@ -696,15 +696,25 @@ public class Fox extends Animal {
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -255,10 +255,10 @@ index 224eca7d20cf4b890a6bc1b314d566e02e716762..7281eb294ddd178ba742088d3c61bf3d
|
|||
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 f9375dbbeda6fdc92406fe5d93df0467e6e70672..b41e6fb0b7e02b50e5ad05555ed911d09055d694 100644
|
||||
index 91cf7728aee475cb36f2c02bbfb7e3d2e0d00576..a3a900d10440ed5ebe24370a77ccb6cad911cfc9 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
|
||||
@@ -755,7 +755,8 @@ public class ArmorStand extends LivingEntity {
|
||||
@@ -754,7 +754,8 @@ public class ArmorStand extends LivingEntity {
|
||||
|
||||
@Override
|
||||
public void kill() {
|
||||
|
@ -269,10 +269,10 @@ index f9375dbbeda6fdc92406fe5d93df0467e6e70672..b41e6fb0b7e02b50e5ad05555ed911d0
|
|||
}
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 3be9882ac1e96441f479f22099b77a25dd7cb8dd..7b7ceefbcc1f0be710dd8995f0afaad98f9c044d 100644
|
||||
index 91f43ce3ef083825b567079990ce6511d4ec1f4b..c5a29d7ca512eddfd01fe1f89f9c1b82bbfd6535 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -1876,7 +1876,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -1880,7 +1880,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
}
|
||||
|
||||
public void sendHealthUpdate() {
|
||||
|
@ -289,7 +289,7 @@ index 3be9882ac1e96441f479f22099b77a25dd7cb8dd..7b7ceefbcc1f0be710dd8995f0afaad9
|
|||
|
||||
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 e094b1b00d5fb73da73abcadb02ffd98b91fb869..3ef52d7705f3c59e19c56aac6250f2e5b5712600 100644
|
||||
index 0d1c6f609a5198c21c895e8f6ace467355b0f166..61c95f98a3e3e52a23f65f7c957019f7f1aa7417 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -807,9 +807,16 @@ public class CraftEventFactory {
|
Loading…
Reference in a new issue