Commit Graph
100 Commits
Author SHA1 Message Date
Jason Penilla 88cd18de34 Set UTF-8 encoding for Javadoc and ProcessResources (#5937) 2021-06-21 08:27:46 -07:00
Jason Penilla 5f20f9bf95 Deobfuscate stacktraces in log messages using a RewriteAppender and a custom RewritePolicy (#5926)
Also replace a couple calls to `System.err` with logger usages, as traces printed with the former do not get deobfuscated.
2021-06-21 01:09:18 -07:00
Jason PenillaandSpottedleaf 6922070800 Fix PlayerDropItemEvent using wrong item (#5924)
Co-authored-by: Spottedleaf <spottedleaf@users.noreply.github.com>
2021-06-20 22:12:04 -07:00
Jason Penilla c0ee8ae35e Rename package from io.papermc.paper.world.gen to io.papermc.paper.world.generation (#5894) 2021-06-19 22:02:27 -07:00
Jason Penilla 7606788417 Save BlockEntities on main for async chunk saves
Closes #5854
2021-06-18 21:38:44 -07:00
Jason Penilla 9713a965ed Add task to print Minecraft version, add snapshots repo for publishing 2021-06-18 16:38:26 -07:00
Jason Penilla 166760a713 Remove chat event APIs marked as deprecated for removal with 1.17 2021-06-18 15:47:40 -07:00
Jason Penilla 1ffd69b7cc Update incremental chunk saving 2021-06-17 01:37:27 -07:00
Jason Penilla 5eb7d40379 Update Entity load/save limit per chunk 2021-06-16 21:00:32 -07:00
Jason Penilla 48c1ea17c3 Fix artifact ids 2021-06-16 16:23:02 -07:00
Jason Penilla 53cf0f23c1 Fix comment 2021-06-16 00:29:05 -07:00
Jason Penilla f0a6f4878d Temporarily revert incremental chunk saving patch
Needs updating to hook into new entity storage system
2021-06-16 00:19:23 -07:00
Jason Penilla a222ba520c Revert "Re-add Chunk Priority/Urgency System (#5829)"
This reverts commit 2119f06b5a.

Patch was updated incorrectly and needs a closer look.
2021-06-15 23:46:06 -07:00
Jason Penilla 942c015158 Update runDev task for Gradle 7.1 deprecations
also no longer disable watchdog by default, instead require `disableWatchdog` Gradle property to be set
2021-06-15 22:10:05 -07:00
Jason Penilla d6c75ac925 Update Paperweight to 1.0.2 2021-06-15 22:08:04 -07:00
Jason Penilla 1c31ebc273 Update sync chunk load debug patch
Had to drop some hunks modifying getEntities, as those methods were rewritten by Mojang in 1.17
2021-06-15 17:50:38 -07:00
Jason Penilla 64c6ffb24e fix StopAttackingIfTargetInvalid behavior 2021-06-15 16:54:59 -07:00
Jason Penilla aa6c0aa554 BlockPos.withinManhattan decomp fix 2021-06-15 06:55:25 -07:00
Jason Penilla a4bbe926b2 Remove sync loading of spawn chunks
Adding the tickets is sufficient
2021-06-15 03:13:30 -07:00
Jason Penilla 802eb82975 Updated Upstream (CraftBukkit/Spigot)
Upstream has released updates that appear 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:
f992ce60 Fix duplicate datapack reload on /reload

Spigot Changes:
9472b09d Rebuild patches
2021-06-15 01:38:57 -07:00
Jason Penilla 7a5a3e1f9b Clean cache on upstream update 2021-06-15 01:38:41 -07:00
Jason Penilla ca9f311974 Revert "Updated Upstream (CraftBukkit)"
This reverts commit 850a1e1949.
2021-06-15 01:12:10 -07:00
Jason Penilla e73e1393f4 update Optimize Pathfinder - Remove Streams / Optimized collections 2021-06-15 00:43:03 -07:00
Jason Penilla a5fd0e69b4 revert accidental changes 2021-06-15 00:28:40 -07:00
Jason Penilla 850a1e1949 Updated Upstream (CraftBukkit)
Upstream has released updates that appear 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:
f992ce60 Fix duplicate datapack reload on /reload
2021-06-14 23:51:30 -07:00
Jason Penilla 651ec26387 reorder patches after merge 2021-06-14 22:49:09 -07:00
Jason Penilla e2c2547bec update Fix incorrect status dataconverter for pre 1.13 chunks 2021-06-14 22:12:50 -07:00
Jason Penilla 995348f469 final patches from remapped and unmapped
keep in mind many patches in the removed folder still need to be updated
2021-06-14 21:55:46 -07:00
Jason Penilla 6b738c8252 fixes 2021-06-14 21:16:18 -07:00
Jason Penilla 67663024a2 Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appear 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:
ebb0e28d #631: Add Villager#shakeHead
751469c6 #629: Add LivingEntity#isClimbing

CraftBukkit Changes:
622cf611 SPIGOT-6555: Cannot access shield BlockStateMeta
8b2e78ec SPIGOT-6542: Fix counting players with fauxSleeping = true
f66c437a SPIGOT-6561: Add events for dripleaf tilting
6ed40004 SPIGOT-6560: Crash when falling stalactite hits player
72a2901b SPIGOT-6557: PlayerEditBookEvent#setNewBookMeta does not update meta
a07e783a #865: Implement Villager#shakeHead
3252ff18 #863: Add LivingEntity#isClimbing
77058c79 SPIGOT-6554: Worlds created with the bukkit ChunkGenerator cannot save
2021-06-14 21:01:27 -07:00
Jason Penilla d96afc738c update mappings files 2021-06-14 20:50:34 -07:00
Jason Penilla d15e006a8c patches 2021-06-14 20:50:26 -07:00
Jason Penilla b23eec8be4 Update editorconfig 2021-06-14 20:50:12 -07:00
Jason Penilla fdd125c43e Put pom in correct location for Paperclip install to maven local feature 2021-06-14 18:50:13 -07:00
Jason Penilla 8865f5811d fix issue in hopper patch 2021-06-14 03:18:42 -07:00
Jason Penilla eb75bb7c8d decomp fixes 2021-06-14 02:15:37 -07:00
Jason Penilla d38930d51e Add missing getLevel implementation to Hopper Minecart, add mapping to fix reobf 2021-06-14 02:06:46 -07:00
Jason Penilla 97607aab4e Fix mojangapi build 2021-06-13 23:56:15 -07:00
Jason Penilla 7007f67ebb patches 2021-06-13 23:45:29 -07:00
Jason Penilla 3390082ea7 progress 2021-06-13 22:32:56 -07:00
Jason Penilla 4fb248cd77 2 patch 2021-06-13 21:27:51 -07:00
Jason Penilla d465800774 small fixes 2021-06-13 20:06:11 -07:00
Jason Penilla 8b23cde79f reorder patches after merge 2021-06-13 19:43:29 -07:00
Jason Penilla d6cfd79fb2 patches 2021-06-13 19:40:12 -07:00
Jason Penilla 24cd075f4e Use correct jetbrains annotations 2021-06-13 18:48:31 -07:00
Jason Penilla bda639725b fix compile 2021-06-13 01:45:29 -07:00
Jason Penilla 21e2a4d210 patch 2021-06-13 01:40:50 -07:00
Jason Penilla 4ec60d8958 patches and patches 2021-06-13 01:26:58 -07:00
Jason Penilla 9a7acfee26 patches
fix
2021-06-12 23:48:25 -07:00
Jason Penilla c7ea12688f Updated Upstream (Bukkit/CraftBukkit/Spigot)
Upstream has released updates that appear 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:
8503c3c9 #621: Add HumanEntity#getItemInUse and Material#getSlipperiness
248deb09 #622: Add methods to check if item is the breed item for an entity
2ce691d8 Clarify Player#breakBlock only works for blocks in the same world
5dcdd48e SPIGOT-6514: Small Dripleaf block data is missing half property
cc9610b7 #619: Add Player#breakBlock()
862bc475 Fix bad merge of SPIGOT-6502 fix
989bb0c1 Downgrade SnakeYAML due to issues with comments parsing
1dff62ae Fix inverted visual fire docs

CraftBukkit Changes:
40caacc8 SPIGOT-6526: World entities are not populated when plugin onEnable is called
c9a92ad0 SPIGOT-6536: Marker position not set on spawn
20d3e57c #855: Add HumanEntity#getItemInUse and Material#getSlipperiness
d9c69b44 SPIGOT-6529: Fix BundleMeta#setItems
8bd43be5 SPIGOT-6535: PlayerGameModeChangeEvent event incorrectly reports old gamemode
4ece3ff3 #856: Add methods to check if item is the breed item for an entity
dd4bec5f Add additional validation to Player#breakBlock
bc835ae6 SPIGOT-6532: Fix Entity#setGlowing
384e116e Restore 1.16.5 behaviour of InventoryDragEvent being called even when a single item is 'dragged' to its own slot
b42e708c Fix new map colors rendering as transparent
cfe7fecf SPIGOT-6524: Inventory desync when InventoryClickEvent is cancelled
eeae1b19 SPIGOT-6522: ItemStack on cursor is always AIR
7490724d Fix missing PlayerEditBookEvent
06875f76 SPIGOT-6513: Placing ItemStack in Inventory causes InventoryAction.NOTHING
27835bde SPIGOT-6519: Fix end gateway teleports
4ac634ad SPIGOT-6515: "Un-waterlogging" throws UnsupportedOperationException in some cases
da425fa2 SPIGOT-6518: Anvils falling onto dripstone can sometimes crash server
50530da9 SPIGOT-6514: Small Dripleaf block data is missing half property
6fdecf20 #853: Implement Player#breakBlock()
4db9c49f SPIGOT-6510: Bukkit#createMap throws NullPointerException
89e2b127 SPIGOT-6517: Spider jockey crash on dripstone
cbf2f678 SPIGOT-6508: Rename conflicted getServer
74575d48 SPIGOT-6506: Fix crash with custom inventories
a3df386f Fix NPE with Entity.getNearbyEntities
d747f8ed Fix NPE with World.getNearbyEntities
4d2c7800 Fix second usage of worldGenSettings just in case
5182f923 SPIGOT-6504: Fix generating fresh worlds

Spigot Changes:
66f9d3c1 Rebuild patches
191e4971 Rebuild patches
a09c0bb6 Restore Spigot experience merging
2021-06-12 22:13:07 -07:00
Jason Penilla 249afad373 patches 2021-06-12 22:09:48 -07:00
Jason Penilla 9d21369fb9 Merge remote-tracking branch 'leaf/dev/1.17' into dev/1.17 2021-06-12 21:35:43 -07:00
Jason Penilla 266a44e61c Resolve run working directory from rootProject 2021-06-12 20:35:03 -07:00
Jason Penilla 4b48806b39 Use forUseAtConfigurationTime() for run directory property 2021-06-12 20:21:59 -07:00
Jason Penilla 744ca73135 Use mergeServiceFiles() instead of AppendingTransformer 2021-06-12 19:23:21 -07:00
Jason Penilla ec859f1f2f Add runWorkDir property for setting a custom run task working directory 2021-06-12 19:18:24 -07:00
Jason Penilla 3a7b3b35c3 Write API version to pom.properties for Versioning to read
Maven writes this metadata normally, but we don't use maven. Maybe should modify Versioning instead in the future, but this works just fine for now.
2021-06-12 18:28:41 -07:00
Jason Penilla 961d6d7dac patches 2021-06-11 20:07:57 -07:00
Jason Penilla 25eea26621 Add ASM dep to API and fix issues from title packet changes with bungee api 2021-06-11 19:23:18 -07:00
Jason Penilla 5db334f804 Add Paper version back to manifest, add runShadow, runReobf, and runDev tasks for testing 2021-06-11 18:10:12 -07:00
Jason Penilla e278cc1a3a Exit with non-zero exit code when killed by watchdog (#5732) 2021-05-28 00:29:41 -07:00
Jason Penilla ee0bafc6a3 Fix default ChatRenderer when no plugins are installed (#5702) 2021-05-21 18:08:18 -07:00
Jason Penilla de5d8a76fe Enhance (Async)ChatEvent with per-viewer rendering API (#5684) 2021-05-21 15:55:54 -07:00
Jason Penilla 1cf0417000 Actually list all missing hard depends (#5701) 2021-05-21 13:31:37 -07:00
Jason Penilla a3b68be22d Add command line option to load extra plugin jars not in the plugins folder
ex: java -jar paperclip.jar nogui -add-plugin=/path/to/plugin.jar -add-plugin=/path/to/another/plugin_jar.jar
2021-05-18 15:17:24 -07:00
Jason Penilla e7d9c31b56 Add ItemStack#displayName to get the formatted display name of an ItemStack (#5628)
The display name includes formatting such as item hover event, display name (in italics if renamed in anvil), and color based on rarity.

This is what vanilla uses for give command feedback, and when an item is shown in a death message.
2021-05-12 23:16:33 -07:00
Jason Penilla 15d0644617 Fix incorrect colors in some log messages (#5609)
CraftChatMessage.fromComponent fails to take into account the style of TranslatableComponent args, causing any styling on args to be completely ignored.

Fixing this is relatively simple, however would cause behavior to deviate from upstream. This commit will fix the coloring in messages logged through MinecraftServer.LOGGER by simply using Adventure's legacy text serializer, which properly serializes TranslatableComponents and their arguments. Note that this doesn't do anything about the underlying issue of CraftChatMessage.fromComponent improperly serializing TranslatableComponents.
2021-05-10 20:47:51 -07:00
Jason Penilla d30a6a4463 Don't annotate type parameters using JetBrains annotations (#5600) 2021-05-08 19:36:53 -07:00
Jason Penilla 7bc482249f Allow for Component suggestion tooltips in AsyncTabCompleteEvent (#5504) 2021-05-07 16:12:03 -07:00
Jason Penilla e57a4cbe72 Use JsonSerializationContext#serialize instead of recursion for AdventureComponents - fixes #5580 and #5371 2021-05-06 03:32:52 -07:00
Jason Penilla 57b254d94f Return after sending empty commands (#5586) 2021-05-06 16:25:29 -07:00
Jason Penilla 1da2f0afbc Implement methods to convert between Component and Brigadier's Message (#5542) 2021-04-24 15:16:41 -07:00
Jason Penilla bf974a611b Expose more Adventure serializers through PaperComponents (#5443) 2021-04-22 05:48:49 -07:00
Jason Penilla 42b4fbf53f Add support for tab completing and highlighting console input from the Brigadier command tree (#5437) 2021-04-16 23:37:51 -07:00
Jason Penilla 6062ab46f1 [CI-SKIP] Drop Allow PlayerEditBookEvent to fire for off hand (#5471)
Upstream fixed this in a different way (using -1 for off hand instead of the real slot id...) so this patch is no longer needed.
2021-04-08 21:54:18 -07:00
Jason Penilla 5c3dff17f2 Fix PlayerEditBookEvent (#5463) 2021-04-05 18:46:31 -07:00
Jason Penilla ed27c9d52c Remove from Map by key 2021-03-29 02:50:01 -07:00
Jason Penilla 8d7a6d9c89 Use PaperAdventure.PLAIN instead of PlainComponentSerializer.plain() for AdventureComponent#getString (#5414) 2021-03-25 17:01:59 -07:00
Jason Penilla a12e69774f Add checkerframework nullness annotations to accepted list for AnnotationTest (#5409)
Also use checkerframework annotations instead of jetbrains ones for Inventory#getContents as jetbrains ones do not allow properly annotating the nullability of an array and it's contents.
2021-03-24 03:02:32 -07:00
Jason Penilla 786afba088 Only set despawnTimer for Wandering Traders spawned by MobSpawnerTrader (#5391)
Upstream recently broke this when they exposed despawnTimer to API.
2021-03-19 16:19:28 -07:00
Jason Penilla 6d452f1f7f Fix VanillaMobGoalTest#testBukkitMap (#5390) 2021-03-19 15:21:54 -07:00
Jason Penilla a724816abb Deprecate ItemStack#setLore(List<String>) and ItemStack#getLore, add Component based alternatives 2021-03-18 22:04:54 -07:00
Jason Penilla 062733b903 Updated Upstream (CraftBukkit/Spigot)
Doesn't compile yet.

CraftBukkit Changes:
90d6905b Repackage NMS
69cf961d Repackage patches

Spigot Changes:
79d53c28 Repackage NMS
2021-03-16 00:19:45 -07:00
Jason Penilla 213b84a2a8 Update scripts for NMS repackaging 2021-03-16 00:19:21 -07:00
Jason Penilla e59776a02e Use Adventure for /version command feedback, add copy to clipboard click event (#5333) 2021-03-09 20:56:13 -08:00
Jason Penilla b0df4d17c8 Fix Material#getTranslationKey for Block Materials (#5294)
* Fix Material#getTranslationKey for Block Materials

* Cache the result of Material#isBlock
2021-03-02 16:27:34 -08:00
Jason Penilla 84af0796d3 Fix a couple of typos in the javadoc for Player (#5235) 2021-02-23 05:46:02 -08:00
Jason Penilla 9cf511130f Replace usages of LegacyComponentSerializer.legacySection() in Paper-Server with PaperAdventure.LEGACY_SECTION_UXRC (#5233) 2021-02-23 05:45:09 -08:00
Jason Penilla 36e0569896 Enable Hex colors on PaperAdventure.LEGACY_SECTION_UXRC, and use it for sending messages to console command sender (#5230)
This fixes messages to console having colors stripped, and also fixes colors being downsampled in PlayerConnection#disconnect(String)
2021-02-22 22:43:49 -08:00
Jason Penilla 79720eaf85 Merchant#getRecipes should return an immutable list (#5183)
This fixes a confusing issue where doing 'merchant.setRecipes(merchant.getRecipes());' would clear the merchants recipes, as the implementation of getRecipes is guavas Lists.transform wrapped in Collections.unmodifiableList, and the implementation of setRecipes clears the backing list before adding the elements of the provided list to the backing list.
The javadoc for the getRecipes method says 'an immutable list of trades', so this patch makes the javadoc correct.
2021-02-10 15:06:34 -08:00
Jason PenillaandSpottedleaf 6a84ae3d30 Do not add passengers of entities that were above save limit (#5073)
Co-authored-by: Spottedleaf <spottedleaf@spottedleaf.dev>
2021-01-16 16:05:33 -08:00
Jason Penilla 9db95fbc63 Improve zombie villager curing exploit fix (#5054)
Instead of completely resetting a Villager's reputation for all players each time they are cured, we now only reset the relevant part of the reputation for only that player. This means the exploit is fixed and players cannot stack multiple cures until prices are down to 1, but doesn't have the same side effects that are commonly complained about with the current exploit fix.
2021-01-15 09:40:10 -08:00
Jason Penilla e1e887ac1e Add a config option to limit the number of entities of each type to load/save in a chunk (#4792) 2021-01-13 16:04:51 -08:00
Jason Penilla c762d416c5 Fix villager boat exploit (#5047) 2021-01-11 13:23:11 -08:00
Jason Penilla c7a5aadb36 JavaDoc fixes
Remove duplicate JavaDocs - At some point upstream decided to fix some of their JD errors/warnings, so now we have duplicate tags, bringing new warnings.
Also add missing `@param` for ItemStack.deserializeBytes
2020-12-19 01:39:37 -08:00
Jason Penilla b9744db06b Add and implement cancellable TargetHitEvent for when Target Blocks are hit by Projectiles 2020-11-26 00:30:08 -08:00
Jason Penilla 9d76d7a887 Add Wandering Trader spawn rate config options 2020-09-23 10:28:11 -07:00
Jason Penilla ca25d24197 Villager resetOffers API 2020-10-03 21:20:10 -07:00
Jason Penilla add661a180 Fix NPE thrown when converting MerchantRecipe from Bukkit to NMS (#4755)
This bug was introduced in https://github.com/PaperMC/Paper/commit/c451989b86432a21509ee91f5067ec81ea8c3c60 (Add ignore discounts API)
2020-11-11 19:35:44 -08:00
Jason Penilla 859ebd5ad4 Fix client lag on advancement loading (#4710)
When new advancements are added via the UnsafeValues#loadAdvancement
API, it triggers a full datapack reload when this is not necessary. The
advancement is already loaded directly into the advancement registry,
and the point of saving the advancement to the Bukkit datapack seems to
be for persistence. By removing the call to reload datapacks when an
advancement is loaded, the client no longer completely freezes up when
adding a new advancement.
To ensure the client still receives the updated advancement data, we
manually reload the advancement data for all players, which
normally takes place as a part of the datapack reloading.
2020-11-11 08:18:36 -08:00