Commit graph

4013 commits

Author SHA1 Message Date
CraftBukkit/Spigot
8216743085 SPIGOT-6936: Cancelling EntityAirChangeEvent doesn't stop player's bubbles from decreasing client side
By: md_5 <git@md-5.net>
2022-02-20 09:25:32 +11:00
CraftBukkit/Spigot
8d542f0b21 SPIGOT-6937: Ramming goat does not throw EntityTargetLivingEntityEvent
By: md_5 <git@md-5.net>
2022-02-20 09:07:37 +11:00
CraftBukkit/Spigot
c48241fce5 SPIGOT-6934: Bring plugin chunk tickets back in line with forceload tickets
By: md_5 <git@md-5.net>
2022-02-20 08:55:27 +11:00
CraftBukkit/Spigot
7fe2a47414 SPIGOT-6935: Make Arrow color nullable
By: Doc <nachito94@msn.com>
2022-02-19 09:36:08 +11:00
CraftBukkit/Spigot
b9534e1c48 #1009: Add Furnace#getRecipesUsed
By: Doc <nachito94@msn.com>
2022-02-15 18:48:54 +11:00
CraftBukkit/Spigot
77b8e4803a #1010: Add PDC to World
By: DerFrZocker <derrieple@gmail.com>
2022-02-15 09:36:00 +11:00
CraftBukkit/Spigot
80e9699ccf #1012: Always save as skull owner and not as internal data
By: DerFrZocker <derrieple@gmail.com>
2022-02-13 20:52:46 +01:00
CraftBukkit/Spigot
8b46bfaaa2 SPIGOT-6927: Fix default value of spawn-limits in Worlds
By: Doc <nachito94@msn.com>
2022-02-07 18:03:56 -03:00
CraftBukkit/Spigot
314b83ffae SPIGOT-6918: Add SpawnCategory API and configurations for Axolotls
By: Doc <nachito94@msn.com>
2022-02-07 18:47:27 +11:00
CraftBukkit/Spigot
f01afaf08f Don't send updates over large distances
By: md_5 <git@md-5.net>
2022-02-07 08:35:20 +11:00
CraftBukkit/Spigot
765eadbac1 SPIGOT-6782: EntityPortalEvent should not destroy entity when setTo() uses same world as getFrom()
By: DerFrZocker <derrieple@gmail.com>
2022-02-05 18:51:46 +01:00
CraftBukkit/Spigot
08891a2e2f #1002: Add Player Profile API
Slight changes may occur as this API is stabilized.

This PR is based on work previously done by DerFrZocker in #938.

By: blablubbabc <lukas@wirsindwir.de>
2022-02-03 09:25:39 +11:00
CraftBukkit/Spigot
0190fa68f9 Increase outdated build delay
By: md_5 <git@md-5.net>
2022-02-03 08:42:42 +11:00
CraftBukkit/Spigot
9523f87f1c SPIGOT-6917: Use main scoreboard for /trigger
Restores pre-1.13 behaviour. See linked ticket for further discussion.

By: md_5 <git@md-5.net>
2022-02-02 08:59:18 +11:00
CraftBukkit/Spigot
d5e124a72d Clean up callBlockDamageEvent
By: md_5 <git@md-5.net>
2022-02-02 08:56:24 +11:00
CraftBukkit/Spigot
e664c2bf5f SPIGOT-6910: Add BlockDamageAbortEvent
By: FreeSoccerHDX <unconfigured@null.spigotmc.org>
2022-02-02 08:56:23 +11:00
CraftBukkit/Spigot
df76a31fc1 #1000: Add PlayerHideEntityEvent and PlayerShowEntityEvent
By: Gero <gecam59@gmail.com>
2022-02-01 18:01:05 +11:00
CraftBukkit/Spigot
e2b1313f00 #1004: Call WorldInitEvent before any chunks are generated
By: DerFrZocker <derrieple@gmail.com>
2022-02-01 08:13:13 +11:00
CraftBukkit/Spigot
99e0adb83b SPIGOT-6891: Crash when importing 1.16 chunks with entities above the world, when a BlockPopulator is active
By: DerFrZocker <derrieple@gmail.com>
2022-01-30 10:52:42 +11:00
CraftBukkit/Spigot
2fb7e5202f #1003: Fix cancellation of TradeSelectEvent
By: pop4959 <pop4959@gmail.com>
2022-01-29 09:27:01 +11:00
CraftBukkit/Spigot
f46c4e64ea SPIGOT-6890: Add repair cost amount in AnvilInventory
By: Doc <nachito94@msn.com>
2022-01-26 09:30:35 +11:00
CraftBukkit/Spigot
2007d3c69f #999: Prevent non-item cooldowns
By: Doc <nachito94@msn.com>
2022-01-23 11:37:48 -03:00
CraftBukkit/Spigot
b80113b447 SPIGOT-6907: Oxygen does not restore up to value set by LivingEntity#setMaximumAir()
By: DerFrZocker <derrieple@gmail.com>
2022-01-23 09:06:19 +11:00
CraftBukkit/Spigot
cf4feec6b5 SPIGOT-6639: During an EntityDamageEvent with damage from blocks, damaging any entity throws an error
By: DerFrZocker <derrieple@gmail.com>
2022-01-23 09:06:06 +11:00
CraftBukkit/Spigot
a8b86ea421 #994: Fix changing world in portal events not updating used world border
Also clamp the event's target location to the world border

By: Phoenix616 <max@themoep.de>
2022-01-20 18:36:14 +11:00
CraftBukkit/Spigot
c5f623b0ac SPIGOT-6902: (Unsupported) Load server as child of system classloader
This is an _unsupported_ feature and may be removed at a later date

By: md_5 <git@md-5.net>
2022-01-19 08:48:55 +11:00
CraftBukkit/Spigot
474603beb3 SPIGOT-6899: Add Player#getPreviousGameMode
By: Doc <nachito94@msn.com>
2022-01-17 10:12:15 +11:00
CraftBukkit/Spigot
4c024e72f9 SPIGOT-6901: Add Support for Random in methods for LootTable
By: Doc <nachito94@msn.com>
2022-01-17 10:09:52 +11:00
CraftBukkit/Spigot
ce2ac2868b SPIGOT-6888: Add SpawnReason for Vex spawned by Evokers
By: Doc <nachito94@msn.com>
2022-01-14 10:55:59 +11:00
CraftBukkit/Spigot
db38e9a8f5 #987: Add generateTree method with a predicate
By: DerFrZocker <derrieple@gmail.com>
2022-01-12 10:52:51 +11:00
CraftBukkit/Spigot
9b581cce11 #990: Add playSound with Entity as source
By: Gero <gecam59@gmail.com>
2022-01-11 18:53:45 +11:00
CraftBukkit/Spigot
602f8cb433 #989: Add PDC to Structures
By: Martoph <sager1018@gmail.com>
2022-01-07 09:43:05 +11:00
CraftBukkit/Spigot
46f0dde817 SPIGOT-5339, SPIGOT-6252, SPIGOT-6777: Only cancel knockback if the damage event was canceled
By: DerFrZocker <derrieple@gmail.com>
2022-01-03 18:07:01 +01:00
CraftBukkit/Spigot
cc34358a3e SPIGOT-6496: /time functions affect entire server, not just the origin world
By: DerFrZocker <derrieple@gmail.com>
2022-01-03 08:29:31 +11:00
CraftBukkit/Spigot
c0b8deb846 Put Discord rather than IRC in config files
By: md_5 <git@md-5.net>
2022-01-03 08:21:46 +11:00
CraftBukkit/Spigot
f5b1ea90e2 SPIGOT-6278: Persistent piglins count towards mob cap
By: md_5 <git@md-5.net>
2022-01-02 11:45:52 +11:00
CraftBukkit/Spigot
bde37a649c #378: Add API to check and set if horses are grazing hay
By: Matthew <stteg@hotmail.com>
2022-01-01 09:58:04 +11:00
CraftBukkit/Spigot
1fa87773be #374: Add isJohnny / setJohnny for Vindicator
By: Matthew <stteg@hotmail.com>
2022-01-01 09:58:04 +11:00
CraftBukkit/Spigot
179dbe9592 #373: Add trap related methods to SkeletonHorse
By: Matthew <stteg@hotmail.com>
2022-01-01 09:58:04 +11:00
CraftBukkit/Spigot
751a5601b8 Fix map colour not being marked as a handled tag
By: md_5 <git@md-5.net>
2021-12-30 10:14:08 +11:00
CraftBukkit/Spigot
1eaf82a627 Make EnderDragon extend/implement Mob
By: md_5 <git@md-5.net>
2021-12-30 09:35:50 +11:00
CraftBukkit/Spigot
5a3105919b Add self-riding check to Entity#addPassenger
By: md_5 <git@md-5.net>
2021-12-29 10:48:15 +11:00
CraftBukkit/Spigot
7a54f9da31 SPIGOT-5766: The VillagerReplenishTradeEvent is now called when a villager restocks its trades.
By: blablubbabc <lukas@wirsindwir.de>
2021-12-25 10:14:17 +11:00
CraftBukkit/Spigot
aa53cef96f SPIGOT-5627: Leads vanish when transporting leashed entities through a Nether portal
By: DerFrZocker <derrieple@gmail.com>
2021-12-25 09:39:27 +11:00
CraftBukkit/Spigot
23b34c080b #978: Add Material#getDefaultAttributeModifiers
By: coll1234567 <joshl5324@gmail.com>
2021-12-24 12:06:26 +11:00
CraftBukkit/Spigot
28ec7a3566 SPIGOT-6859: PlayerInteractEntityEvent#setCancelled desync with Axolotls
By: Doc <nachito94@msn.com>
2021-12-22 08:04:07 +11:00
CraftBukkit/Spigot
f2766fc611 Dependency upgrades
By: md_5 <git@md-5.net>
2021-12-18 12:12:37 +11:00
CraftBukkit/Spigot
edea21b253 SPIGOT-6789: Improve resource pack related API
By: Patrick Choe <mailpatrickkr@gmail.com>
2021-12-18 11:46:17 +11:00
CraftBukkit/Spigot
3736fd83de SPIGOT-6836: Add more API methods in MerchantRecipe
By: Doc <nachito94@msn.com>
2021-12-18 11:44:34 +11:00
CraftBukkit/Spigot
13aa9b7211 SPIGOT-6778: Block#beakNaturally doesn't drop items in chests
By: DerFrZocker <derrieple@gmail.com>
2021-12-18 11:34:20 +11:00
CraftBukkit/Spigot
96c615d4b8 SPIGOT-6843: Wrong PLAINS biome during custom chunk generation
By: DerFrZocker <derrieple@gmail.com>
2021-12-18 11:33:22 +11:00
CraftBukkit/Spigot
94c2fa1b14 SPIGOT-6852: BlockReceiveGameEvent#getBlock returning wrong block
By: md_5 <git@md-5.net>
2021-12-14 07:52:43 +11:00
CraftBukkit/Spigot
ef17571a38 SPIGOT-6851: removeRecipe not unregistering recipe ID
By: md_5 <git@md-5.net>
2021-12-13 11:25:22 +11:00
CraftBukkit/Spigot
667cb32115 Update to Minecraft 1.18.1
By: md_5 <git@md-5.net>
2021-12-11 00:11:02 +11:00
CraftBukkit/Spigot
aa726a99dc Remove outdated build delay.
By: md_5 <git@md-5.net>
2021-12-11 00:11:02 +11:00
CraftBukkit/Spigot
9f768b5caf SPIGOT-6840: Fire resistance potion effect does not prevent melt damage of snow golem
By: Doc <nachito94@msn.com>
2021-12-10 09:01:47 +11:00
CraftBukkit/Spigot
6b9458a6a7 Disable log4j message formatting
By: md_5 <git@md-5.net>
2021-12-10 07:31:27 +11:00
CraftBukkit/Spigot
4d40ab4eec Increase outdated build delay
By: md_5 <git@md-5.net>
2021-12-09 16:02:04 +11:00
CraftBukkit/Spigot
35fdc9103d SPIGOT-6831: Fix llama strength crash
By: md_5 <git@md-5.net>
2021-12-06 15:15:09 +11:00
CraftBukkit/Spigot
24b8f3c641 #971: Remove strong chunk reference in PDC
A previous fix for SPIGOT-6814 implemented a callback function for the
PDC implementation that could be set to actively define a chunk as
unsaved, allowing chunks that have not been mutated through block
changes to still require saving if the chunks pdc was mutated.

This implementation however would pass a callback that references the
chunk access internally, meaning the PDC now actively holds onto a
callback that holds a reference to the entire chunk.

Aditionally, this change also impacted the pdc for item metas and
entities for really no reason whatsoever.

This commit re-implements the fix by introducing a new child of the pdc
implementation that the chunk now uses as its pdc. This specific
implementation maintains a dirty flag that is set to `true` on any form
of mutation and set back to false by the chunk that owns the PDC
whenever the chunk itself is flag as no longer dirty.

By: Bjarne Koll <lynxplay101@gmail.com>
2021-12-05 08:52:51 +11:00
CraftBukkit/Spigot
14215fdadd Add Player#openSign API to edit a placed sign
By: md_5 <git@md-5.net>
2021-12-05 08:34:54 +11:00
CraftBukkit/Spigot
6646c417c5 Purge hidden entities on unload too
By: md_5 <git@md-5.net>
2021-12-04 08:23:26 +11:00
CraftBukkit/Spigot
4f6a5feac8 #967: Store last lava contact location for events
By: Rafael S. M. Santos <eu@rafaelsms.com>
2021-12-04 08:06:32 +11:00
CraftBukkit/Spigot
77f4cb35ff SPIGOT-6833: Do not drop items into unrestricted world during world generation
By: md_5 <git@md-5.net>
2021-12-04 07:19:56 +11:00
CraftBukkit/Spigot
d07de3d840 Fix when bundler directory is a symlink
By: md_5 <git@md-5.net>
2021-12-03 16:24:34 +11:00
CraftBukkit/Spigot
05d379a339 Release POIs when villagers are removed by plugins
By: md_5 <git@md-5.net>
2021-12-03 15:05:20 +11:00
CraftBukkit/Spigot
ea74321d65 SPIGOT-6823: Fix loading custom world in combination with superflat
By: md_5 <git@md-5.net>
2021-12-03 08:34:38 +11:00
CraftBukkit/Spigot
215251ce7b #970: Correct typo in README.md
By: Ryan Redmon <iroleplay55@gmail.com>
2021-12-03 07:35:26 +11:00
CraftBukkit/Spigot
9f2d553877 Fix per-world worldborder command
By: md_5 <git@md-5.net>
2021-12-03 07:34:39 +11:00
CraftBukkit/Spigot
ee342addea Better preserve broken PlayerMoveEvent behaviour
By: md_5 <git@md-5.net>
2021-12-02 12:45:58 +11:00
CraftBukkit/Spigot
7dd6dfc7a4 SPIGOT-6828: <player> fell off a ladder/vines death message not supported
By: md_5 <git@md-5.net>
2021-12-02 12:29:35 +11:00
CraftBukkit/Spigot
a0201b0f02 SPIGOT-6795: Fix BlockFertilizeEvent not being triggered for Azaleas
By: Rafael S. M. Santos <eu@rafaelsms.com>
2021-12-01 08:27:58 +11:00
CraftBukkit/Spigot
cc70f18bef SPIGOT-6820: VillagerCareerChangeEvent's ChangeReason is sometimes incorrect
By: Doc <nachito94@msn.com>
2021-12-01 08:26:14 +11:00
CraftBukkit/Spigot
2492a39911 Update to Minecraft 1.18
By: md_5 <git@md-5.net>
2021-12-01 03:00:00 +11:00
CraftBukkit/Spigot
4dbb83e45d SPIGOT-6817: Revert back to old block state behaviour again
By: md_5 <git@md-5.net>
2021-11-29 11:03:16 +11:00
CraftBukkit/Spigot
6b0484122e SPIGOT-6814: (Chunk) PersistentData is lost after restart
By: DerFrZocker <derrieple@gmail.com>
2021-11-29 09:28:19 +11:00
CraftBukkit/Spigot
95ab0e27a8 Add hideEntity / showEntity API
By: md_5 <git@md-5.net>
2021-11-29 09:18:52 +11:00
CraftBukkit/Spigot
4e0070d822 Move checkstyle to slightly later compile phase
By: md_5 <git@md-5.net>
2021-11-29 08:56:33 +11:00
CraftBukkit/Spigot
f734d4eaf6 SPIGOT-6816: Fix ChunkSnapshot#getBiome
By: md_5 <git@md-5.net>
2021-11-29 08:52:41 +11:00
CraftBukkit/Spigot
62b59aece9 #959: Fix World#refreshChunk
By: Gero <gecam59@gmail.com>
2021-11-28 11:54:00 +11:00
CraftBukkit/Spigot
e55f7f5dc4 #962: Make PotionEffectType implement Keyed
By: coll1234567 <joshl5324@gmail.com>
2021-11-28 11:49:42 +11:00
CraftBukkit/Spigot
4b8394a81b SPIGOT-6810: Improve / fix biome setting code
By: md_5 <git@md-5.net>
2021-11-27 16:42:28 +11:00
CraftBukkit/Spigot
27643e5df2 Update to Minecraft 1.18-rc3
By: md_5 <git@md-5.net>
2021-11-27 08:00:00 +11:00
CraftBukkit/Spigot
96d5854b53 #960: Add Player#showDemoScreen
By: coll1234567 <joshl5324@gmail.com>
2021-11-26 10:13:36 +11:00
CraftBukkit/Spigot
ffdf8aeecf Produce remapped jars after bootstrap jar
By: md_5 <git@md-5.net>
2021-11-26 09:41:18 +11:00
CraftBukkit/Spigot
1618dd945f SPIGOT-6808: Fix RegionAccessor#getBiome
By: md_5 <git@md-5.net>
2021-11-25 17:04:58 +11:00
CraftBukkit/Spigot
799bfc92e2 Update to Minecraft 1.18-pre8
By: md_5 <git@md-5.net>
2021-11-25 08:00:00 +11:00
CraftBukkit/Spigot
0d839e926c Fix crash with composters
By: md_5 <git@md-5.net>
2021-11-24 09:33:28 +11:00
CraftBukkit/Spigot
f3b1f97464 Remove unnecessary CraftBlock creation in CraftRegionAccessor#setBlock
By: md_5 <git@md-5.net>
2021-11-24 08:16:10 +11:00
CraftBukkit/Spigot
2a6e33ffed Generate bootstrap jar separately
By: md_5 <git@md-5.net>
2021-11-24 07:45:54 +11:00
CraftBukkit/Spigot
34c3a49371 SPIGOT-6803: Fix ServerPing not using the new logic for show players in 1.18
By: Doc <nachito94@msn.com>
2021-11-24 07:28:22 +11:00
CraftBukkit/Spigot
c8802f0a64 Fix upgrading worlds with custom generators
By: md_5 <git@md-5.net>
2021-11-23 20:00:10 +11:00
CraftBukkit/Spigot
731158e521 SPIGOT-6781: Add Block#canPlace
By: coll1234567 <joshl5324@gmail.com>
2021-11-23 18:49:13 +11:00
CraftBukkit/Spigot
3e7bd2643c Improve multi-dimension code
By: md_5 <git@md-5.net>
2021-11-23 18:39:43 +11:00
CraftBukkit/Spigot
820ad30036 SPIGOT-6802: Fix major issues with --forceUpgrade
More to come

By: md_5 <git@md-5.net>
2021-11-23 17:13:52 +11:00
CraftBukkit/Spigot
90f6dfa935 Fix loading / creating secondary worlds (nether/end)
By: md_5 <git@md-5.net>
2021-11-23 15:03:34 +11:00
CraftBukkit/Spigot
33d40b06c2 #956: Add getHideOnlinePlayers
By: Doc <nachito94@msn.com>
2021-11-22 22:29:50 -03:00
CraftBukkit/Spigot
6992843028 Fix serializing unhandled NBT + add unit test with unhandled NBT
By: md_5 <git@md-5.net>
2021-11-23 12:35:42 +11:00
CraftBukkit/Spigot
683f54a1e7 #954: Add "Allow Server Listings" API
By: Noah van der Aa <ndvdaa@gmail.com>
2021-11-23 08:56:35 +11:00
CraftBukkit/Spigot
e3c01e2bf0 #955: Add test for BlockData class of Material
By: BlackHole <black-hole@live.com>
2021-11-23 08:07:10 +11:00
CraftBukkit/Spigot
0e36e68e8b Downgrade to Checkstyle 8.x as 9.x series has much larger memory usage
By: md_5 <git@md-5.net>
2021-11-22 15:27:14 +11:00
CraftBukkit/Spigot
ba1c4ea9b7 Remove Player#sendChunkChange
Method is specified according to an obsolete internal format and has not been implemented for nearly 10 years.

By: md_5 <git@md-5.net>
2021-11-22 15:08:57 +11:00
CraftBukkit/Spigot
df75572760 #953: Add Player#sendEquipmentChange
By: Parker Hawke <hawkeboyz2@hotmail.com>
2021-11-22 15:03:21 +11:00
CraftBukkit/Spigot
a10c0a6823 Correct displayed Java version in warning
By: md_5 <git@md-5.net>
2021-11-22 11:47:01 +11:00
CraftBukkit/Spigot
43702a9e10 Update to Minecraft 1.18-pre5
By: md_5 <git@md-5.net>
2021-11-22 09:00:00 +11:00
CraftBukkit/Spigot
a852b81a69 Remove outdated build delay.
By: md_5 <git@md-5.net>
2021-11-22 09:00:00 +11:00
CraftBukkit/Spigot
306648dc4c SPIGOT-6797: EntityInteractEvent called with incorrect location
By: md_5 <git@md-5.net>
2021-11-21 11:22:07 +11:00
CraftBukkit/Spigot
99916e6058 SPIGOT-6798: EntityChangeBlockEvent called with incorrect location
By: md_5 <git@md-5.net>
2021-11-21 11:18:06 +11:00
CraftBukkit/Spigot
68ead41759 SPIGOT-6790: Mimic structure block behaviour and do not save STRUCTURE_VOID
By: md_5 <git@md-5.net>
2021-11-11 18:40:15 +11:00
CraftBukkit/Spigot
e4cce46e63 SPIGOT-6436: Add Player#stopAllSounds
By: Doc <nachito94@msn.com>
2021-11-05 21:02:22 +11:00
CraftBukkit/Spigot
148964d14e SPIGOT-6783: Items do not appear in custom anvil inventories
By: md_5 <git@md-5.net>
2021-11-04 18:17:58 +11:00
CraftBukkit/Spigot
fda316b6eb SPIGOT-6779: Fix LivingEntity#attack for Player entities
By: Doc <nachito94@msn.com>
2021-11-02 18:33:35 +11:00
CraftBukkit/Spigot
9e3a0e859f SPIGOT-6772: Use entity mailbox and re-schedule entities if they get unloaded
By: DerFrZocker <derrieple@gmail.com>
2021-11-01 18:54:44 +11:00
CraftBukkit/Spigot
1f5735df63 #947: Add missing spawn eggs for SpawnEggMeta
By: Doc <nachito94@msn.com>
2021-10-30 18:34:04 +11:00
CraftBukkit/Spigot
a2a88c50af #945: Allow setting BrewEvent results
By: Doc <nachito94@msn.com>
2021-10-30 18:16:35 +11:00
CraftBukkit/Spigot
0136af37a5 SPIGOT-6768: Remove upper bound on setFreezeTicks
By: md_5 <git@md-5.net>
2021-10-23 18:29:53 +11:00
CraftBukkit/Spigot
ab1a1deb6b SPIGOT-5988: Bedspawn doesn't clear after dying when spawn is blocked
By: DerFrZocker <derrieple@gmail.com>
2021-10-16 19:39:14 +11:00
CraftBukkit/Spigot
ea404e3d82 SPIGOT-6758: Reset ItemSign#openSign when aborting the block placement early
By: blablubbabc <lukas@wirsindwir.de>
2021-10-16 18:48:22 +11:00
CraftBukkit/Spigot
55f4d6c7cb SPIGOT-6760: Chest#getInventory only returns one half of a double chest when one or both halves are blocked
By: md_5 <git@md-5.net>
2021-10-16 18:48:21 +11:00
CraftBukkit/Spigot
02cdd23003 SPIGOT-6759: Chest#getInventory() no longer returns double chest inventories
By: blablubbabc <lukas@wirsindwir.de>
2021-10-16 18:48:21 +11:00
CraftBukkit/Spigot
f9c1420daf #940: Fixed a NPE during CraftBlockEntityState#update.
When the BlockState's block type was changed, #update may have removed
the TileEntity, causing #isApplicable to fail with a NPE.

By: blablubbabc <lukas@wirsindwir.de>
2021-10-15 18:03:01 +11:00
CraftBukkit/Spigot
571ec764a6 #937: Fixes related to unplaced BlockStates and the recent world generation changes.
* CraftBlockState#getWorldHandle() would previously run into a NPE when being invoked for a non-placed BlockState. It now returns null in this case.
* CraftChest#getInventory() would previously encounter this NPE when being called for a non-placed BlockState. It will now automatically forward the call to #getBlockInventory() when it is being called for either a non-placed BlockState, or during world generation.
* CraftStructureBlock#applyTo was able to run into a NPE when being called for non-placed BlockStates (this is for example called by #getSnapshotNBT()).
* Replaced all no-world-generation preconditions with a general 'ensureNoWorldGeneration' method.
* Removed a few superfluous #isPlaced() calls. If getWorldHandle() reutrns a World, this already implies that the BlockState is placed.

By: blablubbabc <lukas@wirsindwir.de>
2021-10-10 07:55:53 +11:00
CraftBukkit/Spigot
82e8261d70 SPIGOT-6754: We ignore any still present TileEntity now when we create a BlockState for a block of type AIR.
During block destruction, the type of the block may already have been set to AIR while the TileEntity has not yet been removed.
Also, TileEntity#getOwner() skips the whole BlockState construction now if the block is of type AIR.

This removes the previous workaround again of returning a dummy CraftBlockEntityState in this case.

By: blablubbabc <lukas@wirsindwir.de>
2021-10-10 07:55:53 +11:00
CraftBukkit/Spigot
e9ecd12983 SPIGOT-6754: Temporarily restore previous behaviour for tile entities with removed blocks
By: md_5 <git@md-5.net>
2021-10-09 16:29:58 +11:00
CraftBukkit/Spigot
188d3b23d0 SPIGOT-2903: Add Structure API
By: Sander Knauff <sanderknauff@hotmail.com>
2021-10-05 11:56:35 +11:00
CraftBukkit/Spigot
2d0a775210 #934: Support for configuring Water Underground Creatures spawn settings
By: Doc <nachito94@msn.com>
2021-10-05 11:29:52 +11:00
CraftBukkit/Spigot
f27c8f74f8 #877: Improve and simplify CraftBlockState
By: blablubbabc <lukas@wirsindwir.de>
2021-09-29 18:56:16 +10:00
CraftBukkit/Spigot
65625f410c SPIGOT-6741: shouldGenerateStructures isn't implemented
By: DerFrZocker <derrieple@gmail.com>
2021-09-28 17:52:29 +02:00
CraftBukkit/Spigot
50d4716e9f SPIGOT-6023, SPIGOT-6745: Fix missing BlockDispenseArmorEvents
By: Lars Dormans <lars.dormans@live.nl>
2021-09-26 00:24:33 +02:00
CraftBukkit/Spigot
52c2d5beaf SPIGOT-6738: Add entity type tags
By: md_5 <git@md-5.net>
2021-09-19 14:51:21 +10:00
CraftBukkit/Spigot
4495b9ec5b SPIGOT-6249: Add Missing Effect Constants
By: DerFrZocker <derrieple@gmail.com>
2021-09-11 18:40:14 +10:00
CraftBukkit/Spigot
4d34ac117b SPIGOT-6731: "Nag author" message in CraftServer lists one author only
By: md_5 <git@md-5.net>
2021-09-10 17:49:53 +10:00
CraftBukkit/Spigot
e5b39016a0 SPIGOT-5732, SPIGOT-6387: Overhaul Hanging entities
- SPIGOT-5732: Fix issue with spawning leash hitches and painting, by using the right block faces

- SPIGOT-6387: Allow hanging entities to be spawned mid air

- Use randomize parameter to determine if a random painting should be chosen or not

- Return BlockFace self by leash hitches entity

- Throw a standardised exception when trying to set a BlockFace to a hanging entity which the entity does not support, instead of using BlockFace south or throwing a null pointer

By: DerFrZocker <derrieple@gmail.com>
2021-09-10 17:45:31 +10:00
CraftBukkit/Spigot
b4da42047a #929: Call EntityBlockFormEvent for Wither Rose placed by dead entity
By: Doc <nachito94@msn.com>
2021-09-06 18:57:16 +10:00
CraftBukkit/Spigot
fcb8ac59ec SPIGOT-6729: Add Chunk.isEntitiesLoaded()
By: Brokkonaut <hannos17@gmx.de>
2021-09-06 18:51:39 +10:00
CraftBukkit/Spigot
77dcaefa51 SPIGOT-6708: Fix Experience Orb value not being updated in mend event
By: Phoenix616 <max@themoep.de>
2021-09-03 18:37:44 +10:00
CraftBukkit/Spigot
9d22657139 Rebuild patch
By: md_5 <git@md-5.net>
2021-09-01 19:02:09 +10:00
CraftBukkit/Spigot
5c075d59dc SPIGOT-6547: Chunk#getEntities() doesn't return all entities immediately after chunk load
By: DerFrZocker <derrieple@gmail.com>
2021-09-01 18:55:18 +10:00
CraftBukkit/Spigot
768b5d52aa SPIGOT-6719: Add getTileEntities() to LimitedRegion
By: DerFrZocker <derrieple@gmail.com>
2021-08-30 18:44:44 +10:00
CraftBukkit/Spigot
1dfe698f4f SPIGOT-6726: NPE when calling getBossBar() on plugin spawned EnderDragon
By: Brokkonaut <hannos17@gmx.de>
2021-08-28 19:02:19 +10:00
CraftBukkit/Spigot
08e5ad2b2f SPIGOT-6720: Fix bed explosion checks
By: Doc <nachito94@msn.com>
2021-08-27 19:17:43 +10:00
CraftBukkit/Spigot
c8ef43f1b5 SPIGOT-6722: Close entity manager when unloading world
By: DerFrZocker <derrieple@gmail.com>
2021-08-27 19:14:09 +10:00
CraftBukkit/Spigot
dd503b542b SPIGOT-6686: Changes in MaximumRepairCost for Anvil Rename cause inconsistency
By: DerFrZocker <derrieple@gmail.com>
2021-08-27 19:14:09 +10:00
CraftBukkit/Spigot
8a60b49a31 SPIGOT-6630: Replacing an enchantment on an item creates a conflict error
By: DerFrZocker <derrieple@gmail.com>
2021-08-24 18:10:30 +02:00
CraftBukkit/Spigot
44cc499340 Fix issues with new ChunkGenerator API
- RegionAccessor#setType / RegionAccessor#setBlockData doesn't run entity removal logic
- RegionAccessor#generateTree crashes by bee nest (TreeType#TALL_BIRCH)

By: DerFrZocker <derrieple@gmail.com>
2021-08-22 13:23:40 +02:00
CraftBukkit/Spigot
80b1ef0c8e SPIGOT-6697: Restore generateTree with BlockChangeDelegate behaviour
By: md_5 <git@md-5.net>
2021-08-22 18:12:59 +10:00
CraftBukkit/Spigot
49c30227d2 Rebuild patch
By: md_5 <git@md-5.net>
2021-08-22 18:07:39 +10:00
CraftBukkit/Spigot
00c0964347 SPIGOT-6713: Cancelling EntityTransformEvent Causes Deceased Slimes To Not Despawn
By: md_5 <git@md-5.net>
2021-08-22 18:07:31 +10:00
CraftBukkit/Spigot
9c5dd3b837 SPIGOT-6716: Preserve the order of stored enchantments of enchanted books.
In some cases, differences in this order can result in item stack
comparisons to fails.

By: blablubbabc <lukas@wirsindwir.de>
2021-08-20 19:40:31 +10:00
CraftBukkit/Spigot
973f763605 #914: Add World#spawn with randomizeData parameter
The current implementation of World#spawn or World#spawnEntity
respectively, always prepares/finalizes the spawn of every entity
spawned through the API. While this is great to simulate natural
spawning of entities in the world through the API, it fails at
reliably creating default entities for purposes other than vanilla
gameplay.

While the caller of the API could attempt to undo all of the
customization that is applied in the prepare/finalization step, they are
numerous (reaching from sheep colour to equipment) and in some cases,
such as the chicken jockey, even spawn in other entities.

Hence this commit introduces a new overload to the World#spawn and
World#spawnEntity methods that accepts the 'randomizeData' parameter
that, when set to false, skips the prior mentioned
preparation/finalization step.

By: Bjarne Koll <lynxplay101@gmail.com>
2021-08-18 18:04:53 +10:00