RuneHive-Game
Loading...
Searching...
No Matches
SendConstruction.java
Go to the documentation of this file.
1package com.runehive.net.packet.out;
2
3import com.runehive.game.world.entity.mob.player.Player;
4import com.runehive.net.packet.OutgoingPacket;
5
6public class SendConstruction extends OutgoingPacket {
7
8 public SendConstruction() {
9 super(241, -1);
10 //super(241);
11 }
12
13 @Override
14 public boolean encode(Player player) {
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 }
44
45}
This class represents a character controlled by a player.
Definition Player.java:125
OutgoingPacket(int opcode, int capacity)