Reformated
This commit is contained in:
parent
079b51e3f6
commit
852e5a6abc
385 changed files with 6924 additions and 5656 deletions
|
@ -1,5 +1,8 @@
|
|||
package org.betterx.bclib.sdf;
|
||||
|
||||
import org.betterx.bclib.api.v2.levelgen.structures.StructureWorld;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.BlockPos.MutableBlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
|
@ -10,8 +13,6 @@ import net.minecraft.world.phys.AABB;
|
|||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.google.common.collect.Sets;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.bclib.api.v2.levelgen.structures.StructureWorld;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.function.Function;
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
package org.betterx.bclib.sdf.operator;
|
||||
|
||||
import org.betterx.bclib.sdf.SDF;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
|
||||
import org.betterx.bclib.sdf.SDF;
|
||||
|
||||
public abstract class SDFBinary extends SDF {
|
||||
protected SDF sourceA;
|
||||
protected SDF sourceB;
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
package org.betterx.bclib.sdf.operator;
|
||||
|
||||
import net.minecraft.util.Mth;
|
||||
|
||||
import com.mojang.blaze3d.platform.NativeImage;
|
||||
import net.minecraft.util.Mth;
|
||||
|
||||
public class SDFHeightmap extends SDFDisplacement {
|
||||
private float intensity = 1F;
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
package org.betterx.bclib.sdf.operator;
|
||||
|
||||
import net.minecraft.util.Mth;
|
||||
|
||||
import org.betterx.bclib.noise.OpenSimplexNoise;
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
|
||||
import net.minecraft.util.Mth;
|
||||
|
||||
public class SDFRadialNoiseMap extends SDFDisplacement {
|
||||
private static final float SIN = Mth.sin(0.5F);
|
||||
private static final float COS = Mth.cos(0.5F);
|
||||
|
@ -38,7 +38,7 @@ public class SDFRadialNoiseMap extends SDFDisplacement {
|
|||
return (float) noise.eval(x, z) + (float) noise.eval(
|
||||
x * 3 + 1000,
|
||||
z * 3
|
||||
) * 0.5F + (float) noise.eval(x * 9 + 1000, z * 9) * 0.2F;
|
||||
) * 0.5F + (float) noise.eval(x * 9 + 1000, z * 9) * 0.2F;
|
||||
}
|
||||
|
||||
public SDFRadialNoiseMap setSeed(long seed) {
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
package org.betterx.bclib.sdf.operator;
|
||||
|
||||
import org.betterx.bclib.sdf.SDF;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
|
||||
import org.betterx.bclib.sdf.SDF;
|
||||
|
||||
public abstract class SDFUnary extends SDF {
|
||||
protected SDF source;
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package org.betterx.bclib.sdf.primitive;
|
||||
|
||||
import net.minecraft.util.Mth;
|
||||
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
|
||||
import net.minecraft.util.Mth;
|
||||
|
||||
public class SDFCappedCone extends SDFPrimitive {
|
||||
private float radius1;
|
||||
private float radius2;
|
||||
|
@ -35,7 +35,7 @@ public class SDFCappedCone extends SDFPrimitive {
|
|||
MHelper.dot(radius2 - qx, height - y, k2x, k2y) / MHelper.dot(k2x, k2y, k2x, k2y),
|
||||
0F,
|
||||
1F
|
||||
);
|
||||
);
|
||||
float cbx = qx - radius2 + k2x * mlt;
|
||||
float cby = y - height + k2y * mlt;
|
||||
float s = (cbx < 0F && cay < 0F) ? -1F : 1F;
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package org.betterx.bclib.sdf.primitive;
|
||||
|
||||
import net.minecraft.util.Mth;
|
||||
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
|
||||
import net.minecraft.util.Mth;
|
||||
|
||||
public class SDFCapsule extends SDFPrimitive {
|
||||
private float radius;
|
||||
private float height;
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package org.betterx.bclib.sdf.primitive;
|
||||
|
||||
import net.minecraft.util.Mth;
|
||||
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
|
||||
import net.minecraft.util.Mth;
|
||||
|
||||
public class SDFLine extends SDFPrimitive {
|
||||
private float radius;
|
||||
private float x1;
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package org.betterx.bclib.sdf.primitive;
|
||||
|
||||
import net.minecraft.util.Mth;
|
||||
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
|
||||
import net.minecraft.util.Mth;
|
||||
|
||||
public class SDFPie extends SDFPrimitive {
|
||||
private float sin;
|
||||
private float cos;
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
package org.betterx.bclib.sdf.primitive;
|
||||
|
||||
import org.betterx.bclib.sdf.SDF;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
|
||||
import org.betterx.bclib.sdf.SDF;
|
||||
|
||||
import java.util.function.Function;
|
||||
|
||||
public abstract class SDFPrimitive extends SDF {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue