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

1244 Commits

Autor SHA1 Nachricht Datum
Matthias Ngeo
cb701f6b63 #675: Fix redirected CommandNodes sometimes not being properly redirected 2020-06-17 20:04:50 +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
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
ShaneBeee
214ffea95e SPIGOT-5727: GameRule doImmediateRespawn cannot be set per-world 2020-05-09 15:45:52 +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
Parker Hawke
a1a705ee9a SPIGOT-5566: Doused campfires & fires should call EntityChangeBlockEvent 2020-04-29 17:26:40 +10:00
DiamondDagger590
893ad93b3e #650: Add method to get player's attack cooldown 2020-04-23 11:13:40 +10:00
md_5
b331a05509 SPIGOT-5680: isChunkGenerated creates empty region files 2020-04-22 12:00:50 +10:00
md_5
183139d41f SPIGOT-5665: Improve loading spawn egg NBT 2020-04-10 11:16:58 +10:00
md_5
dec5df2632 SPIGOT-5667: Can't add recipe without (vanilla) datapack 2020-04-10 10:56:00 +10:00
md_5
5838285d60 SPIGOT-5657: BlockPlaceEvent not cancelling for tripwire hooks 2020-04-05 17:19:03 +10:00
SydMontague
aa3a2f2767 #645: Allow statistics to be accessed for offline players 2020-04-05 15:58:43 +10:00
md_5
bbe3d58efc SPIGOT-5650: Lectern.setPage(int) causes a NullPointerException 2020-04-01 09:30:47 +11:00
md_5
4d975ac3b7 SPIGOT-5617: setBlockData does not work when NotPlayEvent is called by redstone current 2020-03-29 16:24:11 +11:00
Parker Hawke
fc318cc10e #642: Add a DragonBattle API to manipulate respawn phases etc 2020-03-24 19:53:47 +11:00
Spottedleaf
796eb15a5b #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
2020-03-22 20:02:22 +11:00
Jan Boerman
a6f809378c SPIGOT-5606: call BlockRedstoneEvent for fence gates 2020-03-15 19:05:50 +11:00
Phoenix616
fc24934098 SPIGOT-5484: Add more spawn tick settings 2020-03-08 19:43:47 +11:00
Spottedleaf
7f61a2526e #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.
2020-03-06 14:34:13 +11:00
md_5
b1ba874912 Move Bukkit.Aware loading/saving to correct location 2020-02-21 10:09:47 +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
880190573c SPIGOT-5571: Beehive MaxEntities cannot be set back to 3 2020-02-10 16:24:11 +11:00
ShaneBee
708be69539 SPIGOT-5468: Improve Beehive TileEntity API 2020-02-09 10:47:11 +11:00
konsolas
c98538940d MC-135989, SPIGOT-5564: Don't kick players for flight while riptiding 2020-02-07 20:19:24 +11:00
md_5
d70084e53d Remove unused seed in CustomChunkGenerator 2020-02-02 19:32:36 +11:00
md_5
c2dc19d385 Craftbukkit -> CraftBukkit 2020-02-02 11:18:17 +11:00
ShaneBee
ae45e09223 SPIGOT-5559: Add EntityPotionEffectEvent causes for bee, raiders and wither rose 2020-02-02 11:16:01 +11:00
md_5
ab13a117a9 SPIGOT-5550: Cancelled ProjectileLaunchEvent still plays sound for eggs 2020-01-28 16:22:09 +11:00
md_5
44016b1dfc SPIGOT-5538: Using javaw to run GUI prints input error 2020-01-28 10:36:47 +11:00
BlackHole
e653ae7669 SPIGOT-5526: Call EntityEnterBlockEvent for bees trying to enter hives 2020-01-28 09:58:36 +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
10763a88ba Change some block == AIR checks to isAir to catch CAVE_AIR 2020-01-27 10:09:46 +11:00
md_5
e911c70f85 SPIGOT-5542: Cancelling EntityToggleGlideEvent doesn't stop client from gliding 2020-01-25 11:30:39 +11:00
Lars Dormans
596b0b2d07 SPIGOT-5514: VehicleEntityCollisionEvent triggered by passengers 2020-01-24 16:48:48 +11:00
md_5
29737ccbd2 SPIGOT-5531: Fix --universe option 2020-01-22 10:36:35 +11:00
md_5
8160e299d0 Strip ANSI colours from ServerGUI 2020-01-22 09:33:40 +11:00
md_5
6881a10803 Update to Minecraft 1.15.2 2020-01-22 08:00:00 +11:00
md_5
5c6b0dc6e4 SPIGOT-5526: Call EntityChangeBlockEvent for bees triggering crop growth 2020-01-21 14:34:14 +11:00
md_5
752cf95e37 SPIGOT-5510: VehicleBlockCollisionEvent returns the wrong block 2020-01-15 15:05:30 +11:00
Phoenix616
01334e7dcb #616: Fix exception on entity portal teleport attempt 2020-01-15 08:13:44 +11:00
Phoenix616
e8cb2f513b SPIGOT-5252: Nether portal fixes and additions
- Fixes PlayerTeleportEvent getting called multiple times and with wrong coordinates
- Implement PlayerPortalEvent and EntityPortalEvent additions
2020-01-13 10:25:17 +11:00
md_5
fde78ef396 SPIGOT-5477: Server not shutting down 2020-01-12 10:50:22 +11:00
md_5
99cf10e4c7 SPIGOT-5504: cancelling InventoryMoveItemEvent on composter doesn't properly cancel 2020-01-10 09:50:39 +11:00
md_5
b98e2defcb SPIGOT-5502: Fix command block successcount being set to return value rather than actual count 2020-01-06 13:44:16 +11:00
md_5
2fd7964587 SPIGOT-5500: Lectern cannot be replaced using /setblock and other commands 2020-01-06 12:12:34 +11:00
md_5
9820cd2db0 MC-151364, SPIGOT-5494: Feeding dolphin hangs if generate-structures=false 2020-01-03 16:56:58 +11:00
md_5
83af86dba5 SPIGOT-5457: Downgrade 'Mismatch in destroy block pos' message to debug 2019-12-25 10:28:43 +11:00
md_5
d641927fce SPIGOT-5481: PlayerBedLeaveEvent returns wrong bed location 2019-12-25 10:11:08 +11:00
md_5
edcb0a4b6a SPIGOT-5482: Structure Block setUsageMode encounters NullpointerException 2019-12-25 10:09:20 +11:00
md_5
4b34472ee0 SPIGOT-5478: XP not dropping when a player dies 2019-12-24 14:07:25 +11:00
BlackHole
297ff4000e SPIGOT-5467: Don't play sound or increase honey level if bee leaving hive is cancelled 2019-12-24 11:13:11 +11:00
md_5
7d677e7b13 SPIGOT-5476: Fix trading empty items 2019-12-24 10:20:39 +11:00
md_5
8073dbec7a SPIGOT-5474: Just ignore bugged fireball data 2019-12-23 13:14:11 +11:00
md_5
817116de01 SPIGOT-5413: Add TrustedPlayer API for foxes 2019-12-23 12:34:53 +11:00
md_5
062680a826 SPIGOT-5467: Calm down bees that cannot exit hive 2019-12-23 12:20:35 +11:00
md_5
75fac431cf SPIGOT-5472: Spurious warning when using clone command on tile entities 2019-12-23 11:59:51 +11:00
ShaneBee
2d9db47fb5 Add TimeSkipEvent 2019-12-21 18:33:20 +11:00
md_5
90ef74efbe SPIGOT-794: Add boats to EntityPlaceEvent 2019-12-19 12:53:27 +11:00
md_5
fb7abcb37a SPIGOT-5466: Bees still get angry even if damage event cancelled 2019-12-19 12:25:11 +11:00
ShaneBee
4499fec567 SPIGOT-5464: Add BEEHIVE SpawnReason for when a bee leaves a beehive 2019-12-19 09:40:58 +11:00
md_5
d31f05fbc6 SPIGOT-5462: Cancelling EntitySpawnEvent takes Ender Eye from inventory 2019-12-18 13:07:14 +11:00
md_5
30a1b6911f Update to Minecraft 1.15.1 2019-12-18 08:00:00 +11:00
md_5
e631456c7d SPIGOT-5458: Riptide tridents don't lose durability 2019-12-17 12:22:53 +11:00
md_5
e43416a342 SPIGOT-5455: Mobs do not ignite due to sun in extra worlds 2019-12-15 15:33:11 +11:00
md_5
16dc5758ae SPIGOT-5449: Fix issue with projectiles 2019-12-13 15:55:19 +11:00
md_5
fd25653f17 SPIGOT-5448: Shulker Boxes collapse empty slots when picked up 2019-12-13 14:06:25 +11:00
md_5
73698cf88d SPIGOT-5442: Fix issue with fire charges 2019-12-12 13:49:56 +11:00
md_5
f777640e48 SPIGOT-5425: Prevent empty/air loot (again?) 2019-12-11 15:49:53 +11:00
md_5
4633e6c5c7 Fix crash with disabled worlds 2019-12-11 12:36:03 +11:00
md_5
de42aa13f3 Update to Minecraft 1.15 2019-12-11 09:00:00 +11:00
md_5
43183eabc2 SPIGOT-5399: spawn-npcs ignored during world generation 2019-12-05 11:01:56 +11:00
Brokkonaut
821238b64c SPIGOT-5412: Use SpawnReason.NATURAL for wandering traders and trader llamas 2019-12-04 06:58:22 +01:00
Brokkonaut
eafd74240d SPIGOT-5405: Use correct damage source for HangingBreakByEntityEvent 2019-11-30 19:03:07 +11:00
Brokkonaut
ccd47a503a SPIGOT-5395: Call BlockFadeEvent for Scaffolding 2019-11-15 01:27:56 +01:00
Spottedleaf
3fe3746012 SPIGOT-5378: Fix TileEntity fixer deadlock
Chunk loading logic can make getTileEntity calls, and these can
be off of the main thread (i.e lighting). The TileEntity fixer
makes a getType call, which will block on chunk load. Thus a
deadlock can occur between a lighting thread and the server thread.
2019-10-20 19:16:35 +11:00
md_5
12386dd445 SPIGOT-5375: Add spaces to coordinates from tile fixer 2019-10-20 08:05:55 +11:00
md_5
606c19e26c SPIGOT-5373: Simultaneous left+right click in creative mode does not work 2019-10-19 20:09:26 +11:00
blablubbabc
13caf84858 SPIGOT-5370: Fix Block#rayTrace considering other blocks. 2019-10-18 20:28:06 +02:00
md_5
e2dd6555e8 SPIGOT-5372: Re-add tile entity fixer due to MC-163945 2019-10-18 19:58:39 +11:00
md_5
d6b3eddf68 SPIGOT-5355: Double Chests still open after InventoryOpenEvent cancelled 2019-10-09 19:51:18 +11:00
jojokobi
7deb3728e3 SPIGOT-5309: Call cancelled EntityDamageEvent when damaging invisible armor stands 2019-10-06 19:20:31 +11:00
md_5
aa492e552e SPIGOT-5255: Raid / patrol spawn reasons 2019-09-07 16:35:09 +10:00
md_5
763e560135 SPIGOT-5294: Cancelled EntityPickupItemEvent and PlayerPickupItemEvent alter on-ground stacks 2019-09-02 13:17:54 +10:00
md_5
403ac18579 SPIGOT-5301: BlockIgniteEvent for campfire + arrow 2019-09-02 13:14:13 +10:00
anhcraft
6ed8a18966 SPIGOT-5290: Invulnerable and/or Marker armor stand triggers EntityDamageEvent 2019-08-30 18:35:55 +10:00
md_5
631eaeb09b SPIGOT-5297: PlayerBedLeaveEvent.getBed() returns player location 2019-08-30 18:34:24 +10:00
md_5
8d4bc54183 SPIGOT-5293: Sponge behaviour differs from Vanilla 2019-08-28 20:10:04 +10:00
md_5
e91fd75e19 SPIGOT-5291: Missing event for ravagers trampling crops 2019-08-28 20:03:43 +10:00
anhcraft
cbdd713908 SPIGOT-5211: Add Raid API 2019-08-28 19:52:32 +10:00
md_5
edd8fdfbe9 SPIGOT-5287: Fix rare CME generating new chunks 2019-08-26 19:24:09 +10:00
md_5
3fc97f086d SPIGOT-5265: FireworkExplodeEvent only fired when rockets explode in air 2019-08-26 18:58:28 +10:00
anhcraft
b2bcde89d9 SPIGOT-5258: TNT Not Moving Players in Creative Mode 2019-08-25 17:22:57 +10:00
md_5
44d675ad8b SPIGOT-5263: Chests stay open after InventoryOpenEvent cancelled. 2019-08-24 20:02:14 +10:00
md_5
2439178eab SPIGOT-5278: EntityDrowned memory leak 2019-08-24 19:45:08 +10:00
md_5
7055c93117 SPIGOT-5264: Call event for experience orbs losing their target 2019-08-24 19:06:17 +10:00
md_5
4914117237 SPIGOT-5282: Improve bucket event API 2019-08-23 20:30:16 +10:00
Brokkonaut
7a806a3a41 SPIGOT-5270: Call BlockSpreadEvent when bamboo saplings grow 2019-08-16 05:19:26 +02:00
Brokkonaut
54f4e7f958 SPIGOT-5257: Call EntityBreedEvent for foxes and set the child's spawn reason to BREEDING 2019-08-09 04:34:33 +02:00
md_5
803eaa3169 SPIGOT-5231: ShotAtAngle API for Fireworks 2019-08-02 19:32:10 +10:00
md_5
7881d2ae15 SPIGOT-5237: Horses, pigs do not drop their inventory 2019-08-02 19:13:16 +10:00
md_5
06efc9ec1f Don't accept connections until all plugins have enabled 2019-07-30 20:48:07 +10:00
md_5
da62a66ab7 SPIGOT-5225: World handle isn't closed if world is unloaded without saving 2019-07-29 16:37:48 +10:00
md_5
f0b3fe4359 SPIGOT-5220: Server CPU usage reaches 100% when stdin is null 2019-07-28 08:49:01 +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
7f33c6a2f5 SPIGOT-5196: Restore previous version behaviour regarding cancelled BlockBreakEvent 2019-07-23 14:30:12 +10:00
md_5
6a5fc90285 Improve diff in EntityHanging 2019-07-23 13:02:23 +10:00
BlackHole
c98d61bfcd SPIGOT-4712: Allow spawning of upwards or downwards facing item frames
Also use correct block position for spawning hanging entities
2019-07-23 13:02:23 +10:00
BlackHole
db97147724 SPIGOT-5199: Fix NPE if setting the book of the ItemMeta of a lectern 2019-07-23 09:28:41 +10:00
md_5
c03b2befb2 SPIGOT-4975: NPE on WorldGenStronghold When Using Multiple Worlds 2019-07-22 16:03:02 +10:00
md_5
65ea162ce2 Ensure Bukkit data pack is always up to date 2019-07-22 12:34:03 +10:00
md_5
0b107b8de3 MC-157395, SPIGOT-5193: Small armor stands do not drop loot 2019-07-22 12:28:38 +10:00
md_5
6da0abca08 SPIGOT-5195: Player loot table does not drop when keepInventory is on 2019-07-22 12:12:48 +10:00
md_5
8b09d98319 SPIGOT-5190: Superfluous EntityCombustEvent called when using fire aspect sword 2019-07-21 11:45:05 +10:00
md_5
9c887d4d80 SPIGOT-5188: Player loot table drops an additional duplicate loot for each subsequent death 2019-07-20 09:38:18 +10:00
md_5
e73aabd666 Update to Minecraft 1.14.4 2019-07-20 09:00:00 +10:00
Irmo van den Berge
eb2e657871 SPIGOT-5116: Fix concurrent modification exception inside ChunkMapDistance 2019-07-16 10:56:19 +10:00
Irmo van den Berge
989f9b3daa SPIGOT-4849: Fix server crash when accessing chunks during chunk load/unload/populate events 2019-07-16 10:54:41 +10:00
md_5
f554183c3a SPIGOT-5171: Don't fire PlayerTeleportEvent if not actually moving 2019-07-16 10:15:59 +10:00
md_5
2349feb849 SPIGOT-5163: Cancelling PlayerBucketFillEvent visually removes the targeted block 2019-07-13 12:07:15 +10:00
Spottedleaf
572c02b06b MC-155077, SPIGOT-5113: EntityTracker desync 2019-07-10 19:56:53 +10:00
md_5
7ad3a1f468 SPIGOT-5146: BlockDataMeta does not work 2019-07-09 10:47:07 +10:00
md_5
608609835d SPIGOT-5155: Setting EntityExplodeEvent yield to 0 still causes blocks to drop 2019-07-09 10:10:36 +10:00
Spottedleaf
07b5b06d2c Add Plugin Chunk Ticket API
Allows plugins to force certain chunks to be kept loaded for as long as they are enabled.
2019-07-08 12:16:01 +10:00
md_5
fca41573a3 SPIGOT-5136: EntityPortalEvent getting called on interdimensional entity teleports 2019-07-05 10:09:11 +10:00
md_5
604c8bf07e SPIGOT-3102: Add EXPLOSION SpawnReason 2019-07-03 11:10:51 +10:00
md_5
375969a674 Re-add chunk GC for plugin chunk loads 2019-07-03 10:29:02 +10:00
md_5
5815136865 SPIGOT-5123: Snapshot tile entities can end up with a non-null world 2019-07-03 10:22:42 +10:00
md_5
491c848210 SPIGOT-5130: PersistentDataContainer not removing values on TileEntities 2019-07-03 10:17:50 +10:00
md_5
bf32933484 SPIGOT-5133: Throwing items into secondary end world portal causes crash 2019-07-02 10:47:00 +10:00
blablubbabc
7a0f61a6e7 SPIGOT-5122: Skip world#notify if sign has no world. 2019-06-29 19:54:50 +02:00
md_5
c69979247b SPIGOT-5110: Zombies converting to drowned too quickly 2019-06-28 17:37:06 +10:00
md_5
0c57560333 SPIGOT-5101: Raids crash 2019-06-28 16:54:54 +10:00
md_5
e8b39d430a SPIGOT-5103: World.save does not save gamerules 2019-06-25 21:02:13 +10:00
md_5
533290e290 SPIGOT-5100: Console warning from pig zombie targeting 2019-06-23 09:14:01 +10:00
md_5
9af900778d SPIGOT-5097: Bukkit.clearRecipes() no longer working 2019-06-22 18:24:23 +10:00
md_5
38fa220f69 Fix setting game rules via the API 2019-06-21 20:35:22 +10:00
md_5
fe3930ce00 Update to Minecraft 1.14.3-pre4 2019-06-21 20:00:00 +10:00
i509VCB
8003ced585 SPIGOT-5061: Add explode and ignite methods to Creeper 2019-06-17 20:12:42 +10:00
md_5
f2757f95b3 SPIGOT-5071: Player loot tables not triggered 2019-06-16 11:39:33 +10:00
md_5
43431ba65b SPIGOT-5034: FoodLevelChangeEvent add getItem method 2019-06-14 19:41:36 +10:00
md_5
4090d01f6d SPIGOT-5047: Correct slot types for 1.14 inventories 2019-06-13 22:01:16 +10:00
blablubbabc
e8c0836216 SPIGOT-5046: World#getLoadedChunks returning inaccessible cached chunks. 2019-06-13 20:52:56 +10:00
md_5
9e95da121e SPIGOT-5052: PlayerPortalEvent not called when nether is disabled 2019-06-12 18:24:57 +10:00
md_5
28ea3fd105 SPIGOT-5062: end_portal on an non-default end world crashes the server 2019-06-12 18:19:36 +10:00
md_5
4a07dc69d0 SPIGOT-5058: ClassCastException when getting InventoryHolder of lectern when it's destroyed 2019-06-12 18:06:43 +10:00
md_5
411609dc81 SPIGOT-5053: Initialize beacon with stored levels where available 2019-06-10 19:09:51 +10:00
md_5
b1c5fd6817 SPIGOT-5054: Prevent issue with invalid hanging entities 2019-06-10 19:02:32 +10:00
md_5
0309d17dcc Rebuild patches 2019-06-09 08:49:28 +10:00