Commit graph

8174 commits

Author SHA1 Message Date
Jason Penilla
1ef549d1f7 Update generated API 2023-12-05 14:36:33 -07:00
Jason Penilla
f64de074e8 patches 2023-12-05 14:34:01 -07:00
Jason Penilla
d611ad767d Update loot table and other patches 2023-12-05 14:20:44 -07:00
Nassim Jahnke
e45e2141a0 Remove unnecessary import 2023-12-05 20:56:22 +01:00
Nassim Jahnke
15a9af2f5e More more more work 2023-12-05 20:54:55 +01:00
Nassim Jahnke
ed4ff79ac7 More more work 2023-12-05 20:39:26 +01:00
Nassim Jahnke
0e154a1701 More work 2023-12-05 20:12:12 +01:00
Nassim Jahnke
f520d3c39b Adventure (kind of) 2023-12-05 19:38:29 +01:00
Nassim Jahnke
aba71147db Finish API 2023-12-05 18:33:18 +01:00
Nassim Jahnke
46f4547805 Prepare for 1.20.3 dev 2023-12-05 18:20:55 +01:00
Owen1212055
1fa2b7d2f5 Dont resend blocks on interactions (#9413)
In general, the client now has an acknowledgment system that will cause block changes made by the client to be reverted correctly.

Essentially:

The client enters a "prediction" stage, where any block changes made will have its old blockstate captured (this is referred to as "server state").
If you update blocks during this stage, the client will update this captured server state as long as they're still currently predicting.
After prediction is done (via an ack packet) all captured blockstates are reverted to their captured server state.
This means that if the server actually updated a block and send a block update packet, it's correctly set, while if a block wasn't updated on the server but WAS updated on the client (server state wasn't updated), that change will be reverted.

It should be noted that this system does not yet support block entities, so those still need to be resynced when needed.

I discovered this when noticing that blocks broken outside of the player's valid interaction distance are still properly reverted, even though the server doesn't send any block updates, only an ack packet.
2023-12-02 22:41:35 -05:00
Jake Potrebic
727bda93be Add Structure check API (#9062) 2023-12-02 18:11:57 -08:00
Owen1212055
00c5568532 Fix Mushroom cow stew api (#9934) 2023-12-02 20:54:58 -05:00
Jake Potrebic
c93b73ddaa Restore vanilla entity drops behavior (#7650) 2023-12-02 17:35:10 -08:00
MrPowerGamerBR
d01c1b856a Configurable Dry and Wet Farmland Tick Rates (#9968)
* Configurable Dry and Wet Farm Land Nearby Water Tick Rates

* Rebase and squash

---------
2023-12-02 22:00:17 -03:00
hyper1423
1d36ab7420 Fix CraftMetaItem#addAttributeModifier duplication check (#9995) 2023-12-03 09:59:13 +09:00
Jake Potrebic
1d8eb1581e [ci skip] Add mention of FQ imports (#9994) 2023-12-02 13:52:14 -08:00
Tamion
6158767599 [ci skip] Correct Windows requiring path to gradlew (#9976)
* [ci skip] Correct Windows requiring path to gradlew

* Update CONTRIBUTING.md
2023-12-02 22:32:46 +01:00
MrPowerGamerBR
3d2d0fb81c Remove unnecessary durability check in ItemStack#isSimilar (#9979)
* Optimize "ItemStack#isSimilar(...)" by removing the unnecessary durability check

* Change patch name and add a better commit message
2023-12-02 18:31:25 -03:00
Jake Potrebic
c270039723 Log correct recipes and advancement count on server start (#9978) 2023-12-02 13:17:35 -08:00
waterlily1
e2a873f205 Updates documentation in EntityEquipment.java (#9992)
* Updates documentation in EntityEquopment.java to reflect behavior mentioned in issue #9867

* rebase and squash patches

---------

Co-authored-by: schwaa96 <schwaa96@mi.fu-berlin.de>
2023-12-02 21:29:47 +01:00
Jason Penilla
94c1e68205 Update mapping-io (#9975) 2023-11-28 14:18:21 -08:00
Jake Potrebic
a60f62506f Un-experimentalize Entity TP APIs (#9964) 2023-11-28 11:40:25 -08:00
Jake Potrebic
cea171de11 Use ? super in Consumer/Predicate API (#9939) 2023-11-25 15:03:02 -08:00
Gijs de Jong
3d12fa65fa Fix plugin bootstrap dependency tree population (#9963)
This patch fixes a bug where the dependency tree used for classpath joining,
wasn't built using the bootstrap dependencies, for plugin bootstrappers.
2023-11-25 23:57:12 +01:00
Jake Potrebic
a3ef5fd4dd Updated Upstream (Bukkit/CraftBukkit/Spigot) (#9953)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
96340858 PR-938: Various Sound API improvements
cbfe0ff0 PR-937: Minor improvements to World#rayTrace documentation
e979ee95 PR-935: Change Consumer and Predicates to super
27ae46dc SPIGOT-3641, SPIGOT-7479, PR-931: Add missing values to EntityEffect
0616ec8b Add eclipse .factorypath file to .gitignore

CraftBukkit Changes:
8e162d008 PR-1301: Various Sound API improvements
eeb7dfc2d SPIGOT-7520: Attribute LootTableSeed missing for generated containers with attached LootTable
d433f086d PR-1297: Change Consumer and Predicates to super
864f616da SPIGOT-7518: Fix NullPointerException when calling Block#applyBoneMeal()
5a2d905af Add eclipse .factorypath file to .gitignore
7c6bf15d4 Fix SkullMeta configuration serialization / deserialization with note block sound

Spigot Changes:
7de1049b Rebuild patches
2023-11-25 14:34:42 -08:00
Jake Potrebic
635d3870ee Don't fire EntityPotionEffectEvent during worldgen (#9965) 2023-11-25 14:18:37 -08:00
Warrior
c60d4a3836 Fix yaw being ignored for first spawn pos (#9959) 2023-11-25 23:09:26 +01:00
MrPowerGamerBR
a4c4fc4bd1 Lazily create LootContext for criterions (#9969)
For each player on each tick, enter block triggers are invoked, and these create loot contexts that are promptly thrown away since the trigger doesn't pass the predicate

To avoid this, we now lazily create the LootContext if the criterion passes the predicate AND if any of the listener triggers require a loot context instance
2023-11-25 19:01:26 -03:00
TonytheMacaroni
32f58b8106 Fix max nearby entities class check (#9967) 2023-11-25 16:48:32 -05:00
Shane Freeder
79599cfd22 Re-add missing vanilla safeMode arg 2023-11-25 09:49:48 +00:00
Jake Potrebic
867ce6cc0a Code Generation for TypedKeys (#9233)
Currently includes generated key holder classes for types
used in the Registry Modification API
2023-11-22 20:56:28 -08:00
Jason Penilla
f5c68d86b0 Update paperweight to 1.5.10 and Gradle to 8.4 (#9957) 2023-11-21 22:27:50 -07:00
Tamion
ea37ffa71d [ci skip] Improve PlayerChatEvent Deprecation Message (#9956) 2023-11-22 05:46:51 +01:00
Isaac - The456
9d5f483cc9 add getAdvancementProgress() to PlayerAdvancementCriterionGrantEvent (#9865)
this allows for simpler checks for if an advancement would be given to a player,
and denying it (as the advancement grant event is non-cancelable)
2023-11-19 01:18:48 +00:00
booky10
3cf1656a28 Fix missing event call for entity teleport API (#9937)
* Fix missing event call for entity teleport API

Previously a plugin couldn't cancel or modify an entity-teleport from another plugin.

* rebase
2023-11-19 02:05:34 +01:00
TonytheMacaroni
a27d62766e Add API to retrieve an attribute modifier from a UUID (#9924)
* Add attribute modifier from UUID API

* Add method to remove by UUID

* Add overload for UnmodifiableAttributeInstance, better precondition messages

* rebase
2023-11-18 19:55:57 -05:00
Jake Potrebic
7693140ca0 More paper config cleanup (#9938)
Also adds a warning and error message if a newer config version
was found signaling a downgrade.
2023-11-18 16:29:14 -08:00
Jake Potrebic
72f5e76f9b Fix spawners checking max nearby entities with correct type (#8945)
Co-authored-by: Owen1212055 <23108066+Owen1212055@users.noreply.github.com>
2023-11-18 15:59:12 -08:00
Bjarne Koll
8b711f86a3 Call LivingEntity#onItemPickup before mutation (#9948)
The existing EntityPickupItemEvent fixes patch moves the call to LivingEntity#onItemPickup for piglins after the respective EntityPickupItemEvent calls, which is correct.
However the patch moved the call so far down the line that the existing logic already mutated the picked up item entity, leading to faulty state being passed to the onItemPickup method.

To prevent logic in LivingEntity#onItemPickup to read from an ItemEntity that was already mutated, this commit moves the calls prior to the two respective mutations (either gold_nugget or rest).

This was chosen above taking a copy of the original item and restoring state later on to avoid a full item stack clone.
2023-11-17 07:43:25 +01:00
SoSeDiK
95c2b76467 Correct typo in javadoc (#9944) 2023-11-13 20:25:46 +02:00
Jake Potrebic
bbd013be54 Run the chat callback on the main thread as expected (#9935) 2023-11-11 15:33:19 -08:00
Jake Potrebic
776cc1199a Fix several issues with EntityBreedEvent (#8677)
Upstream did not account for different hands when storing
the breed item for later use in the event. Also they only
stored a reference to the stack, not a copy so if the stack
changed after love mode was started, the breed item in the event
also changed. Also in several places, the breed item was stored after
it was decreased by one to consume the item.
2023-11-11 15:23:02 -08:00
Jake Potrebic
caf899f62b Deprecate Material#isInteractable (#9216) 2023-11-11 14:21:22 -08:00
booky10
e6ad4fadf4 Add hand to fish event for all player interactions (#9929) 2023-11-11 23:00:45 +01:00
Jake Potrebic
932b0256c7 Use ApiStatus.Internal instead of Deprecated (#9042)
Mainly correctly marks a lot of still used "magic values"
as Internal instead of "Deprecated".
2023-11-11 13:52:32 -08:00
booky10
cbce3a66aa Add aggressive mob API (#9838) 2023-11-11 22:17:36 +01:00
Owen1212055
5cca94a05e Add Entity Movement Direction API (#7085)
This allows you to get player movement when riding vehicles, etc.
2023-11-11 16:04:34 -05:00
Jake Potrebic
aa933b773e Updated Upstream (Bukkit/CraftBukkit) (#9922)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
fde5602a PR-927: Add PlayerRecipeBookSettingsChangeEvent
949ff217 PR-930: Add methods to get/set evoker fang attack delay
f6f7c79d SPIGOT-7514, PR-929: Add "Enchantment Roll" API to enchant items according to Minecraft mechanics
d40e22da PR-712: Add API to get full result of crafting items

CraftBukkit Changes:
c8feb0629 PR-1291: Improve precondition message in Entity#playEffect
482c56a00 PR-1285: Add PlayerRecipeBookSettingsChangeEvent
cdf798800 PR-1290: Add methods to get/set evoker fang attack delay
2c1b5f78f SPIGOT-7514, PR-1289: Add "Enchantment Roll" API to enchant items according to Minecraft mechanics
6aa644ae9 PR-992: Add API to get full result of crafting items
ffb1319bc PR-1287: Fix scoreboards not updating in Player#setStatistic
2023-11-11 12:25:45 -08:00
Luis
316e921c18 Add Enchantment cost API (#9856)
Cost is a property of individual enchantments, and is used by vanilla in combination with environmental aspects like tool enchantability and bookshelf count to determine the final cost of an enchantment as shown in an enchanting table.

Having access to the base cost of an enchantment using these vanilla methods can allow plugin developers to determine the "value" of an enchantment, and use it in custom logic where needed. I came across this recently when trying to assign an economic value to enchantments during tool repairing, and noticed these values don't seem to be obtainable under the current API.
2023-11-11 21:09:48 +01:00