Commit graph

5365 commits

Author SHA1 Message Date
Spottedleaf
ebaf017f9c Make sure inlined getChunkAt has inlined logic for loaded chunks
Tux did some profiling some time ago and showed that the
previous getChunkAt method which had inlined logic for loaded
chunks did get inlined, but the standard CPS.getChunkAt
method was not inlined.
2020-09-20 16:10:49 -07:00
Spottedleaf
e14d95e83c Name craft scheduler threads according to the plugin using them
Provides quick access to culprits running far more threads than
they should be
2020-07-19 15:17:01 -07:00
Spottedleaf
32107198d1 Manually inline methods in BlockPosition 2020-07-06 22:48:48 -07:00
Nassim Jahnke
37bc4f0b04 Sanitize ResourceLocation error logging 2021-08-26 12:09:47 +02:00
Jason Penilla
b67ec825d2 Add '/paper mobcaps' and '/paper playermobcaps'
Add commands to get the mobcaps for a world, as well as the mobcaps for
each player when per-player mob spawning is enabled.

Also has a hover text on each mob category listing what entity types are
in said category
2021-08-16 01:31:54 -05:00
Spottedleaf
c593e8510e Improve and expand AsyncCatcher
Log when the async catcher is tripped
  The chunk system can swallow the exception given it's all
  built with completablefuture, so ensure it is at least printed.

Add/move several async catchers

Async catch modifications to critical entity state
  These used to be here from Spigot, but were dropped with 1.17.
  Now in 1.17, this state is _even more_ critical than it was before,
  so these must exist to catch stupid plugins.

Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
2021-08-25 20:17:12 -07:00
Spottedleaf
efb3bbf2bb Fix GameProfileCache concurrency
Separate lookup and state access locks prevent lookups
from stalling simple state access/write calls
2020-07-11 05:09:28 -07:00
Spottedleaf
7b293aba08 Do not run close logic for inventories on chunk unload
Still call the event and change the active container though. We
want to avoid close logic because it's possible to load the
chunk through it. This should also be OK from a leak prevention/
state desync POV because the TE is getting unloaded anyways.
2021-03-11 03:03:32 -08:00
Jason Penilla
6dafeceebd Vanilla command permission fixes
Fixes permission checks for vanilla commands which don't have a
requirement, as well as for namespaced vanilla commands.

== AT ==
public-f com.mojang.brigadier.tree.CommandNode requirement
2021-08-25 13:19:53 -07:00
Mariell Hoversholm
33aad47ee1 Add Raw Byte Entity Serialization
== AT ==
public net.minecraft.world.entity.Entity setLevel(Lnet/minecraft/world/level/Level;)V
2021-10-24 16:20:31 -04:00
booky10
ef5b6401b3 Add API for resetting a single score
It was only possible to reset all scores for a specific entry, instead of resetting only specific scores.
2021-11-05 21:01:36 +01:00
Seggan
4e20ba8bf7 Goat ram API 2021-08-05 13:10:27 -04:00
Jake Potrebic
26d0751f8e Add hasCollision methods to various places
== AT ==
public net.minecraft.world.level.block.state.BlockBehaviour hasCollision
2021-11-04 11:50:40 -07:00
Jake Potrebic
310d8c53aa Fix issues with mob conversion 2021-10-24 20:29:45 -07:00
dodison
2852803dbf Add critical damage API 2021-07-26 17:32:36 +02:00
William Blake Galbreath
b530d53b66 Add ItemFactory#getSpawnEgg API 2021-10-14 12:09:39 -05:00
syldium
864494345a Add more advancement API
== AT ==
public net.minecraft.advancements.Advancement decorateName(Lnet/minecraft/advancements/DisplayInfo;)Lnet/minecraft/network/chat/Component;

Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
2021-07-09 18:50:40 +02:00
William Blake Galbreath
b2715aeeed Left handed API 2021-10-14 12:36:58 -05:00
Jake Potrebic
4180e72054 Get entity default attributes
== AT ==
public net.minecraft.world.entity.ai.attributes.AttributeSupplier getAttributeInstance(Lnet/minecraft/core/Holder;)Lnet/minecraft/world/entity/ai/attributes/AttributeInstance;
2021-08-20 13:03:21 -07:00
Jakub Zacek
067c4e04bd Add methods to find targets for lightning strikes
== AT ==
public net.minecraft.server.level.ServerLevel findLightningRod(Lnet/minecraft/core/BlockPos;)Ljava/util/Optional;
2021-10-04 10:16:44 +02:00
Jake Potrebic
424403988d Add back EntityPortalExitEvent 2021-05-16 09:39:46 -07:00
Jake Potrebic
75f6d5e329 Add missing team sidebar display slots
== AT ==
public org.bukkit.craftbukkit.scoreboard.CraftScoreboardTranslations
public org.bukkit.craftbukkit.scoreboard.CraftScoreboardTranslations toBukkitSlot(Lnet/minecraft/world/scores/DisplaySlot;)Lorg/bukkit/scoreboard/DisplaySlot;
public org.bukkit.craftbukkit.scoreboard.CraftScoreboardTranslations fromBukkitSlot(Lorg/bukkit/scoreboard/DisplaySlot;)Lnet/minecraft/world/scores/DisplaySlot;
2021-10-01 08:04:39 -07:00
Jake Potrebic
94732f8599 More CommandBlock API 2021-09-23 10:40:09 -07:00
Jake Potrebic
65ec6cf342 Option to prevent data components copy in smithing recipes 2021-09-26 12:57:28 -07:00
Jake Potrebic
b96b8f7723 Add BlockBreakBlockEvent 2021-01-03 17:58:11 -08:00
Jake Potrebic
a6362921cc Change EnderEye target without changing other things 2021-08-21 12:13:53 -07:00
Warrior
c754319985 Configurable item frame map cursor update interval 2021-08-13 01:14:38 +02:00
Andrew Steinborn
8a3f9f7eb6 Optimize indirect passenger iteration 2021-08-09 00:38:37 -04:00
Jake Potrebic
826dc5744d Add EntityDamageItemEvent 2020-12-22 13:52:48 -08:00
Jason Penilla
d4dfcccc84 Config option for Piglins guarding chests 2020-12-02 03:07:58 -08:00
Andrew Steinborn
ac0d44684a Optimize entity tracker passenger checks 2021-08-08 00:52:54 -04:00
Jake Potrebic
70262052bd Make hoppers respect inventory max stack size 2021-07-07 16:30:17 -07:00
Jake Potrebic
0e4e270396 Add PlayerSetSpawnEvent 2021-05-19 18:59:10 -07:00
Professor Bloodstone
2e42192ea2 Allow skipping writing of comments to server.properties
Makes less git noise, as it won't update the date every single time

Use -DPaper.skipServerPropertiesComments=true flag to disable writing it
2021-07-23 02:32:04 +02:00
Noah van der Aa
bb3dbd3116 Prevent AFK kick while watching end credits 2021-07-24 16:54:11 +02:00
underscore11code
b9b53341c3 Add System.out/err catcher 2021-07-23 23:01:42 -07:00
Owen1212055
f81c2d5486 Stinger API 2021-06-22 23:15:44 -04:00
Jake Potrebic
29ce813416 Add missing forceDrop toggles 2021-07-20 21:25:35 -07:00
Phoenix616
a600754f0d Rate options and timings for sensors and behaviors
This adds config options to specify the tick rate for sensors
 and behaviors of different entity types as well as timings
 for those in order to be able to have some metrics as to which
 ones might need tweaking.
2021-06-28 22:38:29 +01:00
Phoenix616
e7de2be721 Don't apply cramming damage to players
It does not make a lot of sense to damage players if they get crammed,
 especially as the usecase of teleporting lots of players to the same
 location isn't too uncommon and killing all those players isn't
 really what one would expect to happen.

For those who really want it a config option is provided.
2021-06-20 16:35:42 +01:00
Jake Potrebic
818a84cfbe Fix kick event leave message not being sent 2021-07-07 16:19:41 -07:00
Jake Potrebic
485db97ad6 Add PlayerArmSwingEvent 2021-03-12 19:22:21 -08:00
Jake Potrebic
39716421ea Fix commands from signs not firing command events
This patch changes sign command logic so that `run_command` click events:
  - are logged to the console
  - fire PlayerCommandPreprocessEvent
  - work with double-slash commands like `//wand`
  - sends failure messages to the player who clicked the sign
2021-07-09 13:50:48 -07:00
Spottedleaf
9ce3172c9f Use getChunkIfLoadedImmediately in places
This prevents us from hitting chunk loads for chunks at or less-than
ticket level 33 (yes getChunkIfLoaded will actually perform a chunk
load in that case).
2019-07-08 00:13:36 -07:00
Jason Penilla
4919926f51 Fix return value of Block#applyBoneMeal always being false 2021-06-28 18:16:52 -07:00
Owen1212055
df822c00c9 Missing Entity API
== AT ==
public net.minecraft.world.entity.animal.Fox isDefending()Z
public net.minecraft.world.entity.animal.Fox setDefending(Z)V
public net.minecraft.world.entity.animal.Fox setFaceplanted(Z)V
public net.minecraft.world.entity.animal.Panda getEatCounter()I
public net.minecraft.world.entity.animal.Panda setEatCounter(I)V
public net.minecraft.world.entity.animal.Bee isRolling()Z
public net.minecraft.world.entity.animal.Bee setRolling(Z)V
public net.minecraft.world.entity.animal.Bee numCropsGrownSincePollination
public net.minecraft.world.entity.animal.Bee ticksWithoutNectarSinceExitingHive
public net.minecraft.world.entity.monster.piglin.Piglin isChargingCrossbow()Z
public net.minecraft.world.entity.ambient.Bat targetPosition
public net.minecraft.world.entity.monster.Ravager attackTick
public net.minecraft.world.entity.monster.Ravager stunnedTick
public net.minecraft.world.entity.monster.Ravager roarTick
public net.minecraft.world.entity.vehicle.MinecartTNT explode(D)V
public net.minecraft.world.entity.vehicle.MinecartTNT fuse
public net.minecraft.world.entity.monster.Endermite life
public net.minecraft.world.entity.projectile.AbstractArrow soundEvent
public net.minecraft.world.entity.monster.Phantom anchorPoint
public net.minecraft.world.entity.npc.WanderingTrader getWanderTarget()Lnet/minecraft/core/BlockPos;
public net.minecraft.world.entity.animal.AbstractSchoolingFish leader
public net.minecraft.world.entity.animal.AbstractSchoolingFish schoolSize
public net.minecraft.world.entity.animal.Rabbit moreCarrotTicks
public net.minecraft.world.entity.AreaEffectCloud ownerUUID
public net.minecraft.world.entity.animal.MushroomCow stewEffects
public net.minecraft.world.entity.Entity FLAG_INVISIBLE
public net.minecraft.world.entity.animal.Cat setRelaxStateOne(Z)V
public net.minecraft.world.entity.animal.Cat isRelaxStateOne()Z

Co-authored-by: Nassim Jahnke <nassim@njahnke.dev>
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
Co-authored-by: William Blake Galbreath <blake.galbreath@gmail.com>
Co-authored-by: SoSeDiK <mrsosedik@gmail.com>
Co-authored-by: booky10 <boooky10@gmail.com>
Co-authored-by: Amin <amin.haddou@frg.wwschool.de>
Co-authored-by: TrollyLoki <trollyloki@gmail.com>
Co-authored-by: FireInstall <kettnerl@hu-berlin.de>
Co-authored-by: maxcom1 <46265094+maxcom1@users.noreply.github.com>
Co-authored-by: TotalledZebra <Holappa57@gmail.com>
2021-06-21 23:56:07 -04:00
Spottedleaf
ac687d7ecb Fix PlayerDropItemEvent using wrong item 2021-06-20 21:55:59 -07:00
dfsek
0cae717977 Add more LimitedRegion API 2021-06-19 20:15:59 -07:00
Jake Potrebic
0bf80e49be Fix potions splash events
Fix PotionSplashEvent for water splash potions
Fixes SPIGOT-6221: https://hub.spigotmc.org/jira/projects/SPIGOT/issues/SPIGOT-6221
Fix splash events cancellation that still show particles/sound
2021-05-20 20:40:53 -07:00
chase
9b7c0ce420 add per world spawn limits 2020-12-02 22:43:39 -08:00