Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-17 13:30:06 +01:00
Fix snowball not recognizing int damage values properly from Craftbukkit -- Thanks Sleaker
Dieser Commit ist enthalten in:
Ursprung
60a2d12250
Commit
bcdad9f837
@ -24,7 +24,7 @@ public class EntitySnowball extends EntityProjectile {
|
|||||||
|
|
||||||
protected void a(MovingObjectPosition movingobjectposition) {
|
protected void a(MovingObjectPosition movingobjectposition) {
|
||||||
if (movingobjectposition.entity != null) {
|
if (movingobjectposition.entity != null) {
|
||||||
byte b0 = 0;
|
int b0 = 0; //Craftbukkit - byte -> int
|
||||||
|
|
||||||
if (movingobjectposition.entity instanceof EntityBlaze) {
|
if (movingobjectposition.entity instanceof EntityBlaze) {
|
||||||
b0 = 3;
|
b0 = 3;
|
||||||
@ -41,7 +41,7 @@ public class EntitySnowball extends EntityProjectile {
|
|||||||
EntityDamageByEntityEvent event = new EntityDamageByEntityEvent(projectile, damagee, EntityDamageEvent.DamageCause.PROJECTILE, b0);
|
EntityDamageByEntityEvent event = new EntityDamageByEntityEvent(projectile, damagee, EntityDamageEvent.DamageCause.PROJECTILE, b0);
|
||||||
Bukkit.getPluginManager().callEvent(event);
|
Bukkit.getPluginManager().callEvent(event);
|
||||||
this.shooter = (projectile.getShooter() == null) ? null : ((CraftLivingEntity) projectile.getShooter()).getHandle();
|
this.shooter = (projectile.getShooter() == null) ? null : ((CraftLivingEntity) projectile.getShooter()).getHandle();
|
||||||
b0 = (byte) event.getDamage();
|
b0 = event.getDamage();
|
||||||
|
|
||||||
if (event.isCancelled()) {
|
if (event.isCancelled()) {
|
||||||
stick = !projectile.doesBounce();
|
stick = !projectile.doesBounce();
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren