mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-04-14 19:56:19 +00:00
terrascript should be thread safe now
This commit is contained in:
@@ -18,6 +18,7 @@ import org.bukkit.entity.Player;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
public class SpawnCommand extends WorldCommand implements DebugCommand {
|
||||
@@ -35,7 +36,7 @@ public class SpawnCommand extends WorldCommand implements DebugCommand {
|
||||
com.dfsek.terra.api.platform.world.World w = BukkitAdapter.adapt(world);
|
||||
String check = new CheckFunction(getMain(), new NumericConstant(0, dummy), new NumericConstant(0, dummy), new NumericConstant(0, dummy), getMain().getWorld(w).getConfig().getSamplerCache(), dummy).apply(new TerraImplementationArguments(new StructureBuffer(
|
||||
new com.dfsek.terra.api.math.vector.Location(w, x, y, z)
|
||||
), Rotation.NONE, new FastRandom(), 0));
|
||||
), Rotation.NONE, new FastRandom(), 0), new HashMap<>());
|
||||
|
||||
sender.sendMessage("Found: " + check);
|
||||
return true;
|
||||
|
||||
@@ -56,6 +56,7 @@ import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.logging.Level;
|
||||
@@ -202,7 +203,7 @@ public class TerraFabricPlugin implements TerraPlugin, ModInitializer {
|
||||
DefaultBiomeFeatures.addFarmAnimals(spawnSettings);
|
||||
DefaultBiomeFeatures.addMonsters(spawnSettings, 95, 5, 100);
|
||||
|
||||
Biome vanilla = ((FabricBiome) biome.getVanillaBiome()).getHandle();
|
||||
Biome vanilla = ((FabricBiome) new ArrayList<>(biome.getVanillaBiomes().getContents()).get(0)).getHandle();
|
||||
|
||||
GenerationSettings.Builder generationSettings = new GenerationSettings.Builder();
|
||||
generationSettings.surfaceBuilder(SurfaceBuilder.DEFAULT.withConfig(new TernarySurfaceConfig(Blocks.GRASS_BLOCK.getDefaultState(), Blocks.DIRT.getDefaultState(), Blocks.GRAVEL.getDefaultState()))); // It needs a surfacebuilder, even though we dont use it.
|
||||
|
||||
Reference in New Issue
Block a user