Commit graph

2776 commits

Author SHA1 Message Date
md_5
9115281ff1
SPIGOT-6832: Improve Player#getPing docs 2021-12-04 08:10:14 +11:00
md_5
f023e77ad7
SPIGOT-6825: MapFont#getWidth ignores §, but not the color-byte and semicolon following it 2021-12-01 14:58:04 +11:00
md_5
fc0fe05559
SPIGOT-6822: Ensure library loader has same parent as plugin loader
This behaviour may need to be revisted in future to achieve greater isolation of plugins/libraries
2021-12-01 10:29:25 +11:00
md_5
b46ac671a3
Update to Minecraft 1.18 2021-12-01 03:00:00 +11:00
md_5
ab6e73a20e
Correct copied javadoc from previous commit 2021-11-29 15:59:20 +11:00
md_5
810cb078fd
Add hideEntity / showEntity API 2021-11-29 09:17:57 +11:00
coll1234567
c9b35cdb66
#684: Make PotionEffectType implement Keyed 2021-11-28 11:49:39 +11:00
md_5
716b4fce84
Revert SnakeYAML upgrade 2021-11-27 09:11:04 +11:00
md_5
ca6f8942a4
Update to Minecraft 1.18-rc3 2021-11-27 08:00:00 +11:00
coll1234567
57e7e95215
#683: Add Player#showDemoScreen 2021-11-26 10:13:40 +11:00
md_5
d25437bce3
Update to Minecraft 1.18-pre8 2021-11-25 08:00:00 +11:00
Doc
ea30a299e9
Add docs in ServerListPingEvent based on changes from 1.18 2021-11-24 07:30:57 +11:00
coll1234567
07a055315c
SPIGOT-6781: Add Block#canPlace 2021-11-23 18:52:15 +11:00
Doc
64c8bd39e0
#679: Add getHideOnlinePlayers 2021-11-23 12:49:12 +11:00
Noah van der Aa
b991b6c754
#677: Add "Allow Server Listings" API 2021-11-23 08:56:03 +11:00
BlackHole
4e9f199ac6
SPIGOT-6801: Wrong BlockData classes in Material enum for SOUL_FIRE and SOUL_TORCH 2021-11-23 08:06:39 +11:00
md_5
0a35cb18fc
Downgrade to Checkstyle 8.x as 9.x series has much larger memory usage 2021-11-22 15:27:06 +11:00
md_5
24313a161e
Remove Player#sendChunkChange
Method is specified according to an obsolete internal format and has not been implemented for nearly 10 years.
2021-11-22 15:08:47 +11:00
Perzan
6c45a80e2e
#592: Add Player#sendEquipmentChange 2021-11-22 15:03:24 +11:00
md_5
27bcdd12f7
Update to Minecraft 1.18-pre5 2021-11-22 09:00:00 +11:00
Cerus
d32e3c764e
#675: Fix typo in ItemFrame#setFixed 2021-11-18 08:14:50 +11:00
JDIALIA
04452475ac
#674: Optimize and cleanup PermissibleBase 2021-11-16 07:27:40 +11:00
Doc
cfd18bd0ac
SPIGOT-6436: Add Player#stopAllSounds 2021-11-05 21:02:12 +11:00
Doc
9b45fa2fab
#667: Allow setting BrewEvent results 2021-10-30 18:16:52 +11:00
md_5
8c776ddc83
SPIGOT-6762: ChatPaginator.wordWrap only transfers one modifier 2021-10-29 18:45:29 +11:00
Doc
da372966a9
SPIGOT-4590, SPIGOT-6769: Clarify DamageCause documentation 2021-10-27 18:36:29 +11:00
md_5
58c2d3c7b8
SPIGOT-6771: Help command tab completion does not respect permissions 2021-10-24 20:33:42 +11:00
md_5
e337669a52
SPIGOT-6756: Clarify drop items in BlockBreakEvent 2021-10-16 19:01:10 +11:00
md_5
9590b610cf
SPIGOT-6749: Library Loader does not correctly isolate dependencies 2021-10-13 08:12:16 +11:00
Sander Knauff
6be36d3638
SPIGOT-2903: Add Structure API 2021-10-05 12:24:33 +11:00
Doc
c01e2f07e9
#662: Support for configuring Water Underground Creatures spawn settings 2021-10-05 11:37:53 +11:00
olijeffers0n
8916693e97
#661: Fix Typo in ScoreboardManager documentation 2021-10-04 21:08:43 +11:00
md_5
19e985ecaf
SPIGOT-6746: Clarify PlayerPortalEvent documentation 2021-09-25 08:02:58 +10:00
md_5
2a0a2e2ebb
SPIGOT-6738: Add entity type tags 2021-09-19 14:50:54 +10:00
DerFrZocker
44cfe1432d
SPIGOT-6249: Add Missing Effect Constants 2021-09-11 18:39:58 +10:00
Brokkonaut
7da4c0be21
SPIGOT-6729: Add Chunk.isEntitiesLoaded() 2021-09-06 18:51:44 +10:00
DerFrZocker
ed7bba95fc
SPIGOT-6547: Chunk#getEntities() doesn't return all entities immediately after chunk load 2021-09-01 18:56:36 +10:00
DerFrZocker
d99a585cb4
SPIGOT-6719: Add getTileEntities() to LimitedRegion 2021-08-30 18:45:15 +10:00
Doc
ea7b3a0d80
#654: Clarify conditions where a bed can explode 2021-08-28 19:00:27 +10:00
md_5
ca5b4b1ae6
SPIGOT-6697: Deprecate generateTree with BlockChangeDelegate as it does not handle tiles 2021-08-22 18:12:37 +10:00
Bjarne Koll
c9a46ebf16
#653: 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.
2021-08-18 18:04:51 +10:00
md_5
e49c2e3a0f
Damageable should extend ItemMeta 2021-08-16 15:36:45 +10:00
DerFrZocker
01ff04f441
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.
2021-08-15 08:08:11 +10:00
md_5
974452512a
Update ASM 2021-08-13 08:45:11 +10:00
Doc
8301151f5d
Add dimension setting getters to World 2021-08-11 18:58:19 +10:00
Brokkonaut
e0598aa29e
SPIGOT-6692: Add sendSignChange overload with a hasGlowingText parameter 2021-08-05 08:43:00 +10:00
Doc
75a0ee4f04
SPIGOT-6691: Material.LAVA_CAULDRON is not Levelled 2021-08-04 17:10:14 +10:00
James Peters
e7b0f8d608
#642: Add Crafting methods to API 2021-07-22 11:37:12 +10:00
DerFrZocker
9e58831e4b
SPIGOT-6641: Use varargs in sendMessage 2021-07-22 09:38:11 +10:00
DerFrZocker
e409fe498b
SPIGOT-6545: Unable to set Guardian target via API while awareness is disabled 2021-07-22 09:36:51 +10:00