Skip to content

#4284: Fix abnormal explosion logic of TNT, Creeper#4293

Open
AlexandreArcil wants to merge 1 commit intoSpongePowered:api-12from
AlexandreArcil:fix-tnt-nosound
Open

#4284: Fix abnormal explosion logic of TNT, Creeper#4293
AlexandreArcil wants to merge 1 commit intoSpongePowered:api-12from
AlexandreArcil:fix-tnt-nosound

Conversation

@AlexandreArcil
Copy link
Copy Markdown
Contributor

After an explosion, the ClientboundExplodePacket packet was not sent, whereas it is needed to play the explosion sound and particules effects on client (See ClientPacketListener#handleExplosion).

I used ServerLocation because it is created with the original x, y and z:

private net.minecraft.world.level.@Nullable Explosion impl$useSpongeExplosion(final Level world,
final Entity entityIn,
final DamageSource damageSource,
final ExplosionDamageCalculator explosionDamageCalculator,
final double xIn, final double yIn, final double zIn, final
float explosionRadius,
final boolean falseValue,
final Level.ExplosionInteraction modeIn) {
return SpongeCommonEventFactory.detonateExplosive(this, Explosion.builder()
.location(ServerLocation.of((ServerWorld) world, xIn, yIn, zIn))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant