diff --git a/index.js b/index.js index bb104e9..1e5104b 100644 --- a/index.js +++ b/index.js @@ -1,3 +1,10 @@ +/* + ==============- index.js -============== + Created by Holly (tgpethan) (c) 2021 + Licenced under MIT + ======================================== +*/ + const server = new (require('net').Server)(); const config = require("./config.json"); diff --git a/server/Converter.js b/server/Converter.js index 0562ec5..b6e3c64 100644 --- a/server/Converter.js +++ b/server/Converter.js @@ -1,3 +1,10 @@ +/* + ============- Converter.js -============ + Created by Holly (tgpethan) (c) 2021 + Licenced under MIT + ======================================== +*/ + module.exports.toAbsoluteInt = function(float = 0.0) { return Math.floor(float * 32.0); } diff --git a/server/Entities/Entity.js b/server/Entities/Entity.js index e5abdbe..fe4ec26 100644 --- a/server/Entities/Entity.js +++ b/server/Entities/Entity.js @@ -1,3 +1,10 @@ +/* + ==============- Entity.js -============= + Created by Holly (tgpethan) (c) 2021 + Licenced under MIT + ======================================== +*/ + class Entity { constructor(EID = 0, x = 0, y = 0, z = 0, yaw = 0, pitch = 0) { this.EID = EID; diff --git a/server/Entities/EntityItem.js b/server/Entities/EntityItem.js index cfb974c..6268fe9 100644 --- a/server/Entities/EntityItem.js +++ b/server/Entities/EntityItem.js @@ -1,3 +1,10 @@ +/* + ============- EntityItem.js -=========== + Created by Holly (tgpethan) (c) 2021 + Licenced under MIT + ======================================== +*/ + const Entity = require("./Entity.js"); class EntityItem extends Entity { diff --git a/server/Entities/EntityLiving.js b/server/Entities/EntityLiving.js index 1f370a1..178d52b 100644 --- a/server/Entities/EntityLiving.js +++ b/server/Entities/EntityLiving.js @@ -1,3 +1,10 @@ +/* + ==========- EntityLiving.js -=========== + Created by Holly (tgpethan) (c) 2021 + Licenced under MIT + ======================================== +*/ + const Entity = require("./Entity.js"); class EntityLiving extends Entity { diff --git a/server/Entities/EntityPlayer.js b/server/Entities/EntityPlayer.js index a7d9a4f..d24bfc8 100644 --- a/server/Entities/EntityPlayer.js +++ b/server/Entities/EntityPlayer.js @@ -1,3 +1,10 @@ +/* + ===========- EntityPlayer.js -========== + Created by Holly (tgpethan) (c) 2021 + Licenced under MIT + ======================================== +*/ + const EntityLiving = require("./EntityLiving.js"); const user = require("../user.js"); diff --git a/server/NamedPackets.js b/server/NamedPackets.js index ac0b8ab..c36c3c6 100644 --- a/server/NamedPackets.js +++ b/server/NamedPackets.js @@ -1,3 +1,10 @@ +/* + ===========- NamedPackets.js -========== + Created by Holly (tgpethan) (c) 2021 + Licenced under MIT + ======================================== +*/ + const namedPackets = { "Disconnect": -1, "KeepAlive": 0x00, diff --git a/server/PacketMappingTable.js b/server/PacketMappingTable.js index dd31bcf..21c3d73 100644 --- a/server/PacketMappingTable.js +++ b/server/PacketMappingTable.js @@ -1,3 +1,10 @@ +/* + ========- PacketMappingTable.js -======= + Created by Holly (tgpethan) (c) 2021 + Licenced under MIT + ======================================== +*/ + const Packet0KeepAlive = require("./Packets/Packet0KeepAlive.js"), Packet1LoginRequest = require("./Packets/Packet1LoginRequest.js"), Packet2Handshake = require("./Packets/Packet2Handshake.js"), diff --git a/server/Packets/Packet.js b/server/Packets/Packet.js index 6cfbe48..539f493 100644 --- a/server/Packets/Packet.js +++ b/server/Packets/Packet.js @@ -1,3 +1,10 @@ +/* + ==============- Packet.js -============= + Created by Holly (tgpethan) (c) 2021 + Licenced under MIT + ======================================== +*/ + const bufferStuff = require("../bufferStuff.js"); module.exports = class { diff --git a/server/Packets/Packet0KeepAlive.js b/server/Packets/Packet0KeepAlive.js index 7458e4e..9740e49 100644 --- a/server/Packets/Packet0KeepAlive.js +++ b/server/Packets/Packet0KeepAlive.js @@ -1,3 +1,10 @@ +/* + ========- Packet0KeepAlive.js -========= + Created by Holly (tgpethan) (c) 2021 + Licenced under MIT + ======================================== +*/ + const Packet = require("./Packet.js"); class Packet0KeepAlive extends Packet { diff --git a/server/Packets/Packet103SetSlot.js b/server/Packets/Packet103SetSlot.js index 3ba268d..07c4b82 100644 --- a/server/Packets/Packet103SetSlot.js +++ b/server/Packets/Packet103SetSlot.js @@ -1,3 +1,10 @@ +/* + ========- Packet103SetSlot.js -========= + Created by Holly (tgpethan) (c) 2021 + Licenced under MIT + ======================================== +*/ + const Packet = require("./Packet.js"); class Packet103SetSlot extends Packet { diff --git a/server/Packets/Packet10Player.js b/server/Packets/Packet10Player.js index 14fb23e..256b444 100644 --- a/server/Packets/Packet10Player.js +++ b/server/Packets/Packet10Player.js @@ -1,3 +1,10 @@ +/* + =========- Packet10Player.js -========== + Created by Holly (tgpethan) (c) 2021 + Licenced under MIT + ======================================== +*/ + const Packet = require("./Packet.js"); class Packet10Player extends Packet { diff --git a/server/Packets/Packet13PlayerPositionAndLook.js b/server/Packets/Packet13PlayerPositionAndLook.js index 9a1ff78..1bfda75 100644 --- a/server/Packets/Packet13PlayerPositionAndLook.js +++ b/server/Packets/Packet13PlayerPositionAndLook.js @@ -1,3 +1,10 @@ +/* + ==- Packet13PlayerPositionAndLook.js -== + Created by Holly (tgpethan) (c) 2021 + Licenced under MIT + ======================================== +*/ + const Packet = require("./Packet.js"); class Packet13PlayerPositionAndLook extends Packet { diff --git a/server/Packets/Packet18Animation.js b/server/Packets/Packet18Animation.js index f8e75f9..b0e08b7 100644 --- a/server/Packets/Packet18Animation.js +++ b/server/Packets/Packet18Animation.js @@ -1,3 +1,10 @@ +/* + ========- Packet18Animation.js -======== + Created by Holly (tgpethan) (c) 2021 + Licenced under MIT + ======================================== +*/ + const Packet = require("./Packet.js"); class Packet18Animation extends Packet { diff --git a/server/Packets/Packet1LoginRequest.js b/server/Packets/Packet1LoginRequest.js index 4093818..be9ad47 100644 --- a/server/Packets/Packet1LoginRequest.js +++ b/server/Packets/Packet1LoginRequest.js @@ -1,3 +1,10 @@ +/* + =======- Packet1LoginRequest.js -======= + Created by Holly (tgpethan) (c) 2021 + Licenced under MIT + ======================================== +*/ + const Packet = require("./Packet.js"); class Packet1LoginRequest extends Packet { diff --git a/server/Packets/Packet20NamedEntitySpawn.js b/server/Packets/Packet20NamedEntitySpawn.js index feefa7c..522a42d 100644 --- a/server/Packets/Packet20NamedEntitySpawn.js +++ b/server/Packets/Packet20NamedEntitySpawn.js @@ -1,3 +1,10 @@ +/* + =====- Packet20NamedEntitySpawn.js -==== + Created by Holly (tgpethan) (c) 2021 + Licenced under MIT + ======================================== +*/ + const Packet = require("./Packet.js"); const Converter = require("../Converter.js"); diff --git a/server/Packets/Packet2Handshake.js b/server/Packets/Packet2Handshake.js index 936aaff..29875aa 100644 --- a/server/Packets/Packet2Handshake.js +++ b/server/Packets/Packet2Handshake.js @@ -1,3 +1,10 @@ +/* + =========- Packet2Handshake.js -======== + Created by Holly (tgpethan) (c) 2021 + Licenced under MIT + ======================================== +*/ + const Packet = require("./Packet.js"); class Packet2Handshake extends Packet { diff --git a/server/Packets/Packet32EntityLook.js b/server/Packets/Packet32EntityLook.js index 0602039..2846fe4 100644 --- a/server/Packets/Packet32EntityLook.js +++ b/server/Packets/Packet32EntityLook.js @@ -1,3 +1,10 @@ +/* + =======- Packet32EntityLook.js -======== + Created by Holly (tgpethan) (c) 2021 + Licenced under MIT + ======================================== +*/ + const Packet = require("./Packet.js"); const Converter = require("../Converter.js"); diff --git a/server/Packets/Packet34EntityTeleport.js b/server/Packets/Packet34EntityTeleport.js index 4993a15..cdf2edf 100644 --- a/server/Packets/Packet34EntityTeleport.js +++ b/server/Packets/Packet34EntityTeleport.js @@ -1,3 +1,10 @@ +/* + ======- Packet34EntityTeleport.js -===== + Created by Holly (tgpethan) (c) 2021 + Licenced under MIT + ======================================== +*/ + const Packet = require("./Packet.js"); const Converter = require("../Converter.js"); diff --git a/server/Packets/Packet3Chat.js b/server/Packets/Packet3Chat.js index 88422b7..a3d30c6 100644 --- a/server/Packets/Packet3Chat.js +++ b/server/Packets/Packet3Chat.js @@ -1,3 +1,10 @@ +/* + ===========- Packet3Chat.js -=========== + Created by Holly (tgpethan) (c) 2021 + Licenced under MIT + ======================================== +*/ + const Packet = require("./Packet.js"); class Packet3Chat extends Packet { diff --git a/server/Packets/Packet4TimeUpdate.js b/server/Packets/Packet4TimeUpdate.js index 2db5d78..b5f6e70 100644 --- a/server/Packets/Packet4TimeUpdate.js +++ b/server/Packets/Packet4TimeUpdate.js @@ -1,3 +1,10 @@ +/* + ========- Packet4TimeUpdate.js -======== + Created by Holly (tgpethan) (c) 2021 + Licenced under MIT + ======================================== +*/ + const Packet = require("./Packet.js"); class Packet4TimeUpdate extends Packet { diff --git a/server/Packets/Packet50PreChunk.js b/server/Packets/Packet50PreChunk.js index 3eb8f18..efa9f4e 100644 --- a/server/Packets/Packet50PreChunk.js +++ b/server/Packets/Packet50PreChunk.js @@ -1,3 +1,10 @@ +/* + ========- Packet50PreChunk.js -========= + Created by Holly (tgpethan) (c) 2021 + Licenced under MIT + ======================================== +*/ + const Packet = require("./Packet.js"); class Packet50PreChunk extends Packet { diff --git a/server/Packets/Packet53BlockChange.js b/server/Packets/Packet53BlockChange.js index 63654ec..1e6a9dc 100644 --- a/server/Packets/Packet53BlockChange.js +++ b/server/Packets/Packet53BlockChange.js @@ -1,3 +1,10 @@ +/* + =======- Packet53BlockChange.js -======= + Created by Holly (tgpethan) (c) 2021 + Licenced under MIT + ======================================== +*/ + const Packet = require("./Packet.js"); class Packet53BlockChange extends Packet { diff --git a/server/Packets/Packet6SpawnPosition.js b/server/Packets/Packet6SpawnPosition.js index 0917ff1..0dcd617 100644 --- a/server/Packets/Packet6SpawnPosition.js +++ b/server/Packets/Packet6SpawnPosition.js @@ -1,3 +1,10 @@ +/* + ======- Packet6SpawnPosition.js -======= + Created by Holly (tgpethan) (c) 2021 + Licenced under MIT + ======================================== +*/ + const Packet = require("./Packet.js"); class Packet6SpawnPosition extends Packet { diff --git a/server/Util/funkyArray.js b/server/Util/funkyArray.js index bcc9dd8..d7381c3 100644 --- a/server/Util/funkyArray.js +++ b/server/Util/funkyArray.js @@ -1,3 +1,10 @@ +/* + ===========- funkyArray.js -============ + Created by Holly (tgpethan) (c) 2021 + Licenced under MIT + ======================================== +*/ + const pRandom = require("./prettyRandom.js"); module.exports = class { diff --git a/server/Util/prettyRandom.js b/server/Util/prettyRandom.js index 5838edc..81e75e5 100644 --- a/server/Util/prettyRandom.js +++ b/server/Util/prettyRandom.js @@ -1,3 +1,10 @@ +/* + ===========- prettyRandom.js -========== + Created by Holly (tgpethan) (c) 2021 + Licenced under MIT + ======================================== +*/ + let lastRandom = -1; function pRandom(from = 0, to = 2147483647) { diff --git a/server/Workers/ChunkWorker.js b/server/Workers/ChunkWorker.js index 587cc64..6dba0d2 100644 --- a/server/Workers/ChunkWorker.js +++ b/server/Workers/ChunkWorker.js @@ -1,3 +1,10 @@ +/* + ===========- ChunkWorker.js -=========== + Created by Holly (tgpethan) (c) 2021 + Licenced under MIT + ======================================== +*/ + const { parentPort } = require('worker_threads'); const { deflateSync } = require("zlib"); diff --git a/server/chunkManager.js b/server/chunkManager.js index 97a8356..c2fd122 100644 --- a/server/chunkManager.js +++ b/server/chunkManager.js @@ -1,3 +1,10 @@ +/* + ===========- chunkManager.js -========== + Created by Holly (tgpethan) (c) 2021 + Licenced under MIT + ======================================== +*/ + const { Worker } = require('worker_threads'); const FunkyArray = require("./Util/funkyArray.js"); const config = require("../config.json"); diff --git a/server/server.js b/server/server.js index 99f6e27..1fdcff7 100644 --- a/server/server.js +++ b/server/server.js @@ -1,3 +1,10 @@ +/* + ==============- server.js -============= + Created by Holly (tgpethan) (c) 2021 + Licenced under MIT + ======================================== +*/ + const bufferStuff = require("./bufferStuff.js"); const ChunkManager = require("./chunkManager.js"); const User = require("./user.js"); diff --git a/server/user.js b/server/user.js index 778cb59..ad92a3c 100644 --- a/server/user.js +++ b/server/user.js @@ -1,3 +1,10 @@ +/* + ===============- user.js -============== + Created by Holly (tgpethan) (c) 2021 + Licenced under MIT + ======================================== +*/ + const funkyArray = require("./Util/funkyArray.js"); const Socket = require("net").Socket;