Skip to content

Commit

Permalink
Fix non-deterministic TileNodeLinker instabilityCheck crash with zero…
Browse files Browse the repository at this point in the history
… instability (#33)
  • Loading branch information
topquarkred authored Jun 2, 2024
1 parent 930ff1c commit a69ec07
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/tb/common/tile/TileNodeLinker.java
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ private boolean hasStabilizerBlock() {
}

public boolean instabilityCheck() {
if (this.worldObj.rand.nextInt(50) <= this.instability) {
if (this.instability > 0 && this.worldObj.rand.nextInt(50) <= this.instability) {
int rnd = this.worldObj.rand.nextInt(this.instability);
if (rnd == 49) {
// if a block of Ichorium is above dont explode or harm node
Expand Down

0 comments on commit a69ec07

Please sign in to comment.