3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-21 05:50:05 +01:00
Commit graph

2934 Commits

Autor SHA1 Nachricht Datum
md_5
a3b3a421ac SPIGOT-3565: Head yaw is "more accurate" for living entities 2017-09-28 16:23:14 +10:00
blablubbabc
ee91bce157 Fix active async tasks not cancelled by CraftScheduler#cancelTasks(Plugin) 2017-09-28 16:18:45 +10:00
md_5
9a1f5ee80a Update to Minecraft 1.12.2 2017-09-18 20:00:00 +10:00
md_5
8f472147b7 Remove outdated build delay. 2017-09-14 21:39:04 +10:00
md_5
876d22cd55 SPIGOT-3561: Fix selectors in SuccessCount 2017-09-09 12:51:18 +10:00
md_5
9e3636d82a SPIGOT-3553: Add OfflinePlayer based methods to SkullMeta 2017-09-06 16:14:37 +10:00
md_5
178caf9ac2 SPIGOT-3551: Recursively unrestrict advancements 2017-09-06 16:07:41 +10:00
blablubbabc
bde2a93cfe Add BukkitTask#isCancelled 2017-09-02 17:04:29 +10:00
Jannyboy11
79e55b6dcf SPIGOT-1107: Shift clicking and delegation for custom inventories
PR #398
2017-08-18 18:54:49 +10:00
Lukas Hennig
e1f296d115 Fix CraftBanner initialisation. 2017-08-07 17:55:47 +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
20ab5d3d10 Add build delay back 2017-08-04 16:09:17 +10:00
md_5
2a927e8638 Update to Minecraft 1.12.1 2017-08-03 23:00:00 +10:00
md_5
9a1fc1e2ee Remove outdated build delay. 2017-08-03 21:10:43 +10:00
md_5
b5dc294d32 SPIGOT-3485: Launch shulker bullets as projectiles 2017-08-03 08:23:27 +10:00
BillyGalbreath
d2aa6845f0 Implement BroadcastMessageEvent 2017-07-28 16:53:43 +10:00
md_5
b1b9ab0df9 SPIGOT-3461: Standardise plugin load timing 2017-07-26 13:20:29 +10:00
md_5
d35483b0e1 Correct scheduler behaviour with intervals of >= Integer.MAX_VALUE (circa 3 years). 2017-07-25 15:36:44 +10:00
md_5
4670a84bd9 SPIGOT-3432: Add playNote support for new sounds 2017-07-24 17:44:44 +10:00
md_5
5a12442f22 SPIGOT-3433: Improve AreaEffectCloud#getSource 2017-07-22 09:51:22 +10:00
md_5
9a82fa7785 SPIGOT-3428: Recover from invalid firework data 2017-07-19 09:56:35 +10:00
md_5
70be90e168 SPIGOT-3425: Correct slot type calculation 2017-07-16 11:03:19 +10:00
md_5
b5df1f59f7 SPIGOT-3423: Don't treat technical piston block as BlockStateMeta 2017-07-16 10:48:21 +10:00
md_5
e03b1a556d SPIGOT-3417: Event for shearing snowman 2017-07-15 09:53:22 +10:00
md_5
6659ddf11a SPIGOT-3416: Cap team prefix / suffix at correct value of 16 2017-07-13 12:42:45 +10:00
md_5
af1c0139f5 SPIGOT-3409: Improve performance of registering stupid amounts of permissions in plugin.yml 2017-07-10 21:05:47 +10:00
md_5
50b75cd65d SPIGOT-3407: Set damager for evoker fangs 2017-07-08 22:40:54 +10:00
md_5
11323bf873 Increase expiration time to two weeks. 2017-07-04 20:52:11 +10:00
BlackHole
d603539842 SPIGOT-3387: Prevent null enchantments in ItemMeta 2017-06-29 10:52:33 +10:00
md_5
477fb2bb72 SPIGOT-3381: Save older serialized enchants 2017-06-26 09:49:28 +10:00
md_5
d7cd7275f2 SPIGOT-3379: Generalise canPickupItems to other entities. 2017-06-26 08:34:52 +10:00
Jeremy Wood
1314229dc2 SPIGOT-3336: HideFlags will now serialize as a List rather than a Set.
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.
2017-06-23 12:48:15 +10:00
md_5
f3356f1074 Treat Vanilla commands as Bukkit Commands 2017-06-21 19:14:51 +10:00
md_5
6aa0fa3206 Increase expire time to 7 days 2017-06-17 17:45:09 +10:00
md_5
885da43758 SPIGOT-3342: Fix invalid usage of null in InventoryWrapper 2017-06-15 20:25:06 +10:00
md_5
2a2d6d6295 Add PistonMoveReaction getters for Entity 2017-06-12 19:23:24 +10:00
md_5
f85977ae6f SPIGOT-3331: New map colours don't display 2017-06-12 19:16:30 +10:00
md_5
ed8c725d19 SPIGOT-3304: Respect duration from Vanilla /weather 2017-06-09 16:17:08 +10:00
md_5
bb4ae3b3b8 Update to Minecraft 1.12 2017-06-08 18:00:00 +10:00
md_5
701b06494d SPIGOT-3286: Call BlockFormEvent for Concrete Powder -> Concrete 2017-06-03 17:39:03 +10:00
md_5
921ba53556 SPIGOT-3283: Don't allow plugin induced infinite velocity / position 2017-06-02 18:44:37 +10:00
md_5
9496c2dad1 SPIGOT-3284: Allow TNTPrimed#getSource to return invalid entities
Eg dead players.
2017-06-02 18:28:30 +10:00
md_5
e13d119686 Update to Minecraft 1.12-pre6 2017-05-30 21:55:13 +10:00
BlackHole
c155d8dd32 SPIGOT-3277: Fix Entity.eject() 2017-05-28 22:27:57 +02:00
md_5
c037fe3d44 Add color API for Teams 2017-05-28 11:00:02 +10:00
Pokechu22
44dd60ac27 SPIGOT-3272: Fix duplicate creative inventory
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).
2017-05-28 10:32:31 +10:00
MiniDigger
274304b8ca SPIGOT-439: Add player locale related APIs. 2017-05-27 19:06:28 +10:00
md_5
a479029a85 Ensure gameLoop function gets selectors applied. 2017-05-26 16:43:56 +10:00
md_5
4377dac138 SPIGOT-3253: Fix entity yaw changes 2017-05-20 11:16:28 +10:00
md_5
1004352990 Update to Minecraft 1.12-pre5 2017-05-19 21:00:13 +10:00
BlackHole
3ecbb59cbb SPIGOT-3248: Don't set shoulder compounds of EntityHuman to null 2017-05-18 07:34:25 +10:00
md_5
45102fcf28 Misc advancement / recipe reload fixes including SPIGOT-3240 2017-05-16 21:22:07 +10:00
md_5
c410240567 SPIGOT-3240: Temporarily stub out rarely used resetRecipes method to fix some issues. 2017-05-16 06:58:37 +10:00
md_5
743252dbe5 SPIGOT-3238: Add Server.advancementIterator 2017-05-15 08:25:53 +10:00
md_5
5195487ec6 Update to Minecraft 1.12-pre2 2017-05-14 12:00:00 +10:00
md_5
6e3cec8bc7 Change book limit to allow for automatically generated colour codes 2017-05-14 11:19:38 +10:00
md_5
36e3402814 Remove outdated build delay. 2017-05-14 10:35:01 +10:00
Lukas Hennig
2b6c9f40ae Set health before entity death. 2017-05-04 19:18:46 +10:00
BlackHole
fbb47e8383 SPIGOT-3215: Call BlockPhysicsEvent for tall plants 2017-05-01 19:49:37 +10:00
md_5
fecf4b4137 SPIGOT-3214: Allow book titles up to 32 even though they can't be created by a Vanilla client. 2017-04-30 13:20:43 +10:00
Matthew
d9d7552262 Implement getColor / setColor for Shulker entity 2017-04-30 09:54:34 +10:00
Pokechu22
a2af8f0a73 SPIGOT-3207: Fix hiding players in a BukkitRunnable after joining
This happened because "joining" wasn't cleared until the player was ticked.  Runnables (presumably) ran _after_ the player list packet was sent, but before the player was ticked; thus, the player list packet was sent, but not cleared.  The fix is to replace joining with hasSentListPacket, which is set immediately before sending any player list packets (thus, if hidePlayer is called after, it sees that the list packet has been sent and sends a new one to reset it).  With this fix, the player is added to the list and then removed shortly afterwards.

The reason why running /hideall in the example wouldn't fix the invisibility is because the server already thinks the player's been removed from the list (as they're hidden), and thus doesn't want to send another hide packet.  This is correct behavior assuming that they get hidden correctly the first time, which they now do.
2017-04-28 15:27:57 +10:00
Matthew
55a1f9ff12 Implement getColor / setColor for TippedArrow 2017-04-26 20:28:27 -04:00
md_5
28d993ccec Skip invalid enchants in CraftMetaItem 2017-04-26 15:45:52 +10:00
Senmori
c19c2932bf Create NBT TypeId helper class 2017-04-22 15:50:30 +10:00
md_5
4acd0f49e0 Enforce proper limits on books. 2017-04-20 21:45:42 +10:00
md_5
be9ef980b9 Implement cooldown API 2017-04-19 18:04:32 +10:00
Lukas Hennig
e04a1793ae Inventory getContents Cleanup 2017-04-17 18:09:15 +10:00
md_5
e17c3d285b Make CraftJukebox.isPlaying locally consistent 2017-04-16 08:26:51 +10:00
md_5
473febc73a Add correct interfaces for comparator / daylight detector 2017-04-16 08:16:49 +10:00
md_5
ac405c3cd4 Fix some blockstate consistency issues. 2017-04-15 18:01:44 +10:00
Pokechu22
1ac133ecc5 SPIGOT-3182: Fix tab-completion in command blocks without leading slash 2017-04-13 17:57:47 -07:00
md_5
b5f7b6d69f SPIGOT-3157: Use Vanilla gamemode change code 2017-03-31 21:21:11 +11:00
Senmori
319013857d Add Chunk.isSlimeChunk to check if a chunk can spawn slimes 2017-03-24 15:17:47 +11:00
md_5
91c315273e Fix trailing whitespace in CraftChunk 2017-03-23 20:19:29 +11:00
Parker Hawke
b80055abfb Properly validate player experience bar progress 2017-03-19 18:31:40 -04:00
bramhaag
dfee3d9f9f Add getWidth + getHeight for Entity 2017-03-19 10:51:59 +11:00
md_5
2aa5ac6c92 SPIGOT-3128: Shift VehicleCreateEvent calling. 2017-03-15 20:48:47 +11:00
md_5
eac85911f0 Don't call super update on unplaced command block metas 2017-03-10 20:30:20 +11:00
md_5
962ffda1a8 Add more notch inventory conversions 2017-03-10 20:03:31 +11:00
md_5
d6aa73d16c SPIGOT-3114: Initialize custom SHULKER_BOX slots 2017-03-10 20:01:31 +11:00
md_5
4316a8c246 SPIGOT-3110: SHULKER_BOX InventoryType 2017-03-08 17:56:08 +11:00
md_5
7fce67144d SPIGOT-3108: Hack around mirroring empty item stacks 2017-03-08 14:35:34 +11:00
md_5
4448a7efa4 SPIGOT-3068: API for localized item names 2017-02-16 11:49:46 +11:00
Max Lee
4c8d895513 SPIGOT-2152: Method to set resource pack + hash. 2017-02-15 10:05:56 +11:00
md_5
a552117725 SPIGOT-3054: Correct LLamaSpit launching 2017-02-09 09:14:44 +11:00
md_5
3c48711c05 SPIGOT-3051: Set pitch/yaw for spawned boats 2017-02-06 11:58:42 +11:00
Parker Hawke
dfe4ed1c3e Add implementation for LlamaSpit in ProjectileSource#launchProjectile 2017-02-01 13:14:41 +11:00
md_5
5ae629285e Increase expiration time to two weeks. 2017-01-31 21:39:17 +11:00
md_5
c1aa85918e SPIGOT-3040: Round health to float for validation 2017-01-28 11:41:09 +11:00
md_5
dbf4ecf30f SPIGOT-3037: WorldBorder#isInside(Location) 2017-01-26 11:16:39 +11:00
xGhOsTkiLLeRx
7fdc749bf1 Add API to set Arrow pickup status 2017-01-18 10:01:28 +11:00
md_5
775f1e1f7f SPIGOT-3003: Fix custom dropper / beacons. 2017-01-11 09:53:16 +11:00
md_5
730bb6ac83 10 day build expire 2017-01-09 10:38:33 +11:00
Zach Brown
059434ce92 SPIGOT-826: Add method to retrieve entity by UUID 2017-01-05 14:54:47 +11:00
md_5
7e19325845 SPIGOT-2640: API for multiple passengers per entity 2017-01-04 10:53:07 +11:00
md_5
613be0d841 SPIGOT-2980: Improve SpawnEgg NBT application and ItemStack conversion. 2017-01-02 16:13:25 +11:00
md_5
a6d8fa2eac Recover spawn egg data from UNSPECIFIC meta. 2017-01-02 15:29:11 +11:00
md_5
5715b3a6d9 SPIGOT-2977: Pass setAmount(0) through to wrapped ItemStack.
This class needs to be rewritten with more consistent semantics and alignment with Minecraft losing null, but that is probably a job for 1.12
2017-01-02 10:04:19 +11:00