Archiviert
13
0

FIXED: DataWatcher can now clone ItemStacks and ChunkPositions.

Due to a oversight, we retrieved the "wrapped" value in the get cloned
helper method. This caused it to not clone the chunk position and item
stack.
Dieser Commit ist enthalten in:
Kristian S. Stangeland 2013-01-13 15:22:55 +01:00
Ursprung 637d6cda18
Commit 651581d677

Datei anzeigen

@ -218,6 +218,14 @@ public class WrappedWatchableObject {
modifier.withType(Object.class).write(0, getUnwrapped(newValue));
}
/**
* Read the underlying value field.
* @return The underlying value.
*/
private Object getNMSValue() {
return modifier.withType(Object.class).read(0);
}
/**
* Read the value field.
* @return The watched value.
@ -324,7 +332,7 @@ public class WrappedWatchableObject {
// Helper
Object getClonedValue() throws FieldAccessException {
Object value = getValue();
Object value = getNMSValue();
// Only a limited set of references types are supported
if (MinecraftReflection.isChunkPosition(value)) {