773 Commits

Author SHA1 Message Date
Yannick Lamprecht
d48f2d1a50
#1047: Support setting individual Wither head targets 2022-05-17 19:27:01 +10:00
md_5
2ac7fa7af6
SPIGOT-7014: getLootTable API should not persistently update loot table 2022-05-09 18:13:06 +10:00
DerFrZocker
7bc728a6b8
#1045: Revert changes to persistence required checks 2022-05-03 23:13:03 +10:00
Doc
e87f2e3ed1
SPIGOT-6992: Add LimitedLife/LifeTicks/Bound APIs to Vex 2022-04-21 06:45:42 +10:00
md_5
cf391b51c8
Pass in SpawnReason rather than boolean 2022-04-18 11:05:15 +10:00
Doc
a459f4d4f5
#1033: Add Villager#zombify 2022-04-15 13:48:55 +10:00
Parker Hawke
6c308e1b57
SPIGOT-6829: Add per-player world border API 2022-04-09 09:39:33 +10:00
Gero
e19ddabd08
#1011: Add Item Unlimited Lifetime APIs 2022-03-12 09:26:16 +11:00
Doc
1e87776acb
SPIGOT-6935: Make Arrow color nullable 2022-02-19 09:36:08 +11:00
Doc
febaa1c6f5
SPIGOT-6918: Add SpawnCategory API and configurations for Axolotls 2022-02-07 18:52:16 +11:00
blablubbabc
8f361ecec0
#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.
2022-02-03 09:25:39 +11:00
Gero
c26a7b54dc
#1000: Add PlayerHideEntityEvent and PlayerShowEntityEvent 2022-02-01 18:01:05 +11:00
Doc
0d109e865c
#999: Prevent non-item cooldowns 2022-01-25 08:28:25 +11:00
Doc
d10c35ea5b
SPIGOT-6899: Add Player#getPreviousGameMode 2022-01-17 10:12:15 +11:00
Gero
312d007f03
#990: Add playSound with Entity as source 2022-01-11 18:53:45 +11:00
Matthew
c93fcba47a
#378: Add API to check and set if horses are grazing hay 2022-01-01 10:01:25 +11:00
Matthew
752fa511a9
#374: Add isJohnny / setJohnny for Vindicator 2022-01-01 09:58:04 +11:00
Matthew
19f2af066e
#373: Add trap related methods to SkeletonHorse 2022-01-01 09:58:04 +11:00
md_5
eea8d55965
Make EnderDragon extend/implement Mob 2021-12-30 09:35:50 +11:00
md_5
633ac8b31c
Add self-riding check to Entity#addPassenger 2021-12-29 10:48:15 +11:00
Patrick Choe
439c685f4e
SPIGOT-6789: Improve resource pack related API 2021-12-18 11:46:17 +11:00
md_5
3c2af1b7f5
SPIGOT-6831: Fix llama strength crash 2021-12-06 15:15:09 +11:00
md_5
27a27cdb84
Add Player#openSign API to edit a placed sign 2021-12-05 08:34:54 +11:00
md_5
1825cc0b04
Purge hidden entities on unload too 2021-12-04 08:23:26 +11:00
md_5
6f3509d12e
Release POIs when villagers are removed by plugins 2021-12-03 15:05:20 +11:00
md_5
37fd1917e7
Add hideEntity / showEntity API 2021-11-29 09:18:52 +11:00
coll1234567
9b2585017b
#960: Add Player#showDemoScreen 2021-11-26 10:13:36 +11:00
Noah van der Aa
aebb79e327
#954: Add "Allow Server Listings" API 2021-11-23 08:56:35 +11:00
md_5
ecfd37b3d8
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:57 +11:00
Parker Hawke
03b50154ef
#953: Add Player#sendEquipmentChange 2021-11-22 15:07:40 +11:00
md_5
a7b8b0270a
Update to Minecraft 1.18-pre5 2021-11-22 09:00:00 +11:00
Doc
b58f4299c6
SPIGOT-6436: Add Player#stopAllSounds 2021-11-05 21:02:22 +11:00
Doc
376edf4fe5
SPIGOT-6779: Fix LivingEntity#attack for Player entities 2021-11-02 18:33:35 +11:00
md_5
fd50041d32
SPIGOT-6768: Remove upper bound on setFreezeTicks 2021-10-23 18:29:53 +11:00
DerFrZocker
1492826118
SPIGOT-6249: Add Missing Effect Constants 2021-09-11 18:40:14 +10:00
DerFrZocker
6cd975d07e
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
2021-09-10 17:46:38 +10:00
Brokkonaut
e167f28088
SPIGOT-6726: NPE when calling getBossBar() on plugin spawned EnderDragon 2021-08-28 19:02:19 +10:00
DerFrZocker
4f6bcc84f9
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:16 +10:00
Brokkonaut
2cdc6b1e4c
SPIGOT-6692: Add sendSignChange overload with a hasGlowingText parameter 2021-08-05 08:43:03 +10:00
md_5
879acfee29
Fix missing varargs from previous commit 2021-07-22 11:30:14 +10:00
md_5
6572b9c31a
SPIGOT-6641: Use varargs in sendMessage 2021-07-22 09:54:57 +10:00
md_5
9e06bb2a26
SPIGOT-6663: Chicken Jockeys chickens don't despawn 2021-07-22 09:53:26 +10:00
DerFrZocker
699f2d36b0
SPIGOT-6545: Unable to set Guardian target via API while awareness is disabled 2021-07-22 09:36:54 +10:00
Phoenix616
b7e3ce0233
#890: Include yaw in player's spawn location 2021-07-15 20:29:38 +10:00
DerFrZocker
f4066854f9
SPIGOT-6579: DragonFireBall movement with setDirection jumps around a lot 2021-07-11 09:34:35 +10:00
md_5
fb556bfa14
Update to Minecraft 1.17.1 2021-07-07 00:00:00 +10:00
Doc
7aa02e3a31
SPIGOT-6615 Fix Glow Item Frame to use EntityTagMeta 2021-07-03 09:33:04 +10:00
Ibrahim Ansari
9ba1c67efc
#870: Add isTrusting/setTrusting to CraftOcelot. 2021-06-21 08:43:09 +10:00
VendoAU
a07e783a69
#865: Implement Villager#shakeHead 2021-06-14 19:15:13 +10:00
Martoph
3252ff189c
#863: Add LivingEntity#isClimbing 2021-06-14 19:11:46 +10:00