53 $result->actorRuntimeId = $actorRuntimeId;
54 $result->eventId = $eventId;
55 $result->effectId = $effectId;
56 $result->amplifier = $amplifier;
57 $result->particles = $particles;
58 $result->duration = $duration;
59 $result->tick = $tick;
60 $result->ambient = $ambient;
65 return self::create($actorRuntimeId, $replace ? self::EVENT_MODIFY : self::EVENT_ADD, $effectId, $amplifier, $particles, $duration, $tick, $ambient);
69 return self::create($actorRuntimeId, self::EVENT_REMOVE, $effectId, 0,
false, 0, $tick,
false);
73 $this->actorRuntimeId =
CommonTypes::getActorRuntimeId($in);
74 $this->eventId = Byte::readUnsigned($in);
75 $this->effectId = VarInt::readSignedInt($in);
76 $this->amplifier = VarInt::readSignedInt($in);
77 $this->particles = CommonTypes::getBool($in);
78 $this->duration = VarInt::readSignedInt($in);
79 $this->tick = VarInt::readUnsignedLong($in);
80 $this->ambient = CommonTypes::getBool($in);
84 CommonTypes::putActorRuntimeId($out, $this->actorRuntimeId);
85 Byte::writeUnsigned($out, $this->eventId);
86 VarInt::writeSignedInt($out, $this->effectId);
87 VarInt::writeSignedInt($out, $this->amplifier);
88 CommonTypes::putBool($out, $this->particles);
89 VarInt::writeSignedInt($out, $this->duration);
90 VarInt::writeUnsignedLong($out, $this->tick);
91 CommonTypes::putBool($out, $this->ambient);