The Twilight Forest

The Twilight Forest

143M Downloads

Ur-ghast falling tears not visible in multiplayer

Benimatic opened this issue ยท 3 comments

commented

Steps to reproduce:

  1. Fight ur-ghast until it begins its tantrum

What I expected to happen:

Giant ghast tears fall and shatter under the boss

What happened instead:

No visible tears, player takes damage from no apparent source

commented

Done via proxy, so only works on singleplayer client atm:

TwilightForestMod.proxy.spawnParticle(this.world, TFParticleType.BOSS_TEAR, this.posX + (this.rand.nextDouble() - 0.5D) * (double) this.width, this.posY + this.rand.nextDouble() * (double) this.height - 0.25D, this.posZ + (this.rand.nextDouble() - 0.5D) * (double) this.width, 0, 0, 0);

The particle spawning here could be moved to the Ur-Ghast's onLivingUpdate, the AI code only runs on the logical server.

commented

It might also be better to check getPrecipitationHeight here instead of canSeeSky:

if (world.canSeeSky(new BlockPos(player))) {

(canSeeSky uses the heightmap based on block opacity, whereas getPrecipitationHeight checks the block material, matching rainfall probably makes more sense here)

commented

I'm unsure how to handle that check for the getPrecipitationHeight, could you clarify that, please?