summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeLines
* Improvements to BlockStatesLukas Hennig2017-08-05-636/+512
| | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* Add build delay backmd_52017-08-04-1/+1
|
* Update to Minecraft 1.12.1md_52017-08-03-42/+3
|
* Remove outdated build delay.md_52017-08-03-1/+1
|
* SPIGOT-3485: Launch shulker bullets as projectilesmd_52017-08-03-0/+7
|
* Implement BroadcastMessageEventBillyGalbreath2017-07-28-8/+18
|
* SPIGOT-3461: Standardise plugin load timingmd_52017-07-26-3/+0
|
* Correct scheduler behaviour with intervals of >= Integer.MAX_VALUE (circa 3 ↵md_52017-07-25-2/+2
| | | | years).
* SPIGOT-3432: Add playNote support for new soundsmd_52017-07-24-0/+32
|
* SPIGOT-3433: Improve AreaEffectCloud#getSourcemd_52017-07-22-2/+3
|
* SPIGOT-3428: Recover from invalid firework datamd_52017-07-19-1/+9
|
* SPIGOT-3425: Correct slot type calculationmd_52017-07-16-1/+1
|
* SPIGOT-3423: Don't treat technical piston block as BlockStateMetamd_52017-07-16-3/+2
|
* SPIGOT-3417: Event for shearing snowmanmd_52017-07-15-2/+2
|
* SPIGOT-3416: Cap team prefix / suffix at correct value of 16md_52017-07-13-2/+2
|
* SPIGOT-3409: Improve performance of registering stupid amounts of ↵md_52017-07-10-3/+4
| | | | permissions in plugin.yml
* SPIGOT-3407: Set damager for evoker fangsmd_52017-07-08-0/+2
|
* Increase expiration time to two weeks.md_52017-07-04-1/+1
|
* SPIGOT-3387: Prevent null enchantments in ItemMetaBlackHole2017-06-29-0/+4
|
* SPIGOT-3381: Save older serialized enchantsmd_52017-06-26-1/+6
|
* SPIGOT-3379: Generalise canPickupItems to other entities.md_52017-06-26-4/+2
|
* SPIGOT-3336: HideFlags will now serialize as a List rather than a Set.Jeremy Wood2017-06-23-2/+2
| | | | | | HideFlags will be serialized as a list and deserialized as an Iterable. This will allow maximum flexibility on both the formats it can be serialized into and formats it can be deserialized from.
* Treat Vanilla commands as Bukkit Commandsmd_52017-06-21-2/+2
|
* Increase expire time to 7 daysmd_52017-06-17-1/+1
|
* SPIGOT-3342: Fix invalid usage of null in InventoryWrappermd_52017-06-15-6/+6
|
* Add PistonMoveReaction getters for Entitymd_52017-06-12-0/+6
|
* SPIGOT-3331: New map colours don't displaymd_52017-06-12-2/+2
|
* SPIGOT-3304: Respect duration from Vanilla /weathermd_52017-06-09-0/+2
|
* Update to Minecraft 1.12md_52017-06-08-2/+5
|
* SPIGOT-3286: Call BlockFormEvent for Concrete Powder -> Concretemd_52017-06-03-2/+3
|
* SPIGOT-3283: Don't allow plugin induced infinite velocity / positionmd_52017-06-02-4/+9
|
* SPIGOT-3284: Allow TNTPrimed#getSource to return invalid entitiesmd_52017-06-02-9/+1
| | | | Eg dead players.
* Update to Minecraft 1.12-pre6md_52017-05-30-4/+4
|
* SPIGOT-3277: Fix Entity.eject()BlackHole2017-05-28-1/+1
|
* Add color API for Teamsmd_52017-05-28-10/+59
|
* SPIGOT-3272: Fix duplicate creative inventoryPokechu222017-05-28-1/+1
| | | | This change properly identifies the creative inventory as one with 5 crafting slots (as that's the default set in ContainerPlayer, and handled properly in other containers), instead of having the same inventory twice (which breaks slot identification).
* SPIGOT-439: Add player locale related APIs.MiniDigger2017-05-27-1/+5
|
* Ensure gameLoop function gets selectors applied.md_52017-05-26-0/+50
|
* SPIGOT-3253: Fix entity yaw changesmd_52017-05-20-1/+1
|
* Update to Minecraft 1.12-pre5md_52017-05-19-4/+4
|
* SPIGOT-3248: Don't set shoulder compounds of EntityHuman to nullBlackHole2017-05-18-4/+4
|
* Misc advancement / recipe reload fixes including SPIGOT-3240md_52017-05-16-6/+2
|
* SPIGOT-3240: Temporarily stub out rarely used resetRecipes method to fix ↵md_52017-05-16-0/+4
| | | | some issues.
* SPIGOT-3238: Add Server.advancementIteratormd_52017-05-15-0/+11
|
* Update to Minecraft 1.12-pre2md_52017-05-14-494/+811
|
* Change book limit to allow for automatically generated colour codesmd_52017-05-14-1/+1
|
* Remove outdated build delay.md_52017-05-14-1/+1
|
* Set health before entity death.Lukas Hennig2017-05-04-2/+2
|
* SPIGOT-3215: Call BlockPhysicsEvent for tall plantsBlackHole2017-05-01-0/+7
|
* SPIGOT-3214: Allow book titles up to 32 even though they can't be created by ↵md_52017-04-30-1/+1
| | | | a Vanilla client.