Skip to content
This repository has been archived by the owner on Aug 25, 2024. It is now read-only.

Commit

Permalink
Fix server crash upon bugball use
Browse files Browse the repository at this point in the history
  • Loading branch information
doctor4t committed Sep 21, 2020
1 parent 1289e35 commit fa94e86
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Illuminations - Changelog

### Illuminations 1.1 - 1.16.3
- Introduced bugballs: get them from a full composter (up to four) and throw them around to spawn fireflies!
- Introduced bugballs: get them from a full composter (up to four) and throw them around to spawn fireflies! (only available if Illuminations is installed on both server and clients)
- Introduced overheads, a new type of cosmetic that can be equipped independently of auras and will float over your head
- Added the Pride and Trans Pride overheads
- Fixed an issue where server players using Illuminations would crash upon a player with an aura dying
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public PrideParticle(ClientWorld world, double x, double y, double z, double vel
super(world, x, y, z, velocityX, velocityY, velocityZ, spriteProvider);

this.alpha = 0;
this.maxAge = 40;
this.maxAge = 40000000;
this.owner = world.getClosestPlayer((new TargetPredicate()).setBaseMaxDistance(1D), this.x, this.y, this.z);

this.scale = 0.2f;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,11 @@ protected void onCollision(HitResult hitResult) {
this.world.setBlockState(this.getBlockPos(), Blocks.DIRT.getDefaultState());
world.breakBlock(this.getBlockPos(), false);
}
}

for (int i = 0; i < 100; i++) {
world.addParticle(IlluminationsClient.FIREFLY, (double)this.getBlockPos().getX() + this.random.nextDouble(), (double)this.getBlockPos().getY() + this.random.nextDouble(), (double)this.getBlockPos().getZ() + this.random.nextDouble(), 0.0D, 0.0D, 0.0D);;
}

if (!this.world.isClient) {
for (int i = 0; i < 100; i++) {
world.addParticle(IlluminationsClient.FIREFLY, (double) this.getBlockPos().getX() + this.random.nextDouble(), (double) this.getBlockPos().getY() + this.random.nextDouble(), (double) this.getBlockPos().getZ() + this.random.nextDouble(), 0.0D, 0.0D, 0.0D);
}
} else {
this.world.sendEntityStatus(this, (byte)3);
this.remove();
}
Expand Down

0 comments on commit fa94e86

Please sign in to comment.