Commit graph

4013 commits

Author SHA1 Message Date
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
CraftBukkit/Spigot
03aecfb428 SPIGOT-6714: Don't fire PlayerBucketEvent when empty
By: Noah van der Aa <ndvdaa@gmail.com>
2021-08-18 17:06:40 +10:00
CraftBukkit/Spigot
3a23c54a91 Fix server crash with BlockPopulator when entities are at a negative chunk border
By: DerFrZocker <derrieple@gmail.com>
2021-08-16 07:07:13 +02:00
CraftBukkit/Spigot
c2e4e91b1b SPIGOT-5880, SPIGOT-5567: New ChunkGenerator API
## **Current API**
The current world generation API is very old and limited when you want to make more complex world generation. Resulting in some hard to fix bugs such as that you cannot modify blocks outside the chunk in the BlockPopulator (which should and was per the docs possible), or strange behavior such as SPIGOT-5880.

## **New API**
With the new API, the generation is more separate in multiple methods and is more in line with Vanilla chunk generation. The new API is designed to as future proof as possible. If for example a new generation step is added it can easily also be added as a step in API by simply creating the method for it. On the other side if a generation step gets removed, the method can easily be called after another, which is the case with surface and bedrock. The new API and changes are also fully backwards compatible with old chunk generators.

### **Changes in the new api**
**Extra generation steps:**
Noise, surface, bedrock and caves are added as steps. With those generation steps three extra methods for Vanilla generation are also added. Those new methods provide the ChunkData instead of returning one. The reason for this is, that the ChunkData is now backed by a ChunkAccess. With this, each step has the information of the step before and the Vanilla information (if chosen by setting a 'should' method to true). The old method is deprecated.

**New class BiomeProvider**
The BiomeProvider acts as Biome source and wrapper for the NMS class WorldChunkManager. With this the underlying Vanilla ChunkGeneration knows which Biome to use for the structure and decoration generation. (Fixes: SPIGOT-5880). Although the List of Biomes which is required in BiomeProvider, is currently not much in use in Vanilla, I decided to add it to future proof the API when it may be required in later versions of Minecraft.
The BiomeProvider is also separated from the ChunkGenerator for plugins which only want to change the biome map, such as single Biome worlds or if some biomes should be more present than others.

**Deprecated isParallelCapable**
Mojang has and is pushing to a more multi threaded chunk generation. This should also be the case for custom chunk generators. This is why the new API only supports multi threaded generation. This does not affect the old API, which is still checking this.

**Base height method added**
This method was added to also bring the Minecraft generator and Bukkit generator more in line. With this it is possible to return the max height of a location (before decorations). This is useful to let most structures know were to place them. This fixes SPIGOT-5567. (This fixes not all structures placement, desert pyramids for example are still way up at y-level 64, This however is more a vanilla bug and should be fixed at Mojangs end).

**WorldInfo Class**
The World object was swapped for a WorldInfo object. This is because many methods of the World object won't work during world generation and would mostly likely result in a deadlock. It contains any information a plugin should need to identify the world.

**BlockPopulator Changes**
Instead of directly manipulating a chunk, changes are now made to a new class LimitedRegion, this class provides methods to populated the chunk and its surrounding area. The wrapping is done so that the population can be moved into the place where Minecraft generates decorations. Where there is no chunk to access yet. By moving it into this place the generation is now async and the surrounding area of the chunk can also be used.

For common methods between the World and LimitedRegion a RegionAccessor was added.

By: DerFrZocker <derrieple@gmail.com>
2021-08-15 08:08:16 +10:00
CraftBukkit/Spigot
fdefaeeccd Update ASM and add support for Java 17
By: md_5 <git@md-5.net>
2021-08-13 08:45:32 +10:00
CraftBukkit/Spigot
3483bd08b3 #913: Handle campfire damage with EntityDamageByBlockEvent
By: Doc <nachito94@msn.com>
2021-08-11 19:05:08 +10:00
CraftBukkit/Spigot
6d08059769 Add dimension setting getters to World
By: Doc <nachito94@msn.com>
2021-08-11 18:57:16 +10:00
CraftBukkit/Spigot
72591f6038 SPIGOT-2222, SPIGOT-6687: Pre-set keepLevel and only use it
By: DerFrZocker <derrieple@gmail.com>
2021-08-11 18:49:49 +10:00
CraftBukkit/Spigot
4a49f6bf8b SPIGOT-6692: Add sendSignChange overload with a hasGlowingText parameter
By: Brokkonaut <hannos17@gmx.de>
2021-08-05 08:43:03 +10:00
CraftBukkit/Spigot
4beaa19a39 SPIGOT-6682: Blocking with shield not reset after die
By: DerFrZocker <derrieple@gmail.com>
2021-08-04 17:09:09 +10:00
CraftBukkit/Spigot
aab97ffee0 SPIGOT-6220: Structures in the world with custom generator not work
By: DerFrZocker <derrieple@gmail.com>
2021-08-01 08:26:30 +10:00
CraftBukkit/Spigot
fa9a064a7d Increase outdated build delay
By: md_5 <git@md-5.net>
2021-07-30 19:11:09 +10:00
CraftBukkit/Spigot
87f8ab3fb3 SPIGOT-6552: Some inventory types reset cursor on switch
By: DerFrZocker <derrieple@gmail.com>
2021-07-30 19:08:43 +10:00
CraftBukkit/Spigot
af0d8b70df SPIGOT-6678: ChunkSnapshot#isSectionEmpty() not working as intended.
By: DerFrZocker <derrieple@gmail.com>
2021-07-27 18:07:14 +10:00
CraftBukkit/Spigot
eda6555bbf #901: Fix PlayerStatisticIncrementEvent spam
By: Mitchell Sulkowski <mitchellsulkowski@gmail.com>
2021-07-26 19:32:51 +10:00
CraftBukkit/Spigot
e4b545e047 Only remove tile entity if block type changes
By: md_5 <git@md-5.net>
2021-07-24 07:55:52 +10:00
CraftBukkit/Spigot
353c9f5090 SPIGOT-1753: ChunkGenerator lighting updates
By: DerFrZocker <derrieple@gmail.com>
2021-07-23 16:43:53 +10:00
CraftBukkit/Spigot
f294d260b8 SPIGOT-6666: NPE when deserializing bundle
By: md_5 <git@md-5.net>
2021-07-23 16:38:51 +10:00
CraftBukkit/Spigot
dcfc8b355a SPIGOT-6669: Shearing a Mooshroom does not fire EntityDropItemEvent
By: md_5 <git@md-5.net>
2021-07-23 16:36:16 +10:00
CraftBukkit/Spigot
999bd6c0ef SPIGOT-6667: /schedule function not working correctly in other dimensions
By: DerFrZocker <derrieple@gmail.com>
2021-07-23 16:29:04 +10:00
CraftBukkit/Spigot
9273a60cdb SPIGOT-6665: Shearing a Snowman does not drop a carved pumpkin
By: md_5 <git@md-5.net>
2021-07-22 17:51:53 +10:00
CraftBukkit/Spigot
93f615157d #893: Add Crafting methods to API
By: James Peters <jameslfc19@gmail.com>
2021-07-22 11:35:48 +10:00
CraftBukkit/Spigot
0376264d06 Fix missing varargs from previous commit
By: md_5 <git@md-5.net>
2021-07-22 11:30:14 +10:00
CraftBukkit/Spigot
bacb1b57f1 SPIGOT-6641: Use varargs in sendMessage
By: md_5 <git@md-5.net>
2021-07-22 09:54:57 +10:00
CraftBukkit/Spigot
2ccd460e09 SPIGOT-6663: Chicken Jockeys chickens don't despawn
By: md_5 <git@md-5.net>
2021-07-22 09:53:26 +10:00
CraftBukkit/Spigot
bfc74e8628 SPIGOT-6545: Unable to set Guardian target via API while awareness is disabled
By: DerFrZocker <derrieple@gmail.com>
2021-07-22 09:36:54 +10:00
CraftBukkit/Spigot
0474cc8833 SPIGOT-6369: Add ItemStack to HangingPlaceEvent
By: DerFrZocker <derrieple@gmail.com>
2021-07-21 09:32:54 +10:00
CraftBukkit/Spigot
8650786dad SPIGOT-6645: Call EntityChangeBlockEvent before PlayerHarvestBlockEvent
By: Brokkonaut <hannos17@gmx.de>
2021-07-19 18:54:13 +10:00
CraftBukkit/Spigot
1e8509d8ef SPIGOT-3725, SPIGOT-6638, MC-136917: Properly clear tile entities before replacing
By: DerFrZocker <derrieple@gmail.com>
2021-07-19 18:49:27 +10:00
CraftBukkit/Spigot
fd8748b4bd SPIGOT-6657: Add getPlayer to SheepDyeWoolEvent
By: md_5 <git@md-5.net>
2021-07-18 11:08:18 +10:00
CraftBukkit/Spigot
5eb7a2ed61 SPIGOT-6656: CauldronLevelChangeEvent is not fired correctly when dripstone fills the cauldron
By: md_5 <git@md-5.net>
2021-07-18 10:14:55 +10:00
CraftBukkit/Spigot
59f5a7ab59 SPIGOT-6653: Canceling snow bucket placement removes snow from bucket
By: md_5 <git@md-5.net>
2021-07-18 10:06:38 +10:00
CraftBukkit/Spigot
71d4016a4d #891: Fix scheduler task ID overflow and duplication issues
By: Phoenix616 <max@themoep.de>
2021-07-17 11:39:56 +10:00
CraftBukkit/Spigot
96ffc08c35 #874: Add FurnaceStartSmeltEvent
By: Rabbitual <38820203+Rabbitual@users.noreply.github.com>
2021-07-17 11:19:51 +10:00
CraftBukkit/Spigot
215fa0caef SPIGOT-6649: Call BlockFadeEvent when Nylium fades to Netherrack
By: Brokkonaut <hannos17@gmx.de>
2021-07-15 20:29:38 +10:00
CraftBukkit/Spigot
c1484dc4b1 #890: Include yaw in player's spawn location
By: Phoenix616 <max@themoep.de>
2021-07-15 20:29:38 +10:00
CraftBukkit/Spigot
96eed49699 #889: Fix CraftChest close() sound being replaced with open sound.
By: James Peters <jameslfc19@gmail.com>
2021-07-15 20:29:38 +10:00
CraftBukkit/Spigot
a061943cac SPIGOT-5561: Warning in logs when changing a Mob Spawner to Air on chunk load
By: DerFrZocker <derrieple@gmail.com>
2021-07-13 19:22:27 +10:00
CraftBukkit/Spigot
e797fdd58a #886: Add new Causes for LightningStrikeEvent
By: Doc <nachito94@msn.com>
2021-07-13 19:16:36 +10:00
CraftBukkit/Spigot
18a453f567 SPIGOT-6637: Revert "#874: Add FurnaceStartSmeltEvent"
This reverts commit 38faf28378.

By: md_5 <git@md-5.net>
2021-07-11 12:26:27 +10:00
CraftBukkit/Spigot
cae78fadd8 SPIGOT-6579: DragonFireBall movement with setDirection jumps around a lot
By: DerFrZocker <derrieple@gmail.com>
2021-07-11 09:34:35 +10:00
CraftBukkit/Spigot
81ee774c37 SPIGOT-6623: Missing API reasons for entity freezing
By: Doc <nachito94@msn.com>
2021-07-11 09:32:27 +10:00
CraftBukkit/Spigot
38faf28378 #874: Add FurnaceStartSmeltEvent
By: Rabbitual <38820203+rabbitual@users.noreply.github.com>
2021-07-11 09:26:46 +10:00
CraftBukkit/Spigot
413825611f SPIGOT-5560, SPIGOT-6574, SPIGOT-6632: Remove no longer needed tile entity fix
By: DerFrZocker <derrieple@gmail.com>
2021-07-11 09:05:59 +10:00
CraftBukkit/Spigot
02134e4ee6 SPIGOT-6634: Override needed method
By: DerFrZocker <derrieple@gmail.com>
2021-07-09 23:48:16 +10:00
CraftBukkit/Spigot
0a1df9ec02 SPIGOT-6624: Explosions do not destroy blocks out of vanilla heights in custom dimensions
By: dYens <dani_raiders@hotmail.com>
2021-07-07 07:27:16 +10:00
CraftBukkit/Spigot
e8c9836ec9 Update to Minecraft 1.17.1
By: md_5 <git@md-5.net>
2021-07-07 00:00:00 +10:00
CraftBukkit/Spigot
0392f45e9c Remove outdated build delay.
By: md_5 <git@md-5.net>
2021-07-06 22:16:50 +10:00
CraftBukkit/Spigot
0c2fdaf521 SPIGOT-6527: Add AxolotlBucketMeta
By: Doc <nachito94@msn.com>
2021-07-04 09:32:25 +10:00
CraftBukkit/Spigot
917e89ed06 SPIGOT-5710: POI data mismatch when cancelling BlockPlaceEvent for villager workstations
By: DerFrZocker <derrieple@gmail.com>
2021-07-03 15:39:52 +10:00
CraftBukkit/Spigot
a388fc3a6c Update Maven plugins
By: md_5 <git@md-5.net>
2021-07-03 11:06:33 +10:00
CraftBukkit/Spigot
bc5ed0e911 SPIGOT-6616: Cancellable StriderTemperatureChangeEvent
By: md_5 <git@md-5.net>
2021-07-03 09:36:51 +10:00
CraftBukkit/Spigot
fec9294c47 SPIGOT-6615 Fix Glow Item Frame to use EntityTagMeta
By: Doc <nachito94@msn.com>
2021-07-03 09:33:04 +10:00
CraftBukkit/Spigot
5e5d47856a SPIGOT-6596: Remove redundant code
By: md_5 <git@md-5.net>
2021-06-30 19:29:17 +10:00
CraftBukkit/Spigot
bfa7716ca1 SPIGOT-6613: Missing BlockIgniteEvent for candles + projectiles
By: md_5 <git@md-5.net>
2021-06-30 18:56:27 +10:00
CraftBukkit/Spigot
80472fd082 SPIGOT-6605: Add method to access value of enforce-whitelist
By: md_5 <git@md-5.net>
2021-06-26 09:58:34 +10:00
CraftBukkit/Spigot
ae7ed4667b SPIGOT-6594: NPE at Bukkit.getServer().getGenerateStructures()
By: md_5 <git@md-5.net>
2021-06-24 08:37:58 +10:00
CraftBukkit/Spigot
a91dc63398 #872: SculkSensor accesses underlying TileEntity instead of snapshot for vibration frequency.
By: blablubbabc <lukas@wirsindwir.de>
2021-06-23 09:02:10 +10:00
CraftBukkit/Spigot
26fd70263e SPIGOT-6592: Tile entities in custom ChunkGenerator causes crash
By: md_5 <git@md-5.net>
2021-06-21 08:46:23 +10:00
CraftBukkit/Spigot
46a09d53f1 #870: Add isTrusting/setTrusting to CraftOcelot.
By: Ibrahim Ansari <ansari.ibrahim1@gmail.com>
2021-06-21 08:40:43 +10:00
CraftBukkit/Spigot
690c8b65a1 SPIGOT-6587: Update documentation/error of drop chance API
By: md_5 <git@md-5.net>
2021-06-20 12:15:28 +10:00
CraftBukkit/Spigot
66df1397b3 Fix Inventory#getViewers on the player inventory not returning the player first time their inventory is opened
By: md_5 <git@md-5.net>
2021-06-20 09:27:32 +10:00
CraftBukkit/Spigot
41524cf726 Fix PrepareItemCraftEvent#isRepair
By: md_5 <git@md-5.net>
2021-06-20 09:03:27 +10:00
CraftBukkit/Spigot
453d93caa5 SPIGOT-6586: EntityChangeBlockEvent for falling block does not cancel properly
By: md_5 <git@md-5.net>
2021-06-20 08:48:15 +10:00
CraftBukkit/Spigot
64174260d1 SPIGOT-6583: Throwing eggs doesn't make sounds
By: md_5 <git@md-5.net>
2021-06-20 08:38:01 +10:00
CraftBukkit/Spigot
bcaff2755a SPIGOT-6580: Cancelling SlimeSplitEvent Causes Infinite Loop
By: md_5 <git@md-5.net>
2021-06-19 08:46:31 +10:00
CraftBukkit/Spigot
fc07fa5704 SPIGOT-6576: BlockExpEvent does not show XP when breaking a furnace
By: md_5 <git@md-5.net>
2021-06-19 08:45:08 +10:00
CraftBukkit/Spigot
d2c0fcf0df #869: Fix BossBar setColor and setStyle updates
By: Eric Su <ericsu14@hotmail.com>
2021-06-17 17:37:30 +10:00
CraftBukkit/Spigot
0747934cc1 Incrase outdated build delay
By: md_5 <git@md-5.net>
2021-06-17 08:42:37 +10:00
CraftBukkit/Spigot
4b86eeff64 SPIGOT-6570: Missing InventoryType: COMPOSTER
By: md_5 <git@md-5.net>
2021-06-17 08:29:15 +10:00
CraftBukkit/Spigot
b9782609ca SPIGOT-6558: Attempt to improve SkullMeta
By: md_5 <git@md-5.net>
2021-06-16 10:28:42 +10:00
CraftBukkit/Spigot
df28f86cce SPIGOT-6562: Add more specific sculk sensor event
By: md_5 <git@md-5.net>
2021-06-16 08:34:34 +10:00
CraftBukkit/Spigot
9233fd67b4 Fix duplicate datapack reload on /reload
By: md_5 <git@md-5.net>
2021-06-15 15:51:13 +10:00
CraftBukkit/Spigot
6b435994e8 SPIGOT-6555: Cannot access shield BlockStateMeta
By: md_5 <git@md-5.net>
2021-06-15 13:06:23 +10:00
CraftBukkit/Spigot
c751b9c098 SPIGOT-6542: Fix counting players with fauxSleeping = true
By: Ivan R <namelessftw1206@hotmail.com>
2021-06-15 12:44:34 +10:00
CraftBukkit/Spigot
e4f5bec8b3 SPIGOT-6561: Add events for dripleaf tilting
By: md_5 <git@md-5.net>
2021-06-15 08:49:10 +10:00
CraftBukkit/Spigot
752618d75f SPIGOT-6560: Crash when falling stalactite hits player
By: md_5 <git@md-5.net>
2021-06-15 08:01:07 +10:00
CraftBukkit/Spigot
46666cb5a8 SPIGOT-6557: PlayerEditBookEvent#setNewBookMeta does not update meta
By: md_5 <git@md-5.net>
2021-06-14 19:37:21 +10:00
CraftBukkit/Spigot
46c18bc4d5 #865: Implement Villager#shakeHead
By: VendoAU <reillyreaby@gmail.com>
2021-06-14 19:13:37 +10:00
CraftBukkit/Spigot
8777dd8e62 #863: Add LivingEntity#isClimbing
By: Martoph <sager1018@gmail.com>
2021-06-14 19:11:46 +10:00
CraftBukkit/Spigot
733b118606 SPIGOT-6554: Worlds created with the bukkit ChunkGenerator cannot save
By: md_5 <git@md-5.net>
2021-06-14 13:52:25 +10:00
CraftBukkit/Spigot
967b0303f3 SPIGOT-6507: Implement abstract skeleton and stray conversion
The previous layout and class hierarchy of the skeleton API defined
variances of the skeleton, such as the wither skeleton or the stray, as
child types of the normal skeleton variance, which is technically
incorrect, yet did not produce any specific issue as the normal skeleton
variance did not have any unique logic.

With the introduction of powdered snow in the 1.17 update, the normal
skeleton variance now has unique logic, specifically the conversion to
a stay when stuck inside powdered snow, which cannot be represented in
the current API layout due to the prior mentioned hierarchy.

This commit implements the hierarchy changes made in the bukkit
repository by representing the new hierarchy on the craftbukkit side
through the CraftAbstractSkeleton and the respective additions to the
skeleton implementation in regards to the stray conversion.

This commit does not break ABI yet breaks backwards compatibility due to
the mentioned hierarchy changes. Plugins that previously used the
Skelton interface to compute whether or not an entity is skeleton-like
through instanceOf checks will now only match the normal skeleton variance
instead of any skeleton-like entity.

By: Bjarne Koll <lynxplay101@gmail.com>
2021-06-14 10:01:19 +10:00
CraftBukkit/Spigot
9a2165ab37 #855: Add Block#getCollisionShape and associated API
By: konsolas <vincentyntang@gmail.com>
2021-06-14 08:33:32 +10:00
CraftBukkit/Spigot
55abb0fd8c #857: Add Block#getBreakSpeed(Player)
By: konsolas <vincentyntang@gmail.com>
2021-06-14 08:28:45 +10:00
CraftBukkit/Spigot
1b34737612 SPIGOT-6540: Firework rockets not crafting into flight duration 1
By: md_5 <git@md-5.net>
2021-06-13 17:59:01 +10:00
CraftBukkit/Spigot
d5a68b79c1 SPIGOT-6526: World entities are not populated when plugin onEnable is called
By: md_5 <git@md-5.net>
2021-06-13 15:05:32 +10:00
CraftBukkit/Spigot
085885b64a SPIGOT-6536: Marker position not set on spawn
By: md_5 <git@md-5.net>
2021-06-13 10:25:21 +10:00
CraftBukkit/Spigot
02ebbcfc81 #855: Add HumanEntity#getItemInUse and Material#getSlipperiness
By: konsolas <vincentyntang@gmail.com>
2021-06-12 21:07:45 +01:00
CraftBukkit/Spigot
3e7e42a371 SPIGOT-6529: Fix BundleMeta#setItems
By: md_5 <git@md-5.net>
2021-06-13 08:48:13 +10:00
CraftBukkit/Spigot
f7478ccc32 SPIGOT-6535: PlayerGameModeChangeEvent event incorrectly reports old gamemode
By: Parker Hawke <hawkeboyz2@hotmail.com>
2021-06-13 08:43:21 +10:00
CraftBukkit/Spigot
94c0260719 #856: Add methods to check if item is the breed item for an entity
By: Nathat23 <nathat890@outlook.com>
2021-06-13 08:37:53 +10:00
CraftBukkit/Spigot
472f590189 Add additional validation to Player#breakBlock
By: md_5 <git@md-5.net>
2021-06-13 08:27:57 +10:00
CraftBukkit/Spigot
c799ab1f6e SPIGOT-6532: Fix Entity#setGlowing
By: md_5 <git@md-5.net>
2021-06-13 08:26:10 +10:00
CraftBukkit/Spigot
47c7562765 Restore 1.16.5 behaviour of InventoryDragEvent being called even when a single item is 'dragged' to its own slot
Ideally this would now be an InventoryClickEvent instead, but that is not so easy with the current structure.
See https://www.spigotmc.org/threads/510208/page-9#post-4185501 for further info.

By: md_5 <git@md-5.net>
2021-06-12 20:19:41 +10:00
CraftBukkit/Spigot
f359c7a3ec Fix new map colors rendering as transparent
By: DerFrZocker <derrieple@gmail.com>
2021-06-12 19:56:13 +10:00
CraftBukkit/Spigot
d57a6b8cc2 SPIGOT-6524: Inventory desync when InventoryClickEvent is cancelled
By: md_5 <git@md-5.net>
2021-06-12 19:44:31 +10:00
CraftBukkit/Spigot
cd03a7966c SPIGOT-6522: ItemStack on cursor is always AIR
By: md_5 <git@md-5.net>
2021-06-12 16:24:52 +10:00
CraftBukkit/Spigot
544ec40369 Fix missing PlayerEditBookEvent
By: md_5 <git@md-5.net>
2021-06-12 16:14:12 +10:00
CraftBukkit/Spigot
8797975de5 SPIGOT-6513: Placing ItemStack in Inventory causes InventoryAction.NOTHING
By: md_5 <git@md-5.net>
2021-06-12 15:23:44 +10:00
CraftBukkit/Spigot
1daedfe082 SPIGOT-6519: Fix end gateway teleports
By: md_5 <git@md-5.net>
2021-06-12 11:07:06 +10:00
CraftBukkit/Spigot
190b3f8308 SPIGOT-6515: "Un-waterlogging" throws UnsupportedOperationException in some cases
By: md_5 <git@md-5.net>
2021-06-12 08:59:05 +10:00