mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2025-07-03 00:15:35 +00:00
Structure#generateDirect -> #generate
This commit is contained in:
parent
9d687208c9
commit
169ed64568
@ -81,7 +81,7 @@ public class StructureLoadCommand implements CommandTemplate {
|
|||||||
if(this.chunk) {
|
if(this.chunk) {
|
||||||
script.generate(player.position(), player.world(), player.world().getChunkAt(player.position()), random, r);
|
script.generate(player.position(), player.world(), player.world().getChunkAt(player.position()), random, r);
|
||||||
} else {
|
} else {
|
||||||
script.generateDirect(player.position(), player.world(), random, r);
|
script.generate(player.position(), player.world(), random, r);
|
||||||
}
|
}
|
||||||
long l = System.nanoTime() - t;
|
long l = System.nanoTime() - t;
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@ public class FeatureGenerationStage implements GenerationStage {
|
|||||||
.getSuitableCoordinates(column)
|
.getSuitableCoordinates(column)
|
||||||
.forEach(y ->
|
.forEach(y ->
|
||||||
feature.getStructure(world, tx, y, tz)
|
feature.getStructure(world, tx, y, tz)
|
||||||
.generateDirect(new Vector3(tx, y, tz), world, PopulationUtil.getRandom(chunk), Rotation.NONE)
|
.generate(new Vector3(tx, y, tz), world, PopulationUtil.getRandom(chunk), Rotation.NONE)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -152,7 +152,7 @@ public class StructureScript implements Structure {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SuppressWarnings("try")
|
@SuppressWarnings("try")
|
||||||
public boolean generateDirect(Vector3 location, World world, Random random, Rotation rotation) {
|
public boolean generate(Vector3 location, World world, Random random, Rotation rotation) {
|
||||||
try(ProfileFrame ignore = main.getProfiler().profile("terrascript_direct:" + id)) {
|
try(ProfileFrame ignore = main.getProfiler().profile("terrascript_direct:" + id)) {
|
||||||
DirectBuffer buffer = new DirectBuffer(location, world);
|
DirectBuffer buffer = new DirectBuffer(location, world);
|
||||||
return applyBlock(new TerraImplementationArguments(buffer, rotation, random, world, 0));
|
return applyBlock(new TerraImplementationArguments(buffer, rotation, random, world, 0));
|
||||||
|
@ -14,5 +14,5 @@ public interface Structure extends StringIdentifiable {
|
|||||||
|
|
||||||
boolean generate(Buffer buffer, World world, Random random, Rotation rotation, int recursions);
|
boolean generate(Buffer buffer, World world, Random random, Rotation rotation, int recursions);
|
||||||
|
|
||||||
boolean generateDirect(Vector3 location, World world, Random random, Rotation rotation);
|
boolean generate(Vector3 location, World world, Random random, Rotation rotation);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user