Mojang stored whitelist state in 2 places (Whitelist Object, PlayerList)
some things checked PlayerList, some checked object. This moves
everything to the Whitelist object.
I really don't know how this could break things with light, but wanted to
let it be an option so we can try turning it off to fix some light bug reports
Also adds a limit to stop sending Sign data to client after 500
signs per chunk to limit client lag.
Use -DPaper.excessiveSignsLimit=500 to configure that limit, or -1
to disable the limit and let your players be abused.
fixes#1878
now 80 chars counts multi sized code points the same so 80 chinese
characters would be allowed too.
Removed outbound limit as it doesn't solve the chunk oversize problem.
proper fix for chunk sending in another patch next.
we missed something in updating this patch and accidently left
hashCode as a 0 value. This caused a pretty nasty performance hit
for BlockStateEnum instances as they would be all a hash collision.
This update fixes that and also promotes the optimizations to cover
ALL cases of Block States, not just enums.
While mojang cached hashCode in 1.13, we can still just use a simple
large prime based hashCode that auto increments guaranteeing no overlap.
Additionally, replace all equals with an identity check.
modified clients can send abnormally large data from the client
to the server and it would get stored on the sign as sent.
the client can barely render around 16 characters as-is, but formatting
codes can get it to be more than 16 actual length.
Set a limit of 80 which should give an average of 16 characters 2
sets of legacy formatting codes which should be plenty for all uses.
This does not strip any existing data from the NBT as plugins
may use this for storing data out of the rendered area.
it only impacts data sent to and from the client.
Set -DPaper.maxSignLength=XX to change limit or -1 to disable
per feedback from @liach about a bug with vanillas previous logic
that we essentially just reverted to. complex recipes could run into
cases where a recipe that does have enough items can be unsatisfied
if the items are in certain orders, making them not truely shapeless.
this scenario doesn't occur in vanilla, but users can load custom recipes.
this improves the logic to do some sorting on the lists to improve
chances of matching the recipes harder ingredients before the easier
to satisfy ingredients.
the likelyhood of someone adding a recipe that still fails this is too
extreme to care about. i doubt mojangs implementation is perfect either.
we can improve this logic more later if we actually get bug reports on it.
Upstream has released updates that appears 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:
96e09e50 Add love mode API to Animals
CraftBukkit Changes:
0f708cbf Add love mode API to Animals
Mojang implemented Shapeless different than Shaped
This made the Bukkit RecipeChoice API not work for Shapeless.
This reimplements vanilla logic using the same test logic as Shaped
Upstream has released updates that appears to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing
Spigot Changes:
3cb9dcb5 SPIGOT-4640: Add debug stick permissions
Adds an event for when the server is going to destroy a current block,
potentially causing it to drop. This event can be cancelled to avoid
the block destruction, such as preventing signs from popping when
floating in the air.
This can replace many uses of BlockPhysicsEvent, as this will not fire
with the same velocity as BPE.
Upstream has released updates that appears to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing
CraftBukkit Changes:
40cbae42 SPIGOT-4638: Give last registered recipe priority
Also fixes build as a result of an upstream force push
--- work/Bukkit
Submodule work/Bukkit 217dc08d..d13fdf8c:
> SPIGOT-4637: Add source block to BlockPhysicsEvent.
--- work/CraftBukkit
Submodule work/CraftBukkit acbba8ba..cb98c6ea:
> Fix line endings in CraftDefaultPermissions
> SPIGOT-4637: Add source block to BlockPhysicsEvent.
--- work/Spigot
Submodule work/Spigot 75ee78a0c...4165cd8f4 (commits not present)
> (Manually Added) - Appears to be a result of an upstream force push
> (Manually Added) - Changed: SPIGOT-4636: Add creative mode NBT permissions
Upstream has released updates that appears to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing
Spigot Changes:
75ee78a0 SPIGOT-4636: Add creative mode NBT permissions
Upstream has released updates that appears 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:
217dc08d SPIGOT-4634: Make Inventory iteration behaviour explicit
Upstream has released updates that appears to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing
CraftBukkit Changes:
acbba8ba SPIGOT-4635: Restore shield damage sound
Upstream has released updates that appears to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing
CraftBukkit Changes:
4e4cde48 Fix experience reward flag gets lost during MerchantRecipe conversion
ConcurrentHashMap synchronizes on .computeIfAbsent even on hits,
so this does a .get(key) first, which most of our use should
be hits, and then falls back to the CHM computeIfAbsent for thread safe puts.
Also improve concurrency on handler and group collections to use a synchronized
list instead of an array deque for concurrency safety.
While these logs indicate something is 'off', we've had no reports
of visible 'issues' with entities, and no one is going to take the
time to debug this farther, so just getting rid of the logs so it's
like its never happening!
Ignorance is bliss.
This was a useless exception wrapper that ends up making
stack traces harder to read as well as the JVM cutting off
the important parts
Nothing catches this exception, so its safe to just get rid
of it and let the REAL exception bubble down
Upstream has released updates that appears to apply and compile correctly.
This update has only been PARTIALLY tested by PaperMC and as with ANY update, please do your own testing
I've tested basic region file saving as well as our oversized chunks approach.
Bukkit Changes:
e167e549 Clarify MerchantInventory#getSelectedRecipe.
3a1d5b8f Apply default permissions by registration order.
c64cc93f Make tags Keyed
ec037ed7 Added a method to get a list of tags
bfb6ef86 Introduce rotation methods to the Vector class
fc727372 Remove draft API from FluidLevelChangeEvent
CraftBukkit Changes:
6430d9c0 SPIGOT-4632: BlockState location is not fixed
14cd1688 Fix CraftInventoryMerchant#getSelectedRecipe if there is no active merchant recipe.
c24abab7 Load custom permissions after default permissions.
bc99dfe8 Make tags Keyed
6fce004f Added a method to get a list of tags
Spigot Changes:
e5e5c7c6 Allow Saving Large Chunks
e8d3881c Rebuild patches
Please test this build on a local TEST SERVER before sending to your live server!
PaperMC is not responsible for any data loss to your chunks.
-------------------------------------------------------------------
The Minecraft World Region File format has a hard cap of 1MB per chunk.
This is due to the fact that the header of the file format only allocates
a single byte for sector count, meaning a maximum of 256 sectors, at 4k per sector.
This limit can be reached fairly easily with books, resulting in the chunk being unable
to save to the world. Worse off, is that nothing printed when this occured, and silently
performed a chunk rollback on next load.
This leads to security risk with duplication and is being actively exploited.
This patch catches the too large scenario, falls back and moves any large Entity
or Tile Entity into a new compound, and this compound is saved into a different file.
On Chunk Load, we check for oversized status, and if so, we load the extra file and
merge the Entities and Tile Entities from the oversized chunk back into the level to
then be loaded as normal.
Once a chunk is returned back to normal size, the oversized flag will clear, and no
extra data file will exist.
This fix maintains compatability with all existing Anvil Region Format tools as it
does not alter the save format. They will just not know about the extra entities.
This fix also maintains compatability if someone switches server jars to one without
this fix, as the data will remain in the oversized file. Once the server returns
to a jar with this fix, the data will be restored.
If anything throwable is thrown, be sure its caught too.
Because I totally did new Error() out of javascript habit...
This ensures that chunk loading process cant get stuck due to uncaught errors
Upstream has released updates that appears 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:
a8887389 Make AreaEffectCloudApplyEvent cancellable
CraftBukkit Changes:
a2dd0e30 SPIGOT-4615: Missing target event for withers
b26fb374 Update outdated spigot link
2b1940ae Make AreaEffectCloudApplyEvent cancellable
if a chunk load was cancelled after generating stage started
it would short circuit return with a null.
however this skipped the creation of the loadTask, which some code
would then invoke in requestChunk and trigger an NPE.
This then likely left an incomplete corrupt request in the chunk map
which then crashes servers.
It should fix these isseues
Fixes#1775Fixes#1743
Upstream has released updates that appears 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:
43b46cbd SPIGOT-4608: Improve quality of MapMeta APIs
CraftBukkit Changes:
c7ba9790 Fix incorrect method descriptor in previous commit
3d19f011 SPIGOT-4608: Improve quality of MapMeta APIs
This doesn't result in the same behavior as other entities and causes
several problems. Anyone ever complain about the "Cannot send chat
message" thing? That's one of the issues this causes, among others.
If a plugin developer can come up with a valid reason to call this on a
Player we will look at limiting the scope of this change. It appears to
be unintentional in the few cases we've seen so far.
Upstream has released updates that appears 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:
bb813f6f SPIGOT-4605: Warn against hacking physics
CraftBukkit Changes:
2ced0233 Don't handle sync packets for kicked players
d5e96882 SPIGOT-4602: Cache reflection in decompile error workaround
Spigot Changes:
b0f4c22b SPIGOT-4605: Catch more physics problems
There is an explicit check in the handling code for empty pistons that
prevents sticky pistons from firing the event. However when we look back
at the history we see that this check was originally added so that ONLY
sticky pistons would fire the retract event. I'm not sure why.
1092acbddf
Over the course of several updates, the meaning of that field appears to
have changed from "is NOT sticky" to "is sticky". So now its having the
opposite effect. Only normal pistons fire the retraction event. And like
all things in CB, it's just been carried around since.
If we are to believe the history, the correct fix for this issue is to
flip it so it only fires for sticky pistons, but that puts us in a
bind. It's already firing for non-sticky pistons, changing it now would
likely result in breakage. Furthermore, there is little documentation as
to WHY that was ever intended to be the case.
Instead we opt to remove the check entirely so that the event fires for
all piston types.
Fixes GH-1829