diff options
| author | boubou19 <miisterunknown@gmail.com> | 2023-04-01 18:11:43 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-04-01 18:11:43 +0200 |
| commit | 5f50e4a36ec000657b0a1664784acf00275293c6 (patch) | |
| tree | 5ef81441032735438c9fd9c620224ca58e46e537 /src/main/java/gregtech/api/world | |
| parent | 6b77557e0e87cf5afd9ebd3985323ff1249e615c (diff) | |
| download | GT5-Unofficial-5f50e4a36ec000657b0a1664784acf00275293c6.tar.gz GT5-Unofficial-5f50e4a36ec000657b0a1664784acf00275293c6.tar.bz2 GT5-Unofficial-5f50e4a36ec000657b0a1664784acf00275293c6.zip | |
update spotless formatting (#1827)
Diffstat (limited to 'src/main/java/gregtech/api/world')
3 files changed, 18 insertions, 9 deletions
diff --git a/src/main/java/gregtech/api/world/GT_Worldgen.java b/src/main/java/gregtech/api/world/GT_Worldgen.java index 3d2fe466c2..742651b02a 100644 --- a/src/main/java/gregtech/api/world/GT_Worldgen.java +++ b/src/main/java/gregtech/api/world/GT_Worldgen.java @@ -65,18 +65,25 @@ public abstract class GT_Worldgen { */ public boolean isGenerationAllowed(World aWorld, int aDimensionType, int aAllowedDimensionType) { - if (!((aWorld.provider.getDimensionName().equalsIgnoreCase("Overworld")) - || (aWorld.provider.getDimensionName().equalsIgnoreCase("Nether")) - || (aWorld.provider.getDimensionName().equalsIgnoreCase("The End")) - || (aWorld.provider.getDimensionName().equalsIgnoreCase("Twilight Forest")) - || (aWorld.provider.getDimensionName().equalsIgnoreCase("Underdark")))) + if (!((aWorld.provider.getDimensionName() + .equalsIgnoreCase("Overworld")) + || (aWorld.provider.getDimensionName() + .equalsIgnoreCase("Nether")) + || (aWorld.provider.getDimensionName() + .equalsIgnoreCase("The End")) + || (aWorld.provider.getDimensionName() + .equalsIgnoreCase("Twilight Forest")) + || (aWorld.provider.getDimensionName() + .equalsIgnoreCase("Underdark")))) return false; String aDimName = aWorld.provider.getDimensionName(); Boolean tAllowed = mDimensionMap.get(aDimName); if (tAllowed == null) { - boolean tValue = GregTech_API.sWorldgenFile - .get("worldgen." + mWorldGenName, aDimName, aDimensionType == aAllowedDimensionType); + boolean tValue = GregTech_API.sWorldgenFile.get( + "worldgen." + mWorldGenName, + aDimName, + aDimensionType == aAllowedDimensionType); mDimensionMap.put(aDimName, tValue); return tValue; } diff --git a/src/main/java/gregtech/api/world/GT_Worldgen_Ore_SingleBlock.java b/src/main/java/gregtech/api/world/GT_Worldgen_Ore_SingleBlock.java index 5916d04a49..79b9e1711f 100644 --- a/src/main/java/gregtech/api/world/GT_Worldgen_Ore_SingleBlock.java +++ b/src/main/java/gregtech/api/world/GT_Worldgen_Ore_SingleBlock.java @@ -38,7 +38,8 @@ public class GT_Worldgen_Ore_SingleBlock extends GT_Worldgen_Ore { int tX = aChunkX + aRandom.nextInt(16), tY = mMinY + aRandom.nextInt(mMaxY - mMinY), tZ = aChunkZ + aRandom.nextInt(16); Block tBlock = aWorld.getBlock(tX, tY, tZ); - if (((mAllowToGenerateinVoid && aWorld.getBlock(tX, tY, tZ).isAir(aWorld, tX, tY, tZ)) + if (((mAllowToGenerateinVoid && aWorld.getBlock(tX, tY, tZ) + .isAir(aWorld, tX, tY, tZ)) || (tBlock != null && (tBlock.isReplaceableOreGen(aWorld, tX, tY, tZ, Blocks.stone) || tBlock.isReplaceableOreGen(aWorld, tX, tY, tZ, Blocks.end_stone) || tBlock.isReplaceableOreGen(aWorld, tX, tY, tZ, Blocks.netherrack))))) { diff --git a/src/main/java/gregtech/api/world/GT_Worldgen_Ore_SingleBlock_UnderLava.java b/src/main/java/gregtech/api/world/GT_Worldgen_Ore_SingleBlock_UnderLava.java index a1bd913ace..2c35dbf27e 100644 --- a/src/main/java/gregtech/api/world/GT_Worldgen_Ore_SingleBlock_UnderLava.java +++ b/src/main/java/gregtech/api/world/GT_Worldgen_Ore_SingleBlock_UnderLava.java @@ -38,7 +38,8 @@ public class GT_Worldgen_Ore_SingleBlock_UnderLava extends GT_Worldgen_Ore { int tX = aChunkX + aRandom.nextInt(16), tY = mMinY + aRandom.nextInt(mMaxY - mMinY), tZ = aChunkZ + aRandom.nextInt(16); Block tBlock = aWorld.getBlock(tX, tY, tZ); - if (((mAllowToGenerateinVoid && aWorld.getBlock(tX, tY, tZ).isAir(aWorld, tX, tY, tZ)) + if (((mAllowToGenerateinVoid && aWorld.getBlock(tX, tY, tZ) + .isAir(aWorld, tX, tY, tZ)) || (tBlock != null && (tBlock.isReplaceableOreGen(aWorld, tX, tY, tZ, Blocks.stone) || tBlock.isReplaceableOreGen(aWorld, tX, tY, tZ, Blocks.end_stone) || tBlock.isReplaceableOreGen(aWorld, tX, tY, tZ, Blocks.netherrack))))) { |
