669 Commits

Author SHA1 Message Date
Parker Hawke
8297676c20
#682: Add hasDiscoveredRecipe() and getDiscoveredRecipes() 2020-07-02 09:27:18 +10:00
md_5
3b9cf0f803
Improve code formatting 2020-07-01 14:17:48 +10:00
md_5
2fe6b4a320
SPIGOT-5899: Hoglins API similar to Piglins 2020-06-30 12:03:24 +10:00
Parker Hawke
32acc26217
#686: Expand Strider and Steerable entity API 2020-06-30 09:54:28 +10:00
ceezuns
44109b726b
SPIGOT-5803: Implement the missing methods for the Piglin API. 2020-06-29 09:58:04 +10:00
md_5
4ff609e60c
SPIGOT-5836: PotionEffect HEALTH_BOOST never expires 2020-06-26 19:14:15 +10:00
md_5
baadbf3f76
SPIGOT-5833: Player#setWalkSpeed not working 2020-06-26 17:56:49 +10:00
SydMontague
a1d23114fa
#687: Add visibility and fixed API for ItemFrames 2020-06-26 10:58:17 +10:00
md_5
174a2ee539
SPIGOT-5829: RGB hex colours not supported in several places 2020-06-26 09:40:21 +10:00
md_5
f7ff58c6c5
SPIGOT-5803: Add Piglin/Zoglin Baby API 2020-06-25 19:58:27 +10:00
md_5
b136f8430d
SPIGOT-5804: Cannot launch Entity Firework 2020-06-25 12:57:58 +10:00
Phoenix616
2b00831c95
SPIGOT-2106, SPIGOT-3942: Improve collidable API 2020-06-25 10:00:00 +10:00
md_5
7ea3c040bc
Update to Minecraft 1.16.1 2020-06-25 10:00:00 +10:00
md_5
be6aaf046e SPIGOT-5782: Set Arrow Launched From Crossbow 2020-06-24 10:05:39 +10:00
Aikar
1b2830a3b3 SPIGOT-4441: Fix serializing Components to and from Legacy
While cfeef75cd97 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 cfeef75cd97 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.
2020-06-01 19:19:42 +10:00
DiamondDagger590
893ad93b3e #650: Add method to get player's attack cooldown 2020-04-23 11:13:40 +10:00
md_5
e0cfb34742 SPIGOT-5689: Fireball.setDirection increases velocity too much 2020-04-23 08:33:33 +10:00
md_5
94cb030fb5 SPIGOT-5673: swingHand API does not show to self 2020-04-22 12:06:24 +10:00
md_5
ce66f6937b Misc checkstyle fixes 2020-04-14 12:34:43 +10:00
md_5
e25a2272f8 Fix some formatting in CraftHumanEntity 2020-04-05 16:30:47 +10:00
Tim
b2de47d581 SPIGOT-5621: Add missing container types for opening InventoryView 2020-04-05 16:28:43 +10:00
SydMontague
aa3a2f2767 #645: Allow statistics to be accessed for offline players 2020-04-05 15:58:43 +10:00
md_5
95bd4238fb SPIGOT-5647: ZombieVillager entity should have getVillagerType() 2020-03-30 12:15:21 +11:00
Parker Hawke
fc318cc10e #642: Add a DragonBattle API to manipulate respawn phases etc 2020-03-24 19:53:47 +11:00
md_5
3d61a853e3 Fix formatting in CraftLivingEntity 2020-02-23 19:01:11 +11:00
konsolas
f7ab30557e #633: Add LivingEntity#attack, LivingEntity#swingMainHand, LivingEntity#swingOffHand 2020-02-23 19:00:18 +11:00
md_5
d5ef2eab9e SPIGOT-5591: Allow concurrent potion effects 2020-02-23 10:33:10 +11:00
Lars Dormans
f7cdb53c0e SPIGOT-5311: Add API to get/set item associated with throwable projectiles 2020-02-21 09:53:51 +11:00
konsolas
ab85433d7f Add set/isAware to disable Vanilla AI components of a Mob 2020-02-20 09:19:59 +11:00
ShaneBee
708be69539 SPIGOT-5468: Improve Beehive TileEntity API 2020-02-09 10:47:11 +11:00
md_5
efd6cf55fc Only load legacy support data if something uses it 2020-01-22 11:15:58 +11:00
md_5
6881a10803 Update to Minecraft 1.15.2 2020-01-22 08:00:00 +11:00
anhcraft
b91ce1192a #601: Implement Player#sendExperienceChange 2020-01-21 10:32:16 +11:00
md_5
d208733e70 SPIGOT-5509: Sleeping player does not eject bed when teleported 2020-01-11 14:14:23 +11:00
md_5
731e819c94 SPIGOT-5486: Raider CanJoinRaid 2019-12-29 14:21:16 +11:00
md_5
817116de01 SPIGOT-5413: Add TrustedPlayer API for foxes 2019-12-23 12:34:53 +11:00
md_5
de42aa13f3 Update to Minecraft 1.15 2019-12-11 09:00:00 +11:00
md_5
6ddeb980cf SPIGOT-5317: Create accessors for player absorption hearts 2019-09-13 20:04:43 +10:00
md_5
803eaa3169 SPIGOT-5231: ShotAtAngle API for Fireworks 2019-08-02 19:32:10 +10:00
md_5
104b3831f8 SPIGOT-5222: Cannot get Long values from Entity memory 2019-07-29 16:37:48 +10:00
md_5
c88867e4fc SPIGOT-5208: Reset state on cancelled EntityTransformEvent to prevent event spam 2019-07-26 09:58:18 +10:00
md_5
f744c09c02 SPIGOT-5214: setCooldown not working 2019-07-26 09:40:09 +10:00
LelouBil
1215188ff7 SPIGOT-5180: Add Villager#sleep() and #wakeup() methods 2019-07-22 18:22:44 +10:00
md_5
e73aabd666 Update to Minecraft 1.14.4 2019-07-20 09:00:00 +10:00
md_5
a0e47473ce SPIGOT-5121: Method to set PierceLevel of arrows 2019-06-30 09:52:18 +10:00
Yannick Lamprecht
8a3d3f4980 SPIGOT-5098: Add a method to allow colored sign changes 2019-06-23 11:00:08 +10:00
blablubbabc
6dde4b9fda SPIGOT-5094: Allow opening merchant for wandering traders and hide the xp bar for custom merchants 2019-06-22 18:31:21 +10:00
md_5
fe3930ce00 Update to Minecraft 1.14.3-pre4 2019-06-21 20:00:00 +10:00
md_5
efd8a2b50a SPIGOT-5089: UnsupportedOperationException on setting villager memory to null 2019-06-19 18:42:51 +10:00
i509VCB
8003ced585 SPIGOT-5061: Add explode and ignite methods to Creeper 2019-06-17 20:12:42 +10:00