mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-06-17 06:11:24 +00:00
implement world api changes
This commit is contained in:
+7
-5
@@ -7,6 +7,8 @@
|
||||
|
||||
package com.dfsek.terra.addons.flora.flora.gen;
|
||||
|
||||
import com.dfsek.terra.api.world.access.WorldAccess;
|
||||
|
||||
import net.jafama.FastMath;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@@ -56,7 +58,7 @@ public class TerraFlora implements Structure {
|
||||
});
|
||||
}
|
||||
|
||||
private void test(EnumSet<Direction> faces, Direction f, Vector3 b, World world) {
|
||||
private void test(EnumSet<Direction> faces, Direction f, Vector3 b, WorldAccess world) {
|
||||
if(testRotation.contains(
|
||||
world.getBlockData(b.getBlockX() + f.getModX(), b.getBlockY() + f.getModY(), b.getBlockZ() + f.getModZ()).getBlockType()))
|
||||
faces.add(f);
|
||||
@@ -66,7 +68,7 @@ public class TerraFlora implements Structure {
|
||||
return layers.get(FastMath.max(FastMath.min(layer, layers.size() - 1), 0));
|
||||
}
|
||||
|
||||
private EnumSet<Direction> getFaces(Vector3 b, World world) {
|
||||
private EnumSet<Direction> getFaces(Vector3 b, WorldAccess world) {
|
||||
EnumSet<Direction> faces = EnumSet.noneOf(Direction.class);
|
||||
test(faces, Direction.NORTH, b, world);
|
||||
test(faces, Direction.SOUTH, b, world);
|
||||
@@ -81,17 +83,17 @@ public class TerraFlora implements Structure {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean generate(Vector3 location, World world, Chunk chunk, Random random, Rotation rotation) {
|
||||
public boolean generate(Vector3 location, WorldAccess world, Chunk chunk, Random random, Rotation rotation) {
|
||||
return generate(location, world, random, rotation);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean generate(Buffer buffer, World world, Random random, Rotation rotation, int recursions) {
|
||||
public boolean generate(Buffer buffer, WorldAccess world, Random random, Rotation rotation, int recursions) {
|
||||
return generate(buffer.getOrigin(), world, random, rotation);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean generate(Vector3 location, World world, Random random, Rotation rotation) {
|
||||
public boolean generate(Vector3 location, WorldAccess world, Random random, Rotation rotation) {
|
||||
boolean doRotation = testRotation.size() > 0;
|
||||
int size = layers.size();
|
||||
int c = ceiling ? -1 : 1;
|
||||
|
||||
Reference in New Issue
Block a user