High performance Spigot fork that aims to fix gameplay and mechanics inconsistencies
Go to file
Hugo Manrique 6d166798e6 Optimize hasItemMeta (remove getItemMeta call) (#1279)
Spigot 1.13 checks if any field (which are manually copied from the ItemStack's "tag" NBT tag) on the ItemMeta class of an ItemStack is set.

We could just check if the "tag" NBT tag is empty, albeit that would break some plugins. The only general tag added on 1.13 is "Damage", and we can just check if the "tag" NBT tag contains any other tag that's not "Damage" (https://minecraft.gamepedia.com/Player.dat_format#Item_structure) making the `hasItemStack` method behave as before.

Check the `ItemMetaTest#testTaggedButNotMeta` method to see how this method behaves. (I also added some extra tests).

`hasItemMeta()` will return true if `ItemStack.getDamage() != 0` or it has the `Damage` tag or any other tag is set.

Closes #1222
2018-07-29 12:30:01 -04:00
.github/ISSUE_TEMPLATE [CI-SKIP] Add newlines in templates for readability 2018-05-22 16:37:23 -05:00
licenses [CI-SKIP] Clarify project licensing 2018-03-06 20:41:03 -05:00
removed/server [CI-SKIP] Patch of progress on async chunkload, delay until 1.13.1 2018-07-26 01:28:53 -04:00
scripts Readd configurable max chunk gens per tick 2018-07-21 17:24:18 -04:00
Spigot-API-Patches 1.13: EnderDragon Events (#1247) 2018-07-28 02:03:10 -04:00
Spigot-Server-Patches Optimize hasItemMeta (remove getItemMeta call) (#1279) 2018-07-29 12:30:01 -04:00
work Update CB/S 2018-07-28 03:38:13 +01:00
.gitignore [CI-SKIP] macOS filesystem dust made it past gitignore! 2018-03-13 18:43:13 -04:00
.gitmodules Cleanup and restructure the project 2016-04-01 23:15:41 -05:00
.travis.yml Move mc decompile source to its own folder 2017-08-12 18:56:59 -05:00
CONTRIBUTING.md Add file import and patch notes to CONTRIBUTING.md 2018-01-24 22:47:00 -05:00
LICENSE.md [CI-SKIP] Add Self to MIT List (#1262) 2018-07-23 21:05:04 -04:00
paper change LAST_EDIT to PAPER_LAST_EDIT for edit commands 2018-07-21 12:07:33 -04:00
pom.xml Update URLs 2018-05-19 01:29:05 -05:00
README.md Update URLs 2018-05-19 01:29:05 -05:00

Paper Build Status

High performance Spigot fork that aims to fix gameplay and mechanics inconsistencies.

IRC Support and Project Discussion

Discord

Documentation

Access the Paper docs here: paper.readthedocs.io
Access the Paper API javadocs here: destroystokyo.com/javadocs

How To (Server Admins)

Paperclip is a jar file that you can download and run just like a normal jar file.

Download a copy of paperclip.jar from our build server, here.

Run the Paperclip jar directly from your server. Just like old times

Paper requires Java 8 or above.

How To (Compiling Jar From Source)

To compile Paper, you need JDK 8, maven, and an internet connection.

Clone this repo, run ./paper jar from bash, get files.

How To (Pull Request)

See Contributing

Special Thanks To:

YourKit-Logo

YourKit, makers of the outstanding java profiler, support open source projects of all kinds with their full featured Java and .NET application profilers. We thank them for granting Paper an OSS license so that we can make our software the best it can be.