修复工具类参数问题
This commit is contained in:
parent
c74b64bed4
commit
827c91c726
2 changed files with 6 additions and 6 deletions
|
@ -150,7 +150,7 @@ public class JavelinMissileEntity extends ThrowableItemProjectile implements Geo
|
||||||
|
|
||||||
if (this.tickCount > 1) {
|
if (this.tickCount > 1) {
|
||||||
if (this.level() instanceof ServerLevel) {
|
if (this.level() instanceof ServerLevel) {
|
||||||
ProjectileTool.causeCustomExplode(this, 8.0f, this.monsterMultiplier);
|
ProjectileTool.causeCustomExplode(this, this.damage, 8.0f, this.monsterMultiplier);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -201,7 +201,7 @@ public class JavelinMissileEntity extends ThrowableItemProjectile implements Geo
|
||||||
|
|
||||||
if (this.tickCount > 200 || this.isInWater()) {
|
if (this.tickCount > 200 || this.isInWater()) {
|
||||||
if (this.level() instanceof ServerLevel) {
|
if (this.level() instanceof ServerLevel) {
|
||||||
ProjectileTool.causeCustomExplode(this, 8.0f, this.monsterMultiplier);
|
ProjectileTool.causeCustomExplode(this, this.damage, 8.0f, this.monsterMultiplier);
|
||||||
}
|
}
|
||||||
this.discard();
|
this.discard();
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,7 @@ import javax.annotation.Nullable;
|
||||||
|
|
||||||
public class ProjectileTool {
|
public class ProjectileTool {
|
||||||
|
|
||||||
public static void causeCustomExplode(ThrowableItemProjectile projectile, Entity target, float radius, float damage, float damageMultiplier) {
|
public static void causeCustomExplode(ThrowableItemProjectile projectile, Entity target, float damage, float radius, float damageMultiplier) {
|
||||||
CustomExplosion explosion = new CustomExplosion(projectile.level(), projectile,
|
CustomExplosion explosion = new CustomExplosion(projectile.level(), projectile,
|
||||||
ModDamageTypes.causeProjectileBoomDamage(projectile.level().registryAccess(), projectile, projectile.getOwner()), damage,
|
ModDamageTypes.causeProjectileBoomDamage(projectile.level().registryAccess(), projectile, projectile.getOwner()), damage,
|
||||||
target.getX(), target.getY(), target.getZ(), radius, Explosion.BlockInteraction.KEEP).setDamageMultiplier(damageMultiplier);
|
target.getX(), target.getY(), target.getZ(), radius, Explosion.BlockInteraction.KEEP).setDamageMultiplier(damageMultiplier);
|
||||||
|
@ -21,15 +21,15 @@ public class ProjectileTool {
|
||||||
projectile.discard();
|
projectile.discard();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void causeCustomExplode(ThrowableItemProjectile projectile, float radius, float damage, float damageMultiplier) {
|
public static void causeCustomExplode(ThrowableItemProjectile projectile, float damage, float radius, float damageMultiplier) {
|
||||||
causeCustomExplode(projectile, projectile, damage, radius, damageMultiplier);
|
causeCustomExplode(projectile, projectile, damage, radius, damageMultiplier);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void causeCustomExplode(ThrowableItemProjectile projectile, float damage, float radius) {
|
public static void causeCustomExplode(ThrowableItemProjectile projectile, float damage, float radius) {
|
||||||
causeCustomExplode(projectile, radius, damage, 0.0f);
|
causeCustomExplode(projectile, damage, radius, 0.0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void causeCustomExplode(LivingEntity projectile, @Nullable LivingEntity owner, float radius, float damage, float damageMultiplier) {
|
public static void causeCustomExplode(LivingEntity projectile, @Nullable LivingEntity owner, float damage, float radius, float damageMultiplier) {
|
||||||
CustomExplosion explosion = new CustomExplosion(projectile.level(), projectile,
|
CustomExplosion explosion = new CustomExplosion(projectile.level(), projectile,
|
||||||
ModDamageTypes.causeProjectileBoomDamage(projectile.level().registryAccess(), projectile, owner), damage,
|
ModDamageTypes.causeProjectileBoomDamage(projectile.level().registryAccess(), projectile, owner), damage,
|
||||||
projectile.getX(), projectile.getY(), projectile.getZ(), radius, Explosion.BlockInteraction.KEEP).setDamageMultiplier(damageMultiplier);
|
projectile.getX(), projectile.getY(), projectile.getZ(), radius, Explosion.BlockInteraction.KEEP).setDamageMultiplier(damageMultiplier);
|
||||||
|
|
Loading…
Add table
Reference in a new issue