Skip to content

Commit 99ade2d

Browse files
committed
decodedChunks
1 parent a6f5c16 commit 99ade2d

File tree

8 files changed

+26
-15
lines changed

8 files changed

+26
-15
lines changed

client/bundle.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

coffee/client/bundle.coffee

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import {Players} from './module/Players.js'
1313
scene=null;materials=null;parameters=null;canvas=null;renderer=null;camera=null;terrain=null;cursor=null;FPC=null;socket=null;stats=null;worker=null;playerObject=null;inv_bar=null
1414

1515
getNick=->
16-
nameList = ['Time','Past','Future','Dev','Fly','Flying','Soar','Soaring','Power','Falling','Fall','Jump','Cliff','Mountain','Rend','Red','Blue','Green','Yellow','Gold','Demon','Demonic','Panda','Cat','Kitty','Kitten','Zero','Memory','Trooper','XX','Bandit','Fear','Light','Glow','Tread','Deep','Deeper','Deepest','Mine','Your','Worst','Enemy','Hostile','Force','Video','Game','Donkey','Mule','Colt','Cult','Cultist','Magnum','Gun','Assault','Recon','Trap','Trapper','Redeem','Code','Script','Writer','Near','Close','Open','Cube','Circle','Geo','Genome','Germ','Spaz','Shot','Echo','Beta','Alpha','Gamma','Omega','Seal','Squid','Money','Cash','Lord','King','Duke','Rest','Fire','Flame','Morrow','Break','Breaker','Numb','Ice','Cold','Rotten','Sick','Sickly','Janitor','Camel','Rooster','Sand','Desert','Dessert','Hurdle','Racer','Eraser','Erase','Big','Small','Short','Tall','Sith','Bounty','Hunter','Cracked','Broken','Sad','Happy','Joy','Joyful','Crimson','Destiny','Deceit','Lies','Lie','Honest','Destined','Bloxxer','Hawk','Eagle','Hawker','Walker','Zombie','Sarge','Capt','Captain','Punch','One','Two','Uno','Slice','Slash','Melt','Melted','Melting','Fell','Wolf','Hound','Legacy','Sharp','Dead','Mew','Chuckle','Bubba','Bubble','Sandwich','Smasher','Extreme','Multi','Universe','Ultimate','Death','Ready','Monkey','Elevator','Wrench','Grease','Head','Theme','Grand','Cool','Kid','Boy','Girl','Vortex','Paradox']
16+
nameList = ['Time','Past','Future','Dev','Fly','Flying','Soar','Soaring','Power','Falling','Fall','Jump','Cliff','Mountain','Rend','Red','Blue','Green','Yellow','Gold','Panda','Cat','Kitty','Kitten','Zero','Memory','Trooper','XX','Bandit','Fear','Light','Glow','Tread','Deep','Deeper','Deepest','Mine','Your','Worst','Enemy','Hostile','Force','Video','Game','Donkey','Mule','Colt','Cult','Cultist','Magnum','Gun','Assault','Recon','Trap','Trapper','Redeem','Code','Script','Writer','Near','Close','Open','Cube','Circle','Geo','Genome','Germ','Spaz','Shot','Echo','Beta','Alpha','Gamma','Omega','Seal','Squid','Money','Cash','Lord','King','Duke','Rest','Fire','Flame','Morrow','Break','Breaker','Numb','Ice','Cold','Rotten','Sick','Sickly','Janitor','Camel','Rooster','Sand','Desert','Dessert','Hurdle','Racer','Eraser','Erase','Big','Small','Short','Tall','Sith','Bounty','Hunter','Cracked','Broken','Sad','Happy','Joy','Joyful','Crimson','Destiny','Deceit','Lies','Lie','Honest','Destined','Bloxxer','Hawk','Eagle','Hawker','Walker','Zombie','Sarge','Capt','Captain','Punch','One','Two','Uno','Slice','Slash','Melt','Melted','Melting','Fell','Wolf','Hound','Legacy','Sharp','Dead','Mew','Chuckle','Bubba','Bubble','Sandwich','Smasher','Extreme','Multi','Universe','Ultimate','Death','Ready','Monkey','Elevator','Wrench','Grease','Head','Theme','Grand','Cool','Kid','Boy','Girl','Vortex','Paradox']
1717
finalName = ""
1818
nick=document.location.hash.substring(1,document.location.hash.length)
1919
if nick is ""

coffee/client/workers/terrain.coffee

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ class TerrainManager
77
@cellSize=options.cellSize
88
@models=options.models
99
@world={}
10-
console.log("WORKER: TerrainManager started!")
10+
console.log "WORKER: TerrainManager started!"
1111
getToxel: (x,y)->
1212
x-=1
1313
y-=1

coffee/server/start.coffee

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@ opn=require "opn"
33
http=require "http"
44
server=http.createServer()
55
io=require("socket.io")(server)
6-
express=require('express')
6+
express=require 'express'
77
app=express();
88
term=require( 'terminal-kit' ).terminal
9-
mineflayer = require('mineflayer')
9+
mineflayer = require 'mineflayer'
10+
Chunk = require('prismarine-chunk')("1.16.1")
1011

1112
exec=(cmd)->
1213
exec = require('child_process').exec;
@@ -114,9 +115,9 @@ com=(command)->
114115
Object.keys(socketInfo).forEach (p)->
115116
term "\n#{p} (#{socketInfo[p].nick})"
116117
else if command is "open"
117-
opn("http://#{config["host"]}:#{config["express-port"]}")
118+
opn "http://#{config["host"]}:#{config["express-port"]}"
118119
else if command is "copen"
119-
exec("google-chrome --app=http://#{config["host"]}:#{config["express-port"]}")
120+
exec "google-chrome --app=http://#{config["host"]}:#{config["express-port"]}"
120121
else if command is "info"
121122
info()
122123
else if command isnt ""
@@ -154,8 +155,11 @@ dolaczGracza=(socketid)->
154155
username: socketInfo[socketid].nick
155156
}
156157

157-
socketInfo[socketid].bot._client.on "map_chunk",(data)->
158-
io.to(socketid).emit "mapChunk",data
158+
socketInfo[socketid].bot._client.on "map_chunk",(packet)->
159+
data=packet.chunkData
160+
cell=new Chunk()
161+
cell.load data,bitmap=packet.bitMap,fullChunk=false
162+
io.to(socketid).emit "mapChunk",cell.toJson()
159163
return
160164

161165
socketInfo[socketid].bot.on 'chat',(username, message)->

minecraft/server.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#Minecraft server properties
2-
#Sat Oct 10 16:31:42 CEST 2020
2+
#Sat Oct 10 20:24:59 CEST 2020
33
enable-jmx-monitoring=false
44
rcon.port=25575
55
level-seed=
@@ -15,8 +15,8 @@ generate-structures=true
1515
difficulty=easy
1616
network-compression-threshold=256
1717
max-tick-time=60000
18-
max-players=20
1918
use-native-transport=true
19+
max-players=20
2020
online-mode=false
2121
enable-status=true
2222
allow-flight=false

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
"mineflayer": "^2.30.0",
3030
"opn": "^6.0.0",
3131
"path": "^0.12.7",
32+
"prismarine-chunk": "^1.20.3",
3233
"socket.io": "^2.3.0",
3334
"terminal-kit": "^1.43.0"
3435
}

server/savedWorld.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

server/start.js

Lines changed: 9 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)