mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-27 06:50:12 +01:00
net/minecraft/world/entity/monster/creaking
This commit is contained in:
parent
a0a4359af1
commit
973fe2a945
2 changed files with 35 additions and 60 deletions
|
@ -0,0 +1,35 @@
|
|||
--- a/net/minecraft/world/entity/monster/creaking/Creaking.java
|
||||
+++ b/net/minecraft/world/entity/monster/creaking/Creaking.java
|
||||
@@ -190,9 +_,9 @@
|
||||
}
|
||||
|
||||
@Override
|
||||
- public void push(double x, double y, double z) {
|
||||
+ public void push(double x, double y, double z, @Nullable Entity pushingEntity) { // Paper - add push source entity param
|
||||
if (this.canMove()) {
|
||||
- super.push(x, y, z);
|
||||
+ super.push(x, y, z, pushingEntity); // Paper - add push source entity param
|
||||
}
|
||||
}
|
||||
|
||||
@@ -317,7 +_,7 @@
|
||||
}
|
||||
|
||||
this.makeSound(this.getDeathSound());
|
||||
- this.remove(Entity.RemovalReason.DISCARDED);
|
||||
+ this.remove(Entity.RemovalReason.DISCARDED, null); // CraftBukkit - add Bukkit remove cause
|
||||
}
|
||||
|
||||
public void creakingDeathEffects(DamageSource damageSource) {
|
||||
@@ -480,9 +_,9 @@
|
||||
}
|
||||
|
||||
@Override
|
||||
- public void knockback(double strength, double x, double z) {
|
||||
+ public void knockback(double strength, double x, double z, @Nullable Entity attacker, io.papermc.paper.event.entity.EntityKnockbackEvent.Cause cause) { // Paper - knockback events
|
||||
if (this.canMove()) {
|
||||
- super.knockback(strength, x, z);
|
||||
+ super.knockback(strength, x, z, attacker, cause); // Paper - knockback events
|
||||
}
|
||||
}
|
||||
|
|
@ -1,60 +0,0 @@
|
|||
--- a/net/minecraft/world/entity/monster/creaking/Creaking.java
|
||||
+++ b/net/minecraft/world/entity/monster/creaking/Creaking.java
|
||||
@@ -198,15 +198,15 @@
|
||||
}
|
||||
|
||||
@Override
|
||||
- public void push(double deltaX, double deltaY, double deltaZ) {
|
||||
+ public void push(double deltaX, double deltaY, double deltaZ, @Nullable Entity pushingEntity) { // Paper - add push source entity param
|
||||
if (this.canMove()) {
|
||||
- super.push(deltaX, deltaY, deltaZ);
|
||||
+ super.push(deltaX, deltaY, deltaZ, pushingEntity); // Paper - add push source entity param
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Brain<Creaking> getBrain() {
|
||||
- return super.getBrain();
|
||||
+ return (Brain<Creaking>) super.getBrain(); // CraftBukkit - decompile error
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -329,7 +329,7 @@
|
||||
}
|
||||
|
||||
this.makeSound(this.getDeathSound());
|
||||
- this.remove(Entity.RemovalReason.DISCARDED);
|
||||
+ this.remove(Entity.RemovalReason.DISCARDED, null); // CraftBukkit - add Bukkit remove cause
|
||||
}
|
||||
|
||||
public void creakingDeathEffects(DamageSource damageSource) {
|
||||
@@ -476,7 +476,7 @@
|
||||
|
||||
@Override
|
||||
protected SoundEvent getHurtSound(DamageSource source) {
|
||||
- return this.isHeartBound() ? SoundEvents.CREAKING_SWAY : super.getHurtSound(source);
|
||||
+ return SoundEvents.CREAKING_SWAY;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -502,9 +502,9 @@
|
||||
}
|
||||
|
||||
@Override
|
||||
- public void knockback(double strength, double x, double z) {
|
||||
+ public void knockback(double strength, double x, double z, @Nullable Entity attacker, io.papermc.paper.event.entity.EntityKnockbackEvent.Cause cause) { // Paper - knockback events
|
||||
if (this.canMove()) {
|
||||
- super.knockback(strength, x, z);
|
||||
+ super.knockback(strength, x, z, attacker, cause); // Paper - knockback events
|
||||
}
|
||||
}
|
||||
|
||||
@@ -549,7 +549,7 @@
|
||||
}
|
||||
|
||||
public void activate(Player player) {
|
||||
- this.getBrain().setMemory(MemoryModuleType.ATTACK_TARGET, (Object) player);
|
||||
+ this.getBrain().setMemory(MemoryModuleType.ATTACK_TARGET, player); // CraftBukkit - decompile error
|
||||
this.gameEvent(GameEvent.ENTITY_ACTION);
|
||||
this.makeSound(SoundEvents.CREAKING_ACTIVATE);
|
||||
this.setIsActive(true);
|
Loading…
Reference in a new issue