From 1b7658d8f9b3e35c0f7ee314e03100f41f179769 Mon Sep 17 00:00:00 2001 From: Daniel Mills Date: Sun, 18 Jul 2021 18:21:04 -0400 Subject: [PATCH] Iris Worlds --- .../iris/engine/object/common/IrisWorld.java | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 src/main/java/com/volmit/iris/engine/object/common/IrisWorld.java diff --git a/src/main/java/com/volmit/iris/engine/object/common/IrisWorld.java b/src/main/java/com/volmit/iris/engine/object/common/IrisWorld.java new file mode 100644 index 000000000..859aa037d --- /dev/null +++ b/src/main/java/com/volmit/iris/engine/object/common/IrisWorld.java @@ -0,0 +1,45 @@ +/* + * Iris is a World Generator for Minecraft Bukkit Servers + * Copyright (c) 2021 Arcane Arts (Volmit Software) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.volmit.iris.engine.object.common; + +import lombok.Builder; +import lombok.Data; +import org.bukkit.World; + +import java.io.File; + +@Builder +@Data +public class IrisWorld { + private String name; + private File worldFolder; + private long seed; + private World.Environment environment; + private boolean real; + + public static IrisWorld fromWorld(World world) + { + return IrisWorld.builder() + .name(world.getName()) + .worldFolder(world.getWorldFolder()) + .seed(world.getSeed()) + .environment(world.getEnvironment()) + .build(); + } +}