RuneHive-Game
Loading...
Searching...
No Matches
SendHintArrow.java
Go to the documentation of this file.
1package com.runehive.net.packet.out;
2
3import com.runehive.game.world.entity.mob.Mob;
4import com.runehive.game.world.entity.mob.player.Player;
5import com.runehive.game.world.position.Position;
6import com.runehive.net.packet.OutgoingPacket;
7
8public class SendHintArrow extends OutgoingPacket {
9
10 private final Position position;
11 private final int type;
12
13 public SendHintArrow(int type) {
14 super(254, 6);
15 this.position = new Position(0, 0, 0);
16 this.type = type;
17 }
18
20 super(254, 6);
21 this.position = position;
22 this.type = 2;
23 }
24
26 super(254, 6);
27 this.position = position;
28 this.type = type;
29 }
30
31 @Override
32 protected boolean encode(Player player) {
33 builder.writeByte(type)
34 .writeShort(position.getX())
35 .writeShort(position.getY())
36 .writeByte(position.getHeight());
37
38 return true;
39 }
40}
This class represents a character controlled by a player.
Definition Player.java:125
Represents a single tile on the game world.
Definition Position.java:14
OutgoingPacket(int opcode, int capacity)
SendHintArrow(Position position, int type)