Renamings

This commit is contained in:
Daniel Mills 2020-10-26 22:33:36 -04:00
parent 84e39add27
commit a7f8d9126e
9 changed files with 44 additions and 15 deletions

View File

@ -1,6 +1,7 @@
package com.volmit.iris.command; package com.volmit.iris.command;
import com.volmit.iris.Iris; import com.volmit.iris.Iris;
import com.volmit.iris.gen.v2.TestGen;
import com.volmit.iris.util.Command; import com.volmit.iris.util.Command;
import com.volmit.iris.util.MortarCommand; import com.volmit.iris.util.MortarCommand;
import com.volmit.iris.util.MortarSender; import com.volmit.iris.util.MortarSender;
@ -58,11 +59,11 @@ public class CommandIris extends MortarCommand
@Override @Override
public boolean handle(MortarSender sender, String[] args) public boolean handle(MortarSender sender, String[] args)
{ {
// if(args.length == 1 && args[0].equalsIgnoreCase("test!")) if(args.length == 1 && args[0].equalsIgnoreCase("test!"))
// { {
// TestGen.gen(sender.player()); TestGen.gen(sender.player());
// return true; return true;
// } }
sender.sendMessage("Iris v" + Iris.instance.getDescription().getVersion() + " by Volmit Software"); sender.sendMessage("Iris v" + Iris.instance.getDescription().getVersion() + " by Volmit Software");
printHelp(sender); printHelp(sender);

View File

@ -19,7 +19,7 @@ import com.volmit.iris.noise.CNG;
import com.volmit.iris.object.DecorationPart; import com.volmit.iris.object.DecorationPart;
import com.volmit.iris.object.InferredType; import com.volmit.iris.object.InferredType;
import com.volmit.iris.object.IrisBiome; import com.volmit.iris.object.IrisBiome;
import com.volmit.iris.object.IrisBiomeDecorator; import com.volmit.iris.object.IrisDecorator;
import com.volmit.iris.object.IrisCaveFluid; import com.volmit.iris.object.IrisCaveFluid;
import com.volmit.iris.object.IrisDepositGenerator; import com.volmit.iris.object.IrisDepositGenerator;
import com.volmit.iris.object.IrisDimension; import com.volmit.iris.object.IrisDimension;
@ -378,7 +378,7 @@ public abstract class TopographicTerrainProvider extends ParallelTerrainProvider
int j = 0; int j = 0;
for(IrisBiomeDecorator i : biome.getDecorators()) for(IrisDecorator i : biome.getDecorators())
{ {
if(i.getPartOf().equals(DecorationPart.SHORE_LINE) && (!touchesSea(rx, rz) || k != getFluidHeight())) if(i.getPartOf().equals(DecorationPart.SHORE_LINE) && (!touchesSea(rx, rz) || k != getFluidHeight()))
{ {
@ -461,7 +461,7 @@ public abstract class TopographicTerrainProvider extends ParallelTerrainProvider
int j = 0; int j = 0;
for(IrisBiomeDecorator i : biome.getDecorators()) for(IrisDecorator i : biome.getDecorators())
{ {
FastBlockData d = i.getBlockData(biome, rng.nextParallelRNG(2333877 + biome.getRarity() + biome.getName().length() + +j++), rx, rz, getData()); FastBlockData d = i.getBlockData(biome, rng.nextParallelRNG(2333877 + biome.getRarity() + biome.getName().length() + +j++), rx, rz, getData());
@ -528,7 +528,7 @@ public abstract class TopographicTerrainProvider extends ParallelTerrainProvider
int j = 0; int j = 0;
for(IrisBiomeDecorator i : biome.getDecorators()) for(IrisDecorator i : biome.getDecorators())
{ {
if(biome.getInferredType().equals(InferredType.SHORE)) if(biome.getInferredType().equals(InferredType.SHORE))
{ {

View File

@ -7,7 +7,7 @@ import org.bukkit.block.Biome;
import com.google.gson.Gson; import com.google.gson.Gson;
import com.volmit.iris.object.IrisBiome; import com.volmit.iris.object.IrisBiome;
import com.volmit.iris.object.IrisBiomeDecorator; import com.volmit.iris.object.IrisDecorator;
import com.volmit.iris.object.IrisBlockData; import com.volmit.iris.object.IrisBlockData;
import com.volmit.iris.object.IrisDimension; import com.volmit.iris.object.IrisDimension;
import com.volmit.iris.object.IrisEntity; import com.volmit.iris.object.IrisEntity;
@ -154,7 +154,7 @@ public class IrisDataManager
IrisBiome biome = new IrisBiome(); IrisBiome biome = new IrisBiome();
biome.getChildren().add("another_biome"); biome.getChildren().add("another_biome");
biome.getDecorators().add(new IrisBiomeDecorator()); biome.getDecorators().add(new IrisDecorator());
biome.getObjects().add(o); biome.getObjects().add(o);
IO.writeAll(new File(examples, "example-pack/biomes/example-biome.json"), new JSONObject(new Gson().toJson(biome)).toString(4)); IO.writeAll(new File(examples, "example-pack/biomes/example-biome.json"), new JSONObject(new Gson().toJson(biome)).toString(4));

View File

@ -16,5 +16,9 @@ public enum DecorationPart
@Desc("Target sea surfaces (typically for lilypads)") @Desc("Target sea surfaces (typically for lilypads)")
@DontObfuscate @DontObfuscate
SEA_SURFACE SEA_SURFACE,
@Desc("Decorates on cave & carving ceilings or underside of overhangs")
@DontObfuscate
CEILING,
} }

View File

@ -164,10 +164,10 @@ public class IrisBiome extends IrisRegistrant implements IRare
@Desc("This defines the layers of materials in this biome. Each layer has a palette and min/max height and some other properties. Usually a grassy/sandy layer then a dirt layer then a stone layer. Iris will fill in the remaining blocks below your layers with stone.") @Desc("This defines the layers of materials in this biome. Each layer has a palette and min/max height and some other properties. Usually a grassy/sandy layer then a dirt layer then a stone layer. Iris will fill in the remaining blocks below your layers with stone.")
private KList<IrisBiomePaletteLayer> seaLayers = new KList<IrisBiomePaletteLayer>(); private KList<IrisBiomePaletteLayer> seaLayers = new KList<IrisBiomePaletteLayer>();
@ArrayType(min = 1, type = IrisBiomeDecorator.class) @ArrayType(min = 1, type = IrisDecorator.class)
@DontObfuscate @DontObfuscate
@Desc("Decorators are used for things like tall grass, bisected flowers, and even kelp or cactus (random heights)") @Desc("Decorators are used for things like tall grass, bisected flowers, and even kelp or cactus (random heights)")
private KList<IrisBiomeDecorator> decorators = new KList<IrisBiomeDecorator>(); private KList<IrisDecorator> decorators = new KList<IrisDecorator>();
@ArrayType(min = 1, type = IrisObjectPlacement.class) @ArrayType(min = 1, type = IrisObjectPlacement.class)
@DontObfuscate @DontObfuscate

View File

@ -25,7 +25,7 @@ import lombok.experimental.Accessors;
@AllArgsConstructor @AllArgsConstructor
@Desc("A biome decorator is used for placing flowers, grass, cacti and so on") @Desc("A biome decorator is used for placing flowers, grass, cacti and so on")
@Data @Data
public class IrisBiomeDecorator public class IrisDecorator
{ {
@DontObfuscate @DontObfuscate
@Desc("The varience dispersion is used when multiple blocks are put in the palette. Scatter scrambles them, Wispy shows streak-looking varience") @Desc("The varience dispersion is used when multiple blocks are put in the palette. Scatter scrambles them, Wispy shows streak-looking varience")
@ -233,4 +233,9 @@ public class IrisBiomeDecorator
return blockDataTops; return blockDataTops;
}); });
} }
public boolean isStacking()
{
return getStackMax() > 1;
}
} }

View File

@ -0,0 +1,8 @@
package com.volmit.iris.util;
@SuppressWarnings("hiding")
@FunctionalInterface
public interface Consumer6<A, B, C, D, E, F>
{
public void accept(A a, B b, C c, D d, E e, F f);
}

View File

@ -41,6 +41,12 @@ public class KList<T> extends ArrayList<T> implements List<T>
add(e); add(e);
} }
public int indexOfAddIfNeeded(T v)
{
addIfMissing(v);
return indexOf(v);
}
/** /**
* Remove the last element * Remove the last element
*/ */

View File

@ -38,6 +38,11 @@ public class RNG extends Random
{ {
return new RNG(sx + signature); return new RNG(sx + signature);
} }
public RNG nextParallelRNG(long signature)
{
return new RNG(sx + signature);
}
public RNG nextRNG() public RNG nextRNG()
{ {