Commit Graph

862 Commits

Author SHA1 Message Date
Edvin Bryntesson
f2d79a6b62 fix so that dev on linux doesn't rebuild entire project (#312) 2024-11-19 09:27:50 +01:00
Commandcracker
9d6eb111ab Use tauri-winres (#315) 2024-11-19 08:24:16 +01:00
Commandcracker
782d5aaa22 Use sysinfo (#314) 2024-11-18 23:05:31 +01:00
Andreas Maerten
2b56e2ea11 git: ignore compose data/ folder (#308) 2024-11-18 11:08:01 +01:00
Snowiiii
a23ce773ad Extract block hardness in block extractor
Fix: https://github.com/Snowiiii/Pumpkin/issues/297
2024-11-17 22:40:32 +01:00
Snowiiii
b01b276307 Optimize Item Extractor
Reduce JSON file size. All things we put in are already there as components
Replace item searching with a HashMap (which is faster)
2024-11-17 22:30:38 +01:00
Snowiiii
230a99adc5 Fix: Extractor Packet build 2024-11-17 22:02:33 +01:00
Niclas
9d4f8c5369 Fixed the issue where the player's second skin layer did not appear after respawn (issue #284). (#300)
* Fixed the issue where the player's second skin did not appear after respawn (issue #284).
2024-11-17 21:18:36 +01:00
Alvsch
4348b56fbe Fix packet side in extractor (#294)
* fix packet side
2024-11-17 19:51:46 +01:00
Commandcracker
76d05d0593 Upgrade thiserror (#304) 2024-11-17 19:50:39 +01:00
user622628252416
00af2b9868 fix respawn position being inside top block (#295)
Co-authored-by: user622628252416 <nnew8715@gmail.com>
2024-11-16 20:35:14 +01:00
Commandcracker
caff0df636 Add transfer command (#285)
* Add transfer command

* implement fmt::Display for CommandSender
2024-11-16 13:12:50 +01:00
Commandcracker
e4190459ed Logging system info (#279)
* Add Git hash to version info, display version on startup, remove ms from log timestamp

* Add startup info
2024-11-15 23:06:40 +01:00
Commandcracker
7b64ca10c3 Term hyperlinks (#290)
* Add hyperlinks to console (see OSC 8 ANSI escape sequence)
2024-11-15 22:39:52 +01:00
Commandcracker
845391242c Add RGB support to TextComponent, Fix click_event, hover_event, hover ShowText (#287) 2024-11-15 22:15:08 +01:00
user622628252416
29d203c8a9 Add /setblock command (#263)
* add /setblock command

* fix particles, block state id, block coordinate rounding, WoldPosition formatting

* fix block state/block mixup

---------

Co-authored-by: user622628252416 <nnew8715@gmail.com>
2024-11-14 20:23:10 +01:00
DataModel
91d2eeebb7 fix(combat): players are getting kicked when attacking dead entities (#271)
* fix(combat): kick players attacking dead players (health <= 0.0)
2024-11-14 19:38:32 +01:00
Andreas Maerten
1ae9c99b2d fix(Docker): improve build and compose files (#255)
* fix(Docker): improve build and compose files

- Adapted `Dockerfile` so the PWD will point to the `/config` folder in the image
- Modified the `docker-compose.yml` to follow the Dockerfile logic
- Added a LABEL to the docker image so it points to the source code

* refactor(Dockerfile): comment WORKDIR /config instruction

* feat(Dockerfile): move back to `/pumpkin` as root folder
2024-11-14 19:17:48 +01:00
DataModel
653caa0a30 fix(player/abilities): remove flying debug code (#272)
* fix(player/abilities): only set `allow_flying` for Creative mode.
2024-11-14 19:06:58 +01:00
Snowiiii
711e16528a Simplify Screens, Sounds and Particles Extractor
Particles: 6.6KB -> 3.5KB
Screens: 1.4KB -> 732B
Sounds: 118KB -> 72.2KB
2024-11-14 19:00:38 +01:00
Snowiiii
ac31d1c83b Improve Packet Extractor
Optimize packets.json
- Reduce lines from 1394 -> 256
- Reduces File size 23KB-> 6.9KB
2024-11-14 18:52:47 +01:00
Snowiiii
987aaad3e9 Fix: living entity kill
Also fix: https://github.com/Snowiiii/Pumpkin/issues/265
2024-11-13 23:05:33 +01:00
Samuel Nitzsche
59aa53a56a updated source code comments to use the new minecraft wiki (#261)
Co-authored-by: Nitzsche, Samuel (SE-A/33) <samuel.nitzsche@volkswagen.de>
2024-11-13 21:33:35 +01:00
Commandcracker
060274bd48 Disallow illegal characters in chat (#258)
* Disallow illegal characters in chat
2024-11-13 21:01:43 +01:00
user622628252416
c2822f45f9 Add Command Suggestions and Tab Completion (#245)
* add prototype for /give command

* fix /give namespace

* fix accidentally replaced text

* replace block_registry with item_registry

* sync added items with client

* add command and command suggestion packets

* Add List command  (#238)

* List command

* Stop message on /stop

* add coverter for (mostly) correctly obtaining CCommands packet payload from CommandDispatcher

* fix proof of concept suggestions replacing entire command

* add client side command argument suggestions

* fix arg_position_2d and arg_position_3d not setting pos to block center when coordinate is an integer

* add optional server side command suggestions

* disable serverside suggestions for entity args

* remove pumpkin test client_side_arg_parsers

* use unsigned bytes for flags

* add missing command arg parsers

* fix entities parser flags

* add player permission level

* fix merge conflicts

---------

Co-authored-by: user622628252416 <nnew8715@gmail.com>
Co-authored-by: Victor <47831936+solvictor@users.noreply.github.com>
2024-11-12 20:49:31 +01:00
Commandcracker
8767e66777 Add icon to windows binary (#257)
* Add icon for windows binary

* Add comment to FileDescription

FileDescription is handled as the Program name by Windows!
2024-11-12 19:51:25 +01:00
Edvin Bryntesson
98e8bba936 Inventory cleanup (#256)
* add pumpkin error handling for commands

* cleanup clear command

* fix so that all Container implementations follow the same order as the trait

* cleanup give command

* remove unnecessary function

* remove unnecessary function

* fix give command

* fix clear command

* fixup item placement logic

* cleanup clear command a little
2024-11-12 19:24:52 +01:00
Edvin Bryntesson
8cde02e625 Add Shaped and Unshaped crafting support, as well as deserializing the entire recipe format (#165)
* add cleaner registry parsing

* start adding recipes

* add tags, and some crafting things

* Fix echest command

* add partly working crafting interface

* add generated assets

* fix container commands and clippy lints

* fix issues with resolving recursive item tags for crafting

* add flatten3x3 function

* add shapeless crafting

* add tests to and fix recipe flattening function

* refactor recipe system a bit

* add rayon to speed up initial loading of recipes

* almost working after rebase

* add deserialization for new crafting type "transmute"

* make crafting work again

* make shapeless recipes not require all permutations

* fixed visual bug with when taking out ingredients for crafting

* add support for new tags system
2024-11-12 12:57:14 +01:00
Victor
80bfee705c Clear command and details (#250)
* Clear command

* Version alias
2024-11-11 22:42:02 +01:00
Tiiita
4067f65ff9 Check collision before block place (#251)
* Add bounding box to entities)

* Try to update boundingbox when changin pos

* Remove unused imports

* Update / recalc boundingbox when changing pos

* Add collision when placing check

* Add todo: Check collision with every entity in pos

* Change BoundingBox::new() args

* Seperate bounding box width and height

* Change intersect fn name

* Clean up code
2024-11-10 23:28:14 +01:00
Snowiiii
2d24098e91 Fix: Wrong Flags numbers
Also fixes Sprinting broadcastig
2024-11-10 17:25:50 +01:00
Snowiiii
b91825f507 Extractor: Add Tags 2024-11-10 17:14:48 +01:00
Snowiiii
63979710b2 Better block air checking 2024-11-09 11:33:38 +01:00
Snowiiii
65cb0b52b4 Decrease Block count when Placed 2024-11-09 11:33:14 +01:00
Snowiiii
0ab4b5daed CI: Cache rust dependencies 2024-11-09 09:33:12 +01:00
Snowiiii
df1d5fb580 Extractor: Export Recipes 2024-11-08 16:48:33 +01:00
Alexander Medvedev
2f6f11673b MPSC channel buffer fix (#246)
* Fix: Check is chunks Vec is not empty
2024-11-07 22:44:17 +01:00
user622628252416
16dabf1826 Add /give Command (#234)
* add prototype for /give command

* fix /give namespace

* fix accidentally replaced text

* remove dbg! statements

* replace block_registry with item_registry

* sync added items with client

* warn!(..) => log::warn!(..)

---------

Co-authored-by: user622628252416 <nnew8715@gmail.com>
2024-11-07 20:34:56 +01:00
Victor
41e71a857d Add List command (#238)
* List command

* Stop message on /stop
2024-11-07 16:32:27 +01:00
Snowiiii
c2dd029fbc Minor changes to PR template 2024-11-07 07:59:55 +01:00
Snowiiii
c470f94bc3 Fix: https://github.com/Snowiiii/Pumpkin/issues/236 2024-11-06 20:50:52 +01:00
Gyula Kiri
a1926ffea6 Fix: Use correct packet for set_help_item (#235)
* According to the wiki we need to use 0x2F for set held item, this fixes the bug where if you have something in your 1st slot you would be able to place it with any other slot selected
2024-11-06 20:24:40 +01:00
Snowiiii
0fb1ac5f5d Fix: build 2024-11-06 07:07:17 +01:00
Alvsch
d3f299d2f6 Add damage and re-spawning (#224)
* Added new packets

Added packets to pumpkin-protocol for damage and re-spawning.

* Made damage_type registry value accessible

* Added damage and fall damage

* fixed phasing bug

* fix issues caused by merge

* spawn player on ground

make the player spawn on the highest block instead of in the air.

* dont default player to flying

* mode last_pos to living_entity

* fix using entity instead of living_entity

* fixed fall damage not working properly when switching gamemodes
2024-11-05 23:38:26 +01:00
Snowiiii
17f1984699 Remove some ToPrimitive 2024-11-05 23:32:56 +01:00
we sell insurance
93c6da993f Implement Query protocol (#218)
* Add query options to config
Added packet data types
Correctly parse a handshake packet
Add tokio to pumpkin protocol for `AsyncReadExt` convenience functions

* Add repr(u8) so that PacketType is a byte

* Respond to handshake correctly

* Allow for proper decoding of status packets and properly handle errors in decoding

* Implement challange tokens and verify with token and address

* Encode Basic status packet
Switch to CString since its better to and null errors higher up the code

* Encode Full status packet

* Add forgotten fields to full status packet

* Correctly respond to query clients when requesting full status

* Return actual address and port of server
Respect config options
Remove uncessary debug derives

* Remove packet type as it is redundant/unnecssary

* Implement basic status request
Refactor code for better error handling

* Update README

* Show players correctly in full status packet

* Store all packets in structs instead of enums
Break up en/decoding for each packet
Reduce client tracking
Get rid of QueryClients struct
Stop storing of magic value and check during decoding
Added tests for all decoding and encoding
Fix all sugestions from @StripedMonkey
2024-11-05 20:07:31 +01:00
Snowiiii
1f8385e890 Add Serverbound Player Input 2024-11-04 22:02:14 +01:00
Snowiiii
f30da32848 Add Serverbound Client Tick End 2024-11-04 21:53:40 +01:00
Snowiiii
3c7106af0b Print raw Packet ID when not found
We now will use Raw Packet IDs instead of hex
2024-11-04 21:48:28 +01:00
user622628252416
87aa5ec493 Commands: Fix Bug, Refactor Arguments, Add /tp (#227)
* fix command dispatch, add/refactor arguments & add tp command

* implement teleport facing location/facing entity

* implement teleport facing location/facing entity

* implement arg_player/arg_entity and refactor commands accordingly

* implement ~ coordinate notation

* refactor arg_position_3d

* major command refactor

* add documentation

* add default names to more argument types

* add argument names to arg_bounded_nums

* change command argument api

---------

Co-authored-by: user622628252416 <nnew8715@gmail.com>
2024-11-03 23:15:49 +01:00