Archiviert
13
0

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

Dieser Commit ist enthalten in:
Kristian S. Stangeland 2013-01-07 20:24:15 +01:00
Ursprung 8abb93114f
Commit 6b3d85af62
4 geänderte Dateien mit 9 neuen und 9 gelöschten Zeilen

Datei anzeigen

@ -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();
} }

Datei anzeigen

@ -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();
} }
/** /**

Datei anzeigen

@ -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();

Datei anzeigen

@ -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) {