mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-07-18 18:23:06 +00:00
Fixes
This commit is contained in:
parent
37705dfc71
commit
38329514f9
@ -1,26 +1,8 @@
|
|||||||
package com.volmit.iris.core.service;
|
package com.volmit.iris.core.service;
|
||||||
|
|
||||||
import com.volmit.iris.core.tools.IrisToolbelt;
|
|
||||||
import com.volmit.iris.util.format.C;
|
|
||||||
import com.volmit.iris.util.plugin.IrisService;
|
import com.volmit.iris.util.plugin.IrisService;
|
||||||
import com.volmit.iris.util.plugin.VolmitSender;
|
|
||||||
import org.bukkit.Bukkit;
|
|
||||||
import org.bukkit.event.EventHandler;
|
|
||||||
import org.bukkit.event.player.PlayerCommandPreprocessEvent;
|
|
||||||
|
|
||||||
public class LocateSVC implements IrisService {
|
public class LocateSVC implements IrisService {
|
||||||
|
|
||||||
@EventHandler
|
|
||||||
public void on(final PlayerCommandPreprocessEvent event) {
|
|
||||||
if (IrisToolbelt.isIrisWorld(event.getPlayer().getWorld())) {
|
|
||||||
VolmitSender sender = new VolmitSender(event.getPlayer());
|
|
||||||
sender.sendMessage(C.YELLOW + "You cannot locate structures in Iris worlds through vanilla commands");
|
|
||||||
sender.sendMessage("You can use:");
|
|
||||||
// TODO: Convert this to have the correct command prefix
|
|
||||||
Bukkit.dispatchCommand(event.getPlayer(), "/ird studio find");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onEnable() {
|
public void onEnable() {
|
||||||
|
|
||||||
|
@ -47,6 +47,7 @@ import org.bukkit.Material;
|
|||||||
import org.bukkit.block.Biome;
|
import org.bukkit.block.Biome;
|
||||||
import org.bukkit.block.data.BlockData;
|
import org.bukkit.block.data.BlockData;
|
||||||
|
|
||||||
|
import java.lang.reflect.Field;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
@ -502,4 +503,20 @@ public class IrisComplex implements DataProvider {
|
|||||||
biome.setInferredType(b.getInferredType());
|
biome.setInferredType(b.getInferredType());
|
||||||
return implode(biome, x, z, max - 1);
|
return implode(biome, x, z, max - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void close() {
|
||||||
|
// I know this looks awful, but it helps gc not deal with the spaghetti reference soup going on here
|
||||||
|
for (Field i : getClass().getDeclaredFields())
|
||||||
|
{
|
||||||
|
if(i.getType().equals(ProceduralStream.class))
|
||||||
|
{
|
||||||
|
i.setAccessible(true);
|
||||||
|
try {
|
||||||
|
i.set(this, null);
|
||||||
|
} catch (IllegalAccessException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -303,6 +303,7 @@ public class IrisEngine extends BlockPopulator implements Engine {
|
|||||||
getCaveModifier().close();
|
getCaveModifier().close();
|
||||||
getPostModifier().close();
|
getPostModifier().close();
|
||||||
getMantle().close();
|
getMantle().close();
|
||||||
|
getComplex().close();
|
||||||
Iris.debug("Engine Fully Shutdown!");
|
Iris.debug("Engine Fully Shutdown!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -58,5 +58,4 @@ public class AddingStream<T> extends BasicStream<T> {
|
|||||||
public T get(double x, double y, double z) {
|
public T get(double x, double y, double z) {
|
||||||
return fromDouble(add.apply(x, y, z) + getTypedSource().getDouble(x, y, z));
|
return fromDouble(add.apply(x, y, z) + getTypedSource().getDouble(x, y, z));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user