mirror of
https://github.com/dragonruler1000/hdm-mod.git
synced 2025-06-29 08:29:33 -05:00
readded stuff that was accidently removed.
Signed-off-by: dragonruler1000 <github@me.minecraftchest2.us>
This commit is contained in:
parent
8f94831df0
commit
c06d73ebff
1 changed files with 10 additions and 0 deletions
|
@ -82,12 +82,22 @@ public class Window extends HorizontalBlock {
|
||||||
MinecraftServer server = worldIn.getServer();
|
MinecraftServer server = worldIn.getServer();
|
||||||
|
|
||||||
if (server != null) {
|
if (server != null) {
|
||||||
|
if (worldIn.getDimensionKey() == ModDimensions.World1) {
|
||||||
|
ServerWorld overWorld = server.getWorld(World.OVERWORLD);
|
||||||
|
if (overWorld != null) {
|
||||||
|
player.changeDimension(overWorld, new SimpleTeleporter(pos, false));
|
||||||
|
}
|
||||||
|
}
|
||||||
ServerWorld targetWorld;
|
ServerWorld targetWorld;
|
||||||
boolean goingToCustom = worldIn.getDimensionKey() != ModDimensions.World1;
|
boolean goingToCustom = worldIn.getDimensionKey() != ModDimensions.World1;
|
||||||
|
|
||||||
if (goingToCustom) {
|
if (goingToCustom) {
|
||||||
targetWorld = server.getWorld(ModDimensions.World1);
|
targetWorld = server.getWorld(ModDimensions.World1);
|
||||||
} else {
|
} else {
|
||||||
|
ServerWorld world1 = server.getWorld(ModDimensions.World1);
|
||||||
|
if (world1 != null) {
|
||||||
|
player.changeDimension(world1, new SimpleTeleporter(pos, true));
|
||||||
|
}
|
||||||
targetWorld = server.getWorld(World.OVERWORLD);
|
targetWorld = server.getWorld(World.OVERWORLD);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue