Allow direct property naming on NBT TAG_Compound

This commit is contained in:
Shoghi Cervantes 2014-02-26 17:55:17 +01:00
parent 3864630bcd
commit b374783486

View File

@ -31,7 +31,11 @@ class NBTTag_Compound extends NamedNBTTag{
public function __set($name, $value){ public function __set($name, $value){
if(isset($this->value[$name])){ if(isset($this->value[$name])){
$this->value[$name]->setValue($value); if($value instanceof NamedNBTTag and $value->getName() !== "" and $value->getName() !== false){
$this->value[$value->getName()]->setValue($value);
}else{
$this->value[$name]->setValue($value);
}
} }
} }