Commit Graph

45 Commits

Author SHA1 Message Date
Slushie 67e019faba
entity/player: rotate nametag to face player (#746)
Nametag is rotated to face the player (Around the Y axes. it still doesn't rotate up or down, I don't know how to rotate it on both axis)
2022-12-31 08:30:22 -08:00
Nathan Ruiz ee8e6cb9f3 Fix formatting 2022-10-30 21:46:21 +00:00
Nathan Ruiz 4ac2a8dafa Fix position serialization 2022-10-24 16:04:54 +00:00
Nathan Ruiz 18b2641d66 Send correct dig packet for each version 2022-10-24 16:04:30 +00:00
Nathan Ruiz 700a31013f Add digging to ECS 2022-09-27 07:07:22 +00:00
terrarier2111 d260162642
entity/systems: fixed typo in comment (#566) 2021-07-18 09:12:42 -07:00
iceiix b7bd59f75f
Update to Rust 1.49.0 (#457)
* Update to Rust 1.49.0

* Fix clippy::manual_range_contains warnings
2020-12-31 09:51:46 -08:00
iceiix 503a98d7a8
Use instant over std::time, for wasm compat (#449)
Replace std::time with the `instant` crate, which bridges to std::time on
native but on wasm calls performance.now() instead of panicking.

A step towards 🕸️ Web support #446

* logo: replace SystemTime/UNIX_EPOCH with Instant
2020-12-27 15:06:03 -08:00
ice_iix 07fd4788e1 Use += to fix assign_op_pattern 2020-06-30 19:03:59 -07:00
iceiix 518b6a07f8
Reformat all source with cargo fmt (#335) 2020-06-21 12:17:24 -07: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 fd028d41b0 Replace println! with log crate facade macros info!, debug!, etc. 2019-05-22 16:01:14 -07:00
ice_iix 1aaf8292ba Add double-jump to toggle creative flight. Closes #46 2019-01-26 13:00:19 -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
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 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 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
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 d704edaf81 Comment out dead code to avoid warning, for https://github.com/iceiix/steven/issues/1 2018-09-29 17:53:01 -07: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
Thinkofname a7caa50b6f Rewrite the UI system (Closes #12) 2016-04-24 12:29:25 +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 cc481d55bb Fix multiple skin rendering issues (Fixes #43) 2016-04-16 21:44:05 +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 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
Thinkofname 3e8de93759 Make light effect entities 2016-04-08 11:08:21 +01:00
Thinkofname 548c98edf8 Add basic nameplates to players 2016-04-07 21:30:20 +01:00
Thinkofname e157daecaf Implement player entities 2016-04-07 20:44:21 +01:00
Thinkofname 8c513a9eb5 Don't remove the skin url when recreating player models 2016-04-07 16:33:08 +01:00
Thinkofname 8469b32061 Initial skin support 2016-04-07 15:55:03 +01:00
Thinkofname c73b9d48b2 Fix sign's texture and positioning 2016-04-05 22:36:29 +01:00
Thinkofname c117f28b2a Block entity support, implement signs 2016-04-04 22:08:24 +01:00
Thinkofname 98ecd348c6 Replace usages of x,y,z for block positions with Position 2016-04-03 20:53:40 +01:00
llogiq 0b8cc33c17 Fixed various clippy warnings 2016-04-03 01:26:31 +01:00
Thinkofname a76f5aeeb0 Don't do collisions until the chunk the player is in has loaded 2016-04-01 00:34:22 +01:00
Thinkofname ed5fb8c93d Initial work on player models 2016-03-28 14:15:21 +01:00
Thinkofname 93c58aad89 Remove unsafe Proxy system 2016-03-27 17:45:12 +01:00
Thinkofname e36a0f4579 Various bug fixes for entity handling. TODO: Smite this system from orbit, it sucks 2016-03-27 17:08:38 +01:00
Thinkofname 6a692ba37d Allow for tracking for component removals and additions 2016-03-27 14:25:34 +01:00
Thinkofname 26bca302aa Minor tweaks 2016-03-27 13:27:31 +01:00
Thinkofname 80f2121bf7 Initial entity work, moved self handling to an entity 2016-03-26 22:21:47 +00:00