RuneHive-Game
Loading...
Searching...
No Matches
SendRemoveGroundItem.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.items.ground.GroundItem;
6import com.runehive.net.packet.OutgoingPacket;
7
8public class SendRemoveGroundItem extends OutgoingPacket {
9
10 private final GroundItem groundItem;
11
13 super(156, 3);
14 this.groundItem = groundItem;
15 }
16
17 @Override
18 public boolean encode(Player player) {
19 player.send(new SendCoordinate(groundItem.getPosition()));
20 builder.writeByte(0, ByteModification.ADD)
21 .writeShort(groundItem.item.getId());
22 return true;
23 }
24
25}
This class represents a character controlled by a player.
Definition Player.java:125
Represents a single Ground item on the world map.
OutgoingPacket(int opcode, int capacity)
Represents RuneScape's custom value types.
ADD
Adds 128 to the value when written, subtracts 128 from the rarity when read.