mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2025-07-02 16:05:29 +00:00
World#getTerraGenerator -> World#getGenerator
This commit is contained in:
parent
ec14666c6d
commit
ad9cc1afcb
@ -21,6 +21,6 @@ public class BufferedEntity implements BufferedItem {
|
||||
@Override
|
||||
public void paste(Vector3 origin, World world) {
|
||||
Entity entity = world.spawnEntity(origin.clone().add(0.5, 0, 0.5), type);
|
||||
main.getEventManager().callEvent(new EntitySpawnEvent(entity.world().getTerraGenerator().getConfigPack(), entity));
|
||||
main.getEventManager().callEvent(new EntitySpawnEvent(entity.world().getGenerator().getConfigPack(), entity));
|
||||
}
|
||||
}
|
||||
|
@ -33,7 +33,7 @@ public class BufferedLootApplication implements BufferedItem {
|
||||
}
|
||||
Container container = (Container) data;
|
||||
|
||||
LootPopulateEvent event = new LootPopulateEvent(container, table, world.getTerraGenerator().getConfigPack(), structure);
|
||||
LootPopulateEvent event = new LootPopulateEvent(container, table, world.getGenerator().getConfigPack(), structure);
|
||||
main.getEventManager().callEvent(event);
|
||||
if(event.isCancelled()) return;
|
||||
|
||||
|
@ -53,7 +53,7 @@ public interface World extends Handle {
|
||||
|
||||
int getMinHeight();
|
||||
|
||||
TerraChunkGenerator getTerraGenerator();
|
||||
TerraChunkGenerator getGenerator();
|
||||
|
||||
BiomeProvider getBiomeProvider();
|
||||
|
||||
|
@ -23,6 +23,6 @@ public class GetBlockCommand implements CommandTemplate {
|
||||
@Override
|
||||
public void execute(CommandSender sender) {
|
||||
Player player = (Player) sender;
|
||||
sender.sendMessage("Block: " + player.world().getTerraGenerator().getBlock(player.world(), player.position()).getAsString());
|
||||
sender.sendMessage("Block: " + player.world().getGenerator().getBlock(player.world(), player.position()).getAsString());
|
||||
}
|
||||
}
|
||||
|
@ -20,7 +20,7 @@ public class SamplerCacheImpl implements com.dfsek.terra.api.world.generator.Sam
|
||||
public Sampler load(@NotNull Long key) {
|
||||
int cx = (int) (key >> 32);
|
||||
int cz = (int) key.longValue();
|
||||
return world.getTerraGenerator().createSampler(cx, cz, world.getBiomeProvider(), world, world.getConfig().elevationBlend());
|
||||
return world.getGenerator().createSampler(cx, cz, world.getBiomeProvider(), world, world.getConfig().elevationBlend());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -169,7 +169,7 @@ public class FabricChunkGeneratorWrapper extends ChunkGenerator implements Gener
|
||||
@Override
|
||||
public int getHeight(int x, int z, Heightmap.Type heightmap, HeightLimitView heightmapType) {
|
||||
int height = ((World) world).getMaxHeight();
|
||||
while(height >= ((World) world).getMinHeight() && !heightmap.getBlockPredicate().test(((FabricBlockState) ((World) world).getTerraGenerator().getBlock((World) world, x, height - 1, z)).getHandle())) {
|
||||
while(height >= ((World) world).getMinHeight() && !heightmap.getBlockPredicate().test(((FabricBlockState) ((World) world).getGenerator().getBlock((World) world, x, height - 1, z)).getHandle())) {
|
||||
height--;
|
||||
}
|
||||
return height;
|
||||
@ -179,7 +179,7 @@ public class FabricChunkGeneratorWrapper extends ChunkGenerator implements Gener
|
||||
public VerticalBlockSample getColumnSample(int x, int z, HeightLimitView view) {
|
||||
BlockState[] array = new BlockState[view.getHeight()];
|
||||
for(int y = view.getBottomY() + view.getHeight() - 1; y >= view.getBottomY(); y--) {
|
||||
array[y] = ((FabricBlockState) ((World) world).getTerraGenerator().getBlock((World) world, x, y, z)).getHandle();
|
||||
array[y] = ((FabricBlockState) ((World) world).getGenerator().getBlock((World) world, x, y, z)).getHandle();
|
||||
}
|
||||
return new VerticalBlockSample(view.getBottomY(), array);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user