Commit graph

5027 commits

Author SHA1 Message Date
Aikar
99dd3ad303 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
0a05b29148 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 21:57:21 +02:00
Aikar
06e816fd71 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:23:34 -04:00
Automated
ff60225e01 [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
465e97513b (1.16.3) Missed some fixes to include in commit 2020-09-10 19:56:58 -04:00
Aikar
9f446a771f (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
2b164910c8 (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 18:09:10 -04:00
Aikar
09d97cf54e (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 18:02:39 -04:00
Josh Roy
e7375f54fe Add additional open container api to HumanEntity 2020-08-26 02:30:08 -04:00
Shane Freeder
d45b5f3499 Fix block data exception when cancelling PortalCreateEvent (#4199) 2020-09-10 09:02:22 +01:00
Automated
505d67bc0e [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:
b8ee6a89f SPIGOT-6125: Grass path should only fade when it is invalid at that location
2020-09-07 22:27:16 -04:00
Automated
f02c69831d [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:
a939fbdf0 SPIGOT-6123: Call EntityDamageEvent when a shulker bullet gets damaged
2020-09-06 04:22:24 -04:00
Daniel Ennis
6f266255ec Fix Entity Teleportation and cancel velocity if teleported (#4210) 2020-09-03 21:48:44 -04:00
Automated
55c99a8953 [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 | Martin
e113a7a6a0 Use wrapped StructureManager to prevent worldgen deadlock 2020-09-02 13:57:35 +02:00
Joshua Dean Küpper
976ac75539 Fix Zombie ShouldBurnInDay API (#4268) 2020-09-01 22:25:06 +02:00
Automated
46ddee2892 [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
Automated
02943637d5 [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:
0e90062a Remove draft API from entity persistence

CraftBukkit Changes:
13fc33f73 #744: Add ability to get location from smithing inventory
2020-09-02 18:27:18 -04:00
MiniDigger | Martin
e72b49b652 Fix javadoc (#4276) 2020-09-02 14:20:10 +02:00
miclebrick
593cdd29be Cache block data strings 2018-12-06 19:53:27 -05:00
Automated
7085579b6c [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
e233d9a058 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
e6f2cd150f 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
f92df32870 Properly pass the close reason for new inventory opens (#2658) (#4247) 2020-08-31 06:12:14 -05:00
ysl3000
8684dcd76e Create HoverEvent from ItemStack Entity
add myself to MIT list

Co-authored-by: Mariell <proximyst@proximyst.com>
Co-authored-by: MiniDigger | Martin <admin@minidigger.dev>
2020-07-06 22:19:08 +02:00
MeFisto94
21b927ed55 Add a way to get translation keys for blocks, entities and materials 2020-08-11 21:20:44 +02:00
BillyGalbreath
030eda8908 Add more Evoker API 2020-08-23 15:29:02 +02:00
Automated
2791f36292 [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:
6008e6660 SPIGOT-6025: Do not NPE when target world of a compass no longer exists
2020-08-31 03:27:17 -04:00
Aikar
d417f6d48b Fix build conflicts 2020-08-30 14:38:49 -04:00
Mariell
a67734d483 Add zombie targets turtle egg config (#4181)
Co-authored-by: BillyGalbreath <Blake.Galbreath@GMail.com>
2020-08-30 20:27:50 +02:00
Eearslya Sleiarion
7324cdbd10 Add BellRingEvent for village bells (#2230) 2020-08-30 11:26:15 -07:00
Jason Penilla
5532c4b10b fix #4144 (#4170) 2020-08-30 11:24:23 -07:00
Daniel Ennis
cfe899e104 Fix PersistentDataContainer contract violation (_->!null returns null) (#3990) 2020-08-30 14:02:34 -04:00
Josh Roy
a9c8e493d3 Fix NPE in getBedSpawnLocation (#4238) 2020-08-30 13:59:14 -04:00
Chew
742b4c6a07 [CI-SKIP] Add issue template 2020-08-29 23:53:41 -05:00
foss-mc
975f6ce331 Fix CraftTeam null check (#4249) 2020-08-30 23:33:25 +08:00
Mariell Hoversholm
824434ec41 Update Paperclip 2020-08-30 10:22:26 +02:00
Aurora
7b6f125863 Update Armor items in PlayerArmorChangeEvent (#4243) 2020-08-29 20:26:49 +02:00
Mariell Hoversholm
422914ef9d Increase visibility of a few methods
Fixes PaperMC/Paper#4094.
2020-08-28 21:40:31 +02:00
Automated
a22f15dcc9 [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
4ffde966fe PortalCreateEvent needs to know its entity
Fixes PaperMC/Paper#4076.
2020-08-21 20:58:20 +02:00
Mariell Hoversholm
e7ec1f421f Port Eigencraft to 1.16 2020-08-04 12:23:54 +02:00
stonar96
c348e498ba 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-07 04:26:01 +02:00
Shane Freeder
8dad068601 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
a16b50072f Fix TNT not pushing creative players 2020-08-25 20:46:04 +02:00
Josh Roy
b1e247dea7 Fix hex colors not working in some kick messages 2020-08-27 16:58:27 -04:00
Automated
64a15f4cb9 [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:
6ff6e033 #545: Add EnderSignal ItemStack API

CraftBukkit Changes:
7d31adb5f #734: Add EnderSignal ItemStack API
2020-08-27 23:02:13 -04:00
Automated
8ca9c07adc [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:
e14c9acbe SPIGOT-6113: Ender Pearls thrown into portals that lead to disabled dimensions crash the server
97da39889 SPIGOT-6114: PlayerRespawnEvent player's location changed before event called
3b5c36769 SPIGOT-6115: Items being deleted on pick up with full inventory
2020-08-27 22:37:10 -04:00
Shane Freeder
c02f7541d2 Fix reading the brand message from clients
Also try to catch the exception caused by clients/plugins seemingly
mangling this information
2020-08-27 17:11:13 +01:00
Shane Freeder
5591eeb4c2 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:
323d6ca3 #535: Add EntityCategory API to LivingEntity
7d3323d8 #526: Add Block#applyBoneMeal()

CraftBukkit Changes:
bf451617 SPIGOT-6109: Improve loot handling
bfea4559 SPIGOT-6111: NPE in CraftHumanEntity#openWorkbench & CraftHumanEntity#openEnchanting
ee7116b4 Add note to CONTRIBUTING.md to suggest keeping commit messages / titles the same
eae15943 #721: Add EntityCategory API to LivingEntity
8c611560 #702: Add Block#applyBoneMeal()
8408de02 #716: Fix barrel open API playing sound twice
74b6982b #711: Add Full RGB support to the console
2020-08-27 14:37:37 +01:00