Removed useless confusing array indices in CompoundTag constructors (#1116)

This commit is contained in:
Dylan K. Taylor
2017-06-20 12:11:24 +01:00
committed by GitHub
parent e11f1e94e9
commit a4b8dd43e6
14 changed files with 111 additions and 112 deletions

View File

@ -1513,24 +1513,23 @@ class Level implements ChunkManager, Metadatable{
if($item->getId() > 0 and $item->getCount() > 0){
$itemEntity = Entity::createEntity("Item", $this, new CompoundTag("", [
"Pos" => new ListTag("Pos", [
new ListTag("Pos", [
new DoubleTag("", $source->getX()),
new DoubleTag("", $source->getY()),
new DoubleTag("", $source->getZ())
]),
"Motion" => new ListTag("Motion", [
new ListTag("Motion", [
new DoubleTag("", $motion->x),
new DoubleTag("", $motion->y),
new DoubleTag("", $motion->z)
]),
"Rotation" => new ListTag("Rotation", [
new ListTag("Rotation", [
new FloatTag("", lcg_value() * 360),
new FloatTag("", 0)
]),
"Health" => new ShortTag("Health", 5),
"Item" => $itemTag,
"PickupDelay" => new ShortTag("PickupDelay", $delay)
new ShortTag("Health", 5),
$itemTag,
new ShortTag("PickupDelay", $delay)
]));
$itemEntity->spawnToAll();