RuneHive-Game
Loading...
Searching...
No Matches
com.runehive.net.packet.out.SendConstruction Class Reference
Inheritance diagram for com.runehive.net.packet.out.SendConstruction:
Collaboration diagram for com.runehive.net.packet.out.SendConstruction:

Public Member Functions

boolean encode (Player player)
 SendConstruction ()
Public Member Functions inherited from com.runehive.net.packet.OutgoingPacket
void execute (Player player)
 OutgoingPacket (int opcode, int capacity)
 OutgoingPacket (int opcode, PacketType type)
 OutgoingPacket (int opcode, PacketType type, int size)

Additional Inherited Members

Protected Attributes inherited from com.runehive.net.packet.OutgoingPacket
final PacketBuilder builder

Detailed Description

Definition at line 6 of file SendConstruction.java.

Constructor & Destructor Documentation

◆ SendConstruction()

com.runehive.net.packet.out.SendConstruction.SendConstruction ( )

Definition at line 8 of file SendConstruction.java.

8 {
9 super(241, -1);
10 //super(241);
11 }

Member Function Documentation

◆ encode()

boolean com.runehive.net.packet.out.SendConstruction.encode ( Player player)

Reimplemented from com.runehive.net.packet.OutgoingPacket.

Definition at line 14 of file SendConstruction.java.

14 {
15// if (player.getHouse() == null) {
16// System.out.println("House is null");
17// return;
18// }
19//
20// player.setLastLocation(player.getPosition().copy());
21// builder.writeShort(player.getPosition().getChunkY() + 6, ByteModification.ADDITION);
22// builder.initializeAccess(AccessType.BIT);
23//
24// for (int z = 0; z < 4; z++) {
25// for (int x = 0; x < 13; x++) {
26// for (int y = 0; y < 13; y++) {
27// Room room = player.getHouse().rooms[x][y][z];
28// builder.writeBits(1, room != null ? 1 : 0);
29//
30// if (room == null) {
31// continue;
32// }
33//
34// builder.writeBits(26, room.getX() / 8 << 14 | room.getY() / 8 << 3 | 0 % 4 << 24 | room.getRotation() % 4 << 1);
35// }
36// }
37// }
38//
39// builder.initializeAccess(AccessType.BYTE);
40// builder.writeShort(player.getPosition().getChunkX() + 6);
41// player.getSession().ifPresent(s -> s.queue(builder));
42 return false;
43 }

The documentation for this class was generated from the following file: