readd potion splash effect cause

This commit is contained in:
Lulu13022002 2024-12-15 23:24:28 +01:00
parent cb51a4fbcd
commit 9bb6731cc4
No known key found for this signature in database
GPG key ID: 491C8F0B8ACDEB01
2 changed files with 5 additions and 3 deletions

View file

@ -20,7 +20,7 @@
} }
} }
@@ -138,15 +_,15 @@ @@ -138,15 +_,17 @@
owner.setPortalCooldown(); owner.setPortalCooldown();
} }
@ -29,11 +29,13 @@
- serverLevel, vec3, Vec3.ZERO, 0.0F, 0.0F, Relative.union(Relative.ROTATION, Relative.DELTA), TeleportTransition.DO_NOTHING - serverLevel, vec3, Vec3.ZERO, 0.0F, 0.0F, Relative.union(Relative.ROTATION, Relative.DELTA), TeleportTransition.DO_NOTHING
- ) - )
- ); - );
+ // CraftBukkit start - moved up
+ // ServerPlayer serverPlayer1 = serverPlayer.teleport( + // ServerPlayer serverPlayer1 = serverPlayer.teleport(
+ // new TeleportTransition( + // new TeleportTransition(
+ // serverLevel, vec3, Vec3.ZERO, 0.0F, 0.0F, Relative.union(Relative.ROTATION, Relative.DELTA), TeleportTransition.DO_NOTHING + // serverLevel, vec3, Vec3.ZERO, 0.0F, 0.0F, Relative.union(Relative.ROTATION, Relative.DELTA), TeleportTransition.DO_NOTHING
+ // ) + // )
+ // ); + // );
+ // CraftBukkit end - moved up
if (serverPlayer1 != null) { if (serverPlayer1 != null) {
serverPlayer1.resetFallDistance(); serverPlayer1.resetFallDistance();
serverPlayer1.resetCurrentImpulseContext(); serverPlayer1.resetCurrentImpulseContext();

View file

@ -33,7 +33,7 @@
- this.applySplash( - this.applySplash(
- serverLevel, potionContents.getAllEffects(), result.getType() == HitResult.Type.ENTITY ? ((EntityHitResult)result).getEntity() : null - serverLevel, potionContents.getAllEffects(), result.getType() == HitResult.Type.ENTITY ? ((EntityHitResult)result).getEntity() : null
+ showParticles = this.applySplash( + showParticles = this.applySplash(
+ serverLevel, potionContents.getAllEffects(), result != null && result.getType() == HitResult.Type.ENTITY ? ((EntityHitResult)result).getEntity() : null, result // CraftBukkit - Pass MovingObjectPosition // Paper - More projectile API + serverLevel, potionContents.getAllEffects(), result != null && result.getType() == HitResult.Type.ENTITY ? ((EntityHitResult)result).getEntity() : null, result // CraftBukkit - Pass MovingObjectPosition // Paper - More projectile API
); );
} }
} }
@ -172,7 +172,7 @@
+ effect, i, mobEffectInstance.getAmplifier(), mobEffectInstance.isAmbient(), mobEffectInstance.isVisible() + effect, i, mobEffectInstance.getAmplifier(), mobEffectInstance.isAmbient(), mobEffectInstance.isVisible()
+ ); + );
+ if (!mobEffectInstance1.endsWithin(20)) { + if (!mobEffectInstance1.endsWithin(20)) {
+ livingEntity.addEffect(mobEffectInstance1, effectSource); + livingEntity.addEffect(mobEffectInstance1, effectSource, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.POTION_SPLASH); // CraftBukkit
+ } + }
+ } + }
+ } + }