Move to parallax views

This commit is contained in:
Daniel Mills 2020-10-27 21:19:23 -04:00
parent 56eb0b8ef1
commit d29b4e486d
10 changed files with 83 additions and 9 deletions

View File

@ -1,5 +1,6 @@
package com.volmit.iris.gen.v2.scaffold.hunk; package com.volmit.iris.gen.v2.scaffold.hunk.view;
import com.volmit.iris.gen.v2.scaffold.hunk.Hunk;
import org.bukkit.block.Biome; import org.bukkit.block.Biome;
import org.bukkit.generator.ChunkGenerator.BiomeGrid; import org.bukkit.generator.ChunkGenerator.BiomeGrid;

View File

@ -1,5 +1,6 @@
package com.volmit.iris.gen.v2.scaffold.hunk; package com.volmit.iris.gen.v2.scaffold.hunk.view;
import com.volmit.iris.gen.v2.scaffold.hunk.Hunk;
import org.bukkit.Chunk; import org.bukkit.Chunk;
import org.bukkit.block.Biome; import org.bukkit.block.Biome;

View File

@ -1,5 +1,6 @@
package com.volmit.iris.gen.v2.scaffold.hunk; package com.volmit.iris.gen.v2.scaffold.hunk.view;
import com.volmit.iris.gen.v2.scaffold.hunk.Hunk;
import org.bukkit.block.data.BlockData; import org.bukkit.block.data.BlockData;
import org.bukkit.generator.ChunkGenerator.ChunkData; import org.bukkit.generator.ChunkGenerator.ChunkData;

View File

@ -1,5 +1,6 @@
package com.volmit.iris.gen.v2.scaffold.hunk; package com.volmit.iris.gen.v2.scaffold.hunk.view;
import com.volmit.iris.gen.v2.scaffold.hunk.Hunk;
import org.bukkit.Chunk; import org.bukkit.Chunk;
import org.bukkit.block.data.BlockData; import org.bukkit.block.data.BlockData;

View File

@ -1,4 +1,6 @@
package com.volmit.iris.gen.v2.scaffold.hunk; package com.volmit.iris.gen.v2.scaffold.hunk.view;
import com.volmit.iris.gen.v2.scaffold.hunk.Hunk;
public class DriftHunkView<T> implements Hunk<T> public class DriftHunkView<T> implements Hunk<T>
{ {

View File

@ -1,4 +1,6 @@
package com.volmit.iris.gen.v2.scaffold.hunk; package com.volmit.iris.gen.v2.scaffold.hunk.view;
import com.volmit.iris.gen.v2.scaffold.hunk.Hunk;
public class InvertedHunkView<T> implements Hunk<T> public class InvertedHunkView<T> implements Hunk<T>
{ {

View File

@ -0,0 +1,60 @@
package com.volmit.iris.gen.v2.scaffold.hunk.view;
import com.volmit.iris.gen.v2.scaffold.hunk.Hunk;
public class ReadOnlyHunk<T> implements Hunk<T> {
private final Hunk<T> src;
public ReadOnlyHunk(Hunk<T> src)
{
this.src = src;
}
@Override
public void setRaw(int x, int y, int z, T t)
{
throw new IllegalStateException("This hunk is read only!");
}
@Override
public T getRaw(int x, int y, int z)
{
return src.getRaw(x, y, z);
}
@Override
public void set(int x1, int y1, int z1, int x2, int y2, int z2, T t)
{
throw new IllegalStateException("This hunk is read only!");
}
@Override
public void fill(T t)
{
throw new IllegalStateException("This hunk is read only!");
}
@Override
public int getWidth()
{
return src.getWidth();
}
@Override
public int getHeight()
{
return src.getHeight();
}
@Override
public int getDepth()
{
return src.getDepth();
}
@Override
public Hunk<T> getSource()
{
return src;
}
}

View File

@ -1,4 +1,6 @@
package com.volmit.iris.gen.v2.scaffold.hunk; package com.volmit.iris.gen.v2.scaffold.hunk.view;
import com.volmit.iris.gen.v2.scaffold.hunk.Hunk;
public class RotatedXHunkView<T> implements Hunk<T> public class RotatedXHunkView<T> implements Hunk<T>
{ {

View File

@ -1,4 +1,6 @@
package com.volmit.iris.gen.v2.scaffold.hunk; package com.volmit.iris.gen.v2.scaffold.hunk.view;
import com.volmit.iris.gen.v2.scaffold.hunk.Hunk;
public class RotatedYHunkView<T> implements Hunk<T> public class RotatedYHunkView<T> implements Hunk<T>
{ {

View File

@ -1,4 +1,6 @@
package com.volmit.iris.gen.v2.scaffold.hunk; package com.volmit.iris.gen.v2.scaffold.hunk.view;
import com.volmit.iris.gen.v2.scaffold.hunk.Hunk;
public class RotatedZHunkView<T> implements Hunk<T> public class RotatedZHunkView<T> implements Hunk<T>
{ {