Commit graph

5749 commits

Author SHA1 Message Date
Nassim Jahnke
334058fa69 Check for block type in SculkSensorBlock#canActivate 2024-08-07 14:33:25 +02:00
Tamion
92fa922afd Fix PickupStatus getting reset 2024-07-21 19:11:22 +02:00
Newwind
15c4f72cf0 Make interaction leniency distance configurable
The server validates incoming interaction packets by ensuring the player
sending them is inside their interaction range. For this, the server adds
a magic value, by default 1.0, to the original interaction range to
account for latency issues.

This value however may be too low in high latency environments.
The patch exposes a new configuration option to configure said value.
2024-07-25 13:00:37 +02:00
Jason Penilla
91b690c240 Add plugin info at startup 2024-07-18 18:44:28 -07:00
Jake Potrebic
4ef8b976c9 Add ItemType#getItemRarity 2024-07-09 18:37:37 -07:00
Bjarne Koll
7b21e8c8d9 Only call EntityDamageEvents before actuallyHurt
The recent upstream update moved around the event logic for
EntiyDamageEvent and its derivatives.
However, the event was called on every call to #hurt as it was moved out
of actuallyHurt.

This patch moves the invocation directly before the #actuallyHurt calls,
respective invulnerable timings.
2024-07-08 22:01:08 +02:00
Jake Potrebic
471be1b4da fix horse inventories
Horse inventories now combine 2 inventories (like
result inventories).

== AT ==
public net/minecraft/world/inventory/HorseInventoryMenu SLOT_BODY_ARMOR
2024-07-06 13:57:10 -07:00
Jake Potrebic
d9e3bee3b5 Fix NPE for Jukebox#setRecord
Fallback to the global registry if no level exists
2024-06-17 17:41:09 -07:00
Jason Penilla
164078cd2a Prioritize Minecraft commands in function parsing and command blocks 2024-07-01 11:58:49 -07:00
Jake Potrebic
9f2cf09ec5 Make a PDC view accessible directly from ItemStack 2024-06-12 10:29:40 -07:00
Jake Potrebic
c441981c54 Proxy ItemStack to CraftItemStack 2024-05-14 11:57:43 -07:00
Owen1212055
c3d1a03428 Configurable Sand Duping 2024-06-15 22:01:39 -04:00
Shane Freeder
6863c9e6db disable forced empty world ticks 2023-03-21 23:51:46 +00:00
Jake Potrebic
9d89ebb121 Properly remove the experimental smithing inventory type 2023-06-08 14:45:18 -07:00
Bjarne Koll
c05db66ee6 Configurable damage tick when blocking with shield 2024-06-13 17:16:01 +02:00
Jake
d7b5168a81 Fix removing recipes from RecipeIterator
== AT ==
public net.minecraft.world.item.crafting.RecipeMap byKey
2024-06-15 18:50:18 +01:00
granny
826f299f4c check if itemstack is stackable first 2024-02-24 19:33:01 -08:00
Owen1212055
84d07ca942 Suspicious Effect Entry API
Exposes a new suspicious effect entry type that properly represents
storable effects in the context of suspicious effects as they only
define the potion effect type and duration.

This differentiates them from the existing PotionEffect API found in
bukkit and hence clarifies that storable values in the parts of the API
in which it replaces PotionEffect.

Co-authored-by: Yannick Lamprecht <yannicklamprecht@live.de>
2024-03-03 19:43:40 +01:00
Bjarne Koll
99cd3b6813 Adopt MaterialRerouting
Adopts the paper-api to the material rerouting infrastructure introduced
by upstream.
2024-06-13 11:02:36 +02:00
Shane Freeder
165e93c7c6 Fix sending disconnect packet in phases where it doesn't exist 2024-05-30 18:46:15 +01:00
Jake Potrebic
960d0c8179 Deprecate InvAction#HOTBAR_MOVE_AND_READD 2024-05-25 09:51:13 -07:00
SoSeDiK
64cbea9119 Add missing fishing event state 2024-05-01 07:44:50 +03:00
Tamion
276e09c3b0 Fix cancelling BlockPlaceEvent calling onRemove 2024-05-23 11:02:20 +02:00
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