Commit graph

136 commits

Author SHA1 Message Date
Brokkonaut
875c84df6f Fix broken block iteration (#1269)
Fixes https://github.com/PaperMC/Paper/issues/1259 and generation of the end pillars
2018-07-25 03:39:30 +02:00
Aikar
77c51f1785 Update upstream 2018-07-23 18:57:54 -04:00
Shane Freeder
0c14fc6ee6 Update B/CB/S 2018-07-23 09:39:55 +01:00
Aikar
84b819bcb8 Fix Chest open/close animations 2018-07-22 19:39:56 -04:00
Aikar
1fbc4f4d9b Re-add block inlining - Closes #1229
Also reordered MC Utils to be higher up
2018-07-22 18:46:13 -04:00
Aikar
6b5f080374 Add mc util methods 2018-07-22 00:45:49 -04:00
Shane Freeder
bd34c3623b NOT FINISHED! She compiles, and she... suffers the wrath of chunkgen... 2018-07-19 05:42:43 +01:00
Shane Freeder
aea45cba34 NF! 1.13 - more fixes 2018-07-19 00:31:45 +01:00
Shane Freeder
828dea48de NOT FINISHED! Fixed a few decomp issues 2018-07-17 16:14:23 +01:00
Aikar
6d1a918378 NOT FINISHED!!! Current Progress on 1.13-pre7 update
This work is 100% unfinished. I am pushing it up so that we as a team
can work on this update.

Do not try to use this branch. You will fail.
2018-07-14 21:53:17 -04:00
Aikar
8778a2ef97 Current Chunk for Entity and Block Entities, counts by entity type
This enables us a fast reference to the entities current chunk instead
of having to look it up by hashmap lookups.

We also store counts by type to further enable other performance optimizations in later patches.
2018-07-04 03:55:24 -04:00
Aikar
d9c9b9a3d2 LivingEntity Hand Raised/Item Use API
How long an entity has raised hands to charge an attack or use an item

Also aliased isHandsRaised for isChargingAttack in RangedEntity
2018-06-29 00:55:29 -04:00
Aikar
5a2b8d5cdc Move definition of fields up 2018-01-14 17:15:27 -05:00
Aikar
2e05bc73b3 PreCreatureSpawnEvent - Closes #917
Adds an event to fire before an Entity is created, so that plugins that need to cancel
CreatureSpawnEvent can do so from this event instead.

Cancelling CreatureSpawnEvent rapidly causes a lot of garbage collection and CPU waste
as it's done after the Entity object has been fully created.

Mob Limiting plugins and blanket "ban this type of monster" plugins should use this event
instead and save a lot of server resources.

See: https://github.com/PaperMC/Paper/issues/917
2018-01-14 17:02:38 -05:00
Aikar
41afad51da Improve Structures Checking
Improves performance by keying every chunk thats part of a structure to a hashmap
instead of only the first one.

This allows us to avoid iterating the entire structures value set to see
if a block position is inside of a structure.

This should have pretty decent performance improvement to any standard world
that has been around for a whilewith lots of structures due to ineffeciencies
in how MC stores structures (even unloaded chunks has structured data loaded)
2017-11-11 18:47:30 -05:00
Shane Freeder
6d76e5b46a Update B/CB/S 2017-11-08 16:13:57 +00:00
Shane Freeder
b1fa92a5e4 allow keepalive to wait longer for a client response
and also provide a bit more information in the server
logs so we can work out what is going on.
2017-10-15 14:00:42 +01:00
stonar96
3a9f17bc4b Anti Xray v2 (#858) 2017-10-05 14:38:21 +01:00
Zach Brown
ab4ae72fd5 Update to MC 1.12-pre2 2017-05-14 13:05:01 -05:00
Aikar
2c5f074c1d Fix String based Action Bar to use ChatComponent to handle proper escaping 2016-12-29 08:29:09 -05:00
Zach Brown
ec68dfff5a Update Paper to MC 1.11.1 2016-12-20 16:34:27 -06:00
Zach Brown
2ee4beaa3a Cleanup obfuscation helper comment format 2016-07-27 17:46:02 -05:00
Techcable
94a6e8cb09 Make entities look for hoppers
Cherry-pick of PR GH-319
2016-06-18 01:03:40 -05:00
Zach Brown
9b192b2708 Update to Minecraft 1.10 2016-06-08 22:57:14 -05:00
Aikar
e9c7cca230 Ensure chunks never load async
Force operation to main thread if it occurs async
2016-05-27 22:28:23 -04:00
Zach Brown
4e74c43218 Re-add some method synchronization and move to a SingleThreadedExecutor in MCUtils 2016-05-22 21:14:17 -05:00
Aikar
1a5414bc4e Add Async Helper method to MCUtil 2016-05-16 20:50:09 -04:00
Aikar
0c78971552 More cases of avoiding marking active for chunks, to stop potential leaks 2016-05-13 22:27:20 -04:00
Aikar
b6d0dd32c6 Fix chunk leak issue with queued light updates 2016-05-13 01:34:37 -04:00
Aikar
34fcd8ccc2 Paper 1.9.4 Update 2016-05-11 22:07:46 -04:00
Aikar
3da6be053f 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-01 23:54:08 -04:00
Aikar
75eb8243f7 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
87deb42c1c update MCUtil.cmpFromMessage to use proper JSON 2016-04-11 01:06:28 -04:00
Aikar
809051d050 Fix isEdgeOfChunk check for MCUtils 2016-03-31 21:43:37 -04:00
Aikar
baf8797e8f 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
0623a754d8 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