Skip to content

Commit

Permalink
fix random issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Treetrain1 committed Aug 17, 2022
1 parent a740b72 commit 500a541
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@
import java.util.Iterator;

@Mixin(SculkBlock.class)
public abstract class SculkBlockMixin {
public class SculkBlockMixin {

@Shadow
private static int getDecay(SculkSpreadManager spreadManager, BlockPos cursorPos, BlockPos catalystPos, int charge) {
int i = spreadManager.getMaxDistance();
float f = MathHelper.square((float) Math.sqrt(cursorPos.getSquaredDistance(catalystPos)) - (float) i);
float f = MathHelper.square((float)Math.sqrt(cursorPos.getSquaredDistance(catalystPos)) - (float)i);
int j = MathHelper.square(24 - i);
float g = Math.min(1.0F, f / (float) j);
return Math.max(1, (int) ((float) charge * g * 0.5F));
float g = Math.min(1.0F, f / (float)j);
return Math.max(1, (int)((float)charge * g * 0.5F));
}

@Shadow
Expand Down

0 comments on commit 500a541

Please sign in to comment.