Commit Graph

28 Commits

Author SHA1 Message Date
Camotoy bc0cfde8f9
Set the minimum Java version to 16; drop Bedrock 1.17.0 (#2477) 2021-09-10 14:10:56 -04:00
David Choo 8461cf76b7
Smooth Pistons (#1542)
With proper piston collision for players as well.
2021-09-09 21:20:25 -04:00
Camotoy ac17963baa
Player effect cache cleanup
Only cache effects and not their values unless we actually use the value.
2021-08-16 11:53:56 -04:00
David Choo 1d04a61a46
Collision Registry (#2430)
* Fix trapdoor collision

* Add EqualsAndHashCode to all Collision subclasses and shift code around

EqualsAndHashCode are required on subclasses otherwise blocks will be assigned an incorrect collision instance. (Doors and trapdoors are mixed and ladder sometimes gets a DoorCollision instance).
Added protected constructor to BlockCollision to make boundingBoxes final.
Removed EmptyCollision because I don't think it is useful.
Moved conversion from ArrayNode to BoundingBoxes[] from OtherCollision to CollisionRegistryLoader
Removed regex from SnowCollision and use default bounding boxes.

* Deduplicate BlockCollision instances

* Create one set of bounding boxes for all BlockCollisions

* Don't depend on the player's block position in DoorCollision

* Fix dirt path position corrections

Grass paths were renamed to dirt path in 1.17
Fix position correction for y=1, y=2, y=255, and y=256

* Increase pushAwayTolerance depending on distance from origin

This should fix position corrections for blocks less than 1 unit in length/width at high coordinates.
This includes ladders after x 4096 or z 4096
Not too sure about the math here though

* Use ThreadLocal for position

Hopefully resolves concurrency issues

* Remove comment and add layer check to SnowCollision
2021-07-30 22:35:13 -04:00
Camotoy 143464b5a9
Respect Javadoc's wishes 2021-07-15 18:12:08 -04:00
Camotoy 25edf41329
Some optimizations
- Fix recipe registry not using an int key-based map
- Versioned registries now use Fastutil more effectively
- Replace uses of String#split for block identifier manipulation with #indexOf and #substring
- Reuse Patterns in collision loader
2021-07-15 18:03:41 -04:00
Redned f7ef90278b
Implement a new registry system (#2306)
Co-authored-by: Camotoy <20743703+Camotoy@users.noreply.github.com>
2021-07-12 21:19:40 -04:00
David Choo 566394f798
Fix breaking animation while jumping (#2335)
* Update block break time after a CONTINUE_BREAK action

* Fix breaking animation time for some blocks

* Reuse Vector3f and add comment

Co-authored-by: Camotoy <20743703+Camotoy@users.noreply.github.com>
2021-06-28 19:26:02 -04:00
Camotoy 1f83a5ac9f
Respect tool tier requirement for block breaking (#1837) 2021-05-23 22:32:42 -04:00
Camotoy b5307ab3ed
21w20a support 2021-05-19 22:24:11 -04:00
Camotoy ce000a496b
Use tags sent from the server, where possible (#2188)
Java Edition has a tags system that allows for some server-side control of certain properties. This PR allows for piglin trading items, wool, and flowers to be determined from the server.
2021-05-02 21:47:11 -04:00
Camotoy 120769c7f6
Allow for crawling and moving in one-block spaces where possible (#1814)
This commit brings full support for crawling, sneaking under 1.5-block-tall spaces, and swimming in one-block areas. There is a check in place that decreases the player's speed to something comparable to Java if they are in a situation where they would otherwise go at normal walking speed (for example: without the check, a Bedrock player would go at full walking speed while crawling).
2021-04-12 00:35:53 -04:00
Camotoy f827b28852
More smoothed out shield code (#2051)
- Shield code is now down as the player is sneaking - it doesn't wait for the server to update our sneaking status
- Shield is now applied correctly when sneaking and then moving to the shield item
2021-03-18 00:53:14 -04:00
Camotoy ded00dfd97
Merge branch 'master' of https://github.com/GeyserMC/Geyser into server-inventory 2021-03-09 14:45:04 -05:00
Camotoy 9ae7c1de25
1.16.210 support (#2019)
This commit implements 1.16.210 support while still keeping 1.16.100 and 1.16.210 compatibility.

Co-authored-by: AJ Ferguson <AJ-Ferguson@users.noreply.github.com>
Co-authored-by: rtm516 <rtm516@users.noreply.github.com>
2021-03-09 12:51:48 -05:00
Camotoy 4db9ec92bf
Merge branch 'master' of https://github.com/GeyserMC/Geyser into server-inventory 2021-01-11 19:46:39 -05:00
Camotoy ade4c14911
Block breaking refactors (#1336)
Client-side block animations and reach checks are now added.

This commit also includes cleanup in BlockChangeTranslator as well as proper Netherite tool support for calculating block breaking.

Co-authored-by: rtm516 <rtm516@users.noreply.github.com>
2021-01-07 22:43:36 -05:00
Camotoy 8317961340
Merge branch 'master' of https://github.com/GeyserMC/Geyser into server-inventory 2021-01-01 14:20:52 -05:00
Camotoy 186d94917a
Update copyright to 2021 (#1772)
* Update copyright to 2021

Free commit!

* These don't need a copyright

* Don't downgrade the mappings
2021-01-01 10:10:36 -05:00
DoctorMacc 049242db4b
Update to 1.16.200 2020-12-09 01:12:02 -05:00
circuit10 a70d3e2150
Fix inconsistencies with movement and position (#699)
Movement is now significant better, especially on slabs, stairs, and other half-blocks.

Co-authored-by: RednedEpic <redned235@gmail.com>
Co-authored-by: DoctorMacc <toy.fighter1@gmail.com>
Co-authored-by: Tim203 <mctim203@gmail.com>
Co-authored-by: Camotoy <20743703+DoctorMacc@users.noreply.github.com>
2020-11-20 14:56:39 -05:00
AJ Ferguson 7f4b588cdf server inventory. WORK IN PROGRESS
wip commit of implementing server authoritative inventories. there is a lot of experimental and debug code. this is NOT ready for testing or review.
2020-10-16 15:25:05 -08:00
Camotoy 4514167835
Fix fire being punched in all directions (#1370)
Apply the fix we have for fire but for all block faces.
2020-10-08 18:44:15 -04:00
RednedEpic 0574feb87e Fix block breaking animations when in water (Closes #494) 2020-05-23 18:29:11 -05:00
RednedEpic e58ffdd3c0 Add support for block break animations from java players to bedrock 2020-05-08 00:18:05 -05:00
RednedEpic 31be608038 Add block break sounds for blocks with 0 hardness, and refactor some things
The refactors in this commit go a bit beyond the scope of what the sound/effects branch was meant to accomplish, however most of these changes are necessary so chunk caching could be reintroduced for the standalone version. The chunk caching here allows for us to get the block ID before the block was broken, and in the future allow us to implement newer features. Chunk caching is optional (and disabled by default) as on non-Bukkit versions, it can eat up a lot of RAM with many players online.
2020-04-29 15:01:53 -05:00
William Johnstone 0caee67e43 Finalise block breaking, (water calculations omitted because of no access to server api) 2020-03-27 23:39:53 +00:00
William Johnstone 60662ae06c Moved break time checks to BlockUtils class, Created ItemUtils and added helper function to get enchantment levels on items, implemented a entity effect cache, added haste and mining fatigue check for block breaking animations, fixed block breaking animations for blocks with speeds that are not affected by tools. 2020-03-22 22:59:34 +00:00