5153 Commits

Author SHA1 Message Date
Parker Hawke
03b50154ef
#953: Add Player#sendEquipmentChange 2021-11-22 15:07:40 +11:00
md_5
bafc27ec51
Correct displayed Java version in warning 2021-11-22 11:47:01 +11:00
md_5
a7b8b0270a
Update to Minecraft 1.18-pre5 2021-11-22 09:00:00 +11:00
md_5
0ebef35c72
Remove outdated build delay. 2021-11-22 09:00:00 +11:00
md_5
eb14700779
SPIGOT-6797: EntityInteractEvent called with incorrect location 2021-11-21 11:23:17 +11:00
md_5
f63504952f
SPIGOT-6798: EntityChangeBlockEvent called with incorrect location 2021-11-21 11:18:06 +11:00
md_5
20716710f8
SPIGOT-6790: Mimic structure block behaviour and do not save STRUCTURE_VOID 2021-11-11 18:40:15 +11:00
Doc
b58f4299c6
SPIGOT-6436: Add Player#stopAllSounds 2021-11-05 21:02:22 +11:00
md_5
eb19161294
SPIGOT-6783: Items do not appear in custom anvil inventories 2021-11-04 18:17:58 +11:00
Doc
376edf4fe5
SPIGOT-6779: Fix LivingEntity#attack for Player entities 2021-11-02 18:33:35 +11:00
DerFrZocker
747a73ec92
SPIGOT-6772: Use entity mailbox and re-schedule entities if they get unloaded 2021-11-01 18:54:44 +11:00
Doc
cef1fda37b
#947: Add missing spawn eggs for SpawnEggMeta 2021-10-30 18:34:04 +11:00
Doc
eb9a0f34af
#945: Allow setting BrewEvent results 2021-10-30 18:16:39 +11:00
md_5
fd50041d32
SPIGOT-6768: Remove upper bound on setFreezeTicks 2021-10-23 18:29:53 +11:00
DerFrZocker
f0f801e58e
SPIGOT-5988: Bedspawn doesn't clear after dying when spawn is blocked 2021-10-16 19:39:14 +11:00
blablubbabc
e2ac9c6ba8
SPIGOT-6758: Reset ItemSign#openSign when aborting the block placement early 2021-10-16 18:49:19 +11:00
md_5
b86793136b
SPIGOT-6760: Chest#getInventory only returns one half of a double chest when one or both halves are blocked 2021-10-16 18:49:04 +11:00
blablubbabc
fee3152be1
SPIGOT-6759: Chest#getInventory() no longer returns double chest inventories 2021-10-16 18:49:04 +11:00
blablubbabc
11c9299fbb
#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.
2021-10-15 18:03:01 +11:00
blablubbabc
960f31098d
#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.
2021-10-10 07:55:53 +11:00
blablubbabc
4faf479e6c
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.
2021-10-10 07:55:53 +11:00
md_5
a72d54044a
SPIGOT-6754: Temporarily restore previous behaviour for tile entities with removed blocks 2021-10-09 16:29:58 +11:00
Sander Knauff
1df303e707
SPIGOT-2903: Add Structure API 2021-10-05 12:24:21 +11:00
Doc
346ebb7a7a
#934: Support for configuring Water Underground Creatures spawn settings 2021-10-05 11:39:21 +11:00
blablubbabc
dc764e7a2f
#877: Improve and simplify CraftBlockState 2021-09-29 18:56:16 +10:00
DerFrZocker
2d933bae44
SPIGOT-6741: shouldGenerateStructures isn't implemented 2021-09-28 17:52:29 +02:00
Lars Dormans
9aeb46ae1f
SPIGOT-6023, SPIGOT-6745: Fix missing BlockDispenseArmorEvents 2021-09-26 18:38:35 +10:00
md_5
d3cc412075
SPIGOT-6738: Add entity type tags 2021-09-19 14:51:21 +10:00
DerFrZocker
1492826118
SPIGOT-6249: Add Missing Effect Constants 2021-09-11 18:40:14 +10:00
md_5
332335e1c6
SPIGOT-6731: "Nag author" message in CraftServer lists one author only 2021-09-10 17:49:53 +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
Doc
9217b523e5
#929: Call EntityBlockFormEvent for Wither Rose placed by dead entity 2021-09-06 18:57:16 +10:00
Brokkonaut
757d42aef6
SPIGOT-6729: Add Chunk.isEntitiesLoaded() 2021-09-06 18:51:39 +10:00
Phoenix616
6719d1f1e7
SPIGOT-6708: Fix Experience Orb value not being updated in mend event 2021-09-03 18:37:44 +10:00
md_5
422cec08d1
Rebuild patch 2021-09-01 19:02:09 +10:00
DerFrZocker
15f27fc710
SPIGOT-6547: Chunk#getEntities() doesn't return all entities immediately after chunk load 2021-09-01 19:01:52 +10:00
DerFrZocker
cbd747afcd
SPIGOT-6719: Add getTileEntities() to LimitedRegion 2021-08-30 18:44:44 +10:00
Brokkonaut
e167f28088
SPIGOT-6726: NPE when calling getBossBar() on plugin spawned EnderDragon 2021-08-28 19:02:19 +10:00
Doc
5be41fb80f
SPIGOT-6720: Fix bed explosion checks 2021-08-27 19:18:05 +10:00
DerFrZocker
09b99daf30
SPIGOT-6722: Close entity manager when unloading world 2021-08-27 19:14:09 +10:00
DerFrZocker
3a9561bf24
SPIGOT-6686: Changes in MaximumRepairCost for Anvil Rename cause inconsistency 2021-08-27 19:14:09 +10:00
DerFrZocker
a0a37f416c
SPIGOT-6630: Replacing an enchantment on an item creates a conflict error 2021-08-24 18:10:30 +02:00
DerFrZocker
a955f15c25
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)
2021-08-22 13:23:40 +02:00
md_5
78d5b35b82
SPIGOT-6697: Restore generateTree with BlockChangeDelegate behaviour 2021-08-22 18:12:59 +10:00
md_5
15792f0de1
Rebuild patch 2021-08-22 18:07:39 +10:00
md_5
c949675e1f
SPIGOT-6713: Cancelling EntityTransformEvent Causes Deceased Slimes To Not Despawn 2021-08-22 18:07:31 +10:00
blablubbabc
7c8bbcbee7
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.
2021-08-20 19:41:17 +10:00
Bjarne Koll
18027d0239
#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.
2021-08-18 18:04:53 +10:00
Noah van der Aa
3cad0316e0
SPIGOT-6714: Don't fire PlayerBucketEvent when empty 2021-08-18 17:06:40 +10:00
DerFrZocker
8c6d60cf50
Fix server crash with BlockPopulator when entities are at a negative chunk border 2021-08-16 07:07:13 +02:00