mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2025-07-04 00:45:57 +00:00
cleanup
This commit is contained in:
parent
7f8749239f
commit
c8c9247dfe
@ -3,6 +3,7 @@ package com.dfsek.terra.api.structures.parser.exceptions;
|
|||||||
import com.dfsek.terra.api.structures.tokenizer.Position;
|
import com.dfsek.terra.api.structures.tokenizer.Position;
|
||||||
|
|
||||||
public class ParseException extends Exception {
|
public class ParseException extends Exception {
|
||||||
|
private static final long serialVersionUID = 6744390543046766386L;
|
||||||
private final Position position;
|
private final Position position;
|
||||||
|
|
||||||
public ParseException(String message, Position position) {
|
public ParseException(String message, Position position) {
|
||||||
|
@ -4,6 +4,8 @@ import com.dfsek.terra.api.structures.tokenizer.Position;
|
|||||||
|
|
||||||
public class EOFException extends TokenizerException {
|
public class EOFException extends TokenizerException {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 3980047409902809440L;
|
||||||
|
|
||||||
public EOFException(String message, Position position) {
|
public EOFException(String message, Position position) {
|
||||||
super(message, position);
|
super(message, position);
|
||||||
}
|
}
|
||||||
|
@ -4,6 +4,8 @@ import com.dfsek.terra.api.structures.tokenizer.Position;
|
|||||||
|
|
||||||
public class FormatException extends TokenizerException {
|
public class FormatException extends TokenizerException {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = -791308012940744455L;
|
||||||
|
|
||||||
public FormatException(String message, Position position) {
|
public FormatException(String message, Position position) {
|
||||||
super(message, position);
|
super(message, position);
|
||||||
}
|
}
|
||||||
|
@ -5,6 +5,8 @@ import com.dfsek.terra.api.structures.tokenizer.Position;
|
|||||||
|
|
||||||
public abstract class TokenizerException extends ParseException {
|
public abstract class TokenizerException extends ParseException {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 2792384010083575420L;
|
||||||
|
|
||||||
public TokenizerException(String message, Position position) {
|
public TokenizerException(String message, Position position) {
|
||||||
super(message, position);
|
super(message, position);
|
||||||
}
|
}
|
||||||
|
@ -5,6 +5,7 @@ import com.dfsek.terra.api.util.GlueList;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class AttemptsFailedException extends RuntimeException {
|
public class AttemptsFailedException extends RuntimeException {
|
||||||
|
private static final long serialVersionUID = -1160459550006067137L;
|
||||||
private final List<Throwable> causes;
|
private final List<Throwable> causes;
|
||||||
|
|
||||||
public AttemptsFailedException(String message, List<Throwable> causes) {
|
public AttemptsFailedException(String message, List<Throwable> causes) {
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
package com.dfsek.terra.api.transform;
|
package com.dfsek.terra.api.transform;
|
||||||
|
|
||||||
public class TransformException extends Exception {
|
public class TransformException extends Exception {
|
||||||
|
private static final long serialVersionUID = -6661338369581162084L;
|
||||||
|
|
||||||
public TransformException() {
|
public TransformException() {
|
||||||
super();
|
super();
|
||||||
}
|
}
|
||||||
|
@ -58,7 +58,7 @@ public class Transformer<F, T> {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public final Transformer<F, T> build() {
|
public Transformer<F, T> build() {
|
||||||
return new Transformer<>(transforms);
|
return new Transformer<>(transforms);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -8,6 +8,7 @@ import java.util.SplittableRandom;
|
|||||||
|
|
||||||
public class FastRandom extends Random {
|
public class FastRandom extends Random {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 4571946470190183260L;
|
||||||
private XoRoShiRo128PlusPlus random;
|
private XoRoShiRo128PlusPlus random;
|
||||||
|
|
||||||
public FastRandom() {
|
public FastRandom() {
|
||||||
|
@ -15,6 +15,8 @@
|
|||||||
*/
|
*/
|
||||||
package com.dfsek.terra.api.util;
|
package com.dfsek.terra.api.util;
|
||||||
|
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.ObjectInputStream;
|
import java.io.ObjectInputStream;
|
||||||
import java.io.ObjectOutputStream;
|
import java.io.ObjectOutputStream;
|
||||||
@ -76,14 +78,16 @@ import static net.jafama.FastMath.*;
|
|||||||
* @see ArrayList
|
* @see ArrayList
|
||||||
* @param <T> the type of elements held in this collection
|
* @param <T> the type of elements held in this collection
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings({"ManualMinMaxCalculation", "ConstantConditions", "ManualArrayToCollectionCopy"})
|
||||||
public class GlueList<T> extends AbstractList<T> implements List<T>, Cloneable, Serializable {
|
public class GlueList<T> extends AbstractList<T> implements List<T>, Cloneable, Serializable {
|
||||||
|
|
||||||
transient Node<T> first;
|
private static final long serialVersionUID = -4339173882660322249L;
|
||||||
transient Node<T> last;
|
private transient Node<T> first;
|
||||||
|
private transient Node<T> last;
|
||||||
|
|
||||||
int size;
|
private int size;
|
||||||
|
|
||||||
int initialCapacity;
|
private int initialCapacity;
|
||||||
|
|
||||||
private static final int DEFAULT_CAPACITY = 10;
|
private static final int DEFAULT_CAPACITY = 10;
|
||||||
|
|
||||||
@ -236,7 +240,7 @@ public class GlueList<T> extends AbstractList<T> implements List<T>, Cloneable,
|
|||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
@Override
|
@Override
|
||||||
public boolean addAll(Collection<? extends T> c) {
|
public boolean addAll(@NotNull Collection<? extends T> c) {
|
||||||
|
|
||||||
Objects.requireNonNull(c);
|
Objects.requireNonNull(c);
|
||||||
|
|
||||||
@ -426,7 +430,6 @@ public class GlueList<T> extends AbstractList<T> implements List<T>, Cloneable,
|
|||||||
return indexOf(o) != -1;
|
return indexOf(o) != -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
|
||||||
@Override
|
@Override
|
||||||
public T remove(int index) {
|
public T remove(int index) {
|
||||||
|
|
||||||
@ -499,7 +502,7 @@ public class GlueList<T> extends AbstractList<T> implements List<T>, Cloneable,
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean removeAll(Collection<?> c) {
|
public boolean removeAll(@NotNull Collection<?> c) {
|
||||||
|
|
||||||
Objects.requireNonNull(c);
|
Objects.requireNonNull(c);
|
||||||
|
|
||||||
@ -518,7 +521,7 @@ public class GlueList<T> extends AbstractList<T> implements List<T>, Cloneable,
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean retainAll(Collection<?> c) {
|
public boolean retainAll(@NotNull Collection<?> c) {
|
||||||
|
|
||||||
Objects.requireNonNull(c);
|
Objects.requireNonNull(c);
|
||||||
|
|
||||||
@ -663,7 +666,7 @@ public class GlueList<T> extends AbstractList<T> implements List<T>, Cloneable,
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<T> subList(int fromIndex, int toIndex) {
|
public @NotNull List<T> subList(int fromIndex, int toIndex) {
|
||||||
return super.subList(fromIndex, toIndex);
|
return super.subList(fromIndex, toIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -689,8 +692,8 @@ public class GlueList<T> extends AbstractList<T> implements List<T>, Cloneable,
|
|||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
@Override
|
@Override
|
||||||
public <T> T[] toArray(T[] a) {
|
public <E> E[] toArray(E[] a) {
|
||||||
return (T[]) Arrays.copyOf(toArray(), size, a.getClass());
|
return (E[]) Arrays.copyOf(toArray(), size, a.getClass());
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isEmpty() {
|
public boolean isEmpty() {
|
||||||
@ -698,7 +701,7 @@ public class GlueList<T> extends AbstractList<T> implements List<T>, Cloneable,
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Iterator<T> iterator() {
|
public @NotNull Iterator<T> iterator() {
|
||||||
return new Itr();
|
return new Itr();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -736,7 +739,7 @@ public class GlueList<T> extends AbstractList<T> implements List<T>, Cloneable,
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ListIterator<T> listIterator(int index) {
|
public @NotNull ListIterator<T> listIterator(int index) {
|
||||||
|
|
||||||
checkPositionIndex(index);
|
checkPositionIndex(index);
|
||||||
|
|
||||||
@ -751,89 +754,65 @@ public class GlueList<T> extends AbstractList<T> implements List<T>, Cloneable,
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ListIterator<T> listIterator() {
|
public @NotNull ListIterator<T> listIterator() {
|
||||||
return new ListItr(0);
|
return new ListItr(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
private class Itr implements Iterator<T> {
|
protected static class Node<T> {
|
||||||
|
|
||||||
Node<T> node = first;
|
protected Node<T> pre;
|
||||||
|
protected Node<T> next;
|
||||||
|
|
||||||
int i = 0;//inner-array index
|
protected int listSize;
|
||||||
int j = 0;//total index -> cursor
|
|
||||||
|
|
||||||
int lastReturn = -1;
|
protected int startingIndex;
|
||||||
|
protected int endingIndex;
|
||||||
|
|
||||||
int expectedModCount = modCount;
|
protected T[] elementData;
|
||||||
int elementDataPointer = node.elementDataPointer;
|
protected int elementDataPointer;
|
||||||
|
|
||||||
@Override
|
@SuppressWarnings("unchecked")
|
||||||
public boolean hasNext() {
|
Node(Node<T> pre, Node<T> next, int listSize) {
|
||||||
return j != size;
|
this.pre = pre;
|
||||||
|
this.next = next;
|
||||||
|
this.listSize = listSize;
|
||||||
|
this.elementData = (T[]) new Object[listSize >>> 1];
|
||||||
|
this.startingIndex = listSize;
|
||||||
|
this.endingIndex = listSize + elementData.length - 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
Node(Node<T> pre, Node<T> next, int listSize, int initialCapacity) {
|
||||||
|
this.pre = pre;
|
||||||
|
this.next = next;
|
||||||
|
this.listSize = listSize;
|
||||||
|
this.elementData = createElementData(initialCapacity);
|
||||||
|
this.startingIndex = listSize;
|
||||||
|
this.endingIndex = listSize + elementData.length - 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
|
T[] createElementData(int capacity) {
|
||||||
|
|
||||||
|
if(capacity == 0 || capacity == 1) {
|
||||||
|
return (T[]) new Object[DEFAULT_CAPACITY];
|
||||||
|
} else if(capacity > 1) {
|
||||||
|
return (T[]) new Object[capacity];
|
||||||
|
} else {
|
||||||
|
throw new IllegalArgumentException("Illegal Capacity: " + capacity);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
boolean isAddable() {
|
||||||
|
return elementDataPointer < elementData.length;
|
||||||
|
}
|
||||||
|
|
||||||
|
void add(T element) {
|
||||||
|
elementData[elementDataPointer++] = element;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public T next() {
|
public String toString() {
|
||||||
|
return String.format("[sIndex: %d - eIndex: %d | elementDataPointer: %d | elementDataLength: %d]", startingIndex, endingIndex, elementDataPointer, elementData.length);
|
||||||
checkForComodification();
|
|
||||||
|
|
||||||
if (j >= size) {
|
|
||||||
throw new NoSuchElementException();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (j >= last.endingIndex + 1) {
|
|
||||||
throw new ConcurrentModificationException();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (j == 0) {// it's for listIterator.when node becomes null.
|
|
||||||
node = first;
|
|
||||||
elementDataPointer = node.elementDataPointer;
|
|
||||||
i = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
T val = node.elementData[i++];
|
|
||||||
|
|
||||||
if (i >= elementDataPointer) {
|
|
||||||
node = node.next;
|
|
||||||
i = 0;
|
|
||||||
elementDataPointer = (node != null) ? node.elementDataPointer : 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
lastReturn = j++;
|
|
||||||
|
|
||||||
return val;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void remove() {
|
|
||||||
|
|
||||||
if (lastReturn < 0) {
|
|
||||||
throw new IllegalStateException();
|
|
||||||
}
|
|
||||||
|
|
||||||
checkForComodification();
|
|
||||||
|
|
||||||
try {
|
|
||||||
com.dfsek.terra.api.util.GlueList.this.remove(lastReturn);
|
|
||||||
|
|
||||||
j = lastReturn;
|
|
||||||
|
|
||||||
lastReturn = -1;
|
|
||||||
|
|
||||||
i = (--i < 0) ? 0 : i;
|
|
||||||
|
|
||||||
elementDataPointer = (node != null) ? node.elementDataPointer : 0;
|
|
||||||
|
|
||||||
expectedModCount = modCount;
|
|
||||||
} catch (IndexOutOfBoundsException e) {
|
|
||||||
throw new ConcurrentModificationException();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void checkForComodification() {
|
|
||||||
if (modCount != expectedModCount) {
|
|
||||||
throw new ConcurrentModificationException();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -988,61 +967,85 @@ public class GlueList<T> extends AbstractList<T> implements List<T>, Cloneable,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static class Node<T> {
|
private class Itr implements Iterator<T> {
|
||||||
|
|
||||||
Node<T> pre;
|
protected Node<T> node = first;
|
||||||
Node<T> next;
|
|
||||||
|
|
||||||
int listSize;
|
protected int i = 0;//inner-array index
|
||||||
|
protected int j = 0;//total index -> cursor
|
||||||
|
|
||||||
int startingIndex;
|
protected int lastReturn = -1;
|
||||||
int endingIndex;
|
|
||||||
|
|
||||||
T[] elementData;
|
protected int expectedModCount = modCount;
|
||||||
int elementDataPointer;
|
protected int elementDataPointer = node.elementDataPointer;
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@Override
|
||||||
Node(Node<T> pre, Node<T> next, int listSize) {
|
public boolean hasNext() {
|
||||||
this.pre = pre;
|
return j != size;
|
||||||
this.next = next;
|
|
||||||
this.listSize = listSize;
|
|
||||||
this.elementData = (T[]) new Object[listSize >>> 1];
|
|
||||||
this.startingIndex = listSize;
|
|
||||||
this.endingIndex = listSize + elementData.length - 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
Node(Node<T> pre, Node<T> next, int listSize, int initialCapacity) {
|
|
||||||
this.pre = pre;
|
|
||||||
this.next = next;
|
|
||||||
this.listSize = listSize;
|
|
||||||
this.elementData = createElementData(initialCapacity);
|
|
||||||
this.startingIndex = listSize;
|
|
||||||
this.endingIndex = listSize + elementData.length - 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
|
||||||
T[] createElementData(int capacity) {
|
|
||||||
|
|
||||||
if (capacity == 0 || capacity == 1) {
|
|
||||||
return (T[]) new Object[DEFAULT_CAPACITY];
|
|
||||||
} else if (capacity > 1) {
|
|
||||||
return (T[]) new Object[capacity];
|
|
||||||
} else {
|
|
||||||
throw new IllegalArgumentException("Illegal Capacity: " + capacity);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
boolean isAddable() {
|
|
||||||
return elementDataPointer < elementData.length;
|
|
||||||
}
|
|
||||||
|
|
||||||
void add(T element) {
|
|
||||||
elementData[elementDataPointer++] = element;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public T next() {
|
||||||
return String.format("[sIndex: %d - eIndex: %d | elementDataPointer: %d | elementDataLength: %d]", startingIndex, endingIndex, elementDataPointer, elementData.length);
|
|
||||||
|
checkForComodification();
|
||||||
|
|
||||||
|
if(j >= size) {
|
||||||
|
throw new NoSuchElementException();
|
||||||
|
}
|
||||||
|
|
||||||
|
if(j >= last.endingIndex + 1) {
|
||||||
|
throw new ConcurrentModificationException();
|
||||||
|
}
|
||||||
|
|
||||||
|
if(j == 0) {// it's for listIterator.when node becomes null.
|
||||||
|
node = first;
|
||||||
|
elementDataPointer = node.elementDataPointer;
|
||||||
|
i = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
T val = node.elementData[i++];
|
||||||
|
|
||||||
|
if(i >= elementDataPointer) {
|
||||||
|
node = node.next;
|
||||||
|
i = 0;
|
||||||
|
elementDataPointer = (node != null) ? node.elementDataPointer : 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
lastReturn = j++;
|
||||||
|
|
||||||
|
return val;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void remove() {
|
||||||
|
|
||||||
|
if(lastReturn < 0) {
|
||||||
|
throw new IllegalStateException();
|
||||||
|
}
|
||||||
|
|
||||||
|
checkForComodification();
|
||||||
|
|
||||||
|
try {
|
||||||
|
com.dfsek.terra.api.util.GlueList.this.remove(lastReturn);
|
||||||
|
|
||||||
|
j = lastReturn;
|
||||||
|
|
||||||
|
lastReturn = -1;
|
||||||
|
|
||||||
|
i = (--i < 0) ? 0 : i;
|
||||||
|
|
||||||
|
elementDataPointer = (node != null) ? node.elementDataPointer : 0;
|
||||||
|
|
||||||
|
expectedModCount = modCount;
|
||||||
|
} catch(IndexOutOfBoundsException e) {
|
||||||
|
throw new ConcurrentModificationException();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void checkForComodification() {
|
||||||
|
if(modCount != expectedModCount) {
|
||||||
|
throw new ConcurrentModificationException();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,6 +1,8 @@
|
|||||||
package com.dfsek.terra.api.util.mutable;
|
package com.dfsek.terra.api.util.mutable;
|
||||||
|
|
||||||
public class MutableDouble extends MutableNumber<Double> {
|
public class MutableDouble extends MutableNumber<Double> {
|
||||||
|
private static final long serialVersionUID = -2218110876763640053L;
|
||||||
|
|
||||||
public MutableDouble(Double value) {
|
public MutableDouble(Double value) {
|
||||||
super(value);
|
super(value);
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
package com.dfsek.terra.api.util.mutable;
|
package com.dfsek.terra.api.util.mutable;
|
||||||
|
|
||||||
public class MutableInteger extends MutableNumber<Integer> {
|
public class MutableInteger extends MutableNumber<Integer> {
|
||||||
|
private static final long serialVersionUID = -4427935901819632745L;
|
||||||
|
|
||||||
public MutableInteger(Integer value) {
|
public MutableInteger(Integer value) {
|
||||||
super(value);
|
super(value);
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
package com.dfsek.terra.api.util.mutable;
|
package com.dfsek.terra.api.util.mutable;
|
||||||
|
|
||||||
public abstract class MutableNumber<T extends Number> extends Number implements MutablePrimitive<T> {
|
public abstract class MutableNumber<T extends Number> extends Number implements MutablePrimitive<T> {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 8619508342781664393L;
|
||||||
protected T value;
|
protected T value;
|
||||||
|
|
||||||
public MutableNumber(T value) {
|
public MutableNumber(T value) {
|
||||||
|
@ -9,6 +9,7 @@ import java.lang.reflect.Type;
|
|||||||
import java.util.LinkedHashMap;
|
import java.util.LinkedHashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
public class LinkedHashMapLoader implements TypeLoader<LinkedHashMap<Object, Object>> {
|
public class LinkedHashMapLoader implements TypeLoader<LinkedHashMap<Object, Object>> {
|
||||||
@Override
|
@Override
|
||||||
public LinkedHashMap<Object, Object> load(Type t, Object c, ConfigLoader loader) throws LoadException {
|
public LinkedHashMap<Object, Object> load(Type t, Object c, ConfigLoader loader) throws LoadException {
|
||||||
|
@ -7,6 +7,7 @@ import com.dfsek.terra.api.math.noise.samplers.noise.CellularSampler;
|
|||||||
import com.dfsek.terra.api.math.noise.samplers.noise.simplex.OpenSimplex2Sampler;
|
import com.dfsek.terra.api.math.noise.samplers.noise.simplex.OpenSimplex2Sampler;
|
||||||
import com.dfsek.terra.api.util.seeded.NoiseSeeded;
|
import com.dfsek.terra.api.util.seeded.NoiseSeeded;
|
||||||
|
|
||||||
|
@SuppressWarnings("FieldMayBeFinal")
|
||||||
public class CellularNoiseTemplate extends NoiseTemplate<CellularSampler> {
|
public class CellularNoiseTemplate extends NoiseTemplate<CellularSampler> {
|
||||||
@Value("distance")
|
@Value("distance")
|
||||||
@Default
|
@Default
|
||||||
|
@ -25,6 +25,7 @@ import java.util.Collections;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
public class BiomeLocateCommand extends WorldCommand {
|
public class BiomeLocateCommand extends WorldCommand {
|
||||||
public BiomeLocateCommand(com.dfsek.terra.bukkit.command.Command parent) {
|
public BiomeLocateCommand(com.dfsek.terra.bukkit.command.Command parent) {
|
||||||
super(parent);
|
super(parent);
|
||||||
|
@ -11,7 +11,7 @@ import java.io.ObjectStreamClass;
|
|||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.lang.reflect.Field;
|
import java.lang.reflect.Field;
|
||||||
|
|
||||||
public class SerializationUtil {
|
public final class SerializationUtil {
|
||||||
public static Object fromFile(File f) throws IOException, ClassNotFoundException {
|
public static Object fromFile(File f) throws IOException, ClassNotFoundException {
|
||||||
ObjectInputStream ois = new MovedObjectInputStream(new FileInputStream(f), "com.dfsek.terra.api.world.generation.population", "com.dfsek.terra.bukkit.population"); // Backwards compat with old Gaea location
|
ObjectInputStream ois = new MovedObjectInputStream(new FileInputStream(f), "com.dfsek.terra.api.world.generation.population", "com.dfsek.terra.bukkit.population"); // Backwards compat with old Gaea location
|
||||||
Object o = ois.readObject();
|
Object o = ois.readObject();
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
package com.dfsek.terra.bukkit.structure;
|
package com.dfsek.terra.bukkit.structure;
|
||||||
|
|
||||||
public class WorldEditNotFoundException extends RuntimeException {
|
public class WorldEditNotFoundException extends RuntimeException {
|
||||||
|
private static final long serialVersionUID = 3678822468346338227L;
|
||||||
|
|
||||||
public WorldEditNotFoundException() {
|
public WorldEditNotFoundException() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,6 +5,7 @@ import com.dfsek.terra.api.platform.world.BiomeGrid;
|
|||||||
import org.bukkit.generator.ChunkGenerator;
|
import org.bukkit.generator.ChunkGenerator;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
public class BukkitBiomeGrid implements BiomeGrid {
|
public class BukkitBiomeGrid implements BiomeGrid {
|
||||||
private final ChunkGenerator.BiomeGrid delegate;
|
private final ChunkGenerator.BiomeGrid delegate;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user