Change "clone" to "deepClone", in line with PacketContainer.

This commit is contained in:
Kristian S. Stangeland 2013-01-07 20:24:15 +01:00
parent 8abb93114f
commit 6b3d85af62
4 changed files with 9 additions and 9 deletions

View File

@ -48,5 +48,5 @@ public interface NbtBase<TType> {
* Clone the current NBT tag.
* @return The cloned tag.
*/
public abstract NbtBase<TType> clone();
public abstract NbtBase<TType> deepClone();
}

View File

@ -141,8 +141,8 @@ public class NbtCompound implements NbtWrapper<Map<String, NbtBase<?>>>, Iterabl
}
@SuppressWarnings({"unchecked", "rawtypes"})
public NbtBase<Map<String, NbtBase<?>>> clone() {
return (NbtBase) container.clone();
public NbtBase<Map<String, NbtBase<?>>> deepClone() {
return (NbtBase) container.deepClone();
}
/**

View File

@ -19,13 +19,13 @@ import com.google.common.base.Objects;
*/
public class NbtElement<TType> implements NbtWrapper<TType> {
// Structure modifier for the base class
private static StructureModifier<Object> baseModifier;
private static volatile StructureModifier<Object> baseModifier;
// For retrieving the current type ID
private static Method methodGetTypeID;
private static volatile Method methodGetTypeID;
// For cloning handles
private static Method methodClone;
private static volatile Method methodClone;
// Structure modifiers for the different NBT elements
private static StructureModifier<?>[] modifiers = new StructureModifier<?>[NbtType.values().length];
@ -154,7 +154,7 @@ public class NbtElement<TType> implements NbtWrapper<TType> {
}
@Override
public NbtBase<TType> clone() {
public NbtBase<TType> deepClone() {
if (methodClone == null) {
Class<?> base = MinecraftReflection.getNBTBaseClass();

View File

@ -176,8 +176,8 @@ public class NbtList<TType> implements NbtWrapper<List<NbtBase<TType>>>, Iterabl
}
@SuppressWarnings({"unchecked", "rawtypes"})
public NbtBase<List<NbtBase<TType>>> clone() {
return (NbtBase) container.clone();
public NbtBase<List<NbtBase<TType>>> deepClone() {
return (NbtBase) container.deepClone();
}
public void add(NbtBase<TType> element) {