Skip to content

Commit

Permalink
Merge pull request TeamWizardry#63 from ZengineeringTeam/master
Browse files Browse the repository at this point in the history
Fix infinite loop in beam raytracing
  • Loading branch information
Rikshy authored Jan 24, 2019
2 parents 587ad3d + 3411528 commit 2b260b3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,7 @@ public void spawn() {
if (world.isRemote) return;
if (this.getAlpha() <= 1) return;
if (bouncedTimes > allowedBounceTimes) return;
if (initLoc.squareDistanceTo(finalLoc) < 0.1) return;

trace = new RayTrace(world, slope, initLoc, range)
.setEntityFilter( entity -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public AxisAlignedBB getRenderBoundingBox() {

@Override
public void update() {
if (world.isRemote) return;
super.update();
Beam beam = outputBeam;
if (beam == null || world.getTileEntity(pos) != this) return;
Expand Down

0 comments on commit 2b260b3

Please sign in to comment.