Commit Graph

29 Commits

Author SHA1 Message Date
Camotoy f59e33d749
Fix behavior of matching custom item predicates
Huge thanks to Kastle for helping me disect this behavior.

- The Unbreakable NBT tag is not the only source for determining if an item should be treated as unbreakable. The damage NBT is also taken into account.
- Custom item options must be processed in an ascending order.
- Multiple conditions may be necessary for an item to be selected.
- Conditions do not have to be exact. See the comments in CustomItemTranslator for an explanation.
- Added a test so we don't break this behavior in the future.
2022-10-10 15:40:07 -04:00
Camotoy cb864b3c98 Fix NPE with furnace minecart with NBT data 2022-09-30 21:21:37 -04:00
RednedEpic e5337b6298 Reintroduce GeyserDefineCommandsEvent and cleanup a few things 2022-09-04 13:08:17 -05:00
Tim203 13046a8602
Fixed building and switched event library 2022-08-13 22:48:12 +02:00
Konicai 259fed247a
Merge remote-tracking branch 'upstream/master' into ext-1.19.20-fixes
# Conflicts:
#	core/pom.xml
2022-08-09 19:27:25 -04:00
7man7LMYT ef81bdeb6b
Update items to 1.19.20 (#3215)
* Update to 1.19.20

* Add 1.19.20 mapping

* Revert biome changes
2022-08-09 16:52:53 -04:00
Konicai aee43e68fa
Merge remote-tracking branch 'upstream/master' into feature/extensions
# Conflicts:
#	ap/pom.xml
#	api/base/pom.xml
#	api/geyser/pom.xml
#	api/pom.xml
#	bootstrap/bungeecord/pom.xml
#	bootstrap/bungeecord/src/main/java/org/geysermc/geyser/platform/bungeecord/GeyserBungeePlugin.java
#	bootstrap/pom.xml
#	bootstrap/spigot/pom.xml
#	bootstrap/sponge/pom.xml
#	bootstrap/standalone/pom.xml
#	bootstrap/standalone/src/main/java/org/geysermc/geyser/platform/standalone/GeyserStandaloneBootstrap.java
#	bootstrap/velocity/pom.xml
#	common/pom.xml
#	core/pom.xml
#	core/src/main/java/org/geysermc/geyser/command/CommandManager.java
#	core/src/main/java/org/geysermc/geyser/registry/populator/ItemRegistryPopulator.java
#	core/src/main/java/org/geysermc/geyser/translator/protocol/java/JavaLoginTranslator.java
#	core/src/main/resources/languages
#	pom.xml
2022-08-02 00:01:05 -04:00
sctigercat1 467286060c
Update items to 1.19.10 (#3151)
Co-authored-by: Camotoy <20743703+Camotoy@users.noreply.github.com>
2022-07-19 21:23:04 -04:00
Kas-tle 363d72da91
Merge remote-tracking branch 'origin/master' into feature/extensions 2022-07-12 05:26:52 +00:00
ImDaBigBoss 36c49a7256
Custom item support for extensions (#2822)
Co-authored-by: Camotoy <20743703+Camotoy@users.noreply.github.com>
2022-07-02 12:50:16 -04:00
David Choo 9ea22042eb
Fix some item interactions (#3083)
* Remove Bedrock only banner patterns from the creative inventory

* Add sound for tadpole bucket

* Fix lily pad and frogspawn placing on mobile/single stacks

* Workaround? Fix? for bucket usage on mobile

* Simplify math and update position+rotation whenever ServerboundUseItemPacket is sent

* Rotate the player back after using an item and fix glass bottles

* ITEM_USE actionType 1 does not need the rotation fix

Increase delay for look back

* Add some checks

* Prevent buckets and spawn eggs from being unintentionally placed when interacting with special blocks

As of 1.19 Bedrock no longer sends a PlayerActionPacket with action=BLOCK_INTERACT. Bedrock now sends action=ITEM_USE_ON_START before and action=ITEM_USE_ON_STOP after using an item on a block. However, this is not useful as it is sent for all block interactions.

* Fix inventory transactions being rejected after restoreCorrectBlock

The held item's netId is always 0 in the InventoryTransactionPacket.

* Touch ups

* Fix lookAt for different poses and sneaking + cauldron + bucket interactions

Fix boat items being desynced when placing them very close to collision
Fix bottles being desynced when tapping above water

Resend the held item if we do encounter a desync

* Avoid getting blockstate twice and fix comment

* Use generated interaction data

* Fix glass bottles being double filled and phantom water bottles/water buckets

* Don't update the entire inventory on useItem

* Use Geyser's inventory copy for check

* Use ItemTranslator#getBedrockItemMapping to avoid NBT translation

* mappings

Co-authored-by: Camotoy <20743703+Camotoy@users.noreply.github.com>
2022-06-24 16:48:28 -04:00
Camotoy c8856d487d
Compile too 2022-06-06 22:56:08 -04:00
davchoo 66a7efaa96 Yeet 1.18.30 and old palette stuff 2022-05-25 22:11:35 -04:00
davchoo c5de293373 Allow 1.19.0 to join and use new block mappings 2022-05-25 21:50:50 -04:00
Camotoy bbf45b6a4c
Compiles; provide your own mappings for now 2022-05-25 15:55:15 -04:00
Camotoy cf8114543e Bump version; drop 1.17.40; support 1.18.30 2022-04-17 19:53:06 -04:00
Camotoy d6cb5bd52d
ItemMappings: use array for ItemMapping class 2022-04-04 14:08:35 -04:00
Camotoy 877301a500
Remove locator map from creative menu; show some map colors
Java allows any map color but Bedrock only allows a few, so we take what we can get.

Fixes #2617
2022-03-23 16:21:04 -04:00
Camotoy 7d1ec5c41a
Support offhand interactions with entities 2022-02-24 22:49:10 -05:00
Camotoy 252348ebd8
Implement globe banner pattern translation
Co-Authored-By: Konicai <71294714+Konicai@users.noreply.github.com>
2022-02-19 12:07:30 -05:00
Camotoy 08a78731df
Drop 1.17.30 support; add support for 1.18.10.28 beta 2022-02-06 17:15:12 -05:00
Tim203 3251d9010c
We're in 2022 now 2022-01-01 20:03:05 +01:00
David Choo ad5a98c859
Improve Statistics Form (#2667)
* Improve statistics form

Fix furnace minecart java identifier
Use clean Java identifier in times mined
Fix icons for statistic form

Show all generic statistics by initializing them to zero
Color every other line grey
Format numbers like on Java Edition

* Update for Java 16 and MCProtocolLib changes

* Sort all statistics alphabetically and color them.

* Update for MCProtocolLib changes

* Re-add clean java identifiers registry and properly fix block break statistics

Also translate before sorting >.>

* Use toLowerCase(Locale.ROOT)

* Use the format provided by MCProtocolLib

* Simplify condition

* Move statistics init and bump MCProtocolLib version
2021-12-07 20:05:44 -05:00
Camotoy 763743a845
Allow for implementations to provide a custom resource loader
This will allow Geyser-Fabric to work without resource loading issues. This commit also ensures try-with-resources is used anywhere a resource is accessed.
2021-12-03 11:01:06 -05:00
Camotoy af8c26a4a5
Remove unnecessary version check for minecart furnace icon information
All supported protocols are now 1.17.30 or later.
2021-11-28 17:18:37 -05:00
Camotoy c200e3e6fa
Update mappings; remove unnecessary item workarounds 2021-11-23 14:22:44 -05:00
Camotoy 98816f1eaa
1.18 Bedrock properly works now 2021-11-22 22:37:22 -05:00
RednedEpic 2c663e0ee5 The Great Refactor Part 3 - Entire project restructure 2021-11-20 17:29:46 -06:00
RednedEpic 3f5cb29ee0 The Great Refactor Part 2 - org.geysermc.connector -> org.geysermc.geyser 2021-11-20 15:34:30 -06:00
Renamed from core/src/main/java/org/geysermc/connector/registry/populator/ItemRegistryPopulator.java (Browse further)