Commit Graph

2855 Commits

Author SHA1 Message Date
Aikar
079a793b51
Revert "Only consider chunks Loaded if at BORDER status"
This reverts commit 9efe071062.

Issues have been found post merge that sadly no one discovered during test builds.
Reverting for now until we can identify the issue and do another test round.
2020-09-21 22:12:28 -04:00
Mariell Hoversholm
eda80e3d7c Prevent fire from spreading to invalid locations 2020-09-21 21:09:04 +02:00
Aikar
826e09f369
Light improvements
Trying to solve random hangs we've seen, ensuring that this part of code isnt the culprit

also fixing a vanilla bug reportedby PhiPro where tickets are released too early
hoping this reduces amount of incorrect light issues.
2020-09-19 14:04:25 -04:00
Aikar
e3e1191ac9
Preserve initial velocity of spawned entities - Fixes #4292 2020-09-19 13:19:34 -04:00
Aikar
bd648dfb47 Optimize some methods for inlining
Adds final to some methods to improve inlining ability
2020-09-19 12:54:05 -04:00
Aikar
9efe071062 Only consider chunks Loaded if at BORDER status
This greatly improves performance as it drastically reduces the amount
of Entities and Tile Entities that are "registered" into the world, as
purely "cached" chunks will no longer have their entities hanging out in the world.

Additionally this fixes our Entity Add To World and Entity Remove From World events

Those events have not been firing correctly since MC changed how chunks work here.

Now the server will only consider a chunk "loaded" if it's got a ticket putting
it at level 33 or lower, which matches the public Bukkit API.
2020-09-19 12:54:05 -04:00
Shane Freeder
298c9022b0 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:
ccb9614e #548: LivingEntity - add methods for getting/setting invisibility

CraftBukkit Changes:
f8d4da08 #743: LivingEntity - add methods for getting/setting invisibility

Spigot Changes:
17d78dbd Rebuild patches
2020-09-19 12:29:53 +01:00
Shane Freeder
d802a50a9a Extend block drop capture to capture all items added to the world (Fixes #4307)
Closes #4316
2020-09-17 00:40:07 +01:00
Aikar
613bdc3f96
[Auto] 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:
d75d8a38 #549: Add Fluid types / tags

CraftBukkit Changes:
890130b46 #746: Add Fluid types / tags
2020-09-14 05:57:06 -04:00
Aikar
e6faa36eb9
Cache DataFixerUpper Rewrite Rules on demand
Mojang precaches every single potential rewrite rule that could ever
exist on server startup. This includes rules from all the way back to versions from 6+ years ago.

This is the source of why the server hogs every CPU core at 100% every start.

For anyone who hard resets for updates or has force upgraded their entire world, this
results in completely wasted cpu cycles.

This massive CPU usage also delays server startup time.

We improve this by making "min version to precache" that defaults to a future version
so that no rewrite rules are precached.

someone who expects to be converting a lot chunks could theoretically set
-DPaper.minPrecachedDatafixVersion=<dataVersionConvertingFrom> as a startup
parameter and only build from that point on.

However this will likely never be needed as the server will still run
the same cache logic on demand when it's actually needed. The only
cost would be some delay on the FIRST chunk conversion, but paper already
runs chunk conversions on another thread so this will likely never be
a concern for TPS.

This patch will significantly reduce CPU use on startup, reduce memory usage,
and improve server startup time.
2020-09-12 17:56:00 -04:00
Mariell
a0b8b886c8
Updated Upstream (CraftBukkit/Spigot) (#4318)
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:
d5a72960 SPIGOT-6063: ConsoleSender sending extra lines in Java 13+

Spigot Changes:
2740d5ae Rebuild patches
2020-09-12 15:57:21 -04:00
Aikar
fb71c71c80
Restore thread pool names for Bootstrap vs main
1.16.2 introduced 2 thread pools for Bootstrap vs main we didn't account for.

This also sets Bootstrap priority to be 1 less thread priority too so MC Main threads will always have
more priority specially on servers running multiple instances, since bootstrap tends to use up all CPU.
2020-09-12 11:25:30 -04:00
Aikar
5b352d9b33
[Auto] 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:
91957aa3 #550: Add getHandlerList into ArrowBodyCountChangeEvent
30dc3e37 Update deprecation message for PotionMeta.setMainEffect

CraftBukkit Changes:
6f55306c4 SPIGOT-5794: Only skip interact event if position, hand and itemstack are equal
2020-09-11 18:42:19 -04:00
Aikar
7d85344efd
(1.16.3) Missed some fixes to include in commit 2020-09-10 19:56:58 -04:00
Aikar
64ed429884
(FIRST 1.16.3): Update Paper to 1.16.3
This is a pretty tiny update with very little changed. Recommended to update
from 1.16.2 ASAP as 1.16.2 is now no longer supported.

Plugins should mostly remain working as the NMS revision did not change.
2020-09-10 19:47:58 -04:00
Aikar
fa9c5e0f95
(FINAL 1.16.2) Improve Entity Activation Range passenger behavior
Previously, Entity Activation Range only applied to the root entity of a vehicle chain.
If that vehicle is active, every entity as it's passenger would then tick.

This creates scenarios where EAR does not apply your desired ranges to passengers.
Additionally, any entity that was a passenger never had its inactiveTick method called
when the parent was inactive, creating behavioral desyncs.

This could of been a source of many villager issues when those villagers were in minecarts
as players commonly do.

Now we will process passengers checking their activation state independently of their vehicle
and if they are inactive, call their inactiveTick() method to ensure state remains consistent.

This also helps improve any desync issues with entity position of passengers too.

This also removes immunity for passenger/vehicles, so it should improve performance
of these minecart villagers too for EAR.
2020-09-10 19:08:02 -04:00
Aikar
6fda3fd0ed
(FINAL 1.16.2) Improve Timings support for Active vs Inactive vs Passengers
This makes it so entities that are passengers of other entities no longer count in the parents timings, as well as
tracks them as a separate timers per their tick status.

This lets you see how much time is spent in activated entities vs inactive (as inactive still has to do work)

Passengers is also tracked separately so you can identify "Villagers in Minecarts" vs roaming villagers, as
the lack of ability to move can impact their performance characteristics.

This will likely break any plugin that was naughty and directly messed with our internal timings as this
moves the timings to the EntityTypes object, speeding up creation of Entities to no longer store
a timing handler object per entity.

This will also change the output of the entities in timings to use internal ID's instead of class names.

If a plugin is broken by this, shame them for doing bad things. Paper will not fix it, they will have to fix it.
2020-09-10 19:08:02 -04:00
JRoy
794e6baf14 Add additional open container api to HumanEntity 2020-09-10 20:31:49 +02:00
Shane Freeder
44e822f7cf Fix block data exception when cancelling PortalCreateEvent (#4199) 2020-09-10 09:02:22 +01:00
Aikar
4be8312fe7
[CI-SKIP] [Auto] Rebuild Patches
A recent commit has been made that caused patches to be out of order, rebuilding
2020-09-03 21:52:16 -04:00
Daniel Ennis
43e5174a01
Fix Entity Teleportation and cancel velocity if teleported (#4210) 2020-09-03 21:48:44 -04:00
Aikar
0fb3daf4f6
[Auto] 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:
a05df28a7 SPIGOT-6122: Revert "SPIGOT-5794: Do not skip PlayerInteractEvent"
2020-09-03 16:52:21 -04:00
MiniDigger
819ff32435 Use wrapped StructureManager to prevent worldgen deadlock 2020-09-03 12:56:03 +02:00
Joshua Dean Küpper
507f302cd2 Fix Zombie ShouldBurnInDay API (#4268) 2020-09-03 12:35:37 +02:00
Aikar
ef5af6f604
[Auto] 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:
1d7440332 #745: Fix getLocation for Cartography Table and Stonecutter
2020-09-03 04:47:24 -04:00
miclebrick
c247857fd4 Cache block data strings 2020-09-02 14:11:44 +02:00
Aikar
ce2eae5ce3
[Auto] 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:
b56e8160 #519: Add ArrowBodyCountChangeEvent

CraftBukkit Changes:
39806409e #697: Add ArrowBodyCountChangeEvent
2020-09-02 05:12:25 -04:00
Shane Freeder
563f77ad23
install remapped server jar to paper package space
Spigot has been stripping the minecraft-server jar down in order to
reduce it's size, primarily by removing classes they don't use from
fastutil. as we use fastutil and offer it as API, this is useless
to us, and creates headaches when it breaks builds due to spigots
version of this being installed.
2020-09-01 23:20:58 +01:00
Aikar
1ab021ddca 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:
565a5727 #533: Add consumed item, hand and consumeItem boolean to EntityShootBowEvent

CraftBukkit Changes:
927200a9 #718: Add consumed item, hand and consumeItem boolean to EntityShootBowEvent
2020-08-31 08:30:51 -04:00
chickeneer
c970f88057
Properly pass the close reason for new inventory opens (#2658) (#4247) 2020-08-31 07:12:14 -04:00
ysl3000
07bca94f71 Create HoverEvent from ItemStack Entity
add myself to MIT list

Co-authored-by: Mariell <proximyst@proximyst.com>
Co-authored-by: MiniDigger <admin@minidigger.me>
2020-08-31 12:27:30 +02:00
MeFisto94
da33f8bbe1 Add a way to get translation keys for blocks, entities and materials 2020-08-31 11:56:32 +02:00
BillyGalbreath
5a20cbd759 Add more Evoker API 2020-08-31 11:22:26 +02:00
Aikar
b0cbebdc7b
Fix build conflicts 2020-08-30 14:38:49 -04:00
Mariell
dfc54a8b92
Add zombie targets turtle egg config (#4181)
Co-authored-by: BillyGalbreath <Blake.Galbreath@GMail.com>
2020-08-30 14:27:50 -04:00
Eearslya Sleiarion
0fe00f61fd
Add BellRingEvent for village bells (#2230) 2020-08-30 14:26:15 -04:00
Daniel Ennis
5c7f3fc091
Fix PersistentDataContainer contract violation (_->!null returns null) (#3990) 2020-08-30 14:02:34 -04:00
Aikar
65dbf5ff0c
[CI-SKIP] [Auto] Rebuild Patches
A recent commit has been made that caused patches to be out of order, rebuilding
2020-08-30 14:02:15 -04:00
Josh Roy
7ed0f7f003
Fix NPE in getBedSpawnLocation (#4238) 2020-08-30 13:59:14 -04:00
foss-mc
6c138412fb
Fix CraftTeam null check (#4249) 2020-08-30 11:33:25 -04:00
Mariell Hoversholm
a67abf5b2a Increase visibility of a few methods
Fixes PaperMC/Paper#4094.
2020-08-29 10:22:30 +02:00
Aikar
7d69214b54
[Auto] 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:
00bff0270 SPIGOT-5794: Do not skip PlayerInteractEvent
2020-08-29 00:17:19 -04:00
Mariell Hoversholm
cbfc236260
PortalCreateEvent needs to know its entity
Fixes PaperMC/Paper#4076.
2020-08-28 20:46:00 +02:00
Mariell Hoversholm
29032edb5b
Fix PersistentDataContainer contract violation (_->!null returns null) 2020-08-28 20:40:58 +02:00
Aikar
f42c53dfeb
[CI-SKIP] [Auto] Rebuild Patches
A recent commit has been made that caused patches to be out of order, rebuilding
2020-08-28 07:42:03 -04:00
Mariell Hoversholm
3efe45f56d Port Eigencraft to 1.16 2020-08-28 13:38:55 +02:00
stonar96
0bad695802 Make engine-mode 2 truly random
Up to now a simple counter variable was used to iterate through the
hidden-blocks in engine-mode 2 while obfuscating. This results in low
quality obfuscation.

One could for example easily write a hack, which bypasses Anti-Xray
by not showing ores, which have a certain pattern.

Furthermore, engine-mode 1 is slightly optimized by this commit.
However, engine-mode 2 is probably somewhat slower. I did some tests but
I wasn't able to get stable results for some reason. Therefore this
needs further testing.

An optimized random algorithm is utilized to pick random blocks from the
hidden-blocks list. This implementation uses xorshift and integer
multiplication for bounding. The resulting distribution is negligibly
biased because xorshift doesn't generate 0 and integer multiplication
also implies biased results.
2020-08-28 13:20:21 +02:00
Shane Freeder
cd06ca5eb8
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:
3f572834 #740: Fix EntityDamageEvent not being called for non EntityDamageSource for End Crystals
3c7143e7 SPIGOT-5953, SPIGOT-5914: Use LinkedHashMap to keep captured block states in order
2020-08-28 12:06:39 +01:00
Professor Bloodstone
ef36b4f80c Fix TNT not pushing creative players 2020-08-28 12:51:11 +02:00
JRoy
915fe5225e Fix hex colors not working in some kick messages 2020-08-28 12:29:41 +02:00