mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-07-19 10:43:14 +00:00
Merge remote-tracking branch 'origin/hotfix' into DecreeCommands
This commit is contained in:
commit
a750241ec3
@ -443,40 +443,38 @@ public class Iris extends VolmitPlugin implements Listener {
|
||||
|
||||
@Override
|
||||
public ChunkGenerator getDefaultWorldGenerator(String worldName, String id) {
|
||||
String dimension = IrisSettings.get().getGenerator().getDefaultWorldType();
|
||||
|
||||
if (id != null && !id.isEmpty()) {
|
||||
dimension = id;
|
||||
Iris.info("Generator ID: " + id + " requested by bukkit/plugin. Assuming IrisDimension: " + id);
|
||||
IrisDimension dim;
|
||||
if (id == null || id.isEmpty()){
|
||||
dim = IrisData.loadAnyDimension(IrisSettings.get().getGenerator().getDefaultWorldType());
|
||||
} else {
|
||||
dim = IrisData.loadAnyDimension(id);
|
||||
}
|
||||
Iris.info("Generator ID: " + id + " requested by bukkit/plugin");
|
||||
|
||||
IrisDimension d = IrisData.loadAnyDimension(dimension);
|
||||
|
||||
if (d == null) {
|
||||
if (dim == null) {
|
||||
Iris.warn("Unable to find dimension type " + id + " Looking for online packs...");
|
||||
d = IrisData.loadAnyDimension(dimension);
|
||||
if (dimension == null) {
|
||||
Iris.warn("Unable to find dimension type \"" + dimensionName + "\". Looking for online packs...");
|
||||
Iris.proj.downloadSearch(new VolmitSender(Bukkit.getConsoleSender()), dimensionName, true);
|
||||
dimension = IrisData.loadAnyDimension(dimensionName);
|
||||
|
||||
if (d == null) {
|
||||
throw new RuntimeException("Can't find dimension " + dimension + "!");
|
||||
Iris.proj.downloadSearch(new VolmitSender(Bukkit.getConsoleSender()), id, true);
|
||||
dim = IrisData.loadAnyDimension(id);
|
||||
|
||||
if (dim == null) {
|
||||
throw new RuntimeException("Can't find dimension " + id + "!");
|
||||
} else {
|
||||
Iris.info("Resolved missing dimension, proceeding with generation.");
|
||||
}
|
||||
}
|
||||
Iris.info("Assuming IrisDimension: " + dim.getName());
|
||||
|
||||
IrisWorld w = IrisWorld.builder()
|
||||
.name(worldName)
|
||||
.seed(RNG.r.lmax())
|
||||
.environment(d.getEnvironment())
|
||||
.environment(dim.getEnvironment())
|
||||
.worldFolder(new File(worldName))
|
||||
.minHeight(0)
|
||||
.maxHeight(256)
|
||||
.build();
|
||||
|
||||
return new BukkitChunkGenerator(w, false, new File(w.worldFolder(), "iris"), dimension);
|
||||
return new BukkitChunkGenerator(w, false, new File(w.worldFolder(), "iris"), dim.getLoadKey());
|
||||
}
|
||||
|
||||
public static void msg(String string) {
|
||||
|
@ -364,7 +364,7 @@ public class ProjectManager {
|
||||
}
|
||||
|
||||
public File compilePackage(VolmitSender sender, IrisDimension d, boolean obfuscate, boolean minify) {
|
||||
return new IrisProject(new File(getWorkspaceFolder(), d.getName())).compilePackage(sender, obfuscate, minify);
|
||||
return new IrisProject(new File(getWorkspaceFolder(), d.getLoadKey())).compilePackage(sender, obfuscate, minify);
|
||||
}
|
||||
|
||||
public File compilePackage(VolmitSender sender, String d, boolean obfuscate, boolean minify) {
|
||||
|
@ -21,10 +21,7 @@ package com.volmit.iris.util.decree;
|
||||
import com.volmit.iris.core.tools.IrisToolbelt;
|
||||
import com.volmit.iris.engine.framework.Engine;
|
||||
import com.volmit.iris.engine.platform.PlatformChunkGenerator;
|
||||
<<<<<<< HEAD
|
||||
import com.volmit.iris.util.format.C;
|
||||
=======
|
||||
>>>>>>> master
|
||||
import com.volmit.iris.util.plugin.VolmitSender;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.entity.Player;
|
||||
|
@ -617,6 +617,14 @@ public class VirtualDecreeCommand {
|
||||
return Objects.hash(getName(), getDescription(), getType(), getPath());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj){
|
||||
if (!(obj instanceof VirtualDecreeCommand)){
|
||||
return false;
|
||||
}
|
||||
return this.hashCode() == obj.hashCode();
|
||||
}
|
||||
|
||||
public boolean matches(String in)
|
||||
{
|
||||
KList<String> a = getNames();
|
||||
|
Loading…
x
Reference in New Issue
Block a user