private WorldDummy() { super( new SaveHandlerMP(), new WorldInfo(new WorldSettings(0, GameType.SPECTATOR, false, false, WorldType.FLAT), "dummy"), new WorldProvider() { @Override public DimensionType getDimensionType() { return DimensionType.OVERWORLD; } }, new Profiler(), false ); provider.setWorld(this); chunkProvider = createChunkProvider(); }
public static WorldDummy instance() { if (instance == null) { final WorldSettings worldSettings = new WorldSettings(0, GameType.CREATIVE, false, false, WorldType.FLAT); final WorldInfo worldInfo = new WorldInfo(worldSettings, "FakeWorld"); instance = new WorldDummy(new SaveHandlerSchematic(), worldInfo, new WorldProviderSchematic(), new Profiler(), false); } return instance; } }
private int getColor(final int chunkX, final int chunkZ) { if(this.bProvider == null) { final DummyWorld world = new DummyWorld(new WorldInfo(this.worldSettings, this.worldName)); world.provider.setWorld(world); this.bProvider = world.getBiomeProvider(); } this.tempArray[0] = null; final int bId = Biome.getIdForBiome(this.bProvider.getBiomes(this.tempArray, (chunkX << 4) + 8, (chunkZ << 4) + 8, 1, 1, false)[0]); if(this.colorArray[bId] == -1) { LogHelper.info(bId); LogHelper.info(Biome.getBiome(bId)); LogHelper.info(Biome.REGISTRY.getNameForObject(Biome.getBiome(bId)));; this.colorArray[bId] = BiomeColorMappings.getColorForBiome(Biome.REGISTRY.getNameForObject(Biome.getBiome(bId)).toString()); } return this.colorArray[bId]; }
public PreviewDummyWorld(WorldType worldType, GenerationSettings settings) { super(new SaveHandler(), new WorldInfo(createSettings(worldType, settings), "terrarium_preview"), new WorldProviderSurface(), new Profiler(), false); int dimension = this.provider.getDimension(); this.provider.setWorld(this); this.provider.setDimension(dimension); this.generator = new ComposableChunkGenerator(this); this.chunkProvider = this.createChunkProvider(); this.initCapabilities(); }
public DummyWorld() { super(new DummySaveHandler(), new WorldInfo(DEFAULT_SETTINGS, "DummyServer"), new WorldProviderSurface(), new Profiler(), false); // Guarantee the dimension ID was not reset by the provider this.provider.setDimension(Integer.MAX_VALUE); int providerDim = this.provider.getDimension(); this.provider.setWorld(this); this.provider.setDimension(providerDim); this.chunkProvider = this.createChunkProvider(); //noinspection ConstantConditions this.perWorldStorage = new MapStorage(null); this.calculateInitialSkylight(); this.calculateInitialWeather(); this.getWorldBorder().setSize(30000000); }