Commit Graph

162 Commits

Author SHA1 Message Date
Spottedleaf
5dc46cd3b2 Move getTypeIfLoaded and friends to IBlockAccess (#2077) 2019-05-27 01:14:14 -05:00
Spottedleaf
90141ff411 Handle gen flag for placeholder getChunkAtAsync (#2079)
Also fix a loadChunk call in heightmap api
2019-05-27 00:17:12 -05:00
Zach Brown
7fe6e643d1
Check property exists before playing chest close sound
There is an artificial delay added to chest close sounds (of 10 ticks)
to make them "feel" more true to vanilla. The problem is that because of
this delay it is possible for the block to be removed by the time the
sound plays.

With 1.14 in the state it is the timing necessary to encounter this
issue has increased.

The correct fix is to just return early if the property checked for in
the TileEntityChest sound method does not exist for the block at the
current location.

Fixes GH-2074
2019-05-26 23:42:39 -05:00
Shane Freeder
d627cfa110
Updated Upstream (CraftBukkit)
Upstream has released updates that appears to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

CraftBukkit Changes:
17da3420 Fix reading custom persistent entity data
83783357 SPIGOT-4980: Shields will not be put on cooldown when hit with an axe
8d0f3722 SPIGOT-4752: Fixed inconsistency between isChunkLoaded and chunk load/unload events
3f9f31c3 SPIGOT-4982: Armor disappearing while breaking the armor stand
2019-05-26 02:56:30 +01:00
Zach Brown
d84080e6d1
MC 1.14.1 2019-05-13 21:20:58 -05:00
Shane Freeder
026210202b
Fix MCUtils and other calls to postTaskOnMain
Method changed changed it's role to providing a TickTask object which
isn't automatically scheduled onto the server
2019-05-10 18:42:33 +01:00
Spottedleaf
e9439e7655 It compiles 2019-05-06 12:30:27 -07:00
Spottedleaf
eeb2ecd789 Update Upstream 2019-05-05 19:58:04 -07:00
Spottedleaf
cb24079b77 More compile error fixes 2019-05-05 17:57:14 -07:00
Spottedleaf
87759ffbb4 Fix some compile errors 2019-05-05 16:24:37 -07:00
Spottedleaf
027575df7f Fix some issues on the list 2019-05-05 14:39:51 -07:00
Spottedleaf
096e29ccfe Shove decompile fixes into the proper patch 2019-05-05 11:09:29 -07:00
Shane Freeder
7e6db27085 Aim towards real 1.14 2019-04-25 07:53:51 +01:00
Shane Freeder
a64c1a03c9 More work towards 1.14 pre5 2019-04-24 02:00:24 +01:00
Shane Freeder
6c3f04049d Initial work on 1.14 pre-5 2019-04-23 10:35:52 +01:00
Shane Freeder
fb25dc17c6 Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appears to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
da08d022 SPIGOT-4700: Add PlayerFishEvent.State.REEL_IN
0cef14e4 Remove draft API from selectEntities

CraftBukkit Changes:
a46fdbc6 Remove outdated build delay.
3697519b SPIGOT-4708: Fix ExactChoice recipes neglecting material
9ead7009 SPIGOT-4677: Add minecraft.admin.command_feedback permission
c3749a23 Remove the Damage tag from items when it is 0.
f74c7b95 SPIGOT-4706: Can't interact with active item
494eef45 Mention requirement of JIRA ticket for bug fixes
51d62dec SPIGOT-4702: Exception when middle clicking certain slots
be557e69 SPIGOT-4700: Add PlayerFishEvent.State.REEL_IN
2019-04-22 22:36:14 +01:00
Aikar
be067fea11
PlayerDeathEvent#getItemsToKeep
Exposes a mutable array on items a player should keep on death.

This allows a cleaner method to implement "Keep certain items on death"
than how plugins currently do it in that it never removes them in first
place, so its safe if the player logs out/server is shutdown before respawn.

Example Usage: https://gist.github.com/aikar/5bb202de6057a051a950ce1f29feb0b4
2019-03-28 01:12:38 -04:00
Aikar
458aa79f63
Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appears to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
451bd74e Use gson for decoding version command

CraftBukkit Changes:
51100db8 SPIGOT-4678: Fix placing signs in certain circumstances
2019-03-24 12:33:39 -04:00
Aikar
17b58d00d8
Unwrap Event Exceptions
This was a useless exception wrapper that ends up making
stack traces harder to read as well as the JVM cutting off
the important parts

Nothing catches this exception, so its safe to just get rid
of it and let the REAL exception bubble down
2019-02-23 12:17:41 -05:00
Shane Freeder
c608a94ff7
Use OBFHELPER in previous commit 2019-01-06 17:48:24 +00:00
Shane Freeder
f4e3b4e439
Updated Upstream (Bukkit/CraftBukkit/Spigot)
Upstream has released updates that appears to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
5b680f0b Note maximum objective score length in documentation

CraftBukkit Changes:
5932f8a7 Load default world spawn areas in consistent order
3a5dc78f Fix confusing migration message appearing on fresh server
516a408f Remove redundant CraftBukkit change for secondary world data
73a2c749 Process conversation input on the main thread.
100c3f07 Cap Objective Score Length
6e842759 Cross World Entity Teleportation
7deba1c6 Check for blank OfflinePlayer Names
f2746a5e Descriptive kick reasons instead of Nope!
b0212308 Cap Channel Registrations
a610dcd8 Identify CraftScheduler threads with useful names

Spigot Changes:
19c3c5a5 Rebuild patches
2019-01-06 17:15:21 +00:00
Shane Freeder
b68b282439
Updated Upstream (Bukkit/CraftBukkit/Spigot)
Upstream has released updates that appears to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Warning: this commit contains more mapping changes from upstream, As always, ensure that you
have working backups and test this build before deployment; Developers working on paper will,
yet again, need to delete their work/Minecraft/1.13.2 folder

Bukkit Changes:
7fca5fd4 SPIGOT-4558: Preserve user order in the face of copied defaults in configurations
15c9b1eb Ignore spurious slot IDs sent by client, e.g. in enchanting tables
5d2a10c5 SPIGOT-3747: Add API for force loaded chunks
d6dd2bb3 SPIGOT-3538: Add getHitBlockFace for ProjectileHitEvent
771db4aa SPIGOT-794: Call EntityPlaceEvent for Minecart placement
55462509 Add InventoryView#getSlotType
2f3ce5b6 Remove EntityTransformEvent and CustomItemTagContainer from draft API
f04ad7b6 Make ProjectileLaunchEvent extend EntitySpawnEvent
ccb85808 Define EntitySpawnEvent
b8cc3ebe Add PlayerItemDamageEvent
184a495d Ease ClassLoader Deadlocks Where Possible
11ac4728 Expand Boolean Prompt Values in Conversation API
aae62d51 Added getAllSessionData() to the Conversation API.
9290ff91 Add InventoryView#getInventory API
995e530f Add API to get / set base arrow damage

CraftBukkit Changes:
c4a67eed SPIGOT-4556: Fix plugins closing inventory during drop events
5be2ddcb Replace version constants with methods to prevent compiler inlining
a5b9c7b3 Use API method to create offset command completions
2bc7d1df SPIGOT-3747: Add API for force loaded chunks
a408f375 SPIGOT-3538: Add getHitBlockFace for ProjectileHitEvent
b54b9409 SPIGOT-2864: Make Arrow / Item setTicksLived behave like FallingBlock
79ded7a8 SPIGOT-1811: Death message not shown on respawn screen
b4a4f15d SPIGOT-943: InventoryCloseEvent called on death regardless of open inventory
0afed592 SPIGOT-794: Call EntityPlaceEvent for Minecart placement
2b2d084a Add InventoryView#getSlotType
01a9959a Do not use deprecated ItemSpawnEvent constructor
9642498d SPIGOT-4547: Call EntitySpawnEvent as general spawn fallback event
963f4a5f Add PlayerItemDamageEvent
63db0445 Add API to get / set base arrow damage
531c25d7 Add CraftMagicNumbers.MAPPINGS_VERSION for use by NMS plugins
d05c8b14 Mappings Update
bd36e200 SPIGOT-4551: Ignore invalid attribute modifier slots

Spigot Changes:
518206a1 Remove redundant trove depend
1959ad21 MC-11211,SPIGOT-4552: Fix placing double slabs at y = 255
29ab5e43 SPIGOT-3661: Allow arguments in restart-script
7cc46316 SPIGOT-852: Growth modifiers for beetroots, potatoes, carrots
82e117e1 Squelch "fatal: Resolve operation not in progress" message
0a1a68e7 Mappings Update & Patch Rebuild
2019-01-01 03:29:51 +00:00
Shane Freeder
0318e62b45
Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appears to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
0969eedc Clarify furnace burn time behaviour as per SPIGOT-844
16453bfd SPIGOT-4503: Add API to insert complete ItemStack into Jukebox

CraftBukkit Changes:
dff66dfc Reduce copying of positions from block states
91cae6ef SPIGOT-4387: Durability looping from cancelled BlockPlaceEvent
24c5e68c SPIGOT-4493: Allow burnt out furnaces to remain lit like Vanilla whilst retaining SPIGOT-844 API
bc943daf Fix Jukebox API not synchronizing playing data with state
fe89a8c1 SPIGOT-4503: Add API to insert complete ItemStack into Jukebox
fc102494 Make CraftBlockState use BlockPosition
89ab4887 SPIGOT-4543: Jukebox playing calls should not use legacy data
6ff5a64c SPIGOT-4541: Cancelled bucket events require inventory update
2018-12-23 17:04:13 +00:00
Shane Freeder
3496f2d7e4
Updated Upstream (Bukkit/CraftBukkit/Spigot)
Developers!: You will need to clean up your work/Minecraft/1.13.2 folder for this

Upstream has released updates that appears to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
b850a822 SPIGOT-4526: Add conversion time API for Zombie & subclasses

CraftBukkit Changes:
38cf676e SPIGOT-4534: CreatureSpawnEvent not being called for CHUNK_GEN
b446cb5d SPIGOT-4527: Fix sponges with waterlogged blocks
6ec8ea5c SPIGOT-4526: Add conversion time API for Zombie & subclasses
c64fe508 Mappings Update
a3c2ec03 Fix missing ServerListPingEvent call for legacy pings

Spigot Changes:
1dc156ce Rebuild patches
140f654d Mappings Update
2018-12-17 05:19:39 +00:00
Shane Freeder
1387cff4e8
Update for Minecraft 1.13.2 2018-10-23 00:16:21 +01:00
BillyGalbreath
8c7f0e79ce Add more Witch API (#1564) 2018-10-18 23:24:09 -04:00
Aikar
459987d69f
More improvements to activation range, improve turtles
improved the water code so that immunity wont trigger if the entity
has the water pathfinder system active, so this improves support
for all entities that know how to behave in water.

Merged 2 EAR patches together, and removed an MCUtil method that
doesnt have a purpose anymore
2018-10-04 23:18:46 -04:00
Aikar
a4df5ddee7
Report errors correctly from FutureTasks
Anything that posts something to main thread was not
correctly reporting their errors to the logger, passing the
ExecutionExcetion instead of the cause. This resolves that,
as well as patches some simple cases of System.nanoTime where mojang
had used a LongSupplier to use a different method on client.
2018-10-04 01:45:11 -04:00
Zach Brown
10209bfbd8
Do not allow null in CanPlaceDestroy NBT API
Fixes GH-1523
2018-10-02 22:54:38 -04:00
BillyGalbreath
997190c3e0 Add ray tracing methods to LivingEntity (#1410)
This method will return the Block a player is looking at while taking into consideration the AABB of each block in the path.

For example, you can look through the 1/4 space of air in a Stair block and get the block behind it instead of the Stair block you are looking past.
2018-09-03 19:59:54 -04:00
Aikar
0aad8bfc1c
Updated Upstream (CraftBukkit)
Upstream has released updates that appears to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

CraftBukkit Changes:
dc69d2b3 Fix unbound shaped recipe ingredients
2018-09-01 00:30:04 -04:00
Aikar
d089acb3bd
Switch to using ForgeFlower for Paper Only mc-dev imports
ForgeFlower is better than Spigots FernFlower at decompiling the source.

However, in order to maintain the CraftBukkit patches, we must keep
using spigots for the primary.

However, for any file that we import on top of Spigots imported files
there is nothing stopping us from using better decompiled files.

So these changes will use ForgeFlower to maintain a better set of
decomped files, so anything we add on top of Paper can start off
in a better spot.
2018-08-31 23:47:57 -04:00
Zach Brown
9ac7577de3
Update upstream CB 2018-08-27 11:07:22 -04:00
Aikar
835bc39b03
Paper 1.13.1 Update
Updated Upstream (Bukkit/CraftBukkit/Spigot)

Bukkit Changes:
2dcc44dc SPIGOT-4307: Fix hacky API for banners on shields
e0fc6572 SPIGOT-4309: Add "forced" display of particles
efeeab2f Add index to README.md for easier navigation
f502bc6f Update to Minecraft 1.13.1

CraftBukkit Changes:
d0bb0a1d Fix some tests randomly failing
997d378d Fix client stall in specific teleportation scenarios
b3dc2366 SPIGOT-4307: Fix hacky API for banners on shields
2a271162 SPIGOT-4301: Fix more invalid enchants
5d0d83bb SPIGOT-4309: Add "forced" display of particles
a6772578 Add additional tests for CraftBlockData
ce1af0c3 Update to Minecraft 1.13.1

Spigot Changes:
2440e189 Rebuild patches
4ecffced Update to Minecraft 1.13.1
2018-08-26 20:51:39 -04:00
stonar96
bd232d80da 1.13: Readd Anti-Xray (#1366)
* Decompile fixes for ProtoChunk and DataPaletteBlock

* Do changes

* final change

* more changes

* First Anti-Xray build

* Fixes and cleanups

* Cleanups and renamings

* Cleanups renamings and move OBFHELPERs to 0004-MC-Utils.patch

* Implement obfuscation for newly generated chunks

* Implement chunk edge mode

* Implement block updates

* Cleanups

* Rebuild patches
2018-08-25 22:37:58 -04:00
Aikar
716db7fb5e
[CI-SKIP] Re-add getBukkitEntity methods to child classes
Helps with development to not need to cast as much...

No clue why upstream makes some of the decisions they do....
2018-08-04 17:03:53 -04:00
Aikar
6b00d856be
Upstream update 2018-08-03 01:04:28 -04:00
Shane Freeder
8808629550
Update B/CB/S 2018-07-26 16:20:37 +01:00
Brokkonaut
af561492ab Fix broken block iteration (#1269)
Fixes https://github.com/PaperMC/Paper/issues/1259 and generation of the end pillars
2018-07-24 21:39:30 -04:00
Aikar
9a17bddf12
Update upstream 2018-07-23 19:41:14 -04:00
Shane Freeder
aad194a32e
Update B/CB/S 2018-07-23 09:44:57 +01:00
Aikar
b801b4baa8
Fix Chest open/close animations 2018-07-22 19:39:56 -04:00
Aikar
4dd6ddb86b
Re-add block inlining - Closes #1229
Also reordered MC Utils to be higher up
2018-07-22 18:46:13 -04:00
Zach Brown
5e2784e941
Switch to a bStats based Metrics system 2017-03-25 00:22:02 -05:00
Aikar
067c5c3f70 Fix String based Action Bar to use ChatComponent to handle proper escaping 2016-12-29 08:29:09 -05:00
Zach Brown
33163525f3
Update Paper to MC 1.11.1 2016-12-20 17:45:00 -06:00
Zach Brown
f9f1a2e97e
Cleanup obfuscation helper comment format 2016-07-28 19:09:54 -05:00
Aikar
0973e46de1 Update upstream 2016-06-22 22:18:41 -04:00
Techcable
bf40dd5557
Make entities look for hoppers
Cherry-pick of PR GH-319
2016-06-18 01:06:44 -05:00
Zach Brown
c442e96eb9
Update to Minecraft 1.10 2016-06-08 23:42:46 -05:00
Aikar
dfd19063f9 Ensure chunks never load async
Force operation to main thread if it occurs async
2016-05-27 22:28:23 -04:00
Zach Brown
3ab1f229c5
Re-add some method synchronization and move to a SingleThreadedExecutor in MCUtils 2016-05-22 21:17:19 -05:00
Aikar
484a23f437 Add Async Helper method to MCUtil 2016-05-16 20:50:09 -04:00
Aikar
024bc323bc More cases of avoiding marking active for chunks, to stop potential leaks 2016-05-13 22:27:20 -04:00
Aikar
bf2ed8af45 Fix chunk leak issue with queued light updates 2016-05-13 01:34:37 -04:00
Aikar
b59e2a51de Paper 1.9.4 Update 2016-05-12 01:01:13 -04:00
Aikar
211cba970b LootTable API & Replenishable Lootables Feature
Provides an API to control the loot table for an object.
Also provides a feature that any Lootable Inventory (Chests in Structures)
can automatically replenish after a given time.

This feature is good for long term worlds so that newer players
do not suffer with "Every chest has been looted"

API and Event added to control the Auto Replenish feature for players.
2016-05-04 19:46:28 -04:00
Aikar
845090e570 Ensure we actually removed entity from chunk before decrementing counts
If a plugin hacks into NMS and triggers entity removal, it could
result in an entity being attempted to remove from the chunk twice.

The 2nd pass will return false, as it did not find the entity in the list.

We should not touch entity counts if the entity was not removed, to avoid
going negative.
2016-04-15 21:31:12 -04:00
Aikar
a0d38c0b55 update MCUtil.cmpFromMessage to use proper JSON 2016-04-11 01:06:28 -04:00
Aikar
d03da137f2 Fix isEdgeOfChunk check for MCUtils 2016-03-31 22:17:33 -04:00
Aikar
dea2d41b86 Do not load chunks for light checks
Should only happen for blocks on the edge that uses neighbors light level
(certain blocks). In that case, there will be 3-4 other neighbors to get a light level from.
2016-03-31 19:29:06 -04:00
Aikar
9ff01b16ab Add MCUtils helper
This will be used by my next commit. But trying to get the build going
since CI blew up
2016-03-28 21:01:42 -04:00