diff options
| author | ghostflyby <ghostflyby@outlook.com> | 2023-11-08 22:17:00 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-11-08 22:17:00 +0800 |
| commit | 3444f528c31ed2dd0f6b18a529ad4a2c14897188 (patch) | |
| tree | aec387815aa3d7a54c1860eb287229a4926c1865 /src/main/java/gregtech/common/tileentities/machines/multi | |
| parent | 86c14f89da55b39ef7a9c850e9a1f303c5274cf4 (diff) | |
| download | GT5-Unofficial-3444f528c31ed2dd0f6b18a529ad4a2c14897188.tar.gz GT5-Unofficial-3444f528c31ed2dd0f6b18a529ad4a2c14897188.tar.bz2 GT5-Unofficial-3444f528c31ed2dd0f6b18a529ad4a2c14897188.zip | |
Migrate to non-Object version Utility methods (#2359)
A few calls restricted by other methods and interfaces are left untouched.
Diffstat (limited to 'src/main/java/gregtech/common/tileentities/machines/multi')
| -rw-r--r-- | src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_IntegratedOreFactory.java | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_IntegratedOreFactory.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_IntegratedOreFactory.java index 4b1a361e04..ea61c5b7de 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_IntegratedOreFactory.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_IntegratedOreFactory.java @@ -577,16 +577,15 @@ public class GT_MetaTileEntity_IntegratedOreFactory extends } int tChance = aRecipe.getOutputChance(i); if (tChance == 10000) { - tOutput.add( - GT_Utility.copyAmountUnsafe((long) aTime * aRecipe.getOutput(i).stackSize, aRecipe.getOutput(i))); + tOutput.add(GT_Utility.copyAmountUnsafe(aTime * aRecipe.getOutput(i).stackSize, aRecipe.getOutput(i))); } else { // Use Normal Distribution double u = aTime * (tChance / 10000D); double e = aTime * (tChance / 10000D) * (1 - (tChance / 10000D)); Random random = new Random(); int tAmount = (int) Math.ceil(Math.sqrt(e) * random.nextGaussian() + u); - tOutput.add( - GT_Utility.copyAmountUnsafe((long) tAmount * aRecipe.getOutput(i).stackSize, aRecipe.getOutput(i))); + tOutput + .add(GT_Utility.copyAmountUnsafe(tAmount * aRecipe.getOutput(i).stackSize, aRecipe.getOutput(i))); } } return tOutput.stream() |
