mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-06-15 21:31:05 +00:00
clean up Palette API
This commit is contained in:
-10
@@ -30,15 +30,6 @@ public abstract class PaletteImpl implements Palette {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Palette add(BlockState m, int layers, NoiseSampler sampler) {
|
|
||||||
for(int i = 0; i < layers; i++) {
|
|
||||||
pallet.add(new PaletteLayer(m, sampler));
|
|
||||||
}
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Palette add(ProbabilityCollection<BlockState> m, int layers, NoiseSampler sampler) {
|
public Palette add(ProbabilityCollection<BlockState> m, int layers, NoiseSampler sampler) {
|
||||||
for(int i = 0; i < layers; i++) {
|
for(int i = 0; i < layers; i++) {
|
||||||
pallet.add(new PaletteLayer(m, sampler));
|
pallet.add(new PaletteLayer(m, sampler));
|
||||||
@@ -47,7 +38,6 @@ public abstract class PaletteImpl implements Palette {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int getSize() {
|
public int getSize() {
|
||||||
return pallet.size();
|
return pallet.size();
|
||||||
}
|
}
|
||||||
|
|||||||
-6
@@ -13,10 +13,6 @@ import com.dfsek.terra.api.util.collection.ProbabilityCollection;
|
|||||||
|
|
||||||
|
|
||||||
public interface Palette {
|
public interface Palette {
|
||||||
Palette add(BlockState m, int layers, NoiseSampler sampler);
|
|
||||||
|
|
||||||
Palette add(ProbabilityCollection<BlockState> m, int layers, NoiseSampler sampler);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fetches a material from the palette, at a given layer.
|
* Fetches a material from the palette, at a given layer.
|
||||||
*
|
*
|
||||||
@@ -25,6 +21,4 @@ public interface Palette {
|
|||||||
* @return BlockData - The material fetched.
|
* @return BlockData - The material fetched.
|
||||||
*/
|
*/
|
||||||
BlockState get(int layer, double x, double y, double z, long seed);
|
BlockState get(int layer, double x, double y, double z, long seed);
|
||||||
|
|
||||||
int getSize();
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user