Commit graph

3602 commits

Author SHA1 Message Date
CraftBukkit/Spigot
5f36fbfcfe SPIGOT-5799: InventoryCloseEvent fires after PlayerQuitEvent
By: md_5 <git@md-5.net>
2020-06-24 09:54:59 +10:00
CraftBukkit/Spigot
fed33ad6d5 SPIGOT-5675, SPIGOT-5798, MC-149563: Fix tracking of entities across dimensions
By: md_5 <git@md-5.net>
2020-06-24 09:21:39 +10:00
CraftBukkit/Spigot
0af0259050 SPIGOT-5797: Zombie(Villagers) Instant Convert based on their lifetime
By: md_5 <git@md-5.net>
2020-06-24 08:52:40 +10:00
CraftBukkit/Spigot
33a09c7f27 Remove outdated build delay.
By: md_5 <git@md-5.net>
2020-06-20 12:50:13 +10:00
CraftBukkit/Spigot
2516f48571 Revert "#675: Fix redirected CommandNodes sometimes not being properly redirected"
This reverts commit 36e3ae4ae6.

By: md_5 <git@md-5.net>
2020-06-18 07:41:02 +10:00
CraftBukkit/Spigot
36e3ae4ae6 #675: Fix redirected CommandNodes sometimes not being properly redirected
By: Matthias Ngeo <matthiasngeo@gmail.com>
2020-06-17 20:04:50 +10:00
CraftBukkit/Spigot
5a47beb9cd SPIGOT-2623: Add EntityEquipment methods to get/set ItemStacks by slot.
By: blablubbabc <lukas@wirsindwir.de>
2020-06-13 20:56:32 +10:00
CraftBukkit/Spigot
ecdda0bdbc #673: Fix Craftworld#isChunkLoaded
The flag for getChunkAt(int, int, ChunkStatus, boolean)
is actually a flag for whether to bring the underlying
PlayerChunk up to the required ticket level to load the
chunk. So, if the chunk is already at the required level,
but has not yet loaded, the call will actually either
start the load if it has not already been started and
block until completion.

This behaviour is not suitable for just
checking if the chunk is loaded.

By: Spottedleaf <Spottedleaf@users.noreply.github.com>
2020-06-06 19:23:46 +10:00
CraftBukkit/Spigot
3be59d8d05 SPIGOT-5751: Made breakNaturally and getDrops returns the correct item if no argument is given
By: Lars Dormans <lars.dormans@live.nl>
2020-06-03 19:28:13 +10:00
CraftBukkit/Spigot
a1cc6a4683 SPIGOT-4441: Fix serializing Components to and from Legacy
While 9862a0135d might of semi helped being able to save black text
lore, it actually took a fundamental problem with the legacy serialization
code and expanded it to break even more aspects of the server when dealing
with Component to Legacy conversion.

This is causing data loss in Spigot with cases such as setting an item name
to white gets stripped resulting in it being italic.

Additionally, things such as book pages have been returning black formatting
codes for the end of the line even when the user doesn't have colors in the book.

The root issue is that the "Default Color" system is fundamentally wrong.

Components do not and should not care about what element of the game they
are being used by, and that's what the default color system did.

It results in components that if obtained from 1 source such as a Book
where the default / rendered color is black, is then copied to another
source such as an Entity name, the black is carried forward and shown
in the Entity name, when in reality it should have been white.

This commit reverts 9862a0135d and fixes the underlying serialization
issues when it comes to Legacy to and From conversions.

There was quite a number of issues with this code overall, in how
it handles inserting color codes, new line parsing and such.

Books was using mojangs own "getLegacyString" which doesn't match behavior.
We also do not want to use Mojangs method as there is no guarantee they don't
remove that in future.
Plus, everything about books uses the CB implementation anyways, and it should
be consistent (this was mandatory to avoid serialization format changes on old vs new)

These changes as is results in Item Stacks already serialized will not
change contents when they go to component and back, so this won't impact
any existing data.

Newly created books though for example will change behavior in that they
will no longer insert black color codes in the serialized data and will
only represent intentional color changes by the creator of the book.
This will result in cleaner data on them, and books are the only thing
I'm aware of that has a behavioral shift due to the likelyhood of the
default color system kicking in on other parts of the string.

A unit test has been added to verify integrity of serialization to
ensure that any legacy string that is converted into Components will
always re-encode back in the same way when going back to Legacy.

By: Aikar <aikar@aikar.co>
2020-06-01 19:19:42 +10:00
CraftBukkit/Spigot
515509a1a9 #665: Add test for Material#getCraftingRemainingItem()
By: ben <ben@benwoodworth.net>
2020-05-28 19:31:27 +10:00
CraftBukkit/Spigot
9862a0135d SPIGOT-5749: ItemMeta serializing to YAML not saving black colour code
By: md_5 <git@md-5.net>
2020-05-26 19:39:03 +10:00
CraftBukkit/Spigot
edf9390114 SPIGOT-5748: Add instant effect potion break to the Effect enum
Conversion from Color to integer for the data of the new enum entry

By: WinX64 <winx64b@hotmail.com>
2020-05-26 19:34:39 +10:00
CraftBukkit/Spigot
809449f545 SPIGOT-5716: Clarify documentation of MultipleFacing
By: md_5 <git@md-5.net>
2020-05-09 16:12:18 +10:00
CraftBukkit/Spigot
a00b0adb43 SPIGOT-5718: Block.BreakBlockNaturally does not reflect tool used
By: md_5 <git@md-5.net>
2020-05-09 16:05:17 +10:00
CraftBukkit/Spigot
698e183d45 SPIGOT-5727: GameRule doImmediateRespawn cannot be set per-world
By: ShaneBeee <shanebolenback@me.com>
2020-05-09 15:45:52 +10:00
CraftBukkit/Spigot
53746005d5 #664: Add methods to get/set ItemStacks in EquipmentSlots
By: Parker Hawke <hawkeboyz2@hotmail.com>
2020-05-05 19:10:03 +10:00
CraftBukkit/Spigot
fb92d00666 #662: Expose ItemStack and hand used in PlayerShearEntityEvent
By: Parker Hawke <hawkeboyz2@hotmail.com>
2020-05-02 17:48:37 +10:00
CraftBukkit/Spigot
c4099fa584 SPIGOT-2304: Implement LootGenerateEvent
By: Parker Hawke <hawkeboyz2@hotmail.com>
2020-04-30 19:15:58 +10:00
CraftBukkit/Spigot
0141e701d7 SPIGOT-5566: Doused campfires & fires should call EntityChangeBlockEvent
By: Parker Hawke <hawkeboyz2@hotmail.com>
2020-04-29 17:26:40 +10:00
CraftBukkit/Spigot
b29a5757f9 SPIGOT-5707: PersistentDataHolder not Persistent on API dropped Item
By: md_5 <git@md-5.net>
2020-04-29 17:21:06 +10:00
CraftBukkit/Spigot
95a89a0073 #650: Add method to get player's attack cooldown
By: DiamondDagger590 <diamonddagger590@gmail.com>
2020-04-23 11:13:40 +10:00
CraftBukkit/Spigot
8a51bce44c #655: Added support for the VM tag jansi.passthrough when processing messages sent to a ColouredConsoleSender.
By: Martoph <sager1018@gmail.com>
2020-04-23 11:06:13 +10:00
CraftBukkit/Spigot
3f9b83c715 SPIGOT-5689: Fireball.setDirection increases velocity too much
By: md_5 <git@md-5.net>
2020-04-23 08:33:33 +10:00
CraftBukkit/Spigot
e9672f330b SPIGOT-5673: swingHand API does not show to self
By: md_5 <git@md-5.net>
2020-04-22 12:06:24 +10:00
CraftBukkit/Spigot
62583ba081 SPIGOT-5680: isChunkGenerated creates empty region files
By: md_5 <git@md-5.net>
2020-04-22 12:00:50 +10:00
CraftBukkit/Spigot
7eca640bdd Improve build process
By: md_5 <git@md-5.net>
2020-04-22 11:50:23 +10:00
CraftBukkit/Spigot
9f7fbec5c6 Add a couple of method null checks to CraftWorld
By: md_5 <git@md-5.net>
2020-04-17 08:39:22 +10:00
CraftBukkit/Spigot
18886036f4 Misc checkstyle fixes
By: md_5 <git@md-5.net>
2020-04-14 12:34:43 +10:00
CraftBukkit/Spigot
5833b4d35c SPIGOT-5669: Fix Beehive.isSedated
By: Lars Dormans <lars.dormans@live.nl>
2020-04-13 00:49:58 +02:00
CraftBukkit/Spigot
d76c6104ce SPIGOT-5665: Improve loading spawn egg NBT
By: md_5 <git@md-5.net>
2020-04-10 11:16:58 +10:00
CraftBukkit/Spigot
593102e1fa SPIGOT-5667: Can't add recipe without (vanilla) datapack
By: md_5 <git@md-5.net>
2020-04-10 10:56:00 +10:00
CraftBukkit/Spigot
92afab4058 SPIGOT-5603: Use LootContext#lootingModifier in CraftLootTable
By: konsolas <vincentyntang@gmail.com>
2020-04-08 17:11:22 +10:00
CraftBukkit/Spigot
bd0b71b0a0 SPIGOT-5657: BlockPlaceEvent not cancelling for tripwire hooks
By: md_5 <git@md-5.net>
2020-04-05 17:19:03 +10:00
CraftBukkit/Spigot
466de0ab57 SPIGOT-5641: Add Block.getDrops(ItemStack, Entity)
By: md_5 <git@md-5.net>
2020-04-05 16:52:06 +10:00
CraftBukkit/Spigot
51b2cd767e Fix some formatting in CraftHumanEntity
By: md_5 <git@md-5.net>
2020-04-05 16:30:47 +10:00
CraftBukkit/Spigot
8c3cf217bb Add Merchant slot delegate
By: md_5 <git@md-5.net>
2020-04-05 16:29:43 +10:00
CraftBukkit/Spigot
8155ea419f SPIGOT-5621: Add missing container types for opening InventoryView
By: Tim <tblattner@gmail.com>
2020-04-05 16:28:43 +10:00
CraftBukkit/Spigot
b7d5dc8dd0 #645: Allow statistics to be accessed for offline players
By: SydMontague <sydmontague@phoenix-staffel.de>
2020-04-05 15:58:43 +10:00
CraftBukkit/Spigot
96b5fcb92f #649: CraftBell should implement Bell
By: ShaneBee <shanebolenback@me.com>
2020-04-04 02:32:15 -07:00
CraftBukkit/Spigot
deee71fef3 SPIGOT-5650: Lectern.setPage(int) causes a NullPointerException
By: md_5 <git@md-5.net>
2020-04-01 09:30:47 +11:00
CraftBukkit/Spigot
7cc234d159 Add FaceAttachable interface to handle Grindstone facing in common with Switches
By: md_5 <git@md-5.net>
2020-04-01 09:14:29 +11:00
CraftBukkit/Spigot
193d17b420 SPIGOT-5647: ZombieVillager entity should have getVillagerType()
By: md_5 <git@md-5.net>
2020-03-30 12:15:21 +11:00
CraftBukkit/Spigot
dd80c73690 SPIGOT-5617: setBlockData does not work when NotPlayEvent is called by redstone current
By: md_5 <git@md-5.net>
2020-03-29 16:24:11 +11:00
CraftBukkit/Spigot
a9cc2e304b #642: Add a DragonBattle API to manipulate respawn phases etc
By: Parker Hawke <hawkeboyz2@hotmail.com>
2020-03-24 19:53:47 +11:00
CraftBukkit/Spigot
bb7a4a3aa5 #644: Fix ChunkMapDistance#removeAllTicketsFor not propagating ticket level updates
Now call the method used in removeTicket for propagating the change,
so that chunks are guaranteed to unload

By: Spottedleaf <Spottedleaf@users.noreply.github.com>
2020-03-22 20:02:22 +11:00
CraftBukkit/Spigot
9d7e810ee1 SPIGOT-5606: call BlockRedstoneEvent for fence gates
By: Jan Boerman <Janboerman95@gmail.com>
2020-03-15 19:05:50 +11:00
CraftBukkit/Spigot
e6566a0503 SPIGOT-5484: Add more spawn tick settings
By: Phoenix616 <mail@moep.tv>
2020-03-07 18:30:21 +01:00
CraftBukkit/Spigot
5ca0965ff4 #640: Fix chunk load/unload callbacks for chunk load cancellations
When a chunk goes from a ticket level where it is loading a
full chunk to an inactive state (i.e ticket level 33 to
ticket level 45) the full status future will be completed
with a "Right" Either (indicating unloaded). However, this
will also schedule the unload callback immediately.

However, the callback is not immediately executed. This means
the next unload/load callback that needs to be scheduled will
fail. The fix applied is to not schedule a callback if the
chunk is not loaded - if the Either is "right."

Even better, due to how completablefuture works, exceptions
are not printed by default. So the exception thrown by the
callback executor was not printed and the failure
hidden from console. This explains why no-one has tracked this issue.
Now the exception is printed so future failures with the
callback system (if any) can be tracked easier.

By: Spottedleaf <Spottedleaf@users.noreply.github.com>
2020-03-02 17:19:06 -08:00
CraftBukkit/Spigot
9b74297f7a Prepare for Java 14
By: md_5 <git@md-5.net>
2020-03-02 13:30:33 +11:00