Commit graph

1166 Commits

Autor SHA1 Nachricht Datum
Parker Hawke
d424351010
SPIGOT-5853: DragonBattle#getEndPortalLocation() throws NPE on new world
* Add method to generate the end portal
2020-06-27 11:09:01 +10:00
md_5
14053c708b
SPIGOT-5847: BlockFadeEvent cannot be triggered asynchronously from another thread 2020-06-27 08:41:54 +10:00
md_5
c99846cc76
Add configuration options for water_ambient spawning 2020-06-26 18:39:42 +10:00
md_5
709b003fee
Re-add default bukkit datapack 2020-06-26 12:24:35 +10:00
DiamondDagger590
d1fb662ec5
SPIGOT-5735: Add EntityEnterLoveModeEvent 2020-06-26 11:12:25 +10:00
SydMontague
a1d23114fa
#687: Add visibility and fixed API for ItemFrames 2020-06-26 10:58:17 +10:00
md_5
50484a657e
SPIGOT-5820: Fix migration of Vanilla nether / end 2020-06-26 09:49:40 +10:00
Parker Hawke
6abb4398b9
SPIGOT-5830: Server crash when campfire lit via dispenser.
Also adds a missing call to BlockIgniteEvent for players igniting campfires with flint and steel.
2020-06-26 09:11:36 +10:00
md_5
4b67fed7f6
Better handling of custom end/nether teleports 2020-06-26 08:38:18 +10:00
md_5
2b5f172cb8
SPIGOT-5816: PlayerTeleportEvent not called when using netherportals and allow-nether=false 2020-06-26 08:30:47 +10:00
md_5
9233a7fb05
SPIGOT-5827: Player.getLocale always returns en_us 2020-06-26 08:06:30 +10:00
md_5
72c080cca6
SPIGOT-5812: ProjectileHitEvent fires twice if projectile is an Egg 2020-06-26 08:02:51 +10:00
md_5
8dc1da156f
Misc bugfixes to multiworld support 2020-06-25 17:58:10 +10:00
md_5
76d2add0bb
SPIGOT-5802: Add SmithingRecipe API 2020-06-25 12:41:55 +10:00
md_5
ab3875418c
SPIGOT-5801: End gateways crash server upon enderpearl use through them 2020-06-25 12:16:41 +10:00
Phoenix616
2b00831c95
SPIGOT-2106, SPIGOT-3942: Improve collidable API 2020-06-25 10:00:00 +10:00
SydMontague
847ad16eed
SPIGOT-5562: Entering a boat triggers VehicleExitEvent
This patch prevents entities from riding a vehicle they're already riding on.
When trying to enter a boat the client will send up to two packets for each hand
causing the server to think they should enter the boat twice, despite the first
interaction being sufficient.
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
833da9c47d SPIGOT-5799: InventoryCloseEvent fires after PlayerQuitEvent 2020-06-24 09:54:59 +10:00
md_5
26c0084f0a SPIGOT-5675, SPIGOT-5798, MC-149563: Fix tracking of entities across dimensions 2020-06-24 09:21:39 +10:00
md_5
7f3e7c3fbf SPIGOT-5797: Zombie(Villagers) Instant Convert based on their lifetime 2020-06-24 08:52:40 +10:00
md_5
ffc2b251af Revert "#675: Fix redirected CommandNodes sometimes not being properly redirected"
This reverts commit cb701f6b63.
2020-06-18 07:41:02 +10:00
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