MmmMmmMmmMmm (Target Dummy)

MmmMmmMmmMmm (Target Dummy)

81M Downloads

Unsafe modulus

Closed this issue ยท 1 comments

commented

Hi! In the DamageNumberParticle

int index = CritMode.extractIntegerPart(dz);
this.xd = POSITIONS.get((index % POSITIONS.size()));

will fail if index is negative. FloorMod should do the trick here, e.g.

this.xd = POSITIONS.get(Math.floorMod(index, POSITIONS.size()));

Specifically this issue can happen if another mod or maybe commands spawns that particle (In my case a particle previewer), passing unexpected velocities.

https://github.com/MehVahdJukaar/DuMmmMmmy/blob/1.20/common/src/main/java/net/mehvahdjukaar/dummmmmmy/client/DamageNumberParticle.java#L70

commented

fixed