This commit is contained in:
Daniel Mills 2020-01-24 08:20:47 -05:00
parent e52f5571a7
commit 7b8b8d6b75
7 changed files with 8 additions and 95 deletions

View File

@ -1,65 +0,0 @@
package ninja.bytecode.iris;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import org.bukkit.ChatColor;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.Sound;
import org.bukkit.block.Block;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.util.Vector;
import mortar.util.text.C;
import ninja.bytecode.iris.controller.WandController;
import ninja.bytecode.iris.generator.genobject.GenObject;
import ninja.bytecode.iris.util.Cuboid;
import ninja.bytecode.iris.util.Cuboid.CuboidDirection;
import ninja.bytecode.iris.util.Direction;
import ninja.bytecode.shuriken.format.Form;
public class CommandIshOld implements CommandExecutor
{
public void msg(CommandSender s, String msg)
{
s.sendMessage(ChatColor.DARK_PURPLE + "[" + ChatColor.GRAY + "Iris" + ChatColor.DARK_PURPLE + "]" + ChatColor.GRAY + ": " + msg);
}
@SuppressWarnings("deprecation")
@Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args)
{
if(args.length == 0)
{
msg(sender, "/ish wand - Get an Iris Wand");
msg(sender, "/ish save <name> - Save Schematic");
msg(sender, "/ish load <name> [cursor] - Paste Schematic");
msg(sender, "/ish expand <amount> - Expand Cuboid in direction");
msg(sender, "/ish shift <amount> - Shift Cuboid in direction");
msg(sender, "/ish shrinkwrap - Shrink to blocks");
msg(sender, "/ish xup - Shift up, Expand up, Contract in.");
msg(sender, "/ish xvert - Expand up, Expand down, Contract in.");
msg(sender, "/ish id - What id am i looking at");
}
if(args.length > 0)
{
if(sender instanceof Player)
{
Player p = (Player) sender;
if(args[0].equalsIgnoreCase("xvert"))
{
}
}
}
return false;
}
}

View File

@ -13,7 +13,6 @@ public class Settings
{
public PerformanceMode performanceMode = PerformanceMode.HALF_CPU;
public ObjectMode objectMode = ObjectMode.PARALLAX;
public boolean fastMode = false;
public int threadPriority = Thread.MAX_PRIORITY;
public int threadCount = 4;
public boolean debugMode = true;
@ -25,8 +24,8 @@ public class Settings
public static class GeneratorSettings
{
public InterpolationMode interpolationMode = InterpolationMode.BICUBIC;
public int interpolationRadius = 4;
public InterpolationMode interpolationMode = InterpolationMode.BILINEAR;
public int interpolationRadius = 6;
public double objectDensity = 1D;
public double horizontalZoom = 2;
public double heightFracture = 155;

View File

@ -51,7 +51,7 @@ public class CommandObjectSave extends MortarCommand
{
FileOutputStream fos = new FileOutputStream(f);
s.write(fos, true);
p.sendMessage("Saved " + args[1] + " (" + Form.f(s.getSchematic().size()) + " Entries)");
p.sendMessage("Saved " + args[0] + " (" + Form.f(s.getSchematic().size()) + " Entries)");
p.playSound(p.getLocation(), Sound.BLOCK_ENCHANTMENT_TABLE_USE, 1f, 0.45f);
}

View File

@ -25,7 +25,7 @@ public class CommandReloadChunks extends MortarCommand
}
sender.sendMessage("Resending Chunks in your view distance.");
Player p = ((Player) sender);
Player p = sender.player();
for(Chunk i : p.getWorld().getLoadedChunks())
{

View File

@ -224,7 +224,7 @@ public class IrisGenerator extends ParallaxWorldGenerator
public double getANoise(int x, int z, ChunkPlan plan, IrisBiome biome)
{
double hv = !Iris.settings.performance.fastMode ? getInterpolation(x, z, plan) : getBiomedHeight((int) Math.round(x), (int) Math.round(z), plan);
double hv = getInterpolation(x, z, plan);
hv += glLNoise.generateLayer(hv * Iris.settings.gen.roughness * 215, (double) x * Iris.settings.gen.roughness * 0.82, (double) z * Iris.settings.gen.roughness * 0.82) * (1.6918 * (hv * 2.35));
if(biome.hasCliffs())

View File

@ -5,7 +5,6 @@ import java.lang.reflect.Field;
import sun.misc.Unsafe;
@SuppressWarnings("restriction")
public class AtomicCharArray implements Serializable
{
private static final long serialVersionUID = 2862133569453604235L;

View File

@ -6,7 +6,6 @@ import org.bukkit.Bukkit;
import org.bukkit.Chunk;
import org.bukkit.World;
import org.bukkit.block.Biome;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.world.ChunkLoadEvent;
@ -66,28 +65,9 @@ public abstract class ParallaxWorldGenerator extends ParallelChunkGenerator impl
@EventHandler
public void on(ChunkLoadEvent e)
{
if(!saving)
{
return;
}
if(Iris.settings.performance.objectMode.equals(ObjectMode.PARALLAX) && !Iris.settings.performance.fastMode && e.getWorld().equals(world))
if(Iris.settings.performance.objectMode.equals(ObjectMode.PARALLAX) && e.getWorld().equals(world))
{
NMP.host.relight(e.getChunk());
Bukkit.getScheduler().scheduleSyncDelayedTask(Iris.instance, () -> fix.add(e.getChunk()), 20);
if(cl.flip())
{
for(Chunk i : fix)
{
for(Player f : e.getWorld().getPlayers())
{
NMP.CHUNK.refreshIgnorePosition(f, i);
}
}
fix.clear();
}
}
}
@ -143,11 +123,11 @@ public abstract class ParallaxWorldGenerator extends ParallelChunkGenerator impl
TaskGroup g = startWork();
if(Iris.settings.performance.objectMode.equals(ObjectMode.PARALLAX))
{
for(int ii = Iris.settings.performance.fastMode ? -1 : -(getParallaxSize().getX() / 2) - 1; ii < (Iris.settings.performance.fastMode ? 1 : ((getParallaxSize().getX() / 2) + 1)); ii++)
for(int ii = -(getParallaxSize().getX() / 2) - 1; ii < (((getParallaxSize().getX() / 2) + 1)); ii++)
{
int i = ii;
for(int jj = Iris.settings.performance.fastMode ? -1 : -(getParallaxSize().getZ() / 2) - 1; jj < (Iris.settings.performance.fastMode ? 1 : ((getParallaxSize().getZ() / 2) + 1)); jj++)
for(int jj = -(getParallaxSize().getZ() / 2) - 1; jj < (((getParallaxSize().getZ() / 2) + 1)); jj++)
{
int j = jj;
int cx = x + i;