Commit Graph

495 Commits

Author SHA1 Message Date
ice_iix c2e3ddb805 Fix write_with_newline, use writeln 2020-06-29 18:06:35 -07:00
ice_iix c3038f82ce Remove redundant imports (single_component_path_imports) 2020-06-29 18:01:02 -07:00
ice_iix 66a787a535 protocol: change UUID from_str to implement FromStr trait (should_implement_trait) 2020-06-29 17:43:49 -07:00
ice_iix ad52d5cb67 gl: update cargo fmt from previous commit 2020-06-28 18:18:48 -07:00
ice_iix e9d2e4691c Fix temporary_cstring_as_ptr lint, using freed memory 2020-06-28 17:09:45 -07:00
ice_iix 0626888197 1.16.1 protocol support (736) (#345)
* Update shifted packet ids

* Add new smithing recipe type

* Also support 1.16 (735), same packets as 1.16.1 (736)

New packets:

* GenerateStructure

New packet variants:

* UseEntity_Sneakflag, split from UseEntity_Hand

* ClientAbilities_u8, split from ClientAbilities_f32

* UpdateJigsawBlock_Joint, split from UpdateJigsawBlock_Type

* ServerMessage_Sender, split from ServerMessage_Position

* ChunkData_Biomes3D_bool, split from ChunkData_Biomes3D

* JoinGame_WorldNames, split from JoinGame_HashedSeed_Respawn

* Respawn_WorldName, split from Respawn_Gamemode

* EntityEquipment_VarInt renamed

* UpdateLight_WithTrust, split from UpdateLight_NoTrust

* LoginSuccess_UUID, split from LoginSuccess_String
2020-06-27 18:39:59 -07:00
iceiix 518b6a07f8
Reformat all source with cargo fmt (#335) 2020-06-21 12:17:24 -07:00
Mèir Noordermeer b26500e1b2
Fix crash when window gets minimized (#332). Fixes #275
* Make sure aspect ratio is always valid

* Do not render while window has an invalid size (e.g. window is minimized)
2020-06-21 12:24:41 +02:00
ice_iix 41f8be6b90 Update to image 0.23.6, closes #333 2020-06-20 15:04:59 -07:00
Martin Kröning 54763da22d Get scale_factor from window instead of monitor
Fixes #316
2020-06-20 14:27:00 -07:00
iceiix a6bff21de8
Update to glutin 0.22.0 and winit 0.20.0 release (#268)
Thanks to @mwkroening (#317) and @martijnberger (#323) for helping fix this update.

* Update to glutin 0.22.0 and winit 0.20.0 release, removing alpha pinning

* scale_factor() replaces hidpi_factor()

* Listen for ScaleFactorChanged, separate from Resized event

* Fix getting physical size of window

* Fix logical mouse event coordinates
2020-06-20 13:55:45 -07:00
Kezi 3e96d2e03b
Add --username option to set offline username (#290) 2020-06-20 10:41:08 -07:00
Mèir Noordermeer 50befb5a0f
Do not redraw until main events are cleared (#315). Fixes #282
Fixes unresponsiveness to input
2020-06-20 10:26:47 -07:00
ice_iix bda0009a6f Add Cargo.toml for new steven_protocol crate. Closes #167 (#278)
Completes the move of the protocol implementation into a new
crate, named steven_protocol, in the protocol/ subdirectory.

* Add Cargo.toml for steven_protocol

* Add steven_protocol entrypoint in protocol/src/lib.rs

* Use steven_protocol in main

* Remove protocol in main, replaced by steven_protocol

* Remove unused dependencies moved into steven_protocol
2020-02-02 07:47:11 -08:00
ice_iix 643de31073 protocol: atomics replace unsafe for version/debug. Closes #261 2020-01-08 18:57:57 -08:00
iceiix a020ed6f2c
Update to glutin 0.22.0-alpha5, remove wasm_stub (#260)
Update from glutin 0.21.x fork to glutin 0.22.0-alpha5 and corresponding
compatible version of winit. This removes our custom temporary wasm_stub
branches, back to mainline glutin and winit, and is a step towards WebAssembly
compatibility, most importantly merging the game loop and event loops as
required by winit _which now supports wasm_. Not yet functional on the web
because other web dependencies have to be added, see #171 and #34, but native
functionality is preserved.

* Update for 0.22 glutin API changes:

* Move game logic into event loop, run() replacing poll_events()

* Specify fullscreen Borderless mode

* Pass generic parameter of Event through handle_window_event
* hidpi_factor() replaces get_hidpi_factor()
* with_inner_size() replaces with_dimensions()
* No longer need to unwrap() LogicalSize
* set_cursor_grab/visible() replaces grab/hide_cursor()

* Fix modifiers deprecated warnings by destructuring only event fields we use, ignoring the rest with '..'

* Remove unnecessary mutability from events_loop

* Listen for ModifiersChanged event, fixing deprecated modifiers field

* Change to stdweb for web backend, replacing web-sys

* Pin to glutin =0.22.0-alpha5 and winit =0.20.0-alpha6
2020-01-05 17:56:32 -08:00
iceiix 8ab981f3ad
Update to reqwest 0.10.0. Closes #259
* Bump reqwest from 0.9.22 to 0.10.0

* Use blocking reqwest API instead of futures, for now
2020-01-05 10:38:21 -08:00
ice_iix b307843d2b Change to PCG random number generator algorithm
See http://www.pcg-random.org/ for benefits of PCG over xorshift
Updates #236 #183
2020-01-05 10:01:44 -08:00
ice_iix cfbcf71b40 Bump image from 0.21.3 to 0.22.3. Closes #238 2020-01-05 09:10:59 -08:00
ice_iix e435daf959 Remove deprecated Error description, replaced by Display
The Display trait is already implemented, so this is only a code
deletion. Fixes 1.42-nightly warning:

warning: use of deprecated item 'std::error::Error::description': use the Display impl or to_string()
   --> src/protocol/mod.rs:981:40
    |
981 |             Error::IOError(ref e) => e.description(),
    |                                        ^^^^^^^^^^^
    |
    = note: `#[warn(deprecated)]` on by default
2020-01-04 19:35:18 -08:00
ice_iix 20bcddfb13 Replace into_iter() -> iter() for arrays, fixes 1.42-nightly warning
warning: this method call currently resolves to `<&[T; N] as IntoIterator>::into_iter` (due to autoref coercions), but that might change in the future when `IntoIterator` impls for arrays are added.
   --> src/entity/player.rs:363:11
    |
363 |         ].into_iter().enumerate() {
    |           ^^^^^^^^^ help: use `.iter()` instead of `.into_iter()` to avoid ambiguity: `iter`
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #66145 <https://github.com/rust-lang/rust/issues/66145>
2020-01-04 19:33:05 -08:00
ice_iix 8502c031f8 Update to Rust 1.40.0. Closes #253
* Update mem::uninitialized to MaybeUninit

* Update to Rust version 1.40 in AppVeyor

* Update readme for Rust version requirement
2020-01-04 17:26:26 -08:00
ice_iix 2daca512b0 1.15.1 protocol support (575) (#252)
* Add v1_15_1 for protocol 575

* Update for shifted packet IDs

https://wiki.vg/index.php?title=Pre-release_protocol&oldid=15213#Packets
https://wiki.vg/Pre-release_protocol

* Add SpawnMob packet variant, no metadata

* Add SpawnPlayer packet variant, no metadata

* Add block update actions comments, including beehive

* Add particle packet variant with 64-bit floats

* Add and handle join game and respawn packet variants, with hashed seeds

* Add chunk data packet variant with 3D biomes

https://wiki.vg/index.php?title=Pre-release_protocol&oldid=15213#Chunk_Data
"1024 biome IDs, ordered by x then z then d, in 4×4×4 blocks. Not
present if full chunk is false."

This is a fixed-size array of integers, but Rust doesn't yet support
generics over integers, so the 1024-element array doesn't support
fmt::Debug, hence we wrap it and implement fmt::Debug ourselves.

* Add load_chunk115 to not read chunk data structure biomes

https://wiki.vg/index.php?title=Pre-release_protocol&oldid=15213#Data_structure
2019-12-29 15:55:19 -08:00
ice_iix 49f2582a50 Fix warning: `...` range patterns are deprecated 2019-11-02 15:46:10 -07:00
ice_iix c88631b124 Fix bare trait objects warning, add explicit `dyn` 2019-11-02 15:46:06 -07:00
ice_iix 6723c75ab4 Add missing time, nbt{_compound,}_tag command nodes. Fixes #227 2019-11-02 13:43:00 -07:00
iceiix d24b6cb599
Fix SpawnPainting parsing 1.13.2-1.14.4, closes #212 (#213)
The packet changed in 1.13.2 but wasn't updated, so we split the packet
variants into SpawnPainting_String for the old version and
SpawnPainting_VarInt for the new version with a 'motive' VarInt field
instead of a String title.

1.9-1.12.2 SpawnPainting_String: https://wiki.vg/index.php?title=Protocol&oldid=14204#Spawn_Painting
1.13.2-1.14.4 SpawnPainting_VarInt: https://wiki.vg/index.php?title=Protocol&oldid=14889#Spawn_Painting
2019-08-17 13:36:07 -07:00
iceiix d1f88c9797
1.13+: Fix parsing Teams packet. Closes #205 (#208)
* Add Teams_VarInt packet variant for 1.13+

https://wiki.vg/index.php?title=Pre-release_protocol&oldid=14150#Teams

* Rename the variant for 1.9-1.12.2 to Teams_u8
2019-08-11 17:46:34 -07:00
iceiix 45099165d9
1.14.4 protocol support (498) (#207)
* Add protocol 498 for 1.14.4

* Add 0x5c AcknowledgePlayerDigging packet, https://wiki.vg/index.php?title=Pre-release_protocol&oldid=14870#Acknowledge_Player_Digging

* Add new demand field in protocol::Trade

https://wiki.vg/index.php?title=Pre-release_protocol&type=revision&diff=14862&oldid=14856
MC-151282 - Villager trade GUI does not show the correct price on servers if trade demand is high
2019-08-11 17:26:20 -07:00
ice_iix 9066b19031 Allow Cmd modifier as alternative to Ctrl, closes #206 2019-08-11 16:15:36 -07:00
iceiix 95a9920cb6
1.14.3 protocol support (490) (#194)
* Copy v1_14_3 from v1_14_2

* Add protocol 490 for v1_14_3

* Add missing 1.14 release TradeList packet fields

TradeList only had fields from the prerelease:
19w02a (452): https://wiki.vg/index.php?title=Pre-release_protocol&oldid=14515#Trade_List

add the six missing fields present in the 1.14 release:
1.14 (477): https://wiki.vg/index.php?title=Pre-release_protocol&oldid=14752#Trade_List

Note this breaks 19w02a TradeList parsing, can be fixed by splitting the
packet for 19w02a/1.14 if needed later.

* Add TradeList_WithRestock variant with new can_restock field
2019-07-07 14:58:49 -07:00
ice_iix 19948ff397 Fix redundant imports on rustc 0.35.0. Fixes #175 2019-05-30 18:13:54 -07:00
iceiix 0fbcb192d8
1.14.2 protocol support (485) (#170)
* Add protocol 1.14.2 (485)

* Copy v1_14_2 from v1_14_1

* Update readme for protocol support
2019-05-29 08:22:45 -07:00
iceiix 836ab9f126
wasm: Fix operation not supported on std::fs. Closes #115 (#166)
* Add new web-based std::fs replacement, localstoragefs:

https://github.com/iceiix/localstoragefs

* Add std_or_web to switch between std::fs (native) or localstoragefs (web)

* Update www readme for new missing glutin/winit links, opens issue #171
2019-05-29 08:21:56 -07:00
ice_iix 367c3e5e09 Use super:: relative instead of crate::protocol absolute import paths 2019-05-25 14:09:09 -07:00
ice_iix 1125c3883d Conditionalize wasm_bindgen to fix compile error on wasm32-wasi
From investigation for #115, now three targets:

- wasm32-unknown-unknown: build with `wasm-pack build`, uses
the #[wasm_bindgen] directive on main()

- wasm32-wasi: build with `cargo +nightly build --target wasm32-wasi`,
requires normal main()

- native targets: same as wasm32-wasi
2019-05-22 18:12:10 -07:00
iceiix fd7add3f17
wasm: log output to browser JavaScript console (#163)
Logging from the `log` facade goes to the colorized in-game GUI console (opened with the backtick key), as well as standard output using `println!` on the native build. To make this work on the wasm build, web-sys is used to access the `console` object, to call `console.log`, `console.warn`, and so on corresponding to the log levels. Extends #92, fails later (see also #115) but now outputs the starting up message:

[main.rs:206][INFO] Starting steven

* Add println! logging to console.log on wasm

* Initialize logger before config (called 'console variables' for some reason) to avoid having to disable it to reach the first logging statement

* Add web-sys crate for browser console access, wasm32-only

* Refactor logger to call println_level on both web/native

* Add multiple log levels, console.warn etc., matching console_log crate

https://github.com/iamcodemaker/console_log#details
2019-05-22 16:12:43 -07:00
ice_iix fd028d41b0 Replace println! with log crate facade macros info!, debug!, etc. 2019-05-22 16:01:14 -07:00
iceiix 8071db668c
Update to glutin 0.21.0. Closes #157 (#160)
Updating the glutin dependency to a 0.21.0-based branch, based on the migration guide at:
https://gentz.rocks/posts/glutin-v0-21-0-migration-guide/

* Remove glutin::ContextTrait

* Create window with ContextBuilder instead of WindowedContext::new

* Add .window() accessor on WindowContext, since it now dereferences to Context

In order to not break wasm32-unknown-unknown compilation, a minor fork is used of glutin v0.21.0 and a corresponding version of winit: https://github.com/iceiix/glutin/pull/1 https://github.com/iceiix/winit/pull/2
 - with stubs to compile (but not run, see issue #115)
2019-05-19 17:58:08 -07:00
ice_iix 9ceddc5057 Fix toggling fullscreen with F11 initially. Closes #156 2019-05-19 11:43:36 -07:00
iceiix e9b336192a Add support for a modded block: rockwool from Thermal Expansion (#153)
The first in support for modded content, a simple custom block: "rockwool" from the Thermal Expansion and Thermal Foundation mods for Forge:

https://ftb.gamepedia.com/Rockwool_(Thermal_Expansion_3)

This makes use of the Forge handshake (#88 #134 #144), matching the mod block names from the negotiation to numeric identifiers in the world to steven_blocks. Rockwool was chosen due to ease of implementation, it looks like wool from vanilla (except is fire-proof), and by supporting it the groundwork necessary is laid for more sophisticated mod support.

Tested with Thermal Expansion on 1.7.10, 1.10.2 (FTB Beyond), and 1.12.2 Forge servers.

* Add `modid` macro token, skipped from vanilla mappings

* Add ThermalExpansionRockwool block (1.7.10)

* Register modded blocks by modid->[data], and lookup block metadata

* Save block IDs from ModIdData/RegistryData to World modded_block_ids

* Add namespaced mod ids for ModIdData, \u{1}=block \u{2}=item

* Add ThermalFoundation's Rockwool (1.12.2)
2019-05-15 12:49:57 -07:00
ice_iix 480b865363 Refactor recipe parsing minecraft: prefix, related to #155 2019-05-15 12:49:50 -07:00
iceiix 8d4d606873
Disable parsing advancements to fix 1.12.2 Forge SevTech crash (#148) (#149)
Leave the advancements packet as an opaque blob for now instead of trying to deserialize it, because it apparently is changed on some modded servers - see https://github.com/iceiix/stevenarella/issues/148
2019-05-13 17:13:22 -07:00
iceiix 599227aef2 1.14.1 protocol support (480) (#151)
* Copy v1_14_1 from v1_14

* Add protocol 1.14.1 (480)

* Update readme

* 0x08 serverbound is now ClickWindowButton

https://wiki.vg/index.php?title=Pre-release_protocol&oldid=14764#Click_Window_Button
2019-05-13 16:45:41 -07:00
ice_iix 1274a75f81 Enhance -p/--protocol-version to accept game version string
Now you can pass `-p 1.7.10` as an alternative to `-p 5`, etc
2019-05-13 16:35:39 -07:00
ice_iix 10e5d6f441 Replace read_to_string -> read_to_end to improve UTF-8 deserialization
See c1692e950a
There are two more instances, encountered when debugging #148

> Instead of read_to_string(), use read_to_end() to read into a buffer,
> then convert using String::from_utf8() and unwrap it. This gives a
> better error message when UTF-8 fails to decode.

which includes the offending bytes that can't be converted
2019-05-12 14:08:53 -07:00
iceiix b98ba3afd2
Fix packet compression (fixes FTB Beyond, etc.). Closes #146 (#147)
Previously, the zlib compressor was initialized once, lazily, then reused for each packet by resetting the stream. This didn't properly emit the zlib headers, so packet compression was broken and caused "java.util.zip.DataFormatException: incorrect header check" on the server. Since packets are only compressed above a threshold, this problem manifested itself only on larger servers, such as 1.10.2 FTB Beyond and Skyfactory 3, and 1.12.2 SevTech: Ages, which require sending a large ModList above the compression threshold enabled by the server. Change to instead recreate the zlib compressor, each time it is used as to capture the full header. For symmetry, the decompressor is also recreated each time.

* Removes self.compression_write and self.compression_read instance variables

* Remove self.compression_write, initialize with cursor

* Log compressing/decompressing packets in network debug mode
2019-05-12 12:15:02 -07:00
iceiix 0cd02fd2da
Forge 1.8.9-1.12.2 handshake protocol support (#144)
Adds support for connecting to Forge servers from 1.8.9 up to 1.12.2.
(1.7.10 was already supported with #134 #88)

Tested on:

- 1.8.9 + forge 11.15.1.2318 + ironchest
- 1.10.2 + forge 12.18.3.2511 + ironchest
- 1.11.2 + forge 13.20.1.2588 + ironchest
- 1.12.2 + forge 14.23.5.2837 + ironchest

Changes:

* Parse and handle FmlHs::RegistryData packet for 1.8+

* Fix RegistryData acknowledgement phase WaitingServerComplete

* Fix acknowledgement phase for 1.7.10 ModIdData too, somehow it worked accidentally

* Append \0FML\0 to end of server hostname if Forge mods detected

https://wiki.vg/Minecraft_Forge_Handshake#Connection_to_a_forge_server
2019-05-11 18:37:33 -07:00
ice_iix ba4a7a9d85 1.7.10: Fix player position too high on login. Closes #87
Adds a new TeleportPlayer_NoGround packet, which is subtly different
from TeleportPlayer_NoConfirm. The flags u8 is replaced with an
on_ground bool, but more importantly the Y position is the eyes
position, so we have to translate to feet position for the client.

1.7.10: https://wiki.vg/index.php?title=Protocol&oldid=6003#Player_Position_And_Look
1.8.9: https://wiki.vg/index.php?title=Protocol&oldid=7368#Player_Position_And_Look
2019-05-11 14:53:42 -07:00
ice_iix a159355751 1.7.10: Fix sending head/feet player position, #87
1.8+ removes the player head position, and sends only the feet position.
We store the feet position internally in the client, so the head
position has to be calculated, normally 1.62 units higher. Previously
the calculation was reversed, which caused the client to show its
position as 1.62 units higher than the server, and the server would
correct the position when the client descends to the ground.

1.7.10: https://wiki.vg/index.php?title=Protocol&oldid=6003#Player_Position
1.8.9: https://wiki.vg/index.php?title=Protocol&oldid=7368#Player_Position
2019-05-11 14:24:41 -07:00
iceiix c8e13c38bd Fix movement fixed-point packets, misplaced players on 1.7/8 (#140)
Movement packets were handled incorrectly, because although the fields are specified as integers they are actually fixed-point values, which need to be converted to floating-point before use. These fields were converted with `as f64`, but they actually need to be scaled. To fix this add several new types, FixedPoint5 for 5-bit fractional fixed-point and FixedPoint12 for 12-bit. Both are parameterized by an integer type: FixedPoint5<i32> and FixedPoint5<i8> for 1.7.10/1.8.9, FixedPoint12<i16> for 1.9+. This moves the calculation into the packet field parsing, so it no longer has to be calculated in src/server/mod.rs since the scaling is taken care of as part of the field type. This fixes the long-standing invisible or actually misplaced players bug on 1.7.10 and 1.8.9, closes #139.

* Add new FixedPoint5<T> type for 1.7/8, https://wiki.vg/Data_types#Fixed-point_numbers

* Add FixedPoint12<i16> for 1.9+, moving type conversion into packet type

https://wiki.vg/index.php?title=Protocol#Entity_Relative_Move

* Add num-traits 0.2.6 dependency for NumCast to use instead of From

* Use FixedPoint5<i32> in spawn object, experience orb, global entity, mob, player, teleport

* Use FixedPoint5<i8> and FixedPoint12<i16> in entity move, look and move

* Update packet handling bouncer functions, using f64::from for each conversion
2019-05-11 13:28:25 -07:00
ice_iix 87bfb8d2a4 Change Lengthable trait method names to into_len/from_len
std::convert::From<usize> cannot be used here because we cannot
implement bool<->usize conversions, due to Rust's orphan rules:

http://smallcultfollowing.com/babysteps/blog/2015/01/14/little-orphan-impls/
"prevent you from implementing external traits for external types"

Nonetheless, Lengthable used the same methods as From. This is allowed
but can require disambiguation if both are used, no longer strictly
needed for #140 but to reduce confusion and improve clarity, renamed
`from` to `from_len` and `into` to `into_len`.
2019-05-11 13:03:24 -07:00
ice_iix b1cae32eed Update to rand 0.6.5 and migrate off deprecated methods. Closes #81
* Import from rand_xorshift crate

* Use shuffle/choose from SliceRandom trait

See https://rust-random.github.io/book/update-0.6.html
2019-05-08 19:32:05 -07:00
ice_iix de25096a6b Fix non-JSON sign text rendering, such as on 1.7.10. Closes #135
src/format.rs Component from_string() attempts JSON deserialization
using serde_json::from_str, and if it fails falls back to a literal text
string. Call from_string() instead of deserializing in format::Component
read_from() and then from_value(). Note the from_string() comment:

    // Sometimes mojang sends a literal string, so we should interpret it literally
2019-05-08 19:12:36 -07:00
ice_iix 06cab07ae6 Log plugin messages only if -n/--network-debug enabled 2019-05-08 19:11:23 -07:00
ice_iix 938905068b Add command-line option to change default protocol version
Previously, we would send the latest supported protocol version in the
server ping packet. This normally works fine since the server will
respond with the protocol version it supports, which we'll use. However,
some server software such as BungeeCord supports _multiple_ protocols,
and the server will match what the client sent in the ping (if it
supports it). Since BungeeCord is a proxy, it forwards to backend
servers which can be of various versions, which won't necessarily be the
latest.

This change adds a command-line option to change the "default" protocol
version, -p or --default-protocol-version, which is used in the ping
packet instead. Current default is 477 (1.14), but if you pass for
example -p 404 (1.13.2), then BungeeCord will respond accordingly:

packet = Some(StatusResponse(StatusResponse { status: "{\"version\":{\"name\":\"BungeeCord 1.8.x-1.14.x\",\"protocol\":404},\"players\":{\"max\":1,\"online\":0},\"description\":{\"extra\":[{\"color\":\"dark_blue\",\"text\":\"Another Bungee server\"}],\"text\":\"\"},\"modinfo\":{\"type\":\"FML\",\"modList\":[]}}" }))

[main.rs:95][INFO] Detected server protocol version 404

and this protocol will be used. Effectively, this option lets you
masquerade as any supported client version.

See https://github.com/iceiix/stevenarella/issues/125#issuecomment-489484701
2019-05-06 16:00:01 -07:00
iceiix 327efcf043 Add Forge handshake support. Closes #88 (#134)
Adds support for connecting to 1.7.10 modded servers using the FML|HS protocol:
https://wiki.vg/Minecraft_Forge_Handshake

* Handle client-bound plugin message packets

* Parse FML|HS plugin channel messages

* Add ModList serialization using Mod serializable, LenPrefixed<VarInt, Mod>

* Save forge_mods from server ping and send in FML|HS ModList packet

* Show Forge mod count in server ping listing

* Send acknowledgements, completing the handshake

* Add VarShort to custom payload len prefix replaces i16, fixes OOM on large modded servers

* Add custom CoFHLib's SendUUID packet -26

See explanation at https://github.com/SpigotMC/BungeeCord/issues/1437
This packet is defined by CoFHLib in https://github.com/CoFH/CoFHLib/blob/1.7.10/src/main/java/cofh/lib/util/helpers/SecurityHelper.java#L40
Fixes thread '' panicked at 'bad packet id 0xffffffe6 in Clientbound Play' with FTB:IE
2019-05-05 18:39:58 -07:00
ice_iix 30b91f4707 Remove unused Game instance variable protocol_version 2019-05-05 17:33:10 -07:00
ice_iix 4520f6bdae Add flag to log network packets for debugging, --network-debug
Pass -n or --network-debug to print out the packets from the server as
they are received, as well as write to last-packet for later analysis.
Useful when debugging network protocol issues. Builds on #90 #114.
2019-05-05 14:32:48 -07:00
iceiix 047ba79947
Add command-line arguments parsing, --server (#90) (#114)
* Add structopt dependency

* Add command-line --server argument to connect to server on startup

* Don't show login/server screen (which pings servers) when connecting to a server from command-line
2019-05-04 18:36:22 -07:00
ice_iix 6322cf8b21 Re-ping server on connect to detect protocol version
Previously, the server protocol was detected in the server listing GUI,
and saved for each server in a server_versions.json file. connect_to()
would read this file to get the version to use, an ugly hack/workaround
for threading/intercommunication challenges, and a questionable attempt
at avoiding another round-trip exchange.

Now, the server is re-pinged in connect_to() to get the protocol version
to use. This is a blocking ping so it may somewhat slow down server
connecting, but avoids the race conditions with the server list, and
undesirable intertwining the GUI with the server connection logic.

This hack was present since the original multiprotocol support (#18),
but it was blocking other enhancements, about time to remove it.
2019-05-04 17:21:58 -07:00
ice_iix eca9b8ae00 1.14 protocol support (477) (#132). Closes #72
Adds 1.14 (477) protocol support, based on:

https://wiki.vg/index.php?title=Pre-release_protocol&oldid=14723

* New packets: SetDifficulty, LockDifficulty, UpdateJigsawBlock, UpdateViewPosition, UpdateViewDistance

* New metadata: Optional VarInt (17) and Pose (18)

* Add new join game variant with view distance, without difficulty

* Add new server difficulty variant, with locked boolean

* Implement recipe parsing changes, add stonecutting recipe type
2019-05-04 16:04:19 -07:00
ice_iix c1692e950a Improve error reporting of invalid UTF-8 when deserializing strings
std::io::Read read_to_string() [1] reports this uninformative error:

thread 'main' panicked at 'Err: IOError(Custom { kind: InvalidData, error: StringError("stream did not contain valid UTF-8") })', src/server/mod.rs:442:33

Instead of read_to_string(), use read_to_end() to read into a buffer,
then convert using String::from_utf8() and unwrap it. This gives a
better error message when UTF-8 fails to decode:

thread '' panicked at 'called Result::unwrap() on an Err value: FromUtf8Error { bytes: [105, 110, 101, 99, 114, 97, 102, 116, 58, 99, 114, 97, 102, 116, 105, 110, 103, 95, 115, 104, 97, 112, 101, 100, 20, 109, 105, 110, 101, 99, 114, 97, 102, 116, 58, 98, 111, 110, 101, 95, 98, 108, 111, 99, 107, 3, 3, 0, 1, 1, 134, 5, 1, 0, 1, 1, 134, 5, 1, 0, 1, 1, 134, 5, 1, 0, 1, 1, 134, 5, 1, 0, 1, 1, 134, 5, 1, 0, 1, 1, 134, 5, 1, 0, 1, 1, 134, 5, 1, 0, 1, 1, 134, 5, 1, 0, 1, 1, 134, 5, 1, 0, 1, 249, 2, 1, 0, 25, 109], error: Utf8Error { valid_up_to: 50, error_len: Some(1) } }', src/libcore/result.rs:1009:5

which is helpful for tracking down protocol errors, such as updating to
a new protocol (developed for GH-132 / GH-72).

[1] https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.read_to_string
[2] https://doc.rust-lang.org/std/string/struct.String.html#method.from_utf8
2019-04-30 19:20:32 -07:00
ice_iix acc086bf27 Add entity_summon and other missing CommandData nodes. Fix #119
Match to 4428409d41/protocol/src/main/java/net/md_5/bungee/protocol/packet/Commands.java (L514)
Not all were documented on https://wiki.vg/Command_Data
2019-03-17 15:26:21 -07:00
ice_iix 0d5c1478a5 Update for glutin wasm_stub branch tracking Rust 2018 changes
c0b36056bd
https://github.com/iceiix/glutin/pull/1
2019-03-03 11:50:52 -08:00
iceiix 2f2f35848a
Add support for compiling WebAssembly wasm32-unknown-unknown target (#92)
Note this only is the first step in web support, although the project compiles, it doesn't run!

Merging now to avoid branch divergence, until dependencies can be updated for wasm support.

* Add instructions to build for wasm32-unknown-unknown with wasm-pack in www/

* Update to rust-clipboard fork to compile with emscripten

https://github.com/aweinstock314/rust-clipboard/pull/62

* Exclude reqwest dependency in wasm32

* Exclude compiling clipboard pasting on wasm32

* Exclude reqwest-using code from wasm32

* Install wasm target with rustup in Travis CI

* Update to collision 0.19.0

Fixes wasm incompatibility in deprecated rustc-serialize crate: https://github.com/rustgd/collision-rs/issues/106

error[E0046]: not all trait items implemented, missing: `encode`
    --> github.com-1ecc6299db9ec823/rustc-serialize-0.3.24/src/serialize.rs:1358:1

* Increase travis_wait time even further, try 120 minutes

* Set RUST_BACKTRACE=1 in main

* Remove unused unneeded bzip2 features in zip crate

To fix wasm32-unknown-unknown target compile error:
error[E0432]: unresolved imports `libc::c_int`, `libc::c_uint`, `libc::c_void`, `libc::c_char`
 --> src/github.com-1ecc6299db9ec823/bzip2-sys-0.1.7/lib.rs:5:12
  |
5 | use libc::{c_int, c_uint, c_void, c_char};
  |            ^^^^^  ^^^^^^  ^^^^^^  ^^^^^^ no `c_char` in the root
  |            |      |       |
  |            |      |       no `c_void` in the root
  |            |      no `c_uint` in the root
  |            no `c_int` in the root

* flate2 use Rust backend

* Add console_error_panic_hook module for wasm backtraces

* Build using wasm-pack, wasm-bindgen, run with wasm-app

* Update to miniz_oxide 0.2.1, remove patch for https://github.com/Frommi/miniz_oxide/issues/42

* Update to official clipboard crate since https://github.com/aweinstock314/rust-clipboard/pull/62 was merged, but git revision pending release

* Update to branch of glutin attempting to build for wasm

https://github.com/iceiix/glutin/pull/1

* Update winit dependency of glutin to git master

https://github.com/iceiix/winit/pull/2

* Update to glutin branch with working (compiles, doesn't run) wasm_stub

* Add app name in title on web page

* Add wasm to Travis-CI test matrix

* Update glutin to fix Windows EGL compilation on AppVeyor

97797352b5
2019-03-03 08:32:36 -08:00
ice_iix 86b1c940ee Update to glutin unreleased post-0.19.0 git revision, current master 2019-03-02 15:17:45 -08:00
Bart Ribbers 3e176fa7c2 Replace trim_left_matches() (deprecated) for trim_start_matches() (#110) 2019-02-23 09:02:04 -08:00
ice_iix 7624b89292 Add 1.13.2+ protocol parsing Particle packet variant. Fixes #104
Pre-1.13.2 particle packet: https://wiki.vg/index.php?title=Protocol&oldid=14204#Particle_2
1.13.2 and later: https://wiki.vg/Protocol#Particle_2 + https://wiki.vg/Protocol#Particle

Split into Particle_Data (1.13.2+) and Particle_VarIntArray (pre-1.13.2)

Fixes crash when landing when dropping from creative flight, among other
crashes when a particle packet is sent.
2019-01-26 13:41:54 -08:00
ice_iix 1aaf8292ba Add double-jump to toggle creative flight. Closes #46 2019-01-26 13:00:19 -08:00
ice_iix c80372a1f1 Rename project to Stevenarella (#83)
This fork has significantly diverged from the original, it is time
to make it official, as a new distinct project. Forked from
https://github.com/thinkofname/steven into https://github.com/iceiix/steven,
now moved to https://github.com/iceiix/stevenarella and renamed accordingly.

* Update readme

* Update logo

* Update binary name

* Update window title

* Update splash text
2019-01-11 20:41:19 -08:00
iceiix 916473d8a7
Add 19w02a (452) multiprotocol support (#82)
Adds support for the 19w02a (451) protocol, yesterday's snapshot.
Builds on https://github.com/iceiix/steven/pull/79 18w50a
Closer to https://github.com/iceiix/steven/issues/72 1.14 protocol support
Updates https://github.com/iceiix/steven/issues/18 Enhance protocol support

* Add 19w02a (452) protocol

* Add campfire recipe type

* Add trade list new packet, and window open variants
2019-01-10 17:47:07 -08:00
iceiix 9adf589436
Add 18w50a (451) multiprotocol support (#79)
Adds 18w50a (451) multiprotocol support, last snapshot of 2018
Reference: https://wiki.vg/index.php?title=Pre-release_protocol&oldid=14491

* Use v18w50a module for protocol

* Add blasting, smoking, and suspicious stew recipe types

* Add entity tags to tags packet

* Add chunk data packet variant with height map

* Add update light packet

* Add chunk format parsing with block_count, without skylights, conditionalize on protocol_version >= 451

* Add villager data entity metadata type parsing

https://wiki.vg/Pre-release_protocol#Entity_Metadata

* Add open book and entity sound effect packets
2019-01-10 17:21:19 -08:00
iceiix 98cc88df5c
Workaround resource manager RwLock deadlock (#78). Closes https://github.com/iceiix/steven/issues/75
game.resource_manager, an Arc<RwLock<resources::Manager>>, sometimes hangs on write(), apparently a deadlock. Switch to using try_write() and continue the main game loop iteration if it fails, using the previous resource version and allow main loop tick if can't obtain a write lock. No warning is logged since this error is recoverable and seemingly intermittent. May not be the best fix, but unblocking iterative development.
2019-01-06 19:56:34 -08:00
iceiix e1769edae8
Update base64, serde_json, and serde (#76)
* Update to base64 0.10.0, use standard base64 config. Closes https://github.com/iceiix/steven/pull/52

* Update to serde_json 1.0.34. Closes https://github.com/iceiix/steven/pull/73

* Update to serde 1.0.84. Closes https://github.com/iceiix/steven/pull/74
2019-01-05 19:55:27 -08:00
iceiix 11f2d2ae13 1.13.2 (404) multiprotocol support (#67)
Adds support for 1.13.2 protocol (404)
Expands https://github.com/iceiix/steven/issues/18 Enhance protocol support

Metadata:

* Support 1.13.2 slot data format, bool and varint item id, optional damage (moved to NBT)

https://wiki.vg/index.php?title=Slot_Data&type=revision&diff=14363&oldid=7835

Packets:

* Add 1.13.2 packets, and implement all the command data parsers

https://wiki.vg/Command_Data#Parsers

* Send new plugin channel minecraft:brand

https://wiki.vg/Plugin_channels#minecraft:brand

* Add 1.13.2 metadata format, with shifted IDs

https://wiki.vg/Entity_metadata#Entity_Metadata_Format

* Implement particle entity metadata

* Add structures for 16 new packets

Blocks: The Flattening:

* Assign flattened IDs in correct order using new 'offset' macro token

* Assign hierarchical (pre-flattening) block IDs sequentially by counting Some data

* Split VANILLA_ID_MAP into flat/hier struct, to support before and after the flattening

* Extend travis build time to 20 minutes because the blocks macro takes a long time

* Support both flat/hier blocks by passing protocol_version to by_vanilla_id

Add block states and offsets for all blocks, replacing metadata for 1.13+:

* Add stripped logs and what was Log2 to Log
* Add the Wood blocks, should be called bark, previously Axis::None Log
* Add leaves distance and offset
* Add jungle/acacia to Leaves moved from Leaves2
* Add dispenser offsets, direction
* Add note block states
* Add offset None to Missing253 and Missing254, no holes in block states of 1.13.2
* Add bed colors
* Add seagrass, tall seagrass, remove redundant deadgrass, and piston offset
* Add torch, TNT, fire offsets, remove slabs
* Add furnance offset, merges lit into a property
* Add pressure plate offsets, new pressure plates, redstone ore/lit merged
* Add lever offsets, new directions from ceiling/floor, rename LeverDirections
* Add redstone torch offsets, new blocks since lit/unlit is now merged, and standing/wall is split
* Change lever to split face/facing, rm LeverDirection, add AttachedFace
* Add stone button offsets, face/facing similar to lever
* Move face/facing data and variant to AttachedFace, reuse for lever/stonebutton
* Add data_with_facing_and_powered() to AttachedFace, for lever/stonebutton
* Add wooden button offsets each wood
* Add pumpkin without a face
* Add carved pumpkin, portal offsets
* Add lit pumpkin (as jack-o-lantern) offsets after carved pumpkin
* Add repeater offsets, merged into Repeater
* Change brown mushroom block to booleans instead of MushroomVariant
* Add mushroom block offsets, red/brown mushroom blocks, and a new mushroom stem block
* Add command block, cobblestone walls, and flower pot offsets
Empty flower pot, and potted plants including saplings. Rename
variant DarkOak to DarkOakSaplings because it is a sapling, and
remove the duplicate Dandelion variant which causes duplicate blocks.
* Increase recursion limit in steven_blocks
* Add colored banner offsets
* Add wooden slab including double slab, in a different position for pre-1.13 and 1.13
* StoneSlabVariant::Wood -> StoneSlabVariant::PetrifiedWood
* Add fence_gate_offset() for wooden fence gates
* Add frosted ice age, offset
* Add new blocks: kelp, turtle egg, coral, coral fans, sea pickle, blue ice, smooth stone
* Add new blocks: conduit, void air, cave aid, bubble column, last of the 1.13 blocks
2018-12-28 21:22:58 -08:00
iceiix 2b641c9af3 1.7.10 (5) multiprotocol support (#64)
Adds 1.7.10 protocol version 5 support, a major update with significant changes.
Expands https://github.com/iceiix/steven/issues/18 Enhance protocol support

* Add v1_7_10 protocol packet structures and IDs

* EncryptionRequest/Response i16 variant in login protocol

* 1.7.10 slot NBT data parsing

* Support both 1.7/1.8+ item::Stack in read_from, using if protocol_verson

* 1.7.10 chunk format support, ChunkDataBulk_17 and ChunkData_17

* Extract dirty_chunks_by_bitmask from load_chunks17/18/19

* Implement keepalive i32 handler

* Send PlayerPositionLook_HeadY

* Send PlayerBlockPlacement_u8_Item_u8y

* Handle JoinGame_i8_NoDebug

* Handle SpawnPlayer_i32_HeldItem_String

* BlockChange_u8, MultiBlockChange_i16, UpdateBlockEntity_Data, EntityMove_i8_i32_NoGround, EntityLook_i32_NoGround, EntityLookAndMove_i8_i32_NoGround

* UpdateSign_u16, PlayerInfo_String, EntityDestroy_u8, EntityTeleport_i32_i32_NoGround

* Send feet_y = head_y - 1.62, fixes Illegal stance

https://wiki.vg/index.php?title=Protocol&oldid=6003#Player_Position

> Updates the players XYZ position on the server. If HeadY - FeetY is less than 0.1 or greater than 1.65, the stance is illegal and the client will be kicked with the message “Illegal Stance”.

> Absolute feet position, normally HeadY - 1.62. Used to modify the players bounding box when going up stairs, crouching, etc…

* Set on_ground = true in entity teleport, fixes bouncing

* Implement block change, fix metadata/id packing, bounce _u8 through on_block_change

* Implement on_multi_block_change_u16, used with explosions
2018-12-17 15:59:17 -08:00
ice_iix 46999f59bb Add protocol version global mutable to merge Metadata18/19 into one
Cleans up https://github.com/iceiix/steven/pull/57 1.8.9 (47) multiprotocol support
which added too much code duplication, Metadata19 vs Metadata18, and
different packets for each, the only difference being how it was parsed.

Instead, switch back to using only one Metadata implementation, but with
parsing conditionalized on a new global mutable: SUPPORTED_PROTOCOL_VERSION.
Accessing global mutable state is unsafe but it is only set when
initializing the connection, and only read when deep enough in the code
where it is not feasible to pass otherwise. More elegant, worth it.
2018-12-11 18:18:25 -08:00
ice_iix 1cb671093d 1.8.9 (47) multiprotocol support (#57)
Protocol 47 (1.8.9-1.8) is the biggest multiprotocol (https://github.com/iceiix/steven/issues/18) change yet:

* New chunk format (load_chunk18)
* New metadata format (Metadata18)
* New packets and changes to 13 packets

References:

http://wiki.vg/index.php?title=Protocol&oldid=7368
https://wiki.vg/Protocol_version_numbers#Versions_after_the_Netty_rewrite
https://wiki.vg/Protocol_History#1.8
https://github.com/PrismarineJS/minecraft-data/blob/master/data/pc/1.8/protocol.json
1.8 chunk format: https://wiki.vg/index.php?title=Chunk_Format&oldid=6124
1.9 chunk format: https://wiki.vg/index.php?title=Chunk_Format&oldid=7411
1.8 vs 1.9: https://wiki.vg/index.php?title=Chunk_Format&diff=7411&oldid=6124
https://github.com/PrismarineJS/prismarine-chunk/blob/master/src/pc/1.8/section.js
https://github.com/PrismarineJS/prismarine-chunk/blob/master/src/pc/1.8/chunk.js

Details:

* Add 1.8.9 packet IDs from https://github.com/iceiix/steven/pull/37

* Add ChunkDataBulk, parse the ChunkMeta and save data in Vec<u8>

* Add EntityEquipment u16 variant, EntityStatus, ChunkData u16 variants

* SpawnPlayer with added held item

https://wiki.vg/Protocol_History#15w31a Removed Current Item short from Spawn Player (0x0C)

* SpawnObject no UUID and optional velocity

https://wiki.vg/index.php?title=Protocol&oldid=7368#Spawn_Object
https://wiki.vg/Protocol_History#15w31a
Added Entity UUID after entity ID to Spawn Object (0x0E)
Spawn Object always sends velocity, even if data is 0

* SpawnMob no UUID variant

https://wiki.vg/Protocol_History#15w31a
Added Entity UUID after entity ID to Spawn Mob (0x0F)

* Maps packet without tracking position boolean

https://wiki.vg/index.php?title=Protocol&oldid=7368#Map
https://wiki.vg/Protocol_History#15w34a
Added tracking position boolean to Map (0x34)

* Update Entity NBT was removed and Bossbar added (both 0x49) >1.8

https://wiki.vg/index.php?title=Protocol&oldid=7368#Update_Entity_NBT
https://wiki.vg/Protocol_History#15w31a
Removed Update Entity NBT Packet (0x49)
Added Boss Bar packet (0x4

* Use entity without hands

https://wiki.vg/index.php?title=Protocol&oldid=7368#Use_Entity
https://wiki.vg/Protocol_History#15w31a
Added VarInt enum for selected hand in Use Entity (0x02); only sent if type is interact or interact at

* Player block placement, held item stack and face byte variant

https://wiki.vg/index.php?title=Protocol&oldid=7368#Player_Block_Placement
https://wiki.vg/Protocol_History#15w31a
Face for Player Block Placement is now a VarInt enum instead of a byte
Replaced held item (slot) with VarInt enum selected hand in Player Block Placement

* Arm swing without hands, a packet with no fields, uses a ZST

https://wiki.vg/index.php?title=Protocol&oldid=7368#Animation_2
https://github.com/iceiix/steven/pull/57#issuecomment-444289008
https://doc.rust-lang.org/nomicon/exotic-sizes.html

* ClickWindow uses u8 mode, same as in 15w39c

* ClientSettings without hands

* SpectateTeleport is added before ResourcePackStatus

* Copy load_chunk to load_chunk19 and load_chunk18

* 1.8 chunk reading implementation, load_chunk18

* Support both metadata formats, Metadata18/Metadata19

* Remove fmt::Debug

* Implement formatting in MetadataBase and bounce through fmt::Debug
2018-12-09 12:03:55 -08:00
ice_iix 3a359267dd Fix backspace not deleting in textfields, but shows ⌂. Closes https://github.com/iceiix/steven/issues/55 2018-12-04 15:51:20 -08:00
ice_iix a5a6a71397 Fix logging bad packet IDs in multiprotocol packet translation macro
https://github.com/iceiix/steven/pull/57#issuecomment-443962662
2018-12-04 08:03:58 -08:00
iceiix 3f5024d4ec
Add 15w39c (74) multiprotocol support (#56)
Closes https://github.com/iceiix/steven/pull/17
This is the biggest multi-protocol change yet, adding many new packet variants and implementing the most, necessitating a respectable amount of refactoring. The last of the "easy" protocols (already implemented, and cribbed from Steven commit history).
For https://github.com/iceiix/steven/issues/18 Enhance protocol support

* Add 15w39c packet IDs

* Add 15w39c packet changes

* Implement EntityMove i16 and i8 packet variants

* Implement EntityLookAndMove i16 and i8 packet variants

* Implement TeleportPlayer no confirm / with confirm packet variants

* Implement EntityTeleport f64 and i32 packet variants

* Implement SpawnPlayer f64 and i32 packet variants
2018-12-03 19:29:02 -08:00
ice_iix b6de7103a7 Add 1.9 (107) multiprotocol support
Closes https://github.com/iceiix/steven/pull/16
Enhances https://github.com/iceiix/steven/issues/18
2018-12-03 16:06:20 -08:00
ice_iix 166079ab06 Add 1.9.2 (109) multiprotocol support
Closes https://github.com/iceiix/steven/pull/15
Enhances https://github.com/iceiix/steven/issues/18
2018-12-03 15:40:57 -08:00
ice_iix 7e54e68d72 Add 1.10.2 (210) multiprotocol support
Closes https://github.com/iceiix/steven/pull/14
Enhances https://github.com/iceiix/steven/issues/18
2018-12-03 15:04:39 -08:00
iceiix d03f102bb8
Multiprotocol support: 1.12.2 and 1.11.2 (#54)
Adds support for connecting to both 1.12.2 and 1.11.2 (protocols 340 and 316) servers

https://github.com/iceiix/steven/issues/18 Enhance protocol support
Closes https://github.com/iceiix/steven/pull/48 1.11.2 protocol support (316)

* Restore create_ids!() macro in packet identifiers

* Add translate_packet_id() function to map external 1.12.2 packet ids to internal sequential ids

* Implement translate_internal_packet_id() from a new protocol_packet_ids! macro

* Move packet IDs to separate file, v1_12_2.rs

* Change supported protocols constant to an array

* Add v1_11_2 protocol packet IDs (from https://github.com/iceiix/steven/pull/48)

* Add keep alive packet variants: _i64 (>=1.12.2) and _VarInt (<=1.11.2)

* Abstract protocol versions, can now connect to both 1.12.2 and 1.11.2

* Send protocol version in handshake packet

* Restore 1.11 (315) protocol support as in original (https://github.com/thinkofname/steven) Steven
2018-12-03 14:22:47 -08:00
iceiix be6e1f79f1 1.12.2 protocol support (340) (#40)
* Add new 1.12.2 packets and shift IDs

CraftRecipeResponse
AdvancementTab
SelectAdvancementTab
Advancements
CraftingRecipeRequest
UnlockRecipes
CraftingBookData

* Fix unlock recipes packet, add length-prefixed arrays

https://wiki.vg/index.php?title=Protocol&oldid=14204#Unlock_Recipes

* Update resources to 1.12.2

* Handle NBTTag metadata (value 13), parsed as nbt::NamedTag

https://wiki.vg/index.php?title=Entity_metadata&oldid=14048#Entity_Metadata_Format
https://github.com/iceiix/steven/pull/40#issuecomment-443454757

* Fix entity packet IDs, 0x25 now is Entity https://wiki.vg/index.php?title=Protocol&oldid=14204#Entity

* Add NBT long array (type 12) support

https://wiki.vg/NBT#Specification

* Entity metadata type is now a VarInt, not u8: https://wiki.vg/index.php?title=Entity_metadata&oldid=14048#Entity_Metadata_Format

* Keep alives changed to longs, no longer VarInts

https://wiki.vg/index.php?title=Protocol&oldid=14204#Keep_Alive_.28serverbound.29

* Parse CraftRecipeResponse (0x2b)

* Add structs for advancements data

* Implement Serializable trait for Advancement and AdvancementDisplay

* Implement advancement progress parsing; advancement packet works

* Particle packet adds fallingdust (46) with length 1

https://wiki.vg/index.php?title=Protocol&oldid=14204#Particle_2
2018-12-02 19:37:41 -08:00
ice_iix 36d9c1383e Recognize translate text components, instead of showing "UNHANDLED"
For example, if a server connection times out and you are kicked, Steven
will now show disconnect.reason timeout, versus a non-descriptive
UNHANDLED message. This text is supposed to be looked up in a
translation table for localization, not yet supported, but showing the
translation identifier is more informative than nothing.
2018-12-02 19:25:11 -08:00
iceiix e8025a0978
1.11.2 (316) protocol update (#38)
Only a minor update, -1 now indicates no color, so changed u8 to i8:

https://wiki.vg/Protocol_History#16w50a
https://wiki.vg/index.php?title=Protocol&diff=8543&oldid=8405
https://wiki.vg/index.php?title=Protocol&oldid=8543

and updated version numbers. 1.11.2 uses the same 1.11 assets, which can
be found by looking up 1.11.2 in:

https://launchermeta.mojang.com/mc/game/version_manifest.json
https://launchermeta.mojang.com/v1/packages/6bd228727ed48bd7ac7bdc0088587dad0fb7c02b/1.11.2.json

1.11.2/1.11 is compatible except for the version number, which is now sent matching the server (#20), so no backwards-compatible branch for 1.11 (315) is needed.

https://github.com/iceiix/steven/issues/18 Enhance protocol support
2018-12-01 10:10:48 -08:00
iceiix 6189d560fd
Explicitly assign packet IDs (not implicitly from ordering in source code) (#19)
The packet IDs were assigned by the `create_ids!` macro, in the order they are in
the source code. This reduces flexibility for adopting new protocols, since the
packets can be reordered arbitrarily. Part of https://github.com/iceiix/steven/issues/18
2018-11-30 17:02:26 -08:00
iceiix d80eca3940
Get the protocol version to send from the ping packet (#20)
The first step of https://github.com/iceiix/steven/issues/18 Enhance protocol support,
instead of hardcoding a fixed version, the client now matches whatever the server sent.

* Get the protocol version to send from the ping packet

* Save/load server protocol versions to disk, server_versions.json

* Fallback to default SUPPORTED_PROTOCOL if no ping response
2018-11-30 16:41:27 -08:00
iceiix c099a68168
Use glutin to replace sdl2 (#35)
* Add glutin dependency

* Create a glutin window

* Use the glutin window, basics work

* Store DPI factor on game object, update on Resized

* Use physical size for rendering only. Fixes UI scaled too small

Fixes https://github.com/iceiix/steven/pull/35#issuecomment-442683373
See also https://github.com/iceiix/steven/issues/22

* Begin adding mouse input events

* Listen for DeviceEvents

* Call hover_at on mouse motion

* Listen for CursorMoved window event, hovering works

Glutin has separate WindowEvent::CursorMoved and
DeviceEvent::MouseMotion events, for absolute cursor and relative mouse
motion, respectively, instead of SDL's Event::MouseMotion for both.

* Use tuple pattern matching instead of nested if for MouseInput

* Implement left clicking

* Use grab_cursor() to capture the cursor

* Hide the cursor when grabbing

* Implement MouseWheel event

* Listen for keyboard input, escape key release

* Keyboard input: console toggling, glutin calls backquote 'grave'

* Implement fullscreen in glutin, updates https://github.com/iceiix/steven/pull/31

* Update settings for glutin VirtualKeyCode

* Keyboard controls (note: must clear conf.cfg to use correct bindings)

* Move DeviceEvent match arm up higher for clarity

* Remove SDL

* Pass physical dimensions to renderer tick so blit_framebuffer can use full size but the ui is still sized logically.

* Listen for DeviceEvent::Text

* Implement text input using ReceivedCharacter window event, works

https://github.com/iceiix/steven/pull/35#issuecomment-443247267

* Request specific version of OpenGL, version 3.2

* Request OpenGL 3.2 but fallback to OpenGL ES 2.0 if available (not tested)

* Set core profile and depth 24-bits, stencil 0-bits

* Allow changing vsync, but require restarting (until https://github.com/tomaka/glutin/issues/693)

* Clarify specific Rust version requirement

* Import glutin::* in handle_window_event() to avoid overly repetitive code

* Linux in VM fix: manually calculate delta in MouseMotion

For the third issue on https://github.com/iceiix/steven/pull/35#issuecomment-443084458
https://github.com/tomaka/glutin/issues/1084 MouseMotion event returns absolute instead of relative values, when running Linux in a VM

* Heuristic to detect absolute/relative MouseMotion from delta:(xrel, yrel); use a higher scaling factor

* Add clipboard pasting with clipboard crate instead of sdl2

https://github.com/iceiix/steven/pull/35#issuecomment-443307295
2018-11-30 11:35:35 -08:00
iceiix 26b1867604 Fix uninitialized texP and heightP in clouds_geo. Closes https://github.com/iceiix/steven/issues/32 2018-11-28 16:45:25 -08:00
ice_iix b91ef23c20 Fix model rendering on OSX by removing [] from uniform names. Closes https://github.com/iceiix/steven/issues/25 2018-11-27 17:03:36 -08:00
iceiix 47d18781b6
Add toggling full screen mode with F11 hotkey (#31)
* Detect when F11 is pressed

* Change mutability of window in handle_window_event()

* Toggle fullscreen between Desktop and Off
2018-11-20 19:42:36 -08:00
ice_iix 7d41bb838d Revert "Change multisampling count to 0, improved fix/workaround for AMD GPUs (#26)"
NUM_SAMPLES=0 or 1 breaks AMD Radeon R9 M295X on Windows 11, but 2 works.

This reverts commit 748911a91b.
2018-11-19 17:44:06 -08:00
ice_iix 1854275282 Fix HDPI scale/offset: Revert "Use drawable_size instead of size for rendering"
Closes https://github.com/iceiix/steven/issues/22 Wrong GUI offsets on AMD Radeon R9 M295X

This reverts commit 715b0cb1ee.
2018-11-19 07:51:55 -08:00
iceiix 748911a91b
Change multisampling count to 0, improved fix/workaround for AMD GPUs (#26)
Part of fixing graphical rendering bugs: https://github.com/iceiix/steven/issues/25
Corrupted graphics on AMD video cards: https://github.com/Thinkofname/steven/issues/74

The previous workaround set NUM_SAMPLES to 2, but this added an extra texel fetch. Setting to 1 reproduces the 16px blue striped unexpected behavior. Setting to 0 samples avoids the extra fetch and the striping.

This is allowed per http://docs.gl/gl3/glTexImage2DMultisample:
> samples specifies the number of samples in the image and must be in the range zero to GL_MAX_SAMPLES - 1.
2018-11-18 16:18:16 -08:00
ice_iix 77cd4ecf35 Use field init shorthand, instead of x:x, just x,
https://rust-lang-nursery.github.io/edition-guide/rust-2018/data-types/field-init-shorthand.html

find src -name '*.rs' -exec perl -pe 's/\b(\w+): \1,/$1,/g' -i {} \;
2018-11-04 13:43:30 -08:00
ice_iix 2af7307d8b Remove inferred 'static lifetime on const, Rust 1.17+
No longer needed since it is inferred automatically:
https://rust-lang-nursery.github.io/edition-guide/rust-2018/ownership-and-lifetimes/simpler-lifetimes-in-static-and-const.html
2018-11-04 13:37:57 -08:00
ice_iix 103a58f92a Remove unnecessary #[macro_use] on console 2018-11-04 12:53:03 -08:00
ice_iix 411e4f69a6 Remove unnecessary 'extern crate's in Rust 2018 edition, import macros
https://rust-lang-nursery.github.io/edition-guide/print.html#no-more-extern-crate
https://rust-lang-nursery.github.io/edition-guide/rust-2018/macros/macro-changes.html
https://github.com/iceiix/steven/pull/13#issuecomment-435702507
2018-11-04 12:39:23 -08:00
ice_iix a40cd43a2e Update to use crate:: for current crate, for Rust 2018 edition
From `cargo fix --edition`, see https://rust-lang-nursery.github.io/edition-guide/print.html#the-crate-keyword-refers-to-the-current-crate
2018-11-04 12:06:00 -08:00
ice_iix db02f9e790 Update try!() to new ? syntax for Rust 2018 edition
Not automatically updated, see https://users.rust-lang.org/t/why-does-cargo-fix-replace-try-with-r-try-instead-of/21972/3
There are other tools to replace it, btu this is what I used:
find src -name '*.rs' -exec perl -MRegexp::Common -0777 -pe'$bp=$RE{balanced}{-parens=>"()"}; s/try\!($bp)/substr($1, 1, length($1) - 2) . "?"/ges' -i {} \;
2018-11-04 11:48:51 -08:00
ice_iix fc18e9836f Remove anonymous trait parameters, name _ for Rust 2018
https://rust-lang-nursery.github.io/edition-guide/rust-2018/trait-system/no-anon-params.html
2018-11-04 11:48:34 -08:00
ice_iix f6a56f5b86 Use non-colliding variable name dynamic_texture instead of dyn (now a keyword) 2018-11-04 11:31:28 -08:00
iceiix 1589a29685
Remove use of OpenSSL for RSA PKCS1 encryption (#12). Closes #2
* Add handwritten RSA PKCS1 encryption using num-bigint and simple_asn1

* Add more logging to compare OpenSSL with/without side-by-side

* Log message and ciphertext in hex

* Print N and e as hexadecimal integers

* Fix bad encryption caused by zeros in PKCS1 padding

PS field in https://tools.ietf.org/html/rfc8017#section-7.2.1
Must be nonzero

* Use rand fill instead of rand_bytes

* Remove OpenSSL!

* Update CI scripts and docs to not install OpenSSL

* Remove copying OpenSSL DLLs (libeay and ssleay) in AppVeyor script

* Change rsa_public_encrypt_pkcs1 to return a Result<Vec<u8>, String>

* Add error checking, returning Err<String> on failure; RFC comments

* Add the required message representative range checking

* Use expect() instead of unwrap() on from_der

* Map the ASN.1 error to a String to return it from rsa_public_encrypt_pkcs1() instead of panicking

* Move RSA to a new crate, rsa_public_encrypt_pkcs1

https://github.com/iceiix/rsa_public_encrypt_pkcs1

* Update to rsa_public_encrypt_pkcs1 with simple_asn 0.1.0

https://github.com/iceiix/rsa_public_encrypt_pkcs1/issues/1

* Update to published version of rsa_public_encrypt_pkcs1, 0.1.0

* Remove unnecessarily added blank line

* Remove libssl-dev from .travis.yml
2018-11-04 09:40:51 -08:00
iceiix 90aaeaf16a
Support beta Rust release. Closes #8 (#11)
* Remove seemingly unneeded const on MetadataKey<T> new

* Change biome temperature/moisture to integer, x100 to remove floating-point so can use within stable 'const fn'

* Remove unstable const_fn feature, now using stable const fn: see https://www.reddit.com/r/rust/comments/9msqfn/const_fn_soon_on_stable_rust/

* Test on Rust beta (awaiting 1.31 release for stable)

* Update readme for beta Rust support
2018-11-02 16:57:23 -07:00
iceiix 6d88ce23ec Switch to RustCrypto for Cfb8 symmetric crypto, instead of OpenSSL (#10) (#2)
* Encrypt with both RustCrypto cfb8 and OpenSSL

* Switch to RustCrypto for decrypting

* Show encryption for both RustCrypto and OpenSSL, for comparison...

* Correct off-by-one error in encryption, cfb8 doesn't need extra byte

* Remove OpenSSL for symmetric crypto

* Update Cargo.lock
2018-11-01 20:46:21 -07:00
ice_iix c36d0706ac Remove obsolete comment 2018-10-29 17:10:08 -07:00
ice_iix 56a1cb2b76 Fix logging with set_boxed_logger, add std feature to dep
https://github.com/rust-lang-nursery/log/issues/303
2018-10-28 19:45:57 -07:00
ice_iix 51a5e3ed5c Update to rust-openssl 0.10.15 (from 0.7.8)
Major API change, the last of the outdated dependencies
Closes https://github.com/iceiix/steven/issues/4

Note: would still like to replace the last usages of the OpenSSL crate
https://github.com/iceiix/steven/issues/2 but it is needed for CFB8
until a replacement is available (maybe https://github.com/RustCrypto/stream-ciphers/issues/4)
2018-10-27 19:56:34 -07:00
ice_iix 80c740c1c5 Update to cgmath 0.16.1, collision 0.18.0
https://github.com/iceiix/steven/issues/4
2018-10-27 18:11:26 -07:00
iceiix b17f296ab4
Replace hyper with reqwest (#7)
An old version of hyper was used before (0.8.0), in the process of updating to hyper 0.12.11, found this higher-level replacement/wrapper, reqwest 0.9.4 which is simpler to use than the latest hyper and serves the purpose of a simple HTTP client well

* Begin updating to hyper 0.12.11

https://github.com/iceiix/steven/issues/4#issuecomment-425759778

* Use type variables for hyper::Client

* Fix setting header syntax, Content-Type: application/json, 17->13

* Parse strings into URLs with url.parse::<hyper::Uri>().unwrap()

b20971cb4e/examples/client.rs (L25)

* Use hyper::Request::post() then client.request() since client.post() removed

* wait() on the ResponseFuture to get the Result

* try! to unwrap the Result

* status() is now a method

* Concatenate body chunks unwrap into bytes, then parse JSON from byte slice, instead of from_reader which didn't compile

* Replace send() with wait() on ResponseFuture

* Parse HeaderValue to u64

* Slices implement std::io::Read trait

* Read into_bytes() instead of read_to_end()

* Disable boxed logger for now to workaround 'expected function, found macro'

* Remove unnecessary mutability, warnings

* Hack to parse twice to avoid double move

* Use hyper-rustls pure Rust implementation for TLS for HTTPS in hyper

* Start converting to reqwest: add Protocol::Error and reqwest::Error conversion

* Use reqwest, replacing hyper, in protocol

* Convert resources to use reqwest instead of hyper

* Convert skin download to reqwest, instead of hyper

* Remove hyper

* Revert unnecessary variable name change req/body to reduce diff

* Revert unnecessary whitespace change to reduce diff, align indentation on .

* Fix authenticating to server, wrong method and join URL

* Update Cargo.lock
2018-10-27 17:03:34 -07:00
iceiix de6cd2044e
Update to serde_json 1.0 (#6)
* Replace find() with get()

* Update for renamed as_string->as_str and as_boolean->as_bool

https://github.com/serde-rs/json/releases/tag/v0.8.0
Value::as_string() has been renamed to as_str() and Value::as_boolean() has been renamed to as_bool() to improve consistency
https://github.com/serde-rs/json/issues/126

* No serde_json::Value::I64/U64/F64 anymore, only Number

* Update from lookup() to pointer(), using JSON pointer syntax

https://github.com/iceiix/steven/pull/6#issuecomment-432472123

* Remove unused and removed ObjectBuilder import

* Use into_iter().collect() to convert BTreeMap to serde_json::Map

* Change parse_rules to accept serde_json::Map instead of BTreeMap

* Remove unused serde_json macro_use

* Update Cargo.lock
2018-10-23 18:47:21 -07:00
ice_iix edbed5e319 Check glGetError() in rendering loop
For investigating https://github.com/iceiix/steven/issues/5
No errors seen
2018-10-07 13:53:50 -07:00
ice_iix ed5d48f136 Clamp NUM_SAMPLES glTexImage2DMultisample at GL_MAX_SAMPLES, since not all systems support >1 see https://github.com/iceiix/steven/issues/5#issuecomment-427669426 2018-10-07 10:08:24 -07:00
iceiix cceb1768b1 Panic on incomplete framebuffer so can see where it was called with RUST_BACKTRACE=1 2018-10-07 09:43:00 -07:00
ice_iix 7731117e4f Check framebuffer statuses before rendering and unbinding
No errors, so not the cause of https://github.com/iceiix/steven/issues/5
2018-10-07 08:00:07 -07:00
ice_iix 84c682b177 Check framebuffer status later not immediately after binding
No errors https://github.com/iceiix/steven/issues/5
2018-10-06 13:58:16 -07:00
ice_iix 3a32710b17 Check framebuffer status after each bind
For https://github.com/iceiix/steven/issues/5
GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT
2018-10-06 13:28:19 -07:00
ice_iix 7503b90667 Use the RustCrypto sha-1 crate instead of sha1
For https://github.com/iceiix/steven/issues/2#issuecomment-425769562
2018-10-03 18:28:05 -07:00
ice_iix d2b59fbd10 Update to rand 0.5.5 for https://github.com/iceiix/steven/issues/4
Useful guide: https://github.com/rust-random/rand/blob/master/UPDATING.md
2018-09-30 19:05:20 -07:00
ice_iix c688836a16 Use hex module for hex decoding, removing deprecated rustc-serialize for https://github.com/iceiix/steven/issues/4 2018-09-30 18:14:36 -07:00
ice_iix e988c64376 Use base64 crate for base64 instead of deprecated rustc-serialize, for https://github.com/iceiix/steven/issues/4 2018-09-30 17:58:40 -07:00
ice_iix fe99910550 Update to image 0.20.0 2018-09-30 17:21:05 -07:00
ice_iix 43f6565fa5 Update to log 0.4.5
https://github.com/iceiix/steven/issues/4
2018-09-30 16:36:00 -07:00
ice_iix fd2c51eac4 Update to flate2 1.0.2
https://github.com/iceiix/steven/issues/4
2018-09-30 16:19:24 -07:00
ice_iix 562ab9dbc4 Remove unused username field in Server. Closes https://github.com/iceiix/steven/issues/1 2018-09-30 00:25:07 -07:00
ice_iix d6fa1d0a0b Fix warning: unnecessary parentheses around function argument, new in nightly-2018-02-15 2018-09-29 23:28:38 -07:00
ice_iix 6eaf1688f4 Remove time crate in favor of std::time, removing last usage in main
Combined with these changes, which also convert to std::time:
47aeb83da2 logo text
2f861f815a light updates
9677f8ae9c server ping
2018-09-29 23:11:47 -07:00
ice_iix 9677f8ae9c Use std::time for server ping, getting closer to eliminating use of 'time' crate, https://github.com/iceiix/steven/issues/3 2018-09-29 22:57:55 -07:00
ice_iix 2f861f815a Use std::time for 5ms light updates instead of time crate
More progress on https://github.com/iceiix/steven/issues/3
2018-09-29 22:36:55 -07:00
ice_iix 163556fbf1 Use sha1 module for hashing instead of openssl, part of https://github.com/iceiix/steven/issues/2 2018-09-29 22:23:48 -07:00
ice_iix 47aeb83da2 Use std::time instead of time crate for logo text, progress on https://github.com/iceiix/steven/issues/3 2018-09-29 20:01:13 -07:00
ice_iix fbd71ea8ce Fix warning: variable does not need to be mutable, in nightly-2017-08-31
https://github.com/iceiix/steven/issues/3
2018-09-29 18:42:13 -07:00
ice_iix d704edaf81 Comment out dead code to avoid warning, for https://github.com/iceiix/steven/issues/1 2018-09-29 17:53:01 -07:00
ice_iix 84cbc3d00e Fix illegal use of floating point in pattern, https://github.com/iceiix/steven/issues/1 https://github.com/rust-lang/rust/issues/41620 2018-09-29 17:50:02 -07:00
ice_iix fa8f7bb9b9 Increase sample count to 2 to fix/workaround rendering issue #74 https://github.com/Thinkofname/steven/issues/74 2018-09-29 17:31:16 -07:00
iceiix b399b74adb Update to rust-sdl2 0.31.0 2018-09-29 13:56:52 -07:00
iceiix 743aaac4cd Enable SDL hint to workaround SDL_SetRelativeMouseMode broken on Linux
Fixes https://github.com/Thinkofname/steven/issues/73
See https://bugzilla.libsdl.org/show_bug.cgi?id=2150
2018-09-29 13:39:20 -07:00
Matthew Collins 2e99712cc8 Update rust-sdl to fix a bug (Fixes #69) 2017-05-14 10:04:34 +01:00
satoshinm 2f950a749c Fix use of deprecated Rc:would_unwrap 2017-05-14 09:58:34 +01:00
Techcable 1e8c3582ed Update to Minecraft 1.11 (Fixes #63) 2016-12-09 14:32:02 +00:00
llogiq 5e0c041a71 Fixed another batch of clippy warnings
Those are mostly readability-related. Also did a cargo update.
2016-09-15 15:15:52 +01:00
Techcable 555b646696 Update to minecraft 1.10.2 2016-07-10 12:23:59 +01:00
Kyle Wood 8d95965d40 Enable paste in textboxes 2016-04-26 00:50:16 +01:00
Thinkofname 6e33c3cc36 Fix the text boxes in the server edit screen not being focusable 2016-04-26 00:31:47 +01:00
Thinkofname 2e3d9a0a4b Fix skins reverting to default on reload 2016-04-25 13:45:13 +01:00
Thinkofname 61829c055a Fix a crash caused by trying to load a skin whilst missing vanilla resources 2016-04-25 13:31:24 +01:00
Thinkofname 4436736dce Download vanilla assets (sounds/locales) and load as a pack 2016-04-25 13:21:30 +01:00
Thinkofname 3b7d2cb8ee Fix default textures being replaced with the missing texture on reload 2016-04-25 12:05:57 +01:00
Thinkofname f23c16bff2 Update client url and add an in-game progress bar for the download (Fixes #22) 2016-04-24 23:22:10 +01:00
Thinkofname f8be801eac Improve biome color handling 2016-04-24 20:09:24 +01:00
Thinkofname 88d43c615a Move the disconnected message to the foreground 2016-04-24 14:05:21 +01:00
Thinkofname a7caa50b6f Rewrite the UI system (Closes #12) 2016-04-24 12:29:25 +01:00
Thinkofname b0c54a3561 Don't leak the block targeting model when disconnecting from a server 2016-04-22 00:01:38 +01:00
Thinkofname 5f725a843b Teleport entities when they are far from their target position 2016-04-21 23:24:01 +01:00
Thinkofname 287867dbcd Add a collidable flag to Material 2016-04-21 21:47:39 +01:00
Thinkofname 3038596b27 Simplify chunk loading 2016-04-21 21:20:28 +01:00
Thinkofname 9c816c7ea1 Implement interaction with blocks 2016-04-21 20:25:58 +01:00
Thinkofname 98422678a3 Add block targeting 2016-04-21 19:53:47 +01:00
Thinkofname d719e117ad Work around a block mapping bug 2016-04-21 13:38:49 +01:00
Thinkofname df37ec283d Handle errors when fetching skins better 2016-04-21 13:09:20 +01:00
Thinkofname feb7ea1630 Fix a crash caused by duplicate block mappings 2016-04-21 12:55:42 +01:00
Thinkofname 50ded118f3 Remove a leftover comment 2016-04-21 11:43:42 +01:00
Thinkofname edf6f34a0b Separate the console and console vars. Removes the need to lock on the console to read vars 2016-04-21 11:40:50 +01:00
Thinkofname 380a844272 Implement a background for the option menus 2016-04-21 11:00:05 +01:00
Thinkofname ebc11224e7 Fix the player's body glitching when moving 2016-04-20 22:16:40 +01:00
Thinkofname 23e779c0d7 Make BlockSnapshots use BlockStorage 2016-04-20 21:52:04 +01:00
Thinkofname 94bfc1493b Make the storage system used for chunk sections reusable 2016-04-20 21:52:04 +01:00
Thinkofname b25b565b8a Default vsync to disabled 2016-04-16 21:57:38 +01:00
Thinkofname 380f549454 Fix a large number of warnings 2016-04-16 21:44:05 +01:00
Thinkofname cc481d55bb Fix multiple skin rendering issues (Fixes #43) 2016-04-16 21:44:05 +01:00
TheUnnamedDude f349d516f2 Implement frame limit and configurable vsync (Fixes #29) 2016-04-10 22:05:05 +01:00
Thinkofname 75fb828a89 Simplify model rendering 2016-04-09 21:49:39 +01:00
Thinkofname a7c586b2e9 Optimize the types used for blocks.
Reduces the size of a block from 16 bytes -> 8 bytes on my 64 bit machine.
2016-04-09 13:48:42 +01:00
Thinkofname bb82798ab8 Disable ticking completely when disconnected from a server 2016-04-09 11:43:44 +01:00
Thinkofname a644f3ac8f Handle unused uniforms and attributes better 2016-04-09 11:08:17 +01:00
Thinkofname d5a6eb36db Fix an attribute being larger than needed 2016-04-09 10:46:00 +01:00
TheUnnamedDude 4c590f8184 Add a options/pause menu (Closes #4) 2016-04-09 09:56:55 +01:00
Thinkofname 2acfa47491 Reduce the distance the camera lags behind the player's actual position 2016-04-09 01:11:33 +01:00
Thinkofname e35a122305 Rework movement to improve compatibility with servers using NoCheatPlus (Fixes #35) 2016-04-09 00:40:35 +01:00
Thinkofname 1df78ad1c9 Fix handling of pitch for teleports/moves 2016-04-08 22:33:35 +01:00
Thinkofname 0e23e1d86f Fix entities not correctly being removed on switching servers 2016-04-08 21:39:00 +01:00
Thinkofname 1f91a10678 Fix teleports having the look direction inverted 2016-04-08 21:35:08 +01:00
Thinkofname bfbd4fe05a Clean up the protocol implementation to use generics instead of trait objects 2016-04-08 18:46:07 +01:00
Thinkofname fc82b62a04 Send a MC|Brand plugin message when joining servers 2016-04-08 18:30:05 +01:00
Thinkofname d8bdf94da2 Improve checks to see if an entity is moving 2016-04-08 17:58:00 +01:00
Scetch 1781d74ca0 Fix models to reflect Direction index changes. 2016-04-08 12:55:30 -04:00
Scetch 64ec2e4d3b Cleaning up blocks a little bit. 2016-04-08 11:30:41 -04:00
Thinkofname accf01e1fb Fix the skin processing thread crashing on shutdown 2016-04-08 11:48:26 +01:00
Thinkofname 6cfef5af2d Fix clicking causing the camera to flick 2016-04-08 11:44:23 +01:00
Thinkofname 3e8de93759 Make light effect entities 2016-04-08 11:08:21 +01:00
Thinkofname 027134f4c6 Better handling for unused blocks found during chunk load (Fixes #34) 2016-04-08 01:48:45 +01:00
Thinkofname d8b90b74bc Support being kicked from servers 2016-04-08 01:41:26 +01:00
Thinkofname 51ec66ec5c Don't clean up air blocks from the block map on chunk load (Fixes #34) 2016-04-08 01:18:08 +01:00
Thinkofname a0ae0465b0 Don't over resize chunk sections 2016-04-08 01:01:28 +01:00
Thinkofname ff83cd7367 Remove dead code from the last commit 2016-04-08 00:21:57 +01:00
Thinkofname 456411c816 Fix model rescaling 2016-04-07 23:55:18 +01:00