-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWorldTypeBiosphere.java
More file actions
68 lines (56 loc) · 1.79 KB
/
Copy pathWorldTypeBiosphere.java
File metadata and controls
68 lines (56 loc) · 1.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
package forgebiosphere;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiCreateFlatWorld;
import net.minecraft.client.gui.GuiCreateWorld;
import net.minecraft.world.World;
import net.minecraft.world.WorldType;
import net.minecraft.world.biome.WorldChunkManager;
import net.minecraft.world.chunk.IChunkProvider;
public class WorldTypeBiosphere extends WorldType {
/**
* Creates a new world type, the ID is hidden and should not be referenced by modders.
* It will automatically expand the underlying workdType array if there are no IDs left.
*
* @param name
*/
public WorldTypeBiosphere(String name) {
super(name);
}
@Override
public WorldChunkManager getChunkManager(World world) {
return new ChunkManagerBiosphere(world);
}
@Override
public IChunkProvider getChunkGenerator(World world, String generatorOptions) {
return new ChunkProviderBiosphere(world, world.getSeed(), world.getWorldInfo().isMapFeaturesEnabled(), generatorOptions);
}
@Override
public int getMinimumSpawnHeight(World world) {
return 4;
}
@Override
public double getHorizon(World world) {
return 0;
}
@Override
public boolean hasVoidParticles(boolean flag) {
return false;
}
@Override
public double voidFadeMagnitude() {
return 1.0D;
}
// カスタマイズボタンを表示する
@Override
public boolean isCustomizable() {
return true;
}
// カスタマイズボタンからスーパーフラットのカスタマイズ画面を表示する
@Override
@SideOnly(Side.CLIENT)
public void onCustomizeButton(Minecraft instance, GuiCreateWorld guiCreateWorld) {
instance.displayGuiScreen(new GuiCreateFlatWorld(guiCreateWorld, guiCreateWorld.field_146334_a));
}
}