Commit graph

5185 commits

Author SHA1 Message Date
Aikar
97b9071852 Preserve initial velocity of spawned entities - Fixes #4292 2020-09-19 13:19:34 -04:00
Aikar
0aa0eba111 Optimize some methods for inlining
Adds final to some methods to improve inlining ability
2020-09-19 11:51:01 -04:00
Aikar
7968c4f5c9 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-12 22:24:48 -04:00
Shane Freeder
9c1e6eab19 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
Automated
875d0516d1 [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:
da9bb3ea9 #753: RecipeIterator#hasNext will now accurately represent if the current iterator has a next item.
2020-09-18 04:52:15 -04:00
Shane Freeder
9cf1088154 Extend block drop capture to capture all items added to the world (Fixes #4307)
Closes #4316
2020-09-17 00:40:00 +01:00
Automated
dca2ee55df [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
Pedro Arenas
b5dcdf4ec3 [CI-SKIP] Update README.md (1.16.3 release) (#4321) 2020-09-13 00:05:29 -03:00
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