Commit Graph

5733 Commits

Author SHA1 Message Date
Jake Potrebic acdfeeea3d Prevent NPE if hooked entity was cleared 2024-05-12 21:57:23 -07:00
Nassim Jahnke c6f962ba54 Prevent sending oversized item data in equipment and metadata
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
2021-12-01 12:36:25 +01:00
Jason Penilla ce6fd58a5e Allow Bukkit plugin to use Paper PluginLoader API 2024-05-21 13:18:15 -07:00
Jake Potrebic e1b7819229 Fix equipment slot and group API
Adds the following:
- Add test for EquipmentSlotGroup
- Expose LivingEntity#canUseSlot

Co-authored-by: SoSeDiK <mrsosedik@gmail.com>
2024-05-22 10:01:19 -07:00
Jake Potrebic 5d843f3120 Fix issues with Recipe API 2024-05-12 15:49:36 -07:00
Owen1212055 977543c545 Brigadier based command API
== AT ==
public net.minecraft.commands.arguments.blocks.BlockInput tag
public net.minecraft.commands.arguments.DimensionArgument ERROR_INVALID_VALUE
public net.minecraft.server.ReloadableServerResources registryLookup
public net.minecraft.server.ReloadableServerResources

Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
Co-authored-by: Marc Baloup <marc.baloup@laposte.net>
2022-08-01 22:50:34 -04:00
Nassim Jahnke aabe9f5264 Print data component type on encoding error 2024-05-09 15:11:34 +02:00
SoSeDiK b50682ab2b More Chest Block API
== AT ==
public net.minecraft.world.level.block.ChestBlock isBlockedChestByBlock(Lnet/minecraft/world/level/BlockGetter;Lnet/minecraft/core/BlockPos;)Z
2024-05-01 08:22:13 +03:00
Jake Potrebic 31725bc039 General ItemMeta fixes
== AT ==
private-f net/minecraft/world/item/ItemStack components
public net/minecraft/world/food/FoodProperties DEFAULT_EAT_SECONDS
public org/bukkit/craftbukkit/block/CraftBlockStates getBlockState(Lorg/bukkit/World;Lnet/minecraft/core/BlockPos;Lnet/minecraft/world/level/block/state/BlockState;Lnet/minecraft/world/level/block/entity/BlockEntity;)Lorg/bukkit/craftbukkit/block/CraftBlockState;
public net/minecraft/world/level/block/entity/BlockEntity saveId(Lnet/minecraft/nbt/CompoundTag;)V

Co-authored-by: GhastCraftHD <julius.gruenberg@leghast.de>
2024-04-27 20:56:17 -07:00
nostalfinals 445e9a65fb Added API to get player ha proxy address 2024-04-08 23:24:38 +08:00
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