add license to the top of each file

This commit is contained in:
Holly Stubbs 2021-08-24 15:29:46 +01:00
parent d34724227a
commit 0c50e5e7ef
30 changed files with 210 additions and 0 deletions

View file

@ -1,3 +1,10 @@
/*
==============- index.js -==============
Created by Holly (tgpethan) (c) 2021
Licenced under MIT
========================================
*/
const server = new (require('net').Server)(); const server = new (require('net').Server)();
const config = require("./config.json"); const config = require("./config.json");

View file

@ -1,3 +1,10 @@
/*
============- Converter.js -============
Created by Holly (tgpethan) (c) 2021
Licenced under MIT
========================================
*/
module.exports.toAbsoluteInt = function(float = 0.0) { module.exports.toAbsoluteInt = function(float = 0.0) {
return Math.floor(float * 32.0); return Math.floor(float * 32.0);
} }

View file

@ -1,3 +1,10 @@
/*
==============- Entity.js -=============
Created by Holly (tgpethan) (c) 2021
Licenced under MIT
========================================
*/
class Entity { class Entity {
constructor(EID = 0, x = 0, y = 0, z = 0, yaw = 0, pitch = 0) { constructor(EID = 0, x = 0, y = 0, z = 0, yaw = 0, pitch = 0) {
this.EID = EID; this.EID = EID;

View file

@ -1,3 +1,10 @@
/*
============- EntityItem.js -===========
Created by Holly (tgpethan) (c) 2021
Licenced under MIT
========================================
*/
const Entity = require("./Entity.js"); const Entity = require("./Entity.js");
class EntityItem extends Entity { class EntityItem extends Entity {

View file

@ -1,3 +1,10 @@
/*
==========- EntityLiving.js -===========
Created by Holly (tgpethan) (c) 2021
Licenced under MIT
========================================
*/
const Entity = require("./Entity.js"); const Entity = require("./Entity.js");
class EntityLiving extends Entity { class EntityLiving extends Entity {

View file

@ -1,3 +1,10 @@
/*
===========- EntityPlayer.js -==========
Created by Holly (tgpethan) (c) 2021
Licenced under MIT
========================================
*/
const EntityLiving = require("./EntityLiving.js"); const EntityLiving = require("./EntityLiving.js");
const user = require("../user.js"); const user = require("../user.js");

View file

@ -1,3 +1,10 @@
/*
===========- NamedPackets.js -==========
Created by Holly (tgpethan) (c) 2021
Licenced under MIT
========================================
*/
const namedPackets = { const namedPackets = {
"Disconnect": -1, "Disconnect": -1,
"KeepAlive": 0x00, "KeepAlive": 0x00,

View file

@ -1,3 +1,10 @@
/*
========- PacketMappingTable.js -=======
Created by Holly (tgpethan) (c) 2021
Licenced under MIT
========================================
*/
const Packet0KeepAlive = require("./Packets/Packet0KeepAlive.js"), const Packet0KeepAlive = require("./Packets/Packet0KeepAlive.js"),
Packet1LoginRequest = require("./Packets/Packet1LoginRequest.js"), Packet1LoginRequest = require("./Packets/Packet1LoginRequest.js"),
Packet2Handshake = require("./Packets/Packet2Handshake.js"), Packet2Handshake = require("./Packets/Packet2Handshake.js"),

View file

@ -1,3 +1,10 @@
/*
==============- Packet.js -=============
Created by Holly (tgpethan) (c) 2021
Licenced under MIT
========================================
*/
const bufferStuff = require("../bufferStuff.js"); const bufferStuff = require("../bufferStuff.js");
module.exports = class { module.exports = class {

View file

@ -1,3 +1,10 @@
/*
========- Packet0KeepAlive.js -=========
Created by Holly (tgpethan) (c) 2021
Licenced under MIT
========================================
*/
const Packet = require("./Packet.js"); const Packet = require("./Packet.js");
class Packet0KeepAlive extends Packet { class Packet0KeepAlive extends Packet {

View file

@ -1,3 +1,10 @@
/*
========- Packet103SetSlot.js -=========
Created by Holly (tgpethan) (c) 2021
Licenced under MIT
========================================
*/
const Packet = require("./Packet.js"); const Packet = require("./Packet.js");
class Packet103SetSlot extends Packet { class Packet103SetSlot extends Packet {

View file

@ -1,3 +1,10 @@
/*
=========- Packet10Player.js -==========
Created by Holly (tgpethan) (c) 2021
Licenced under MIT
========================================
*/
const Packet = require("./Packet.js"); const Packet = require("./Packet.js");
class Packet10Player extends Packet { class Packet10Player extends Packet {

View file

@ -1,3 +1,10 @@
/*
==- Packet13PlayerPositionAndLook.js -==
Created by Holly (tgpethan) (c) 2021
Licenced under MIT
========================================
*/
const Packet = require("./Packet.js"); const Packet = require("./Packet.js");
class Packet13PlayerPositionAndLook extends Packet { class Packet13PlayerPositionAndLook extends Packet {

View file

@ -1,3 +1,10 @@
/*
========- Packet18Animation.js -========
Created by Holly (tgpethan) (c) 2021
Licenced under MIT
========================================
*/
const Packet = require("./Packet.js"); const Packet = require("./Packet.js");
class Packet18Animation extends Packet { class Packet18Animation extends Packet {

View file

@ -1,3 +1,10 @@
/*
=======- Packet1LoginRequest.js -=======
Created by Holly (tgpethan) (c) 2021
Licenced under MIT
========================================
*/
const Packet = require("./Packet.js"); const Packet = require("./Packet.js");
class Packet1LoginRequest extends Packet { class Packet1LoginRequest extends Packet {

View file

@ -1,3 +1,10 @@
/*
=====- Packet20NamedEntitySpawn.js -====
Created by Holly (tgpethan) (c) 2021
Licenced under MIT
========================================
*/
const Packet = require("./Packet.js"); const Packet = require("./Packet.js");
const Converter = require("../Converter.js"); const Converter = require("../Converter.js");

View file

@ -1,3 +1,10 @@
/*
=========- Packet2Handshake.js -========
Created by Holly (tgpethan) (c) 2021
Licenced under MIT
========================================
*/
const Packet = require("./Packet.js"); const Packet = require("./Packet.js");
class Packet2Handshake extends Packet { class Packet2Handshake extends Packet {

View file

@ -1,3 +1,10 @@
/*
=======- Packet32EntityLook.js -========
Created by Holly (tgpethan) (c) 2021
Licenced under MIT
========================================
*/
const Packet = require("./Packet.js"); const Packet = require("./Packet.js");
const Converter = require("../Converter.js"); const Converter = require("../Converter.js");

View file

@ -1,3 +1,10 @@
/*
======- Packet34EntityTeleport.js -=====
Created by Holly (tgpethan) (c) 2021
Licenced under MIT
========================================
*/
const Packet = require("./Packet.js"); const Packet = require("./Packet.js");
const Converter = require("../Converter.js"); const Converter = require("../Converter.js");

View file

@ -1,3 +1,10 @@
/*
===========- Packet3Chat.js -===========
Created by Holly (tgpethan) (c) 2021
Licenced under MIT
========================================
*/
const Packet = require("./Packet.js"); const Packet = require("./Packet.js");
class Packet3Chat extends Packet { class Packet3Chat extends Packet {

View file

@ -1,3 +1,10 @@
/*
========- Packet4TimeUpdate.js -========
Created by Holly (tgpethan) (c) 2021
Licenced under MIT
========================================
*/
const Packet = require("./Packet.js"); const Packet = require("./Packet.js");
class Packet4TimeUpdate extends Packet { class Packet4TimeUpdate extends Packet {

View file

@ -1,3 +1,10 @@
/*
========- Packet50PreChunk.js -=========
Created by Holly (tgpethan) (c) 2021
Licenced under MIT
========================================
*/
const Packet = require("./Packet.js"); const Packet = require("./Packet.js");
class Packet50PreChunk extends Packet { class Packet50PreChunk extends Packet {

View file

@ -1,3 +1,10 @@
/*
=======- Packet53BlockChange.js -=======
Created by Holly (tgpethan) (c) 2021
Licenced under MIT
========================================
*/
const Packet = require("./Packet.js"); const Packet = require("./Packet.js");
class Packet53BlockChange extends Packet { class Packet53BlockChange extends Packet {

View file

@ -1,3 +1,10 @@
/*
======- Packet6SpawnPosition.js -=======
Created by Holly (tgpethan) (c) 2021
Licenced under MIT
========================================
*/
const Packet = require("./Packet.js"); const Packet = require("./Packet.js");
class Packet6SpawnPosition extends Packet { class Packet6SpawnPosition extends Packet {

View file

@ -1,3 +1,10 @@
/*
===========- funkyArray.js -============
Created by Holly (tgpethan) (c) 2021
Licenced under MIT
========================================
*/
const pRandom = require("./prettyRandom.js"); const pRandom = require("./prettyRandom.js");
module.exports = class { module.exports = class {

View file

@ -1,3 +1,10 @@
/*
===========- prettyRandom.js -==========
Created by Holly (tgpethan) (c) 2021
Licenced under MIT
========================================
*/
let lastRandom = -1; let lastRandom = -1;
function pRandom(from = 0, to = 2147483647) { function pRandom(from = 0, to = 2147483647) {

View file

@ -1,3 +1,10 @@
/*
===========- ChunkWorker.js -===========
Created by Holly (tgpethan) (c) 2021
Licenced under MIT
========================================
*/
const { parentPort } = require('worker_threads'); const { parentPort } = require('worker_threads');
const { deflateSync } = require("zlib"); const { deflateSync } = require("zlib");

View file

@ -1,3 +1,10 @@
/*
===========- chunkManager.js -==========
Created by Holly (tgpethan) (c) 2021
Licenced under MIT
========================================
*/
const { Worker } = require('worker_threads'); const { Worker } = require('worker_threads');
const FunkyArray = require("./Util/funkyArray.js"); const FunkyArray = require("./Util/funkyArray.js");
const config = require("../config.json"); const config = require("../config.json");

View file

@ -1,3 +1,10 @@
/*
==============- server.js -=============
Created by Holly (tgpethan) (c) 2021
Licenced under MIT
========================================
*/
const bufferStuff = require("./bufferStuff.js"); const bufferStuff = require("./bufferStuff.js");
const ChunkManager = require("./chunkManager.js"); const ChunkManager = require("./chunkManager.js");
const User = require("./user.js"); const User = require("./user.js");

View file

@ -1,3 +1,10 @@
/*
===============- user.js -==============
Created by Holly (tgpethan) (c) 2021
Licenced under MIT
========================================
*/
const funkyArray = require("./Util/funkyArray.js"); const funkyArray = require("./Util/funkyArray.js");
const Socket = require("net").Socket; const Socket = require("net").Socket;