1
0
Commit Graph

455 Commits

Author SHA1 Message Date
Pokechu22
a4f327118b 1.9 / 1.9.2 / 1.9.3 / 1.9.4 protocol support (#3135)
* Semistable update to 15w31a

I'm going through snapshots in a sequential order since it should make things easier, and since protocol version history is written.

* Update to 15w34b protocol

Also, fix an issue with the Entity Equipment packet from the past version.  Clients are able to connect and do stuff!

* Partially update to 15w35e

Chunk data doesn't work, but the client joins.  I'm waiting to do chunk data because chunk data has an incomplete format until 15w36d.

* Add '/blk' debug command

This command lets one see what block they are looking at, and makes figuring out what's supposed to be where in a highly broken chunk possible.

* Fix CRLF normalization in CheckBasicStyle.lua

Normally, this doesn't cause an issue, but when running from cygwin, it detects the CR as whitespace and creates thousands of violations for every single line.  Lua, when run on windows, will normalize automatically, but when run via cygwin, it won't.

The bug was simply that gsub was returning a replaced version, but not changing the parameter, so the replaced version was ignored.

* Update to 15w40b

This includes chunk serialization.  Fully functional chunk serialization for 1.9.

I'm not completely happy with the chunk serialization as-is (correct use of palettes would be great), but cuberite also doesn't skip sending empty chunks so this performance optimization should probably come later.  The creation of a full buffer is suboptimal, but it's the easiest way to implement this code.

* Write long-by-long rather than creating a buffer

This is a bit faster and should be equivalent.  However, the code still doesn't look too good.

* Update to 15w41a protocol

This includes the new set passengers packet, which works off of the ridden entity, not the rider.  That means, among other things, that information about the previously ridden vehicle is needed when detaching.  So a new method with that info was added.

* Update to 15w45a

* 15w51b protocol

* Update to 1.9.0 protocol

Closes #3067.  There are still a few things that need to be worked out (picking up items, effects, particles, and most importantly inventory), but in general this should work.  I'll make a few more changes tomorrow to get the rest of the protocol set up, along with 1.9.1/1.9.2 (which did make a few changes).  Chunks, however, _are_ working, along with most other parts of the game (placing/breaking blocks).

* Fix item pickup packet not working

That was a silly mistake, but at least it was an easy one.

* 1.9.2 protocol support

* Fix version info found in server list ping

Thus, the client reports that it can connect rather than saying that the server is out of date.  This required creating separate classes for 1.9.1 and 1.9.2, unfortunately.

* Fix build errors generated by clang

These didn't happen in MSVC.

* Add protocol19x.cpp and protocol19x.h to CMakeLists

* Ignore warnings in protocol19x that are ignored in protocol18x

* Document BLOCK_FACE and DIG_STATUS constants

* Fix BLOCK_FACE links and add separate section for DIG_STATUS

* Fix bat animation and object spawning

The causes of both of these are explained in #3135, but the gist is that both were typos.

* Implement Use Item packet

This means that buckets, bows, fishing rods, and several other similar items now work when not looking at a block.

* Handle DIG_STATUS_SWAP_ITEM_IN_HAND

* Add support for spawn eggs and potions

The items are transformed from the 1.9 version to the 1.8 version when reading and transformed back when sending.

* Remove spammy potion debug logging

* Fix wolf collar color metadata

The wrong type was being used, causing several clientside issues (including the screen going black).

* Fix 1.9 chunk sending in the nether

The nether and the end don't send skylight.

* Fix clang build errors

* Fix water bottles becoming mundane potions

This happened because the can become splash potion bit got set incorrectly.  Water bottles and mundane potions are only differentiated by the fact that water bottles have a metadata of 0, so setting that bit made it a mundane potion.

Also add missing break statements to the read item NBT switch, which would otherwise break items with custom names and also cause incorrect "Unimplemented NBT data when parsing!" logging.

* Copy Protocol18x as Protocol19x

Aditionally, method and class names have been swapped to clean up other diffs.  This commit is only added to make the following diffs more readable; it doesn't make any other changes (beyond class names).

* Make thrown potions use the correct appearence

This was caused by potions now using metadata.

* Add missing api doc for cSplashPotionEntity::GetItem

* Fix compile error in SplashPotionEntity.cpp

* Fix fix of cSplashPotionEntity API doc

* Temporarilly disable fall damage particles

These were causing issues in 1.9 due to the changed effect ID.

* Properly send a kick packet when connecting with an invalid version

This means that the client no longer waits on the server screen with no indication whatsoever.  However, right now the server list ping isn't implemented for unknown versions, so it'll only load "Old" on the ping.

I also added a GetVarIntSize method to cByteBuffer.  This helps clean up part of the code here (and I think it could clean up other parts), but it may make sense for it to be moved elsewhere (or declared in a different way).

* Handle server list pings from unrecognized versions

This isn't the cleanest way of writing it (it feels odd to use ProtocolRecognizer to send packets, and the addition of m_InPingForUnrecognizedVersion feels like the wrong technique), but it works and I can't think of a better way (apart from creating a full separate protocol class to handle only the ping... which would be worse).

* Use cPacketizer for the disconnect packet

This also should fix clang build errors.

* Add 1.9.3 / 1.9.4 support

* Fix incorrect indentation in APIDesc
2016-05-14 20:12:42 +01:00
LogicParrot
ca6ef58b1e Bulk clearing of whitespace 2016-02-05 23:50:18 +02:00
bibo38
657b0ed007 Changed the format of the MobHead data to allow MobHeads working on MInecraft 1.8
The NBT format now carries the texture data and transmit it to the client.
See: http://minecraft.gamepedia.com/Head#Block_entity
Related to #2674
2016-01-11 17:55:32 +01:00
bibo38
a45315ee74 Fixed not working packet decompression
A compressed packed contains always the uncompressed size, but in the code this size was threatened as the compressed data size. This created a failure, when the client compressed a packet.
See: http://wiki.vg/Protocol#With_compression
Fixes #2841
Fixes #2467
2016-01-10 15:16:29 +01:00
Mattes D
491dbda7d3 Fixed Clang warnings. 2016-01-06 16:20:12 +01:00
Mattes D
80e1eb37dd Renamed leftover strings to Cuberite / Server, as needed.
Also upgraded the user setting file for MSVC to 2013.
2016-01-01 21:05:09 +01:00
Mattes D
0054104017 Fixed problems in cBlockingSslClientSocket. 2015-12-30 13:00:02 +01:00
worktycho
76cd723867 Added GeoTrust Root Certificate 2015-12-22 16:08:02 +00:00
Alexander Harkness
8b851d5048 Added HTTPS links wherever they are supported. 2015-12-19 14:30:32 +00:00
Lukas Pioch
d620dcdd08 Moved variables into scope, removed unused variables and fixed variables 2015-12-17 10:48:36 +01:00
Gargaj
68ff0edfde allow horse control (still quite buggy) 2015-12-15 21:14:27 +01:00
Gargaj
4ae3b64b07 implement breeding 2015-11-29 20:14:28 +01:00
Gargaj
1fb89a5409 fix escaped characters in signs (fixes #1736, fixes #2170) 2015-11-24 19:51:39 +01:00
Dave Tucker
83870f9fc0 Add enum for Sound and Particle Effects
Fixes #2603

Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
2015-11-24 13:21:40 +00:00
Julian Laubstein
48f84cc3e9 changed mob age from char to int 2015-11-16 14:13:44 +01:00
Gargaj
6d8baa6a75 idle/deflating creeper should be -1
according to http://wiki.vg/Entities#Creeper
2015-11-09 20:06:32 +01:00
Lukas Pioch
079bb7c016 Update Loops required for JsonCPP 2015-10-26 00:16:35 +00:00
tycho
e1d5e5e165 Improved types of utf 16 strings 2015-10-02 17:26:53 +02:00
worktycho
11c1686092 Merge pull request #2465 from electromatter/master
Added BungeeCord support for Protocol18x
2015-09-27 14:24:15 +01:00
Mattes D
82d9ac1e1c Namechange to Cuberite 2015-09-25 10:14:17 +02:00
electromatter
a24cc01843 Merge branch 'master' into master 2015-09-21 22:44:34 -04:00
tycho
fd7b87741a Refactored cProtocol Chat handling 2015-09-21 12:32:56 +01:00
Eric Chai
1ef6bd8169 added bungeecord support for protocol18x 2015-09-06 09:58:18 -04:00
Tiger Wang
a341419b04 Merge pull request #2380 from cuberite/travis
Use container-based infrastructure
2015-08-20 17:18:08 +01:00
Tiger Wang
de2cce9b79 Fixed food drain bugs 2015-08-20 16:26:42 +01:00
Tiger Wang
5751ba0c1c Use container-based infrastructure for Travis 2015-08-20 16:15:55 +01:00
Matti Hänninen
b20294604c Fix old style casts and implicit conversions 2015-08-12 16:51:38 +03:00
Mattes D
6e4122e551 Unified the doxy-comment format. 2015-07-31 16:49:10 +02:00
Samuel Barney
804805d35a Silenced and fixed many warning messages across multiple files. 2015-07-29 09:49:30 -06:00
bibo38
6a27ec2ea0 Added Rabbit Metadata values.
Added the Rabbit Types and the MoreCarrotTicks value. Types are selected randomly on creation.
Fixes #1867
2015-07-17 01:09:06 +02:00
Tiger Wang
eadd761a29 Merge pull request #2348 from bibo38/customname
Added CustomName and Health to sended Metadata of Monsters.
2015-07-15 22:18:11 +01:00
Julian Laubstein
8b74adcfab Merge pull request #2353 from SamJBarney/DyedArmor
Implements Dyed Leather Armor
2015-07-15 22:31:48 +02:00
Samuel Barney
561296f269 Leather Armor can now be dyed.
* Created new color class to handle dye-related coloring
2015-07-15 14:05:36 -06:00
bibo38
d364b779d1 Added CustomName and Health to sended Metadata of Monsters.
Fixes #2113
2015-07-15 19:32:10 +02:00
Tiger Wang
c390604bc1 Merge pull request #2349 from cuberite/maps
Improved maps
2015-07-15 17:13:55 +01:00
Tiger Wang
8656e149c8 Improved maps 2015-07-14 21:46:30 +01:00
Hallucino
53207d3f18 Support ageable mobs
Move ageable stuff in Monster directly
2015-07-14 22:41:31 +02:00
Samuel Barney
aa94a275c6 Fixes compilation failures on MacOSX 10.10
* Replace old c-style casts with c++ casts
* Added `-Wno-error=old-style-cast` to Protocol18x.cpp
2015-07-09 11:15:37 -06:00
Mattes D
bebd4de144 Fixed warnings generated by 64-bit MSVC. 2015-07-07 11:50:06 +02:00
bibo38
ec628846d2 Fixed Middle-Click Button in the ClickWindow-Packet.
See http://wiki.vg/Protocol#Click_Window
The MiddleClick has the button 2 and not 0. Now you can max an item in an inventory in Creative mode, without inventory desync.
Bugfix #2260
2015-06-25 13:01:48 +02:00
Tiger Wang
6920e468ad Check the return value of InflateString
Fixes #2256
2015-06-18 11:19:41 +01:00
tycho
6687ed03a1 Removed version 29 serilization
This has been unused since support for <1.7 has been dropped.
2015-06-16 10:24:06 +01:00
jan64
be4a5a0803 Fix incorrent experience sending for 1.7 clients 2015-06-07 15:21:18 +02:00
jan64
fd964200b2 Changed SendAboveActionBarMessage / SendSystemMessage to be a noop for < 1.8 clients 2015-06-03 18:11:12 +02:00
jan64
d37e0eb72b Added system and above action bar chat messages 2015-06-02 19:59:46 +02:00
tycho
e19693e529 Merge branch 'master' into PreventNewWarnings
Conflicts:
	src/Inventory.cpp
2015-05-28 11:05:41 +01:00
Mattes D
c3c30a78e1 Merge pull request #1848 from scottwillmoore/ImplementTitleCommand
Implement backend for /title command
2015-05-26 08:46:16 +02:00
tycho
dae9e5792a Made -Weverything an error. 2015-05-24 12:56:56 +01:00
tycho
1577a080ee Merge branch 'master' into PreventNewWarnings 2015-05-23 11:31:03 +01:00
Tiger Wang
8f6788b2ef Close Ssl Socket on destroy
* Fixes #2072
2015-05-22 23:54:32 +01:00