mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-07-18 18:23:06 +00:00
Cleanup
This commit is contained in:
parent
7a188af002
commit
8e873ccd00
@ -272,8 +272,7 @@ public class CommandStudio implements DecreeExecutor {
|
||||
}
|
||||
|
||||
try {
|
||||
if(biome.getLoadFile() == null)
|
||||
{
|
||||
if (biome.getLoadFile() == null) {
|
||||
sender().sendMessage(C.GOLD + "Cannot find the file for the biome you are in! Perhaps it was not loaded directly from a file?");
|
||||
return;
|
||||
}
|
||||
|
@ -31,22 +31,13 @@ import com.volmit.iris.util.collection.KList;
|
||||
import com.volmit.iris.util.collection.KMap;
|
||||
import com.volmit.iris.util.format.C;
|
||||
import com.volmit.iris.util.format.Form;
|
||||
import com.volmit.iris.util.math.RollingSequence;
|
||||
import com.volmit.iris.util.plugin.IrisService;
|
||||
import com.volmit.iris.util.scheduling.ChronoLatch;
|
||||
import com.volmit.iris.util.scheduling.J;
|
||||
import lombok.Data;
|
||||
import net.minecraft.server.dedicated.ThreadWatchdog;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.boss.BarColor;
|
||||
import org.bukkit.boss.BarStyle;
|
||||
import org.bukkit.boss.BossBar;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.player.PlayerChangedWorldEvent;
|
||||
import org.bukkit.event.player.PlayerJoinEvent;
|
||||
import org.bukkit.event.player.PlayerToggleSneakEvent;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ -94,36 +85,31 @@ public class BoardSVC implements IrisService, BoardProvider {
|
||||
return C.GREEN + "Iris";
|
||||
}
|
||||
|
||||
public void tick()
|
||||
{
|
||||
public void tick() {
|
||||
boards.forEach((k, v) -> v.update());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getLines(Player player) {
|
||||
PlayerBoard pb = boards.computeIfAbsent(player, PlayerBoard::new);
|
||||
synchronized (pb.lines)
|
||||
{
|
||||
synchronized (pb.lines) {
|
||||
return pb.lines;
|
||||
}
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class PlayerBoard
|
||||
{
|
||||
public static class PlayerBoard {
|
||||
private final Player player;
|
||||
private final KList<String> lines;
|
||||
|
||||
public PlayerBoard(Player player)
|
||||
{
|
||||
public PlayerBoard(Player player) {
|
||||
this.player = player;
|
||||
this.lines = new KList<>();
|
||||
update();
|
||||
}
|
||||
|
||||
public void update() {
|
||||
synchronized (lines)
|
||||
{
|
||||
synchronized (lines) {
|
||||
lines.clear();
|
||||
|
||||
if (!IrisToolbelt.isIrisStudioWorld(player.getWorld())) {
|
||||
|
@ -188,12 +188,10 @@ public interface Engine extends DataProvider, Fallible, LootProvider, BlockUpdat
|
||||
default IrisBiome getCaveOrMantleBiome(int x, int y, int z) {
|
||||
MatterCavern m = getMantle().getMantle().get(x, y, z, MatterCavern.class);
|
||||
|
||||
if(m != null && m.getCustomBiome() != null && !m.getCustomBiome().isEmpty())
|
||||
{
|
||||
if (m != null && m.getCustomBiome() != null && !m.getCustomBiome().isEmpty()) {
|
||||
IrisBiome biome = getData().getBiomeLoader().load(m.getCustomBiome());
|
||||
|
||||
if(biome != null)
|
||||
{
|
||||
if (biome != null) {
|
||||
return biome;
|
||||
}
|
||||
}
|
||||
@ -727,8 +725,7 @@ public interface Engine extends DataProvider, Fallible, LootProvider, BlockUpdat
|
||||
|
||||
int getCacheID();
|
||||
|
||||
default IrisBiome getBiomeOrMantle(Location l)
|
||||
{
|
||||
default IrisBiome getBiomeOrMantle(Location l) {
|
||||
return getBiomeOrMantle(l.getBlockX(), l.getBlockY(), l.getBlockZ());
|
||||
}
|
||||
}
|
||||
|
@ -313,8 +313,7 @@ public interface EngineMantle extends IObjectPlacer {
|
||||
return false;// TODO:
|
||||
}
|
||||
|
||||
default int getLoadedRegionCount()
|
||||
{
|
||||
default int getLoadedRegionCount() {
|
||||
return getMantle().getLoadedRegionCount();
|
||||
}
|
||||
}
|
||||
|
@ -37,13 +37,11 @@ public class IrisSeed {
|
||||
@Desc("To calculate a seed Iris passes in it's natural seed for the current feature, then mixes it with your seed. Setting this to true ignores the parent seed and always uses your exact seed ignoring the input of Iris feature seeds. You can use this to match seeds on other generators.")
|
||||
private boolean ignoreNaturalSeedInput = false;
|
||||
|
||||
public long getSeed(long seed)
|
||||
{
|
||||
public long getSeed(long seed) {
|
||||
return (seed * 47) + getSeed() + 29334667L;
|
||||
}
|
||||
|
||||
public RNG rng(long inseed)
|
||||
{
|
||||
public RNG rng(long inseed) {
|
||||
return new RNG(getSeed(inseed));
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user