RuneHive-Game
Loading...
Searching...
No Matches
SendRemoveObject.java
Go to the documentation of this file.
1package com.runehive.net.packet.out;
2
3import com.runehive.net.codec.ByteModification;
4import com.runehive.game.world.entity.mob.player.Player;
5import com.runehive.game.world.object.GameObject;
6import com.runehive.net.packet.OutgoingPacket;
7
8public class SendRemoveObject extends OutgoingPacket {
9
10 private final GameObject object;
11
13 super(101, 2);
14 this.object = object;
15 }
16
17 @Override
18 public boolean encode(Player player) {
19 player.send(new SendCoordinate(object.getPosition()));
20 builder.writeByte(object.getObjectType().getId() << 2 | (object.getDirection().getId() & 3), ByteModification.NEG)
21 .writeByte(0);
22 return true;
23 }
24}
This class represents a character controlled by a player.
Definition Player.java:125
OutgoingPacket(int opcode, int capacity)
Represents RuneScape's custom value types.