Commit graph

5716 commits

Author SHA1 Message Date
SoSeDiK
d5b93a0167 Expose #hasColor to leather armor 2024-05-01 10:58:50 +03:00
Jake Potrebic
ae4acc6aeb improve checking handled tags in itemmeta 2023-07-10 16:10:15 -07:00
Jake Potrebic
50b91c7359 Revert to vanilla handling of LivingEntity#actuallyHurt 2024-04-27 09:44:53 -07:00
Lulu13022002
ee130088cc Fix damage modifier inconsistencies
Affect the falling stalactite damage type where the
reduction is not applied like in Vanilla.
Additionally fix the "is_freezing" damage type tag.
2024-04-27 21:51:58 +02:00
Jake Potrebic
97a4aeda2d Fix ItemFlags
Re-adds missing functionality for HIDE_DESTROYS and
HIDE_PLACED_ON. Also adds new flag in HIDE_STORED_ENCHANTS
which was split from HIDE_ADDITIONAL_TOOLTIP.

== AT ==
public net.minecraft.world.item.AdventureModePredicate predicates
2024-04-27 12:16:38 -07:00
Aikar
236dce4925 Handle Large Packets disconnecting client
If a players inventory is too big to send in a single packet,
split the inventory set into multiple packets instead.
2018-11-27 21:18:06 -05:00
Jake Potrebic
ba71d372a5 Fix shield disable inconsistency
In vanilla, if the damage source is tagged as a projectile,
it will not disable the shield if the attacker is holding
an axe item.
2024-04-26 19:08:37 -07:00
Aikar
3844905fa8 Support old UUID format for NBT
We have stored UUID in plenty of places that did not get DFU'd

So just look for old format and load it if it exists.
2020-06-29 03:26:17 -04:00
SoSeDiK
4c8c367eee Deep clone nbt tags in PDC 2022-05-26 03:30:05 +03:00
Jake Potrebic
49778e042c Add config for mobs immune to default effects 2020-12-02 21:03:02 -08:00
Aikar
eb626e1176 Protect Bedrock and End Portal/Frames from being destroyed
This fixes exploits that let players destroy bedrock by Pistons, explosions
and Mushrooom/Tree generation.

These blocks are designed to not be broken except by creative players/commands.
So protect them from a multitude of methods of destroying them.

A config is provided if you rather let players use these exploits, and let
them destroy the worlds End Portals and get on top of the nether easy.
2020-05-13 23:01:26 -04:00
Jake Potrebic
27979040fd Properly track the changed item from dispense events 2022-12-12 12:14:03 -08:00
Jake Potrebic
193d6ee2ca Per world ticks per spawn settings 2021-11-13 12:36:26 -08:00
Owen1212055
5a83b512a7 Item Mutation Fixes 2024-03-20 20:41:35 -04:00
Nassim Jahnke
3758965f88 Improve tag parser handling 2024-02-05 11:54:04 +01:00
Jake Potrebic
6c400a907b Fix possible StackOverflowError and NPE for some dispenses
For saddles, carpets, horse armor, and chests for horse-likes
a BlockDispenseEvent handler that always mutated the item without
changing the type would result in a SO error because when it went
to find the replacement dispense behavior (since the item "changed")
it didn't properly handle if the replacement was the same instance
of dispense behavior.

Additionally equippable mob heads, wither skulls, and carved pumpkins
are subject to the same possible error.

Furthermore since 1.21.2, the DISPENSER_REGISTRY map doesn't have a default
return value anymore and some dispense behaviors like equippable and
regular items will not have a defined behavior in that map and might throw
a NPE in that case.
2022-10-29 17:02:42 -07:00
Pierpaolo Coletta
368ca9c145 Fix creation of invalid block entity during world generation 2024-03-30 21:06:10 +01:00
Jake Potrebic
d42ef390ea Fix DamageSource API
Uses the correct entity in the EntityDamageByEntity event
Returns the correct entity for API's DamageSource#getCausingEntity
2024-03-09 14:13:04 -08:00
RodneyMKay
a87a5e10d9 Fire EntityDamageByEntityEvent for unowned wither skulls 2024-02-11 20:05:11 +01:00
Warrior
079a41f4c4 Disable memory reserve allocating 2024-01-18 23:25:09 +01:00
Jake Potrebic
93a2600891 Fix bees aging inside hives
Fixes bees incorrectly being aged up due to upstream's
resetting the ticks inside hive on a failed release
2021-08-21 21:54:16 -07:00
Gero
f42abdfad3 Configurable max block/fluid ticks 2024-02-19 17:39:59 +01:00
leguan
046fc5171f Add onboarding message for initial server start 2024-03-10 20:10:41 +01:00
Jake Potrebic
e06fe76018 More Raid API
== AT ==
public net.minecraft.world.entity.raid.Raid raidEvent
2022-03-04 09:46:33 -08:00
Janet Blackquill
e57ad97c91 Add CartographyItemEvent 2024-04-07 16:52:42 -04:00
Owen1212055
70cd7cfb23 Deprecate ItemStack#setType 2024-03-26 21:42:23 -04:00
Badbird5907
66ebf93c21 Add BlockBreakProgressUpdateEvent 2024-03-04 22:18:28 -05:00
vicisacat
93c49bbe31 Expanded Hopper API
== AT ==
public net.minecraft.world.level.block.entity.HopperBlockEntity setCooldown(I)V
public net.minecraft.world.level.block.entity.HopperBlockEntity cooldownTime
2024-03-15 17:35:40 +01:00
Yannick Lamprecht
61c73ee83e improve BanList types 2024-02-10 20:50:01 +01:00
David Mayr
10a15650f1 add number format api
== AT ==
public net.minecraft.network.chat.numbers.FixedFormat value
public net.minecraft.network.chat.numbers.StyledFormat style
2023-12-16 10:40:29 +01:00
vicisacat
380cb52e43 Add FluidState API 2023-11-17 20:22:43 +01:00
Warrior
b5cda1d98f Add getChunkSnapshot includeLightData parameter 2024-02-10 10:03:48 +01:00
Yannick Lamprecht
a2bbaf6744 ItemStack Tooltip API 2024-01-22 13:27:30 +01:00
Jake Potrebic
ef5bac21b2 Add Lifecycle Event system
This event system is separate from Bukkit's event system and is
meant for managing resources across reloads and from points in the
PluginBootstrap.
2023-07-18 17:49:38 -07:00
Luis
e5c2af7f5e Add api for spawn egg texture colors 2024-01-11 19:58:23 +01:00
Chase Henderson
0b0012faf2 Add ShulkerDuplicateEvent 2024-01-05 03:50:10 -05:00
Jake Potrebic
597ce940a4 Add PlayerTradeEvent and PlayerPurchaseEvent
Co-authored-by: Alexander <protonull@protonmail.com>
2020-07-02 16:12:10 -07:00
Spottedleaf
46c2fbfb74 Reduce allocation of Vec3D by entity tracker 2020-04-27 00:04:16 -07:00
FireInstall
0449ede4a6 Expose LootTable of DecoratedPot 2024-01-20 16:20:06 +01:00
Nassim Jahnke
898bf90054 Fixup NamespacedKey handling 2024-01-06 14:31:00 +01:00
Owen1212055
21837e419b Properly handle experience dropping on block break
This causes spawnAfterBreak to spawn xp by default, removing the need to manually add xp wherever this method is used.
For classes that use custom xp amounts, they can drop the resources with disabling
2023-12-30 15:00:06 -05:00
Nassim Jahnke
2506babe8e Validate ResourceLocation in NBT reading 2024-01-04 13:49:14 +01:00
Cryptite
b37ffd3a00 Add PlayerShieldDisableEvent
Called whenever a players shield is disabled. This is mainly caused by
attacking players or monsters that carry axes.

The event, while similar to the PlayerItemCooldownEvent, offers other
behaviour and can hence not be implemented as a childtype of said event.
Specifically, cancelling the event prevents the game events from being
sent to the player.

Plugins listening to just the PlayerItemCooldownEvent may not want said
sideeffects, meaning the disable event cannot share a handlerlist with
the cooldown event
2023-05-01 16:22:43 -05:00
Jake Potrebic
66ed50064c Add drops to shear events 2021-05-18 12:32:02 -07:00
Lukas Planz
57894618cf Add experience points API 2023-09-05 20:34:20 +02:00
Jake Potrebic
15fcde4b3c Fix NPE on null loc for EntityTeleportEvent
EntityTeleportEvent#setTo is marked as nullable and so is the
getTo method. This fixes the handling of a null "to" location
by treating it the same as the event being cancelled. This is
already existing behavior for the EntityPortalEvent (which
extends EntityTeleportEvent).
2023-12-09 19:15:59 -08:00
Jake Potrebic
5b1ab02f39 Improve Registry 2023-12-20 02:03:05 -08:00
Jake Potrebic
a264c42314 add more scoreboard API 2023-12-16 14:46:01 -08:00
Owen1212055
893616e851 Dont resend blocks on interactions
In general, the client now has an acknowledgment system which will prevent block changes made by the client to be reverted correctly.

It should be noted that this system does not yet support block entities, so those still need to resynced when needed.
2023-06-27 21:09:11 -04:00
Jake Potrebic
ddbfcd4403 Restore vanilla entity drops behavior
Instead of just tracking the itemstacks, this tracks with it, the
action to take with that itemstack to apply the correct logic
on dropping the item instead of generalizing it for all dropped
items like CB does.
2022-03-22 09:34:41 -07:00