-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Custom Void Dimension, Replace JED's
- Loading branch information
1 parent
b231e9e
commit 0558a3d
Showing
7 changed files
with
89 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
src/main/java/com/nomiceu/nomilabs/dimension/LabsDimensions.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package com.nomiceu.nomilabs.dimension; | ||
|
||
import net.minecraft.world.DimensionType; | ||
import net.minecraftforge.common.DimensionManager; | ||
|
||
public class LabsDimensions { | ||
|
||
public static final int VOID_ID = 119; | ||
|
||
public static DimensionType VOID; | ||
|
||
public static void register() { | ||
VOID = DimensionType.register("void_world", "_void", VOID_ID, LabsVoidWorldProvider.class, false); | ||
DimensionManager.registerDimension(VOID_ID, VOID); | ||
} | ||
} |
45 changes: 45 additions & 0 deletions
45
src/main/java/com/nomiceu/nomilabs/dimension/LabsVoidWorldProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
package com.nomiceu.nomilabs.dimension; | ||
|
||
import net.minecraft.util.math.BlockPos; | ||
import net.minecraft.world.DimensionType; | ||
import net.minecraft.world.WorldProvider; | ||
import net.minecraft.world.gen.ChunkGeneratorFlat; | ||
import net.minecraft.world.gen.IChunkGenerator; | ||
|
||
import org.jetbrains.annotations.NotNull; | ||
import org.jetbrains.annotations.Nullable; | ||
|
||
public class LabsVoidWorldProvider extends WorldProvider { | ||
|
||
private static final BlockPos spawnPos = new BlockPos(2.5, 80, 2.5); | ||
|
||
@Override | ||
@NotNull | ||
public DimensionType getDimensionType() { | ||
return LabsDimensions.VOID; | ||
} | ||
|
||
@Override | ||
@NotNull | ||
public IChunkGenerator createChunkGenerator() { | ||
return new ChunkGeneratorFlat(world, getSeed(), false, "3;minecraft:air;1;decoration"); | ||
} | ||
|
||
@Override | ||
@NotNull | ||
public BlockPos getRandomizedSpawnPoint() { | ||
return spawnPos; | ||
} | ||
|
||
@Override | ||
@NotNull | ||
public BlockPos getSpawnPoint() { | ||
return spawnPos; | ||
} | ||
|
||
@Override | ||
@Nullable | ||
public BlockPos getSpawnCoordinate() { | ||
return spawnPos; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters