Skip to content

Commit e5681b8

Browse files
committed
mcInstall
1 parent 509afc0 commit e5681b8

File tree

15 files changed

+178
-67
lines changed

15 files changed

+178
-67
lines changed

README.md

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,6 @@
88
> Instalacja CoffeeScripta nie jest wymagana do włączenia gry.<br>
99
> Zalecam grę włączać na przeglądarce Google Chrome</u>.<br>
1010
11-
<h4>Szykujące się updaty:</h4>
12-
<li>
13-
Dynamiczne ładowanie i odładowywanie chunków
14-
</li>
15-
<li>
16-
Generowanie nieskończonego terenu
17-
</li>
18-
<li>
19-
Połączenie z prawdziwym serwerem minecraftowym
20-
</li>
21-
22-
2311

2412
<i>
2513
</i>
@@ -35,23 +23,38 @@ cd web-minecraft
3523
npm install
3624

3725
```
38-
3926
<h3>Uruchamianie gry</h3>
4027

4128
```bash
4229

4330
#Uruchamianie konsoli
4431
npm start
4532

33+
#Po uruchomieniu serwera gra zostanie (z defaultu) hostowana pod linkiem: http://localhost:8080
4634
```
4735

48-
Po uruchomieniu serwera gra zostanie (z defaultu) hostowana pod linkiem: <a href="http://localhost:8080">http://localhost:8080</a>
36+
<h3>Dla deweloperów</h3>
37+
38+
```bash
39+
40+
#Generowanie atlasu tekstur
41+
npm run atlas
42+
43+
#Uruchamianie kompilatora coffeescript
44+
npm run coffee
45+
46+
#Instalacja i uruchamianie serwera minecraftowego
47+
npm run mcserver
48+
49+
#Model gry
50+
npm run diagram
51+
```
4952

5053

5154

5255
<h3>DEMO</h3>
5356

54-
DEMO gry znajduje się pod adresem: <a href="http://mc.grok.eu">http://mc.grok.eu</a>
57+
Demonstracja gry znajduje się pod adresem: <a href="http://mc.grok.eu">http://mc.grok.eu</a>
5558

5659
<h3>Screenshoty:</h3>
5760

coffee/build/gitignore.coffee

Lines changed: 0 additions & 5 deletions
This file was deleted.
Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
path=require "path"
32
fs=require "fs"
43
Canvas=require "canvas"
@@ -28,13 +27,6 @@ images={}
2827
textureMapping={}
2928
miniMapping={}
3029

31-
NWD=(a,b)->
32-
if b isnt 0
33-
return NWD b,a%b
34-
return a
35-
NWW=(a,b)->
36-
return a*b/NWD a,b
37-
3830
firstLoad=->
3931
folderName="../client/assets/blocks/images"
4032
directoryPath=__dirname+"/"+folderName

coffee/server/gitignore.coffee

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
fs=require "fs"
2+
fs.writeFile "#{__dirname}/../.gitignore", '.gitignore\nnode_modules', (err)->
3+
if err
4+
return console.log err

coffee/server/mcserver.coffee

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
util=require "util"
2+
exec=require('child_process').exec
3+
fs=require "fs"
4+
process = require 'child_process'
5+
6+
wget=(url,result)->
7+
child=exec 'curl '+url+' > '+result, (error, stdout, stderr)->
8+
if error isnt null
9+
console.log 'exec error: '+error
10+
11+
server_jar=__dirname+"/../minecraft/server.jar"
12+
eula_txt=__dirname+"/../minecraft/eula.txt"
13+
start_sh=__dirname+"/../minecraft/start.sh"
14+
if not fs.existsSync server_jar
15+
console.log "Downloading server jar..."
16+
wget 'https://cdn.getbukkit.org/spigot/spigot-1.16.1.jar', server_jar
17+
else
18+
console.log "Server.jar already exist"
19+
20+
console.log "Writing eula.txt file..."
21+
fs.writeFileSync eula_txt,"#Sat Oct 10 16:00:22 CEST 2020\neula=true"
22+
23+
console.log "Writing start.sh file..."
24+
fs.writeFileSync start_sh,"#!/bin/bash\njava -jar #{server_jar} nogui"
25+
26+
console.log "RUNNING SERVER!"
27+
process.spawn("#{start_sh}", [], { stdio: 'inherit' })

logs/2020-10-10-1.log.gz

172 Bytes
Binary file not shown.

logs/2020-10-10-2.log.gz

121 Bytes
Binary file not shown.

logs/latest.log

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[16:04:49] [main/INFO]: You need to agree to the EULA in order to run the server. Go to eula.txt for more info.

package-lock.json

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

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
"scripts": {
66
"start": "node server/start.js",
77
"coffee": "coffee -o . -cw coffee/",
8-
"atlas": "node build/atlas.js",
9-
"gitignore": "node build/gitignore.js",
8+
"atlas": "node server/atlas.js",
9+
"gitignore": "node server/gitignore.js",
1010
"mcserver": "node server/mcserver.js",
1111
"diagram": "drawio web-minecraft.xml"
1212
},
@@ -26,10 +26,10 @@
2626
"express": "^4.17.1",
2727
"flying-squid": "^1.3.1",
2828
"http": "0.0.1-security",
29-
"mineflayer": "^2.28.1",
29+
"mineflayer": "^2.30.0",
3030
"opn": "^6.0.0",
3131
"path": "^0.12.7",
3232
"socket.io": "^2.3.0",
33-
"terminal-kit": "^1.42.0"
33+
"terminal-kit": "^1.43.0"
3434
}
3535
}

0 commit comments

Comments
 (0)