Skip to content

Commit

Permalink
Fixed #7 & Removed Useless "@SideOnly"
Browse files Browse the repository at this point in the history
  • Loading branch information
Desoroxxx committed Nov 2, 2022
1 parent f0977cf commit 1c1dc46
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
14 changes: 14 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# Fancier Block Particles Version 0.8 Changelog

## Fixed

- Fixed crashes with some moded blocks (#7)

## Optimization

## Internal

### Changes in error handling

Non critical try-catch blocks should now never throw a runtime exception or print a stacktrace except when debug mode is added they should print a stacktrace and count towards the issues counter and their respective counters (Rendering Issues, Physics Issues, Performance Issues, etc.)

# Fancier Block Particles Version 0.7 Changelog

## Showcase
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.TominoCZ.FBP.FBP;
import com.TominoCZ.FBP.keys.FBPKeyBindings;
import com.TominoCZ.FBP.model.FBPModelHelper;
import com.TominoCZ.FBP.renderer.FBPRenderer;
import com.TominoCZ.FBP.util.FBPMathUtil;
import com.TominoCZ.FBP.vector.FBPVector3d;
Expand Down Expand Up @@ -126,7 +127,7 @@ protected FBPParticleDigging(World worldIn, double xCoordIn, double yCoordIn, do

destroyed = facing == null;

if (texture == null) {
if (texture == null && FBPModelHelper.isModelValid(state)) {
BlockModelShapes blockModelShapes = mc.getBlockRendererDispatcher().getBlockModelShapes();

// GET THE TEXTURE OF THE BLOCK FACE
Expand All @@ -137,7 +138,7 @@ protected FBPParticleDigging(World worldIn, double xCoordIn, double yCoordIn, do
if (!quads.isEmpty())
this.particleTexture = quads.get(0).getSprite();
} catch (Exception e) {
throw new RuntimeException(e);
// TODO: (Debug Mode) This should count to the problem counter and should output a stack trace
}
}

Expand Down Expand Up @@ -543,7 +544,6 @@ private void createRotationMatrix() {
}

@Override
@SideOnly(Side.CLIENT)
public int getBrightnessForRender(float partialTicks) {
AxisAlignedBB box = getBoundingBox();

Expand All @@ -569,4 +569,4 @@ private void calculateYAngle()
double getMult() {
return Math.sqrt(motionX * motionX + motionZ * motionZ) * (FBP.randomRotation ? 200 : 500) * FBP.rotationMult;
}
}
}

1 comment on commit 1c1dc46

@Desoroxxx
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.