Commit graph

251 commits

Author SHA1 Message Date
Romain Beaumont
e7952f386f send equipment during spawn and fix some code style issues 2015-11-28 21:54:49 +01:00
Romain Beaumont
c8ce897013 start fixing inventory equipments 2015-11-28 21:40:09 +01:00
Romain Beaumont
b5d22e57f9 improve code with webstorm suggestion + split entities.js into spawn.js and other files 2015-11-28 18:23:26 +01:00
Romain Beaumont
f2889dd674 fix /command help message 2015-11-28 02:16:23 +01:00
Romain Beaumont
23094fd152 try/catch acceptClick until everything is implemented 2015-11-28 01:53:35 +01:00
Romain Beaumont
af3cfeda51 fix place lime wool bug (use Item.fromNotch) 2015-11-28 01:48:54 +01:00
Romain Beaumont
6d098deb23 convert coords to int, fix chunk unload bug (on node 0.10) 2015-11-26 18:04:13 +01:00
Romain Beaumont
7f47dacc60 add a server setting view-distance, and take the min of that settings and the player settings to get the distance to send chunks
I experimented with vanilla, and its "MultiplayerChunkCache" indicates this behavior for a vanilla server
progress on #127
2015-11-26 01:32:35 +01:00
Romain Beaumont
fb5450e3ca unload chunks, progress on #127 2015-11-26 01:08:10 +01:00
Romain Beaumont
ddd38e148a fix settings, cleanup logs (fix #125) 2015-11-25 19:49:38 +01:00
Romain Beaumont
82dbd722fd most objects don't despawn and don't get picked up, fix #121 2015-11-25 00:52:49 +01:00
Romain Beaumont
f250e4b2a4 fix chunk sending, fix #124 2015-11-25 00:46:56 +01:00
Romain Beaumont
804ddee7c1 Merge pull request #123 from 109C/master
Disable shift clicking
2015-11-25 00:12:07 +01:00
C109
69379d75e4 Not even shift clicking works... 2015-11-24 18:09:55 -05:00
Romain Beaumont
77b326ffee Merge pull request #122 from 109C/master
No more crashes when using uniplemented windows.js features
2015-11-25 00:06:22 +01:00
C109
d5a8acbe3b No more crashes 2015-11-24 18:02:32 -05:00
Romain Beaumont
58193cb37e Merge pull request #116 from 109C/master
Add survival inventory handling for players
2015-11-24 23:43:02 +01:00
DemiPixel
8d9eb32073 Fix crashing for module plugins 2015-11-24 14:35:07 -08:00
DemiPixel
483269db4c Added forceCancelDig and some other stuff 2015-11-23 19:27:35 -08:00
DemiPixel
0355195cd9 No more crashes, update API, add more stuff 2015-11-23 16:27:35 -08:00
DemiPixel
6a9281c195 Add more to "dug" behavior and add "breakAnimation" behavior 2015-11-23 16:12:51 -08:00
C109
c01c0b9cb4 Items now stack 2015-11-23 18:21:13 -05:00
DemiPixel
565309846b Fix packages, add catch to commands 2015-11-23 13:54:23 -08:00
DemiPixel
a68b10bfa0 Change to async emits 2015-11-23 11:23:50 -08:00
DemiPixel
fa99c91551 Small fixes 2015-11-23 09:25:59 -08:00
C109
06eda4e2fc More skeletal code 2015-11-23 11:00:09 -05:00
C109
c1571c1bd3 Skeletal code for survival inventory clicks 2015-11-23 10:22:15 -05:00
DemiPixel
de59be23ad Trying to fix sound, no success so far 2015-11-22 19:31:00 -08:00
DemiPixel
93ab42152c Add behaviors, edit docs a TON (YOU'RE WELCOME) 2015-11-22 18:35:33 -08:00
DemiPixel
3ba46f0e97 Adding behaviors 2015-11-22 18:35:33 -08:00
C109
44f96dde73 Fixed sending malformed items, that caused the client to have visual bugs 2015-11-22 21:03:00 -05:00
Romain Beaumont
c9ef10b223 Merge pull request #112 from 109C/master
Use mineflayer's window classes in player's inventory
2015-11-23 00:48:28 +01:00
C109
28343dc3d3 Implement player inventory using prismarine-windows and prismarine-item
* player can collect item
2015-11-23 00:47:02 +01:00
DemiPixel
cb88a5cbbb Lots and lots and lots of changes... Plugins begin again! 2015-11-21 14:30:16 -08:00
Romain Beaumont
808b5a0149 remove player specific updateAndSpawn since this is already happening for all entities 2015-11-21 00:02:41 +01:00
DemiPixel
4d7f000b61 Last fixes 2015-11-20 14:38:05 -08:00
DemiPixel
8215985f7f Fix a lot of communication things, added lots of semicolons, started on entity knockback (hehe, doesn't work well, needs improvement) 2015-11-20 13:52:19 -08:00
DemiPixel
2a376626e6 Fix stuff, add a small implementation of picking up blocks (doesn't go into inventory) 2015-11-19 21:16:27 -08:00
DemiPixel
a02983c2bd Fixing metadata, almost done! 2015-11-19 17:46:54 -08:00
DemiPixel
180799e045 Attempting to convert Player into Entity 2015-11-19 17:17:33 -08:00
Romain Beaumont
8d7523a995 fix /help <command> 2015-11-20 00:48:36 +01:00
Romain Beaumont
f4a168cffb fix block drop in node 0.10 : itemCount is not optional 2015-11-20 00:23:22 +01:00
Romain Beaumont
da2457eae4 fix setBlock 2015-11-19 23:50:36 +01:00
Romain Beaumont
79e7d040b5 improve ticking, fix #101 2015-11-19 23:46:03 +01:00
Romain Beaumont
3f7853c95b update to nmp 0.16.2 2015-11-19 23:41:29 +01:00
Romain Beaumont
5282dd84a4 makes diamond_square a bit more rough 2015-11-19 23:10:17 +01:00
Romain Beaumont
6ea69796fb add a check in block_place : only place a block if you are holding a block, fix #104 2015-11-19 23:06:52 +01:00
Romain Beaumont
477d5ff3b1 properly build Vec3 from block_dig location, fix #103 2015-11-19 21:56:07 +01:00
Romain Beaumont
5530f7b1de get ticking back to server plugin (more efficient not to listen lot of time on an event) 2015-11-17 00:56:32 +01:00
Romain Beaumont
4cefdedf75 improve entity movement a little bit 2015-11-17 00:42:39 +01:00
Romain Beaumont
ebed98d85f fix respawn 2015-11-17 00:32:05 +01:00
Romain Beaumont
4cfcfe9277 fix missing serv in chat.js 2015-11-16 23:55:44 +01:00
Romain Beaumont
3b46fc348f add /spawnObject <id> 2015-11-16 23:48:49 +01:00
Romain Beaumont
d87e9a3a31 add /summon <entity_name> command 2015-11-16 23:26:31 +01:00
Romain Beaumont
f522dfac97 use Vec3 correctly + move commands in the related plugins 2015-11-16 22:22:58 +01:00
Romain Beaumont
9bcbb991bb serv, player -> player,serv because serv is often not needed 2015-11-16 21:24:19 +01:00
Romain Beaumont
a1a260c1da move some of entities.js in other files 2015-11-16 21:11:20 +01:00
Romain Beaumont
94a11951f4 entity plugins 2015-11-16 20:57:38 +01:00
Romain Beaumont
39dc37f94d put together player plugins and server plugins 2015-11-16 20:23:09 +01:00
Romain Beaumont
15350791df Merge pull request #95 from mhsjlw/update_nmp
update to nmp 0.16
2015-11-16 19:53:30 +01:00
Romain Beaumont
2a64559dc2 Merge pull request #94 from demipixel/blockdrop
Entities and Physics
2015-11-16 19:50:43 +01:00
Romain Beaumont
78149b646e fix changing world 2015-11-16 19:50:33 +01:00
Romain Beaumont
500616283d update to nmp 0.16 2015-11-12 02:28:17 +01:00
Romain Beaumont
47b6e00d5e fix block drop (use currentlyDugBlock instead of getting air) 2015-11-11 11:37:06 +01:00
DemiPixel
f0c17d38b4 Almost done with entities, needs some more finishing touches 2015-11-10 21:12:53 -08:00
DemiPixel
9c61b7b009 Trying to work on sending entities, fair amount of broken stuff 2015-11-09 13:25:42 -08:00
DemiPixel
687b8b971f Remove debugging, fix flying blocks 2015-11-08 14:46:56 -08:00
DemiPixel
cc072e2464 Add cool sounds, remove some debugging 2015-11-08 09:06:37 -08:00
DemiPixel
0684ff481f Added mobs, /spawn, fixed bugs, added many more 2015-11-07 23:17:38 -08:00
DemiPixel
573c0e4200 Adding lots of cool stuff (spawnObject, entity physics, etc) 2015-11-07 17:49:52 -08:00
Romain Beaumont
3134633a87 properly implement gamemode change, make gamemode3 (spectator) work 2015-11-07 20:43:34 +01:00
Romain Beaumont
12620716e7 only wait between each chunk after the initial map was sent 2015-11-06 22:11:52 +01:00
Romain Beaumont
591a4ed8df implement skins (player properties) 2015-11-06 21:40:18 +01:00
Romain Beaumont
d7aa0bca83 handle player set view distance, fix #76 2015-11-06 20:50:29 +01:00
Romain Beaumont
6b86cf5e9a send rest of the map only when the player has logged, fix #88 2015-11-06 20:36:41 +01:00
Romain Beaumont
a647e34078 fix respawning : fix #91 2015-11-06 19:17:52 +01:00
Romain Beaumont
010cda5c6e use destructuring in more commands 2015-11-06 19:07:05 +01:00
Romain Beaumont
41811c79b5 improve code of new commands : do the parsing in parse and use destructuring 2015-11-06 18:39:29 +01:00
DemiPixel
446dfa64d0 Lots of stuff. 2015-11-05 17:41:16 -08:00
DemiPixel
2955c5bcfd Support sound basics 2015-11-02 19:04:09 -08:00
Romain Beaumont
20ff77bc1d listen on server 'connection' to listen to non-PLAY errors, try to fix #85 2015-10-26 22:33:52 +01:00
Romain Beaumont
81d6cca4f1 add metadata when placing a block, progress on #9 2015-10-26 21:32:53 +01:00
Romain Beaumont
73a18ef863 use an es6 class for the player 2015-10-26 02:59:37 +01:00
Romain Beaumont
888fa21b7b some more es6 arrows 2015-10-26 02:40:23 +01:00
Romain Beaumont
accb742c7f add back server.setBlock 2015-10-26 02:28:07 +01:00
Romain Beaumont
53c2bc776d use an es6 class for diamond_square generation 2015-10-26 02:03:32 +01:00
Romain Beaumont
1a58da904c more es6 refactoring : use destructing and more arrow functions 2015-10-26 01:53:07 +01:00
Romain Beaumont
a50642967b use more es6 arrow function, and directly define the player.f functions instead of defining the function then assigning it 2015-10-26 01:15:21 +01:00
Romain Beaumont
69819b880e proper /changeworld overworld|nether command implemented 2015-10-25 23:58:30 +01:00
Romain Beaumont
939a404050 fix grass in diamond_square 2015-10-25 23:33:12 +01:00
Romain Beaumont
2a3b8a157b add player.spawnAPlayer, player.despawnPlayers, player.updateAndSpawnNearbyPlayers, automatically spawn and despawn players when getting closer or far 2015-10-25 23:26:04 +01:00
Romain Beaumont
c2b1424743 serv.setBlock -> player.setBlock 2015-10-25 21:24:37 +01:00
Romain Beaumont
e3b7ad569b fix stuff related to changeWorld
* use writeOthersNearby everywhere
* create player.playerViewDistance
* put toFixedPosition in vec3 prototype
* fix changeWorld (use the same function than in login)
* use entity_destroy in changeWorld
* sendPosition, not setPosition
* disable pregenWorld : it just makes everything slow
2015-10-25 21:03:02 +01:00
DemiPixel
7ac4653ea2 Maybe this works 2015-10-24 21:22:20 -07:00
DemiPixel
f0cce9fadb Added lots of communication stuff 2015-10-24 21:02:26 -07:00
DemiPixel
bb80bd7c44 Changed stuff, added seeds, etc 2015-10-24 19:41:21 -07:00
DemiPixel
c48dc8c2c0 Fail 2015-10-24 18:47:02 -07:00
DemiPixel
afb75e4bea Update docs, small fix 2015-10-24 18:39:59 -07:00
DemiPixel
1b739c3391 NOT FINAL VERSION, stuff still broken but some more fixes 2015-10-24 17:15:04 -07:00
DemiPixel
cfa690efb3 Change serv.world to serv.worlds. Added playerPlugins/world.js and moved a lot of stuff from login.js there. Generating multiple worlds works and moving players there works as well. A few issues here and there. 2015-10-24 17:10:43 -07:00
DemiPixel
1917165caf Change serv.world to serv.worlds. Added playerPlugins/world.js and moved a lot of stuff from login.js there. Generating multiple worlds works and moving players there works as well. A few issues here and there. 2015-10-24 16:56:28 -07:00
Romain Beaumont
24370e9d0f make the program crash in case of errors 2015-10-24 22:12:11 +02:00
Romain Beaumont
17b65f5021 crash when there is an error during login 2015-10-24 21:44:30 +02:00
Romain Beaumont
8a93ffbdd9 anvil loading 2015-10-23 17:26:25 +02:00
Romain Beaumont
cf7b1e8fe5 send only one player_info packet, now that the problem has been solved: don't send the displayName 2015-10-14 18:58:28 +02:00
Romain Beaumont
892199e4a3 Merge pull request #72 from JWo1F/commands
fix #42
2015-10-13 00:17:55 +02:00
Romain Beaumont
c89c9e722e move Command class to its own file, fix bugs in commands and improve info 2015-10-13 00:17:38 +02:00
Romain Beaumont
82353ad13c actually fix displayName by not putting it (the vanilla server does that) 2015-10-12 23:01:27 +02:00
Romain Beaumont
57a253565f display name is a json chat 2015-10-12 22:53:09 +02:00
Romain Beaumont
7b93432d7f disable broken world border 2015-10-12 22:36:10 +02:00
Romain Beaumont
50785a9e5e improve spawn point 2015-10-12 21:59:13 +02:00
Romain Beaumont
c26b11bb74 fix 2 bugs in login : send the update health packet + send named_entity_spawn as fixed point 2015-10-12 21:46:55 +02:00
Romain Beaumont
06770fc23f force compression 2015-10-12 18:59:57 +02:00
Romain Beaumont
0c738d1b74 make map sending a bit more lazy, that way it's always instant to login in the game, even if some chunks are missing 2015-10-12 18:08:20 +02:00
Romain Beaumont
86b83e4e8d fix basic.js, fix #74 2015-10-11 14:25:47 +02:00
JWo1F
b51519e138 fixes 2015-10-11 07:32:49 +03:00
JWo1F
19b5c9a9cc move code to inject section 2015-10-11 07:11:36 +03:00
JWo1F
75f974ecc8 ping! 2015-10-11 06:42:46 +03:00
JWo1F
0f5ce49610 commands 2015-10-11 06:11:03 +03:00
Romain Beaumont
82067d1424 add try catch for the modpe commands to avoid crashes 2015-10-10 19:07:00 +02:00
Romain Beaumont
316ed6b49b add _worldSync to implement modpe api 2015-10-10 18:54:21 +02:00
Romain Beaumont
32c1368107 add all_the_blocks generation 2015-10-10 16:15:33 +02:00
Romain Beaumont
54e9e6b979 Merge pull request #67 from demipixel/mini-worldgen-change
Mini worldgen change
2015-10-10 16:02:37 +02:00
Romain Beaumont
51148036e4 put modpe in its own command namespace (/modpe <command>), add the same /time command that minecraft has 2015-10-10 15:56:47 +02:00
DemiPixel
7fd8e56d3e Of course it breaks 2015-10-09 17:33:29 -07:00
DemiPixel
7a028e7193 Quick fixes, adding everything to api.md 2015-10-09 17:30:10 -07:00
DemiPixel
e062e4d6a9 Start of ticks, added daycycle, fixed inventory + chest things 2015-10-09 17:18:13 -07:00
Romain Beaumont
012f6e7c30 fix lines in modpe.js 2015-10-09 20:17:37 +02:00
Romain Beaumont
3f0c099c42 generate an uuidv3 in offline mode, fix #68 2015-10-09 19:46:14 +02:00
DemiPixel
c72452da79 Added waterline + dirt/bedrock height 2015-10-09 10:29:40 -07:00
Romain Beaumont
36465cf00d fix modpe dir 2015-10-09 18:07:33 +02:00
Romain Beaumont
0e3ce375a6 fix metadata (nmp 0.15) 2015-10-09 18:07:33 +02:00
Romain Beaumont
cd3434b8ea move back files where they should have been (in src/) 2015-10-09 18:07:33 +02:00
Ubuntu
a4cae0c143 Modpe support is merged, added flag for enabling modpe, added world edit 2015-10-09 18:07:33 +02:00
Creeplays
e00d3e294c Move _writeAll 2015-10-09 18:07:33 +02:00
Creeplays
4219435bb7 Blah, blah... 2015-10-09 18:07:33 +02:00
Alex
8658a5eb6b move waterline to params 2015-10-09 18:50:28 +03:00
JWo1F
4e091873d4 Fix grass under water 2015-10-09 18:38:26 +03:00
Romain Beaumont
c4974f8e33 make seed a normal generation option, use es6 default parameters, add superflat (thanks @demipixel) 2015-10-09 15:11:28 +02:00
Romain Beaumont
140cf4bb5a add seed to the parameters of generations 2015-10-09 14:54:10 +02:00
Romain Beaumont
e5a5973575 add options to the generation files 2015-10-09 14:17:13 +02:00
JWo1F
b28204974a fix grass bug 2015-10-09 14:32:00 +03:00
Romain Beaumont
df58bea932 support multiple generation : worldGenerations dir + generation option in the settings, move diamond_square in its own file, 2015-10-09 13:08:00 +02:00
JWo1F
cc3977e41b World Generation 2015-10-09 12:51:50 +02:00
Romain Beaumont
0873206011 fix missing fixedPosition conversion, bypass nmp 0.15 uuid+array bug by sending multiple player_info, fix the mc version since next nmp version will support cross version 2015-10-09 12:30:43 +02:00
Romain Beaumont
2424dac368 increase the kickTimeout to 10min, fix "disconnected" infinite world bug 2015-10-09 00:23:34 +02:00
Romain Beaumont
587ce76f27 use nmp 0.15.0 2015-10-08 23:52:42 +02:00
Romain Beaumont
4b7acbf00e increase the sleep 2015-10-08 23:07:29 +02:00
Romain Beaumont
414c27ddcb add a sleep between each chunk write 2015-10-08 23:03:45 +02:00
Romain Beaumont
d3a20e4399 implement infinite world, fix #43, fix #52, progress on #47 2015-10-08 22:50:04 +02:00