3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-18 20:40:08 +01:00
Commit graph

3552 Commits

Autor SHA1 Nachricht Datum
blablubbabc
c9d7c16b5f SPIGOT-2623: Add EntityEquipment methods to get/set ItemStacks by slot. 2020-06-13 20:56:32 +10:00
Spottedleaf
fad2494af1 #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.
2020-06-06 19:23:46 +10:00
Lars Dormans
8637ec008d SPIGOT-5751: Made breakNaturally and getDrops returns the correct item if no argument is given 2020-06-03 19:28:13 +10:00
Aikar
1b2830a3b3 SPIGOT-4441: Fix serializing Components to and from Legacy
While cfeef75cd9 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 cfeef75cd9 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
ben
aae46f82ea #665: Add test for Material#getCraftingRemainingItem() 2020-05-28 19:31:27 +10:00
md_5
cfeef75cd9 SPIGOT-5749: ItemMeta serializing to YAML not saving black colour code 2020-05-26 19:39:03 +10:00
WinX64
eb1b19d979 SPIGOT-5748: Add instant effect potion break to the Effect enum
Conversion from Color to integer for the data of the new enum entry
2020-05-26 19:34:39 +10:00
md_5
d07a78b1f3 SPIGOT-5716: Clarify documentation of MultipleFacing 2020-05-09 16:12:18 +10:00
md_5
46a1386066 SPIGOT-5718: Block.BreakBlockNaturally does not reflect tool used 2020-05-09 16:05:17 +10:00
Parker Hawke
933e9094bf #664: Add methods to get/set ItemStacks in EquipmentSlots 2020-05-05 19:10:03 +10:00
Parker Hawke
1872231235 #662: Expose ItemStack and hand used in PlayerShearEntityEvent 2020-05-02 17:48:37 +10:00
Parker Hawke
77fd87e4d0 SPIGOT-2304: Implement LootGenerateEvent 2020-04-30 19:15:58 +10:00
md_5
41712eddeb SPIGOT-5707: PersistentDataHolder not Persistent on API dropped Item 2020-04-29 17:21:06 +10:00
DiamondDagger590
893ad93b3e #650: Add method to get player's attack cooldown 2020-04-23 11:13:40 +10:00
Martoph
ef706b064e #655: Added support for the VM tag jansi.passthrough when processing messages sent to a ColouredConsoleSender. 2020-04-23 11:06:13 +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
e1335932a7 Improve build process 2020-04-22 11:50:23 +10:00
md_5
a8ec1d60f3 Add a couple of method null checks to CraftWorld 2020-04-17 08:39:22 +10:00
md_5
ce66f6937b Misc checkstyle fixes 2020-04-14 12:34:43 +10:00
Lars Dormans
8bd0e9ab0e SPIGOT-5669: Fix Beehive.isSedated 2020-04-13 15:45:52 +10:00
konsolas
f7d6ad53ee SPIGOT-5603: Use LootContext#lootingModifier in CraftLootTable 2020-04-08 17:13:29 +10:00
md_5
f325b9beac SPIGOT-5641: Add Block.getDrops(ItemStack, Entity) 2020-04-05 16:52:06 +10:00
md_5
e25a2272f8 Fix some formatting in CraftHumanEntity 2020-04-05 16:30:47 +10:00
md_5
498540e082 Add Merchant slot delegate 2020-04-05 16:29:43 +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
ShaneBee
2122c0b128 #649: CraftBell should implement Bell 2020-04-05 15:40:54 +10:00
md_5
bbe3d58efc SPIGOT-5650: Lectern.setPage(int) causes a NullPointerException 2020-04-01 09:30:47 +11:00
md_5
3075579f61 Add FaceAttachable interface to handle Grindstone facing in common with Switches 2020-04-01 09:14:29 +11: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
Phoenix616
fc24934098 SPIGOT-5484: Add more spawn tick settings 2020-03-08 19:43:47 +11:00
md_5
13ed05decd Prepare for Java 14 2020-03-02 13:30:33 +11:00
Bjarne Koll
6b00b14539 #639: Deep clone itemmetas persistent container on clone
After this commit, spigot now creates a deep copy of the
itemmeta's persistent data container when the itemmeta
instance is cloned.

This change fixes the bug that, after cloning itemmeta, the container
instance the cloned meta would point to was equal to the original one.
This resulted in two itemmeta instances sharing a single persistent
container.
2020-03-02 13:10:21 +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
md_5
25a9a9ff62 SPIGOT-5592: Custom ChunkGenerator can cause bugged dirt 2020-02-23 10:29:46 +11:00
md_5
3f6d0de989 Make it clear in error messages that api-version above 1.13 is also supported 2020-02-23 09:42:33 +11:00
md_5
fba9f4876b Improve legacy conversion of some materials that changed post flattening 2020-02-21 12:13:05 +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
Brokkonaut
918061b75c SPIGOT-5468: Beehive TileEntity was not loaded for BlockStateMeta 2020-02-17 18:08:10 +01:00
konsolas
37f32da8f8 SPIGOT-5573, SPIGOT-5574: Move CustomChunkGenerator generation code back to buildBase() 2020-02-13 09:04:28 +11:00
md_5
d171d7eb8e SPIGOT-5572: Fix console/API completion of Vanilla commands 2020-02-11 12:03:36 +11:00
ShaneBee
708be69539 SPIGOT-5468: Improve Beehive TileEntity API 2020-02-09 10:47:11 +11:00
ysl3000
2d151f4c33 #624: Add an API for passing the heightmap to getHighestBlockAt* method 2020-02-09 10:32:24 +11:00
ysl3000
807a677e9a SPIGOT-5558: Fix World#getHighestBlockAt, previously off by +1 2020-02-03 09:42:48 +11:00
md_5
d70084e53d Remove unused seed in CustomChunkGenerator 2020-02-02 19:32:36 +11:00
konsolas
8a66d4c7ac #619: Allow delegation of certain elements to Vanilla when using a custom ChunkGenerator
Allows delegation of caves, decorations, mobs and structures to the Vanilla generation algorithms.
Overriding these methods to return true enables that aspect of Vanilla generation, which is applied after the ChunkGenerator's custom generation.
2020-02-02 19:27:10 +11:00
ShaneBee
0098037647 #618: Add method to remove a recipe by its key 2020-02-02 10:32:49 +11:00
md_5
e82b5477ae SPIGOT-5556: Some biome methods use incorrect positions
See SPIGOT-5529
2020-02-01 17:30:40 +11:00
md_5
512ff7a52f Print legacy load reason in debug mode 2020-01-31 19:32:57 +11:00
md_5
df371c1b69 SPIGOT-5554: Clear error message when BossBar is used for not fully joined players 2020-01-31 08:36:59 +11:00
md_5
6bbb4e7348 Clean up CraftBlockData.toString 2020-01-29 09:53:13 +11:00
md_5
b1e96bd5ca SPIGOT-5551: BlockState.setData fails when used by legacy plugin 2020-01-29 09:22:43 +11:00
md_5
6515ea4957 SPIGOT-5537: Bee nests generated by growing trees near flower have no bees 2020-01-28 09:48:28 +11:00
md_5
d82b314944 Remove unused CraftWorld.getId method 2020-01-27 19:30:17 +11:00
md_5
a0e88fb362 SPIGOT-5536: Material.values() causes legacy data init 2020-01-23 08:53:36 +11:00
md_5
a81f6ed397 SPIGOT-5532: Material.values() yields an exception 2020-01-22 13:23:55 +11:00
md_5
efd6cf55fc Only load legacy support data if something uses it 2020-01-22 11:15:58 +11:00
md_5
dad61762f8 Fix log messages being split across GUI and terminal 2020-01-22 09:11:37 +11:00
md_5
3c9a4a3ba6 SPIGOT-5529: BiomeGrid uses incorrect indexing 2020-01-22 08:54:12 +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
661bebc642 Remove outdated build delay. 2020-01-19 11:33:04 +11:00
md_5
ec4b2b5ef1 SPIGOT-5516: Correct EnchantmentTarget values 2020-01-15 14:20:14 +11:00
Phoenix616
01334e7dcb #616: Fix exception on entity portal teleport attempt 2020-01-15 08:13:44 +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
108b44ca20 SPIGOT-5506: CustomChunkGenerator is processing Phantoms in the Nether and The End 2020-01-10 09:22:31 +11:00
md_5
e7202cd444 SPIGOT-5496: API to create and manipulate hardcore worlds 2020-01-04 10:14:23 +11:00
md_5
731e819c94 SPIGOT-5486: Raider CanJoinRaid 2019-12-29 14:21:16 +11:00
md_5
4e4a9b200d SPIGOT-5487: Increase outdated build delay 2019-12-29 14:18:05 +11:00
md_5
edcb0a4b6a SPIGOT-5482: Structure Block setUsageMode encounters NullpointerException 2019-12-25 10:09:20 +11:00
md_5
82322fe06c SPIGOT-5426: isSimilar for player heads fails 2019-12-25 10:05:11 +11:00
md_5
817116de01 SPIGOT-5413: Add TrustedPlayer API for foxes 2019-12-23 12:34:53 +11:00
md_5
85106731bf SPIGOT-5471: Allow empty title/author for books 2019-12-22 18:40:55 +11:00
ShaneBee
2d9db47fb5 Add TimeSkipEvent 2019-12-21 18:33:20 +11:00
md_5
384225c282 Add thread name to TerminalConsoleWriterThread 2019-12-21 12:01:52 +11:00
md_5
90ef74efbe SPIGOT-794: Add boats to EntityPlaceEvent 2019-12-19 12:53:27 +11:00
md_5
30a1b6911f Update to Minecraft 1.15.1 2019-12-18 08:00:00 +11:00
md_5
e2790ae2ea Remove outdated build delay. 2019-12-18 07:00:00 +11:00
md_5
61d4b09023 SPIGOT-5428: Better handling of some ItemMeta 2019-12-14 10:54:12 +11:00
ShaneBeee
b97d581af2 SPIGOT-5443: BEE_NEST BlockState
- Add missing BEE_NEST block state
- Add a missing break in CraftMetaBlockState
2019-12-13 09:12:38 +11:00
BlackHole
beff9fb9dd SPIGOT-5437: Fix CustomChunkGenerator.CustomBiomeGrid ignoring the y value for biomes 2019-12-11 19:43:03 +01:00
md_5
db0dafb17c SPIGOT-5422: Add support for 3-dimensional biomes 2019-12-11 15:28:37 +11:00
md_5
de42aa13f3 Update to Minecraft 1.15 2019-12-11 09:00:00 +11:00
md_5
656701746a SPIGOT-5417: Campfire should implement Directional 2019-12-09 12:52:46 +11:00
md_5
eeae942e44 SPIGOT-5416: Block.getDrops gives drops even when tool should not give drops 2019-12-08 10:39:57 +11:00
md_5
e9bb2f15aa SPIGOT-5403: isSimilar returns true for different skulls 2019-12-05 10:37:02 +11:00
md_5
5c9e723692 SPIGOT-5409: Remove unnecessary defaulting in CraftMetaBookSigned 2019-12-05 10:28:16 +11:00
md_5
56118c6760 Increase outdated build delay to 4 weeks 2019-11-08 20:07:56 +11:00
pop4959
7554e08e45 Add UUID support to CraftProfileBanList 2019-10-20 19:22:04 +11:00
blablubbabc
13caf84858 SPIGOT-5370: Fix Block#rayTrace considering other blocks. 2019-10-18 20:28:06 +02:00
md_5
1e7a197f7a Fix incorrect inequality in 683bae0670
Thanks Brokkoli & Phoenix616 for pointing out
2019-10-17 20:35:42 +11:00
ShaneBeee
db98d54df9 SPIGOT-5362: Suspicious stews fail isSimilar check 2019-10-14 21:04:58 +11:00
jojokobi
7deb3728e3 SPIGOT-5309: Call cancelled EntityDamageEvent when damaging invisible armor stands 2019-10-06 19:20:31 +11:00
md_5
46351e1783 SPIGOT-5341: Add Material.isAir 2019-10-06 18:41:56 +11:00
md_5
683bae0670 SPIGOT-5342: Lore lost when deserializing items with no version stored 2019-10-06 18:34:51 +11:00