mirror of
https://github.com/dmulloy2/ProtocolLib.git
synced 2024-11-01 00:11:39 +01:00
Change "clone" to "deepClone", in line with PacketContainer.
This commit is contained in:
parent
8abb93114f
commit
6b3d85af62
@ -48,5 +48,5 @@ public interface NbtBase<TType> {
|
|||||||
* Clone the current NBT tag.
|
* Clone the current NBT tag.
|
||||||
* @return The cloned tag.
|
* @return The cloned tag.
|
||||||
*/
|
*/
|
||||||
public abstract NbtBase<TType> clone();
|
public abstract NbtBase<TType> deepClone();
|
||||||
}
|
}
|
@ -141,8 +141,8 @@ public class NbtCompound implements NbtWrapper<Map<String, NbtBase<?>>>, Iterabl
|
|||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings({"unchecked", "rawtypes"})
|
@SuppressWarnings({"unchecked", "rawtypes"})
|
||||||
public NbtBase<Map<String, NbtBase<?>>> clone() {
|
public NbtBase<Map<String, NbtBase<?>>> deepClone() {
|
||||||
return (NbtBase) container.clone();
|
return (NbtBase) container.deepClone();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -19,13 +19,13 @@ import com.google.common.base.Objects;
|
|||||||
*/
|
*/
|
||||||
public class NbtElement<TType> implements NbtWrapper<TType> {
|
public class NbtElement<TType> implements NbtWrapper<TType> {
|
||||||
// Structure modifier for the base class
|
// Structure modifier for the base class
|
||||||
private static StructureModifier<Object> baseModifier;
|
private static volatile StructureModifier<Object> baseModifier;
|
||||||
|
|
||||||
// For retrieving the current type ID
|
// For retrieving the current type ID
|
||||||
private static Method methodGetTypeID;
|
private static volatile Method methodGetTypeID;
|
||||||
|
|
||||||
// For cloning handles
|
// For cloning handles
|
||||||
private static Method methodClone;
|
private static volatile Method methodClone;
|
||||||
|
|
||||||
// Structure modifiers for the different NBT elements
|
// Structure modifiers for the different NBT elements
|
||||||
private static StructureModifier<?>[] modifiers = new StructureModifier<?>[NbtType.values().length];
|
private static StructureModifier<?>[] modifiers = new StructureModifier<?>[NbtType.values().length];
|
||||||
@ -154,7 +154,7 @@ public class NbtElement<TType> implements NbtWrapper<TType> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public NbtBase<TType> clone() {
|
public NbtBase<TType> deepClone() {
|
||||||
if (methodClone == null) {
|
if (methodClone == null) {
|
||||||
Class<?> base = MinecraftReflection.getNBTBaseClass();
|
Class<?> base = MinecraftReflection.getNBTBaseClass();
|
||||||
|
|
||||||
|
@ -176,8 +176,8 @@ public class NbtList<TType> implements NbtWrapper<List<NbtBase<TType>>>, Iterabl
|
|||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings({"unchecked", "rawtypes"})
|
@SuppressWarnings({"unchecked", "rawtypes"})
|
||||||
public NbtBase<List<NbtBase<TType>>> clone() {
|
public NbtBase<List<NbtBase<TType>>> deepClone() {
|
||||||
return (NbtBase) container.clone();
|
return (NbtBase) container.deepClone();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void add(NbtBase<TType> element) {
|
public void add(NbtBase<TType> element) {
|
||||||
|
Loading…
Reference in New Issue
Block a user