Commit Graph

670 Commits

Author SHA1 Message Date
md_5
4509a144db SPIGOT-3899: Only load advancements from primary world 2018-04-15 10:21:11 +10:00
md_5
fb423b8f48 SPIGOT-3883: Better reloading of pending unload chunks 2018-04-04 16:12:32 +10:00
md_5
68b4fb6427 SPIGOT-3882: Extra call site for VehicleEntityCollisionEvent 2018-04-02 12:55:28 +10:00
md_5
1daee53916 SPIGOT-3879: Make end->overworld spawning more consistent with vanilla 2018-03-30 19:16:53 +11:00
md_5
2e210288de SPIGOT-3875: Book selectors not resolving 2018-03-29 20:34:46 +11:00
md_5
aa255689c1 SPIGOT-3869: More resurrect fixes 2018-03-24 16:13:17 +11:00
md_5
3fed09cc42 SPIGOT-3869: Error when forcing EntityResurrectEvent 2018-03-23 19:40:16 +11:00
md_5
29705a0d4f SPIGOT-3864: Protect against suffocation on world change 2018-03-22 21:05:34 +11:00
md_5
7e94e65a1c SPIGOT-3845: Fix spawnRadius on respawn
Thanks senmori for the investigation in PR #431
2018-03-08 18:21:31 +11:00
md_5
1bb523c4e4 SPIGOT-3829: Apply some speed limits to all entities 2018-02-19 09:52:00 +11:00
Senmori
f8411ea1e5 Expand Structure Block API 2018-02-12 10:33:19 +11:00
md_5
8bb4f6ccc1 SPIGOT-3813: Player.setHealth not reliable in conjunction with attribute API 2018-02-12 08:59:32 +11:00
md_5
aa34e9bddd SPIGOT-3805: Minecart does not teleport through Nether Portal 2018-02-09 18:04:44 +11:00
Senmori
1c40a81828 Expand EnderSignal API 2018-02-03 17:48:41 +11:00
md_5
dac2a4a6ae SPIGOT-3784: Reset horse chests after event 2018-01-28 09:44:16 +11:00
Senmori
c7656468e4 Expand CreatureSpawner API 2018-01-24 17:19:41 +11:00
md_5
4a030536cd SPIGOT-3775: ghost player list entry if kicked on join 2018-01-23 22:49:26 +11:00
md_5
1dced6a2c5 Send complete metadata update to joining players 2018-01-08 19:48:32 +11:00
md_5
c3e4382c33 CauldronLevelChangeEvent does not use new level 2018-01-08 13:42:44 +11:00
md_5
dc7d31b00d SPIGOT-3735: Missing call to BlockFadeEvent 2018-01-04 08:57:01 +11:00
md_5
360629ec5a SPIGOT-3729: Add AreaEffectClouds to tracker 2018-01-02 10:14:30 +11:00
Senmori
950006003c SPIGOT-355: API for Villager careers 2017-12-31 21:21:03 +11:00
md_5
8c37e2ebda SPIGOT-3717: Fix some RCON commands 2017-12-26 07:28:56 +11:00
md_5
70cc3820cf SPIGOT-3686: Move entity event call earlier in method 2017-12-09 17:32:19 +11:00
md_5
d063cd0d3b Fix missing event call for BlockRedstoneLamp 2017-12-07 10:59:30 +11:00
md_5
22564a9177 SPIGOT-3674: Take into account max stack size for PlayerDropItemEvent 2017-12-03 08:55:19 +11:00
md_5
809c399a62 SPIGOT-3668: Missing EntityToggleGlideEvent in creative mode 2017-11-28 09:33:40 +11:00
Senmori
bdb8822625 SPIGOT-1505: PlayerItemMendEvent 2017-11-21 10:21:20 +11:00
md_5
b4c298d644 Fix mismatched setArrowCount method 2017-11-17 11:03:30 +11:00
Thinkofdeath
685ed2eb92 Fix dispensing bone meal not having the correct data value 2017-11-17 10:23:20 +11:00
Parker Hawke
305df9035f Implement max fuse tick & explosion radius methods to Creeper 2017-11-08 12:33:21 +11:00
md_5
3e3bbd4272 SPIGOT-3638: Don't process async chat on shutting down server 2017-11-08 10:36:11 +11:00
md_5
2fae23c251 SPIGOT-3637: Adjust yaw yet again 2017-11-07 17:21:38 +11:00
md_5
b8f84f375b Fix bad diff 2017-10-13 21:47:55 +11:00
md_5
ef2f38267f SPIGOT-3607: Bad yaw from armorstands treated as living 2017-10-13 21:36:32 +11:00
md_5
6733aa5635 SPIGOT-3603: Fix client timing out in scenarios where it sends no packets. 2017-10-09 18:23:58 +11:00
blablubbabc
f8500c0a3e SPIGOT-3598: Persist all beacon effects
Regardless of if they are possible in Vanilla by default.
2017-10-07 18:48:08 +11:00
md_5
e8b6e4f29b Temporarily shift L7 timeout value to L4 value of 30s. 2017-10-06 20:49:22 +11:00
md_5
362ed329f0 Supress harmless teleport error 2017-10-01 17:29:03 +11:00
md_5
94b0980852 SPIGOT-3571: Packet handling must be synchronous 2017-09-19 08:00:56 +10:00
md_5
9a1f5ee80a Update to Minecraft 1.12.2 2017-09-18 20:00:00 +10:00
md_5
357b573a19 SPIGOT-3513: Correctly set size for freshly spawned Minecarts 2017-08-16 20:47:23 +10:00
Geoff Crossland
963b19c599 Fix a few chunk saving race conditions
* ChunkRegionLoader.c() picks an entry in the save queue, removes that entry from the save queue and then actually writes the entry to the region file. So, between the last two steps, the entry is neither in the save queue nor is it in the region file; if somebody loads the chunk again (with ChunkRegionLoader.loadChunk()) in that gap, they'll get old data. I've delayed the removal until the saving is done.
* ChunkRegionLoader.c() also records the coords of the chunks it's currently saving in this.c. ChunkRegionLoader.a(ChunkCoordIntPair, NBTTagCompound), which adds an entry to the save queue, stops the addition of an entry if its coords are in this.c. Now, I'm guessing that Mojang's intended purpose for this mechanism was to prevent multiple parallel writes for the same chunk. The "stops the addition" bit above should then be something like "block until it's no longer in c"; in fact, the vanilla implementation is "discard the new state of the chunk". I've taken the easy route to solving this, by just making ChunkRegionLoader.c() synchronized (since, in normal use, only the chunk saving thread is in here).
2017-08-11 17:34:19 +10:00
md_5
27b8bf9116 SPIGOT-3497: Cancelled EntityPortalEvent leads to incorrect behaviour 2017-08-08 20:35:29 +10:00
Lukas Hennig
61a31ca0c7 SPIGOT-3496, MC-92282: Set mob type of mob-spawner reverts after single spawn wave.
Fixes CreatureSpawner.setSpawnedType and a vanilla issue related to
setting the mob type of a mob-spawner via spawn_egg.
2017-08-08 20:34:15 +10:00
md_5
b5878783ad SPIGOT-3491: Add option to bypass permissions in advancements 2017-08-06 09:07:24 +10:00
Lukas Hennig
19507baf8b Improvements to BlockStates
* Actually capture all the data of TileEntities. This is done by creating a copy of the TileEntity. The methods of BlockState which currently directly access the TileEntity reference will modify the data of that TileEntity-snapshot instead.
* With the call to BlockState.update, the captured TileEntity data gets applied to the current TileEntity in the world.
* Methods which trigger block specific actions will use the current TileEntity from the world.
* CraftBlockState does not hand out the wrapped or the snapshot TileEntity directly. Instead, it provides an applyTo method to copy the data to a given TileEntity and a method to directly get a copy of the TileEntity NBT data represented by the BlockState. CraftMetaBlockState was updated to make use of that.
* Added #getSnapshotInventory() to bukkit which allows modifiying the captured inventory snapshots of containers.
* Tried to clarify which methods only work if the BlockState is placed, which methods require the block in the world to still be of the same type (methods which trigger actions), and that .getInventory() directly modifies the inventory of the block in the world if the BlockState is placed and becomes invalid if the block type is changed.

Backwards compatibility

* If the BlockState acts as InventoryHolder, getInventory() will still return the inventory directly backed by the TileEntity in the world (like before), and not the snapshot inventory. This compromise should reduce the potential of these changes to break existing plugins, or craftbukkit's own use of BlockState.
* The snapshot's inventory can be accessed by a new method getSnapshotInventory()
* In case the BlockState is not placed (if it was retrieved from the MetaBlockState of an item), the getInventory() method will however return the snapshot inventory. So that when the BlockState gets applied back to the item, the inventory changes are properly included.
* With the changes to CraftMetaBlockState it is no longer required to call the update method before passing a modified BlockState to the CraftMetaBlockState. For backwards compatibility the update method will simply return true for a non-placed BlockState, without actually doing anything.

Impact on plugins
* Restoring blocks now actually works as expected, properly restoring the TileEntity data, reglardless if the block changed its type in the meantime.
* Plugins are now consistently required to call the update method in order to apply changes to blocks. Though, regarding the Javadoc they should have been required to do so anyways.
* New feature: Plugins can take and modify inventory snapshots.
* Breaking change: If a plugin gets the BlockState of a block in the world, modifies the inventory returned by .getInventory(), and then tries to use the same BlockState to apply the TileEntity data to an ItemStack block meta, the ItemStack will use the snapshot inventory, disregarding the changes made to the inventory returned by .getInventory(). This is the compromise of .getInventory() returning the inventory directly backed by the TileEntity in the world.

Other fixes related to BlockState:
* TileEntityContainer#getLocation() will run into a NPE if the TileEntity is non-placed (ex. when getting the BlockState from a CraftMetaBlockState).
* Beacon.getEntitiesInRange() would previously throw a NPE if called for a non-placed BlockState. It was changed to now require to be placed and use the current TileEntity in the world. If the TileEntity in the world is no longer a beacon, it will return an empty list.
* EndGateway now supports setting and getting the exit location even for non-placed EndGateways (inside BlockStateMeta) by using / returning a location with world being null.
2017-08-05 14:37:19 +10:00
md_5
63029f4ff3 SPIGOT-3492: Ensure player functionality uses their specific scoreboard 2017-08-05 09:15:52 +10:00
md_5
2a927e8638 Update to Minecraft 1.12.1 2017-08-03 23:00:00 +10:00
md_5
57c323aad1 SPIGOT-3486: Missing check in redstone placement 2017-08-03 08:31:29 +10:00