mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-12 08:08:34 +00:00
some codestyle application
This commit is contained in:
@ -1,6 +1,5 @@
|
||||
package com.fastasyncworldedit.core.extent;
|
||||
|
||||
import com.fastasyncworldedit.core.FaweCache;
|
||||
import com.fastasyncworldedit.core.extent.filter.block.ExtentFilterBlock;
|
||||
import com.fastasyncworldedit.core.function.generator.GenBase;
|
||||
import com.fastasyncworldedit.core.function.generator.Resource;
|
||||
|
@ -27,16 +27,13 @@ import com.sk89q.worldedit.util.Countable;
|
||||
import com.sk89q.worldedit.util.Location;
|
||||
import com.sk89q.worldedit.util.formatting.text.Component;
|
||||
import com.sk89q.worldedit.world.biome.BiomeType;
|
||||
import com.sk89q.worldedit.world.biome.BiomeTypes;
|
||||
import com.sk89q.worldedit.world.block.BaseBlock;
|
||||
import com.sk89q.worldedit.world.block.BlockState;
|
||||
import com.sk89q.worldedit.world.block.BlockStateHolder;
|
||||
import com.sk89q.worldedit.world.block.BlockType;
|
||||
import com.sk89q.worldedit.world.block.BlockTypes;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.Future;
|
||||
|
@ -2,7 +2,6 @@ package com.fastasyncworldedit.core.extent;
|
||||
|
||||
import com.fastasyncworldedit.core.util.ExtentTraverser;
|
||||
import com.fastasyncworldedit.core.util.ReflectionUtils;
|
||||
import com.sk89q.worldedit.WorldEdit;
|
||||
import com.sk89q.worldedit.extent.AbstractDelegateExtent;
|
||||
import com.sk89q.worldedit.extent.Extent;
|
||||
import com.sk89q.worldedit.math.BlockVector3;
|
||||
|
@ -1,7 +1,6 @@
|
||||
package com.fastasyncworldedit.core.extent.clipboard.io.schematic;
|
||||
|
||||
import com.fastasyncworldedit.core.FaweCache;
|
||||
import com.fastasyncworldedit.core.math.MutableBlockVector3;
|
||||
import com.sk89q.jnbt.CompoundTag;
|
||||
import com.sk89q.jnbt.IntTag;
|
||||
import com.sk89q.jnbt.ListTag;
|
||||
|
@ -15,8 +15,8 @@ public class ArrayHeightMap extends ScalableHeightMap {
|
||||
* New height map represented by byte array[][] of values x*z to be scaled given a set size
|
||||
*
|
||||
* @param height array of height values
|
||||
* @param minY min y value allowed to be set. Inclusive.
|
||||
* @param maxY max y value allowed to be set. Inclusive.
|
||||
* @param minY min y value allowed to be set. Inclusive.
|
||||
* @param maxY max y value allowed to be set. Inclusive.
|
||||
*/
|
||||
public ArrayHeightMap(byte[][] height, int minY, int maxY) {
|
||||
super(minY, maxY);
|
||||
|
@ -138,8 +138,10 @@ public interface HeightMap {
|
||||
double raiseScaled = diff * (raisePow * sizePowInv);
|
||||
double raiseScaledAbs = Math.abs(raiseScaled);
|
||||
int random =
|
||||
ThreadLocalRandom.current().nextInt(maxY + 1 - minY) - minY < (int) ((Math.ceil(raiseScaledAbs) - Math.floor(
|
||||
raiseScaledAbs)) * (maxY + 1 - minY)) ? (diff > 0 ? 1 : -1) : 0;
|
||||
ThreadLocalRandom
|
||||
.current()
|
||||
.nextInt(maxY + 1 - minY) - minY < (int) ((Math.ceil(raiseScaledAbs) - Math.floor(
|
||||
raiseScaledAbs)) * (maxY + 1 - minY)) ? (diff > 0 ? 1 : -1) : 0;
|
||||
int raiseScaledInt = (int) raiseScaled + random;
|
||||
newData[index] = height + raiseScaledInt;
|
||||
}
|
||||
@ -181,8 +183,10 @@ public interface HeightMap {
|
||||
}
|
||||
raise = (yscale * raise);
|
||||
int random =
|
||||
ThreadLocalRandom.current().nextInt(maxY + 1 - minY) - minY < (int) ((raise - (int) raise) * (maxY - minY + 1))
|
||||
? 1 : 0;
|
||||
ThreadLocalRandom
|
||||
.current()
|
||||
.nextInt(maxY + 1 - minY) - minY < (int) ((raise - (int) raise) * (maxY - minY + 1))
|
||||
? 1 : 0;
|
||||
int newHeight = height + (int) raise + random;
|
||||
newData[index] = newHeight;
|
||||
}
|
||||
|
@ -92,7 +92,7 @@ public class ScalableHeightMap implements HeightMap {
|
||||
highestY = y + 1;
|
||||
}
|
||||
}
|
||||
int pointHeight = Math.min(clipMaxY, ((maxY - minY + 1 ) * (highestY - clipMinY)) / clipHeight);
|
||||
int pointHeight = Math.min(clipMaxY, ((maxY - minY + 1) * (highestY - clipMinY)) / clipHeight);
|
||||
int x = xx - clipMinX;
|
||||
int z = zz - clipMinZ;
|
||||
heightArray[x][z] = (byte) pointHeight;
|
||||
|
@ -17,9 +17,9 @@ public class OffsetTransform extends ResettableExtent {
|
||||
* New instance
|
||||
*
|
||||
* @param parent extent to set to
|
||||
* @param dx offset x
|
||||
* @param dy offset y
|
||||
* @param dz offset z
|
||||
* @param dx offset x
|
||||
* @param dy offset y
|
||||
* @param dz offset z
|
||||
*/
|
||||
public OffsetTransform(Extent parent, int dx, int dy, int dz) {
|
||||
super(parent);
|
||||
|
@ -20,9 +20,9 @@ public class RandomOffsetTransform extends ResettableExtent {
|
||||
* New instance
|
||||
*
|
||||
* @param parent extent to set to
|
||||
* @param dx range of x values to choose from (0 -> x)
|
||||
* @param dy range of y values to choose from (0 -> y)
|
||||
* @param dz range of z values to choose from (0 -> z)
|
||||
* @param dx range of x values to choose from (0 -> x)
|
||||
* @param dy range of y values to choose from (0 -> y)
|
||||
* @param dz range of z values to choose from (0 -> z)
|
||||
*/
|
||||
public RandomOffsetTransform(Extent parent, int dx, int dy, int dz) {
|
||||
super(parent);
|
||||
|
Reference in New Issue
Block a user