mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-04-06 15:56:14 +00:00
remove useless Structure#generate implementation
This commit is contained in:
@@ -81,7 +81,7 @@ public class StructureLoadCommand implements CommandTemplate {
|
||||
if(this.chunk) {
|
||||
script.generate(player.position(), player.world(), player.world().getChunkAt(player.position()), random, r);
|
||||
} else {
|
||||
script.generate(player.position(), player.world(), random, r);
|
||||
script.generateDirect(player.position(), player.world(), random, r);
|
||||
}
|
||||
long l = System.nanoTime() - t;
|
||||
|
||||
|
||||
@@ -112,17 +112,6 @@ public class StructureScript implements Structure {
|
||||
this.cache = CacheBuilder.newBuilder().maximumSize(main.getTerraConfig().getStructureCache()).build();
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("try")
|
||||
public boolean generate(Vector3 location, World world, Random random, Rotation rotation) {
|
||||
try(ProfileFrame ignore = main.getProfiler().profile("terrascript:" + id)) {
|
||||
StructureBuffer buffer = new StructureBuffer(location);
|
||||
boolean level = applyBlock(new TerraImplementationArguments(buffer, rotation, random, world, 0));
|
||||
buffer.paste(location, world);
|
||||
return level;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("try")
|
||||
public boolean generate(Vector3 location, World world, Chunk chunk, Random random, Rotation rotation) {
|
||||
|
||||
@@ -10,16 +10,6 @@ import com.dfsek.terra.api.world.World;
|
||||
import java.util.Random;
|
||||
|
||||
public interface Structure extends StringIdentifiable {
|
||||
/**
|
||||
* Paste the structure at a location
|
||||
*
|
||||
* @param location Location to paste structure
|
||||
* @param world
|
||||
* @param rotation Rotation of structure
|
||||
* @return Whether generation was successful
|
||||
*/
|
||||
boolean generate(Vector3 location, World world, Random random, Rotation rotation);
|
||||
|
||||
boolean generate(Vector3 location, World world, Chunk chunk, Random random, Rotation rotation);
|
||||
|
||||
boolean generate(Buffer buffer, World world, Random random, Rotation rotation, int recursions);
|
||||
|
||||
Reference in New Issue
Block a user