Commit graph

6089 commits

Author SHA1 Message Date
Noah van der Aa
3fbf7aa159
net/minecraft/world/level/levelgen/feature 2024-12-15 00:09:40 +01:00
Noah van der Aa
6a85106951
net/minecraft/world/entity/ambient 2024-12-15 00:03:08 +01:00
Jake Potrebic
d1369750e2
net.minecraft.world.level.levelgen 2024-12-14 15:00:22 -08:00
Noah van der Aa
c9fd2a7ad5
cleanup wrong at 2024-12-14 23:58:10 +01:00
Noah van der Aa
5b17ebbd30
net/minecraft/server/dedicated 2024-12-14 23:58:10 +01:00
Jake Potrebic
630c815714
net.minecraft.world.item.trading 2024-12-14 14:45:10 -08:00
Jake Potrebic
2546348b9d
net.minecraft.world.level.chunk.storage 2024-12-14 14:36:51 -08:00
Owen1212055
1dd7ab9203
net/minecraft/nbt 2024-12-14 17:35:55 -05:00
Owen1212055
f2f3b06179
remove already applied
net/minecraft/world/level/storage/loot
2024-12-14 17:29:33 -05:00
Owen1212055
d096e6baaf
net/minecraft/world/entity/ai/behavior/ 2024-12-14 17:25:17 -05:00
Owen1212055
4707f46b25
net/minecraft/world/level/material 2024-12-14 16:50:01 -05:00
Jake Potrebic
9524c006d7
net.minecraft.world.entity.ai.village 2024-12-14 13:44:30 -08:00
Jake Potrebic
93114d09f2
net.minecraft.server.commands 2024-12-14 13:42:45 -08:00
Owen1212055
973fe2a945
net/minecraft/world/entity/monster/creaking 2024-12-14 16:38:13 -05:00
Owen1212055
a0a4359af1
net/minecraft/stats/ 2024-12-14 16:29:32 -05:00
Owen1212055
97043e3e5b
net/minecraft/world/level/block/piston/ 2024-12-14 16:24:09 -05:00
Jake Potrebic
004ee8651c
net.minecraft.world.effect 2024-12-14 13:12:42 -08:00
Jake Potrebic
8ec3dedfbd
net.minecraft.world.level.block.grower 2024-12-14 13:03:13 -08:00
Jake Potrebic
636e4ccaf2
net.minecraft.world.entity.monster.hoglin 2024-12-14 12:59:43 -08:00
Owen1212055
5c36e5e6b5
net/minecraft/core/registries 2024-12-14 15:59:29 -05:00
Owen1212055
aa4dd1b840
net/minecraft/network/protocol/handshake/ 2024-12-14 15:55:25 -05:00
Jake Potrebic
31913c0b0a
net.minecraft.world.item 2024-12-14 12:50:23 -08:00
Jake Potrebic
718d970f97
net.minecraft.world.level.levelgen.structure 2024-12-14 12:50:23 -08:00
Jake Potrebic
e28654cfb2
net.minecraft.world.food 2024-12-14 12:50:23 -08:00
Jake Potrebic
3cce21ddce
net.minecraft.world.level.portal 2024-12-14 12:50:23 -08:00
Jake Potrebic
7b75c1b42e
net.minecraft.world.entity.boss.wither 2024-12-14 12:50:23 -08:00
Jake Potrebic
ca35cc216e
net.minecraft.world.level.levelgen.structure.structures 2024-12-14 12:50:23 -08:00
Jake Potrebic
ce87e69d53
net.minecraft.world.level.storage.loot 2024-12-14 12:50:23 -08:00
Owen1212055
93c74cf2f4
net/minecraft/network/ 2024-12-14 15:47:52 -05:00
Nassim Jahnke
b0f627d7bb
Small cleanup 2024-12-14 21:47:32 +01:00
Shane Freeder
a546b39e58
net/minecraft/world/scores 2024-12-14 20:46:54 +00:00
Owen1212055
a9d7ae7213
Missing part of net/minecraft/world/level/dimension/end/ 2024-12-14 15:32:26 -05:00
Shane Freeder
12e0268dab
net/minecraft/core 2024-12-14 20:27:11 +00:00
Owen1212055
0aa15ea868
net/minecraft/world/level/chunk/ 2024-12-14 15:26:22 -05:00
Nassim Jahnke
9aa5f1a955
LivingEntity 2024-12-14 21:21:09 +01:00
Owen1212055
a3bd0b2bbb net/minecraft/world/level/chunk/ 2024-12-14 15:20:06 -05:00
Owen1212055
c31ab10475 Fixy 2024-12-14 14:43:19 -05:00
Owen1212055
ea5c599077 /net/minecraft/world/entity/monster 2024-12-14 14:39:44 -05:00
Noah van der Aa
f1ee7a0262
net.minecraft.commands.arguments(.{blocks|item}) 2024-12-14 20:30:36 +01:00
Shane Freeder
a890e322f1
net/minecraft/world/entity/ai/sensing (but, actually) 2024-12-14 18:42:28 +00:00
Shane Freeder
e90ba22ef7
net/minecraft/world/entity/ai/sensing 2024-12-14 18:40:19 +00:00
Noah van der Aa
6a84e88e76
net/minecraft/world/level/block/entity/vault 2024-12-14 19:37:38 +01:00
Noah van der Aa
27a47b77c7
net/minecraft/network/protocol/login 2024-12-14 19:37:38 +01:00
Noah van der Aa
33efd7ee12
net.minecraft.util.worldupdate 2024-12-14 19:37:37 +01:00
Owen1212055
c8d3ed4430 /net/minecraft/core/cauldron/CauldronInteraction fix 2024-12-14 13:23:24 -05:00
Owen1212055
fa792cf719 /net/minecraft/core/cauldron/CauldronInteraction 2024-12-14 13:21:23 -05:00
Noah van der Aa
ff9cf280c2
net.minecraft.world.entity.animal.{armadillo|camel|sniffer} 2024-12-14 19:16:36 +01:00
Jake Potrebic
db81fd3455
net.minecraft.world.item.crafting 2024-12-14 10:07:55 -08:00
Noah van der Aa
b602dc968e
net.minecraft 2024-12-14 19:06:58 +01:00
Noah van der Aa
2a274e38c6
net.minecraft.tags 2024-12-14 19:06:58 +01:00
Noah van der Aa
902965e66a
net.minecraft.network.protocol.common(.custom) 2024-12-14 19:06:58 +01:00
Shane Freeder
1a214aed6a
net/minecraft/world/entity/item 2024-12-14 17:58:14 +00:00
Owen1212055
822b963d3f net/minecraft/network/protocol/game/ 2024-12-14 12:57:50 -05:00
Nassim Jahnke
e50b519542
Next one unfortunately is LivingEntity 2024-12-14 18:45:01 +01:00
Noah van der Aa
02fb33c3ee
net.minecraft.network.chat 2024-12-14 18:44:19 +01:00
Noah van der Aa
52d26db5a0
net.minecraft.world.item.consume_effects 2024-12-14 18:44:19 +01:00
Noah van der Aa
1f128f76c7
net.minecraft.data.loot.packs 2024-12-14 18:44:19 +01:00
Lulu13022002
d7eab570bd
components 2024-12-14 18:41:16 +01:00
Owen1212055
016503a85f net/minecraft/world/entity/animal/goat/ 2024-12-14 12:28:50 -05:00
Lulu13022002
cb84eaf87a
some fixes 2024-12-14 18:22:52 +01:00
Noah van der Aa
d027a2c341
net.minecraft.resources 2024-12-14 18:17:05 +01:00
Owen1212055
71cac092ea net/minecraft/world/inventory fixes 2024-12-14 12:14:44 -05:00
Nassim Jahnke
ea14971545
More entity classes 2024-12-14 18:12:30 +01:00
Owen1212055
64e61681f4 net/minecraft/world/inventory 2024-12-14 11:56:00 -05:00
Shane Freeder
3672a7d70f
net/minecraft/world/entity/npc 2024-12-14 16:44:20 +00:00
Shane Freeder
6002fbc152
/net/minecraft/world/level/levelgen/structure/templatesystem 2024-12-14 16:44:20 +00:00
Noah van der Aa
14f6b329a5
net.minecraft.world.level.border 2024-12-14 17:43:55 +01:00
Noah van der Aa
3efd1caa64
net.minecraft.server.packs(.repository) 2024-12-14 17:39:31 +01:00
Noah van der Aa
68961d9f5e
net.minecraft.server.gui 2024-12-14 17:35:50 +01:00
Noah van der Aa
2a9bf40295
net.minecraft.world.entity.animal (thank you wheel of pain) 2024-12-14 17:27:12 +01:00
Bjarne Koll
dde17defa5
net/minecraft/world/entity/vehicle 2024-12-14 17:17:22 +01:00
Bjarne Koll
216f3118ae
net/minecraft/world/level/block/entity/trialspawner 2024-12-14 17:17:22 +01:00
Lulu13022002
bfcb0e71c9
server/network 2024-12-14 17:05:42 +01:00
MiniDigger | Martin
41494c70b0 net/minecraft/util/datafix/** 2024-12-14 16:42:52 +01:00
MiniDigger | Martin
f803e7cc28 update mache, rebuild patches for concurrency fix 2024-12-14 16:08:32 +01:00
Noah van der Aa
649f20ca93
net.minecraft.util.thread 2024-12-14 15:51:03 +01:00
Noah van der Aa
6fdbfef28e
net.minecraft.world.level.entity 2024-12-14 15:02:14 +01:00
Noah van der Aa
7d70dbf927
net.minecraft.world.damagesource 2024-12-14 14:47:37 +01:00
Noah van der Aa
5eb4ceb6a4
net.minecraft.world.item.enchantment 2024-12-14 14:40:36 +01:00
Noah van der Aa
729c6e5369
Random small stuff 2024-12-14 14:31:00 +01:00
Nassim Jahnke
679c2f7c9f
More more entity classes 2024-12-14 13:05:27 +01:00
Nassim Jahnke
07642b457e
More entity classes 2024-12-14 12:36:08 +01:00
Nassim Jahnke
03daab51f7
Entity class 2024-12-14 11:41:23 +01:00
Bjarne Koll
afa25753de
Fix compile issue in MinecraftServer 2024-12-14 05:48:25 +01:00
Bjarne Koll
f25c1a33a0
Finish block entity 2024-12-14 05:45:11 +01:00
Jake Potrebic
368d2116ba
net.minecraft.world.entity.raid 2024-12-13 19:53:42 -08:00
Jake Potrebic
aa7204fd62
net.minecraft.commands.arguments.selector 2024-12-13 19:46:27 -08:00
Jake Potrebic
9793846a7e
net.minecraft.world.level.redstone 2024-12-13 19:42:44 -08:00
Jake Potrebic
c62af3a5b7
net.minecraft.world.level.saveddata.maps 2024-12-13 19:35:46 -08:00
Jake Potrebic
d064a57573
fix a bunch of imports 2024-12-13 19:24:28 -08:00
Jake Potrebic
64500a201f
net.minecraft.server 2024-12-13 19:12:33 -08:00
Jake Potrebic
ce9d79a81b
net.minecraft.world.entity.projectile.windcharge 2024-12-13 17:54:21 -08:00
Jake Potrebic
5b0289a248
net.minecraft.world.level.storage.loot.predicates 2024-12-13 17:50:51 -08:00
Jake Potrebic
9ef230aa31
net.minecraft.world.entity.projectile 2024-12-13 17:45:53 -08:00
Jake Potrebic
cb5feced53
net.minecraft.world.entity.monster.warden 2024-12-13 16:08:40 -08:00
Jake Potrebic
f98d879f07
net.minecraft.world.level.block.state.properties 2024-12-13 16:05:23 -08:00
Jake Potrebic
fe1744dfd1
net.minecraft.world.item.alchemy 2024-12-13 16:02:20 -08:00
Jake Potrebic
f60983ac06
net.minecraft.world.entity.animal.allay 2024-12-13 15:55:52 -08:00
Jake Potrebic
f0e7d7e5f7
net.minecraft.world.level.block.state 2024-12-13 15:50:44 -08:00
Jake Potrebic
f252b67a97
net.minecraft.core.dispenser 2024-12-13 13:30:09 -08:00
Lulu13022002
83c42080d6
chat/contents 2024-12-13 21:49:47 +01:00
Lulu13022002
c6a426beda
warden AI 2024-12-13 21:36:11 +01:00
Nassim Jahnke
f73e864f18
Commands 2024-12-13 21:21:57 +01:00
Lulu13022002
2509faa08e
mob spawn settings 2024-12-13 21:07:56 +01:00
Nassim Jahnke
c3d5f253fe
Moar 2024-12-13 20:30:07 +01:00
Bjarne Koll
4091c6ac4d
Follow up on block entities 2024-12-13 20:17:16 +01:00
MiniDigger | Martin
b95e27be6c skip setupMacheSource on patch changes to save some time 2024-12-13 20:16:59 +01:00
Bjarne Koll
e0fae5ef02
Part of block entities 2024-12-13 20:11:23 +01:00
Nassim Jahnke
0135513d3d
More mobs 2024-12-13 20:01:24 +01:00
Nassim Jahnke
3ef3394311
More mobs 2024-12-13 19:25:16 +01:00
Noah van der Aa
7d42b87010
net/minecraft/world + Tadpole? 2024-12-13 19:17:03 +01:00
Noah van der Aa
18a25937bc
pathfinding, packet utils 2024-12-13 18:57:25 +01:00
Nassim Jahnke
e20952c643
Make Tadpole apply 2024-12-13 18:55:47 +01:00
Jake Potrebic
b97663fdf9
remove applied patches 2024-12-13 09:44:26 -08:00
Nassim Jahnke
aa998246f7
More work 2024-12-13 18:40:56 +01:00
Jake Potrebic
e9b739bc48
some more directories 2024-12-13 09:40:09 -08:00
Noah van der Aa
1ed5242f38
Ender dragon 2024-12-13 18:36:33 +01:00
Nassim Jahnke
83b7370131
Players directory 2024-12-13 18:06:27 +01:00
Owen1212055
a68b56a864
advancement stuff 2024-12-13 11:39:43 -05:00
Bjarne Koll
ee51737be6
More work 2024-12-13 17:24:35 +01:00
Bjarne Koll
92ef45d166
First attempt 2024-12-13 17:14:25 +01:00
Owen1212055
8324be321a
brig stuff 2024-12-13 11:02:13 -05:00
Nassim Jahnke
f2ff5966a6
First few files and initial rebuild 2024-12-13 16:52:45 +01:00
Nassim Jahnke
45ddf764d9
Move patches to unapplied 2024-12-12 12:30:31 +01:00
Jason Penilla
ff75689b08
Adjust build for config cache compat 2024-12-12 11:36:57 +01:00
Jason Penilla
8da8d2991f
Update dev bundle publishing 2024-12-12 11:36:57 +01:00
Jason Penilla
48c0f0ecd6
Fix commented sections of server build 2024-12-12 11:36:56 +01:00
Jason Penilla
d23702f449
Add back remapper for reobf testing and dev bundle 2024-12-12 11:36:56 +01:00
Jason Penilla
9368da77a9
Build updates 2024-12-12 11:36:55 +01:00
Jason Penilla
fe6dbf0377
Move paperweight use to -server 2024-12-12 11:36:44 +01:00
MiniDigger | Martin
40ec8fb606
Move to paperweight v2
Co-authored-by: Nassim Jahnke <nassim@njahnke.dev>
2024-12-12 10:57:30 +01:00
Jake Potrebic
ca5499c7fa Switch Impl types to Holderable 2024-11-24 15:08:19 -08:00
Owen1212055
d300c94ec2 Properly resend entities
This resolves some issues which caused entities to not be resent correctly.
Entities that are interacted with need to be resent to the client, so we resend all the entity
data to the player whilst making sure not to clear dirty entries from the tracker. This makes
sure that values will be correctly updated to other players.

This also adds utilities to aid in further preventing entity desyncs.

This also also fixes the bug causing cancelling PlayerInteractEvent to cause items to continue
to be used despite being cancelled on the server.

For example, items being consumed but never finishing, shields being put up, etc.
The underlying issue of this is that the client modifies their synced data values,
and so we have to (forcibly) resend them in order for the client to reset their using item state.

See: https://github.com/PaperMC/Paper/pull/1896

== AT ==
public net.minecraft.server.level.ChunkMap$TrackedEntity serverEntity
2022-12-07 17:25:19 -05:00
Rick
ea24e2c6aa Fix incorrect command serialization by creating new Command
Fixes #11649 - As noted in the issue, when CommandNodes are serialized
they are used as the key in a Map. Their equals()/hashcode() should only
match if they are equal nodes (name & command), but due to the erasure of the command field pre-serialization, nodes with different commands can be mapped onto the same value. This causes the client to interpret both nodes as the same, causing suggestions where they should not.

This is fixed by creating a different no-op command for the
erasure, instead of them holding the same lambda.
2024-11-26 20:45:52 +01:00
96DarkCode96
2837612191 Fix Player.setPlayerListOrder to send update to clients 2024-12-10 15:45:47 +01:00
Intybyte
24f63384b2 Expand scoreboard tag count validation to API set 2024-10-21 01:41:04 +02:00
Owen1212055
25c25923e9 DataComponent API
Exposes the data component logic used by vanilla ItemStack to API
consumers as a version-specific API.
The types and methods introduced by this patch do not follow the general
API deprecation contracts and will be adapted to each new minecraft
release without backwards compatibility measures.

== AT ==
public net/minecraft/world/item/component/ItemContainerContents MAX_SIZE
public net/minecraft/world/item/component/ItemContainerContents items
2024-04-28 19:53:01 -04:00
Nassim Jahnke
2a20fde332 Add feature patch hook for overrides 2024-12-05 13:00:22 +01:00
Jake Potrebic
193eebecdf Tag Lifecycle Events
== AT ==
public net/minecraft/tags/TagEntry id
public net/minecraft/tags/TagEntry tag
public net/minecraft/tags/TagEntry required
2024-06-20 09:40:57 -07:00
Bjarne Koll
45d04f9749 Add registry entry and builders 2024-06-13 23:45:32 +02:00
Jake Potrebic
a1b891dd88 Registry Modification API
== AT ==
public net.minecraft.core.MappedRegistry validateWrite(Lnet/minecraft/resources/ResourceKey;)V
public net.minecraft.resources.RegistryOps lookupProvider
public net.minecraft.resources.RegistryOps$HolderLookupAdapter
2023-02-27 18:28:39 -08:00
MrPowerGamerBR
463f952cd4 Only attempt to find spawn position if there isn't a fixed spawn position set 2024-11-28 15:20:25 -03:00
kokiriglade
4bae091802 Expanded Art API 2024-11-23 18:58:49 +00:00
Kevin Raneri
b2d8133382 Configurable Entity Despawn Time 2024-09-30 09:50:55 -07:00
Abel
7294ae3022 API to allow/disallow tick sleeping 2024-11-12 22:25:20 +01:00
Abel
b4c394a1c6 API to check if the server is sleeping 2024-11-10 16:32:34 +01:00
Lulu13022002
7b83e91bb7 Fix NPE when EntityResurrectEvent is uncancelled 2024-11-18 20:27:58 +01:00
Bjarne Koll
c7c3d8a9cb Fix incorrect invulnerability damage reduction
Fixes incorrect spigot handling of the invulnerability damage
reduction applied when an already invulnerable entity is damaged with a
larger damage amount than the initial damage.
Vanilla still damages entities even if invulnerable if the damage to be
applied is larger than the previous damage taken. In that case, vanilla
applies the difference between the previous damage taken and the
proposed damage.

Spigot's damage modifier API takes over the computation of damage
reducing effects, however spigot invokes this handling with the initial
damage before computing the difference to the previous damage amount.
This leads to the reduction values to generally be larger than expected,
as they are computed on the not-yet-reduced value.
Spigot applies these reductions after calling the EntityDamageEvent and
*then* subtracts the previous damage point, leading to the final damage
amount being smaller than expected.

This patch cannot simply call the EntityDamageEvent with the reduced
damage, as that would lead to EntityDamageEvent#getDamage() returning
the already reduced damage, which breaks its method contract.
Instead, this patch makes use of the DamageModifier API, implementing
the last-damage-reduction as a DamageModifier.
2024-11-11 21:35:27 +01:00
Barnaby
318f7b2014 Reduce work done in CraftMapCanvas.drawImage by limiting size of image and using System.arraycopy instead of for loops and use bitwise operations to do bounds checks. 2024-06-29 12:06:51 +01:00
Jake Potrebic
9467a08b36 Improve performance of RecipeMap#removeRecipe 2024-10-31 20:36:41 -07:00
Gero
7acf73ce66 Call CraftPlayer#onEntityRemove for all online players 2024-11-09 22:27:58 +01:00
Bjarne Koll
66e1ce8504 Correct update cursor
Spigot uses a no longer valid ClientboundContainerSetSlotPacket with the
slot -1, which would update the carried stack in versions <=1.21.1 but
now leads to an IOOB.
1.21.2 instead introduced the ClientboundSetCursorItemPacket, which this
patch uses instead.
2024-11-01 14:58:57 +01:00
Jake Potrebic
b620df8e20 Fix inconsistencies in dispense events regarding stack size
The javadocs for BlockDispenseEvent suggest the ItemStack is a single
item which is being dispensed. Before this fix, sometimes it was the whole
stack before a single item had been taken. This fixes that so the stack size
is always 1.
2022-12-11 23:47:22 -08:00
Aikar
0d8c3dc008 Block Enderpearl Travel Exploit
Players are able to use alt accounts and enderpearls to travel
long distances utilizing the pearls in unloaded chunks and loading
the chunk later when convenient.

This disables that by not saving the thrower when the chunk is unloaded.

This is mainly useful for survival servers that do not allow freeform teleporting.

Note: Currently removed as enderpearls are ticked as long as their owner is online in 1.21.2.
Might be worth to re-add once an option to disable the above vanilla mechanic is added, to
fully prevent enderpearl travel exploits.

== AT ==
public net.minecraft.world.entity.projectile.Projectile ownerUUID
2018-04-30 17:15:26 -04:00
Jason Penilla
cf7a1191a9 Allow using old ender pearl behavior
When enabled, ender pearls will not load chunks and will save to the world instead of the player.

== AT ==
public net.minecraft.world.entity.projectile.Projectile cachedOwner
2024-10-27 12:36:53 -07:00
Jason Penilla
21f51ebd74 Avoid issues with certain tasks not processing during sleep
Execute processQueue tasks during sleep: needed for console tab completions, pre join event, etc.

Upstream has set precedent that the bukkit scheduler will still tick during sleep, which avoids some problems
with plugins not accounting for the new sleep feature, but can still lead to others. Because of this we have disabled
sleep by default, which avoids the problem and makes it more obvious to check if this is the cause of issues when
enabled. We also unload chunks during sleep to prevent memory leaks caused by plugin chunk loads.
2024-10-27 14:18:28 -07:00
Riley Park
855db272b1 Bundle spark 2024-07-16 14:55:23 -07:00
Spottedleaf
29e03d0439 Add startup flag to disable gamerule limits
-DPaper.DisableGameRuleLimits=true will disable gamerule limits

== AT ==
public net.minecraft.server.level.ChunkLevel ENTITY_TICKING_LEVEL
2024-10-25 14:20:40 -07:00
Jason Penilla
1218a52ac9 Fix CraftWorld#isChunkGenerated
The upstream implementation is returning true for non-full chunks.
2024-06-18 12:43:06 -07:00
Flo0
35f6f25e78 API for checking sent chunks 2024-04-08 16:43:16 +02:00
Shane Freeder
8f7365707a Always send Banner patterns to the client
The mojang client will not remove patterns from a Banner when none
are sent inside of an update packet, given that this is not an expected
flow for them, this is not all too surprising. So, we shall resort to always
sending the patterns over the network for update packets.
2024-10-20 18:23:59 +01:00
Nassim Jahnke
3d14e7af19 Separate dimensiondata executor 2024-11-28 10:35:58 +01:00
Spottedleaf
7ec2cf09a3 Add proper async player disconnections
Blocking can cause performance problems
2024-10-16 06:41:32 -07:00
Doc
e95dccb515 Add AnvilView#bypassEnchantmentLevelRestriction
Anvils, by default, limit applied enchantment levels to their respective
maximum level. The added API enables plugins to disable this behaviour,
allowing enchantments that are overleveled to be applied via the anvil.
2024-10-06 16:46:36 -03:00
Lulu13022002
f207099765 Add Offline PDC API 2022-07-09 17:28:42 +02:00
Axionize
66e26ebe48 Void damage configuration API 2024-09-29 14:20:42 -07:00
Mariell Hoversholm
411498e394 Add PlayerInsertLecternBookEvent 2024-09-29 16:21:26 +02:00
Jake Potrebic
5b0133e675 Call bucket events for cauldrons 2022-01-16 10:13:33 -08:00
Tamion
8b8acbb898 Add recipeBrewTime
== AT ==
public net.minecraft.world.inventory.BrewingStandMenu brewingStandData
2024-09-15 19:17:12 +02:00
Jake Potrebic
cea3e6b65b Improve entity effect API 2024-09-27 17:13:16 -07:00
masmc05
da18fc4d93 Add enchantWithLevels with enchantment registry set 2024-09-25 16:26:04 +03:00
Nassim Jahnke
c056e2319d Fix PlayerCommandPreprocessEvent on signed commands 2024-09-21 22:01:52 +02:00
Newwind
f5e9df0862 Disable pretty printing for advancement saving
Reduces json size by about 25%
Not sure why advancements even had pretty printing enabled.
My best guess was by accident on mojang's part, especially since stats json files don't have pretty printing.
2024-09-20 14:17:37 +02:00
Bjarne Koll
c8efaa46cb Remove wall-time / unused skip tick protection
Spigot still maintains some partial implementation of "tick skipping", a
practice in which the MinecraftServer.currentTick field is updated not
by an increment of one per actual tick, but instead set to
System.currentTimeMillis() / 50. This behaviour means that the tracked
tick may "skip" a tick value in case a previous tick took more than the
expected 50ms.

To compensate for this in important paths, spigot/craftbukkit
implements "wall-time". Instead of incrementing/decrementing ticks on
block entities/entities by one for each call to their tick() method,
they instead increment/decrement important values, like
an ItemEntity's age or pickupDelay, by the difference of
`currentTick - lastTick`, where `lastTick` is the value of
`currentTick` during the last tick() call.

These "fixes" however do not play nicely with minecraft's simulation
distance as entities/block entities implementing the above behaviour
would "catch up" their values when moving from a non-ticking chunk to a
ticking one as their `lastTick` value remains stuck on the last tick in
a ticking chunk and hence lead to a large "catch up" once ticked again.

Paper completely removes the "tick skipping" behaviour (See patch
"Further-improve-server-tick-loop"), making the above precautions
completely unnecessary, which also rids paper of the previous described
incompatibility with non-ticking chunks.
2024-09-16 23:07:29 +02:00
strnq
883f50eb19 Validate slot in PlayerInventory#setSlot
The CraftPlayerInventory implementation sends a container_set_slot
packet to the client which will error if an invalid slot is passed to
the setSlot method, making a validation necessary over simply silently
ignoring invalid slot values.
2024-09-14 12:53:13 +03:00
masmc05
1cd7fd4eec Item serialization as json 2024-08-11 03:01:52 +03:00
Jake Potrebic
90bc5f1e0b Add FeatureFlag API 2024-05-29 19:50:21 -07:00
Newwind
e29ea45639 Check dead flag in isAlive()
If a plugin sets the health of a living entity above 0 after it has already died, the entity will be "revived".
It will behave the exact same as before, except with the internal "dead" flag set, resulting in 2 behavior changes,
A: it's completely invulnerable to all damage
B: it's unable to pickup items

isValid() for these bugged entities will return true, isDead() will return false, despite the dead flag.
This patch checks that the mob isn't dead before saying its alive.

Also, even if the plugin is responsibly checking !isDead() before modifying health, on very rare circumstances
I am currently unable to replicate, these "revived" entities can still appear
2024-08-26 14:01:37 +02:00
Nathan
7b8f630280 Fire BlockExpEvent on grindstone use 2024-08-31 18:09:55 -06:00
Tamion
2742ad6a9a Fix InventoryOpenEvent cancellation 2024-08-19 18:05:26 +02:00
Gegy
be5187c2da Fix: synchronise sending chat to client with updating message signature cache
In the case where multiple messages from different players are being processed in parallel, there was a potential race condition where the messages would be sent to the client in a different order than the message signature cache was updated. However, the cache relies on the fact that the client and server get the exact same updates in the same order. This race condition would cause the caches to become corrupted, and any future message received by the client would fail to validate.

This also applies to the last seen state of the server, which becomes inconsistent in the same way as the message signature cache and would cause any messages sent to be rejected by the server too.
2024-08-26 19:45:07 +02:00
okx-code
ad8ae89c95 Add enchantment seed update API 2024-08-17 13:02:45 +01:00
Newwind
34c99b8c67 Remove set damage lootable item function from compasses
In VanillaChestLoot, compasses accidentally have a setdamage loot
function on them, but compasses don't take durability, resulting in a warning.
This patch simply removes attempting to add damage to the compass item.
2024-08-22 22:55:37 +02:00
Jake Potrebic
8a940ca0ba Fix SculkBloomEvent firing for block entity loading 2024-08-19 13:43:06 -07:00
Tamion
b724ae078d Fix CraftBukkit drag system
== AT ==
public net.minecraft.world.inventory.AbstractContainerMenu quickcraftSlots
public net.minecraft.world.inventory.AbstractContainerMenu quickcraftStatus
public net.minecraft.world.inventory.AbstractContainerMenu quickcraftType
public net.minecraft.world.inventory.AbstractContainerMenu resetQuickCraft()V
2024-05-26 22:20:21 +02:00
Lulu13022002
52acc18e4f Leashable API 2024-06-22 21:17:54 +02:00
Jake Potrebic
d72defffba Add even more Enchantment API
In a separate patch because RegistryKeySet is used
and the previous "more enchant api" patch is before that.
2024-07-19 08:42:45 -07:00
mja00
15c3f06938 Add skipping world symlink scan
In worlds that are extremely large (greater than 1TB), it can take an insanely long time to walk the entire world for symlinks.
This patch adds a system property to disable the symlink scan, which can be used to speed up world loading.
2024-08-12 06:27:15 -04:00
Newwind
4b761f97a3 Configuration for horizontal-only item merging
Most of the visual artifacts that result from having item merge radius above vanilla levels is from items merging vertically,
which realistically, only happens when a player is dropping items, or items are dropping from breaking a block.

Most of the scenarios where item merging makes sense involves the two item entities being on the same Y level. i.e on the ground next to each other.
This is even more apparent since paper fixed items being able to merge through blocks.

This patch allows us to configure items to only merge horizontally, which is what vanilla does.
This allows us to have both the reduced number of item entities a high item-merge radius provides,
without most of the visual artifacts caused by items merging vertically.
2024-08-07 13:25:55 +02:00
Jake Potrebic
f6f6664716 Add API for CanPlaceOn and CanDestroy NBT values 2018-09-12 18:53:55 +03:00
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