RuneHive-Tarnish
Neural OSRS Enhancement Framework
Loading...
Searching...
No Matches
SendConstruction.java
1package com.osroyale.net.packet.out;
2
3import com.osroyale.game.world.entity.mob.player.Player;
4import com.osroyale.net.packet.OutgoingPacket;
5
23
24public class SendConstruction extends OutgoingPacket {
25
26 public SendConstruction() {
27 super(241, -1);
28 //super(241);
29 }
30
31 @Override
32 public boolean encode(Player player) {
33// if (player.getHouse() == null) {
34// System.out.println("House is null");
35// return;
36// }
37//
38// player.setLastLocation(player.getPosition().copy());
39// builder.writeShort(player.getPosition().getChunkY() + 6, ByteModification.ADDITION);
40// builder.initializeAccess(AccessType.BIT);
41//
42// for (int z = 0; z < 4; z++) {
43// for (int x = 0; x < 13; x++) {
44// for (int y = 0; y < 13; y++) {
45// Room room = player.getHouse().rooms[x][y][z];
46// builder.writeBits(1, room != null ? 1 : 0);
47//
48// if (room == null) {
49// continue;
50// }
51//
52// builder.writeBits(26, room.getX() / 8 << 14 | room.getY() / 8 << 3 | 0 % 4 << 24 | room.getRotation() % 4 << 1);
53// }
54// }
55// }
56//
57// builder.initializeAccess(AccessType.BYTE);
58// builder.writeShort(player.getPosition().getChunkX() + 6);
59// player.getSession().ifPresent(s -> s.queue(builder));
60 return false;
61 }
62
63}