Commit graph

3704 commits

Author SHA1 Message Date
Lulu13022002
d22d2a19de Fix sniffer removeExploredLocation
Add support to remove explored location in different world
2023-06-11 19:02:46 +02:00
TheMeinerLP
a652ca1f5c Don't enforce icanhasbukkit default if alias block exists 2023-06-13 16:10:59 +02:00
Malfrador
6c30e5b15b Add transient modifier API 2023-05-31 23:30:00 +02:00
Jake Potrebic
e48a6a04cc Refresh ProjectileSource for projectiles
Makes sure the value returned by Projectile#getShooter in
the API matches the owner UUID specified in the entity nbt.
Previously, after the entity reloaded, Projectile#getShooter
would return null, while the entity still had an owner.

Also fixes setting the shooter/owner to null actually
clearing the owner.

Co-authored-by: Warrior <50800980+Warriorrrr@users.noreply.github.com>
2023-05-30 12:59:10 -07:00
Jake Potrebic
79ffc3e056 Expand PlayerItemMendEvent 2022-01-20 18:11:20 -08:00
Warrior
605fb41674 More accurate isInOpenWater impl
For fishing hooks, the openWater field is true by default, and only calculated when a "fish" is approaching the bobber.
This patch changes the API impl to calculate the open water state itself instead of returning this field.

Relevant link: https://github.com/PaperMC/Paper/issues/9131

== AT ==
public net.minecraft.world.entity.projectile.FishingHook calculateOpenWater(Lnet/minecraft/core/BlockPos;)Z
public net.minecraft.world.entity.projectile.FishingHook outOfWaterTime
2023-05-07 22:33:50 +02:00
GodOfPro
3079b71627 Add Mob Experience reward API 2023-04-11 16:31:39 +04:30
Jake Potrebic
71e08c0a8d Fix SpawnEggMeta#get/setSpawnedType 2023-02-23 13:19:13 -08:00
Owen1212055
2e77028ed4 Add Shearable API 2021-10-17 15:39:48 -04:00
Jake Potrebic
6e85945a4b Correctly handle ArmorStand invisibility 2023-03-05 14:38:21 -08:00
Jake Potrebic
006e8346e9 Fix HumanEntity#drop not updating the client inv
== AT ==
public net.minecraft.server.level.ServerPlayer containerSynchronizer
2021-10-10 18:18:01 -07:00
Lulu13022002
ab040d534d Add EntityFertilizeEggEvent 2022-06-24 12:39:34 +02:00
TheTuso
d1abd737aa Add Entity Body Yaw API 2023-02-02 16:40:41 +01:00
Jake Potrebic
db1df52d4c Fix force-opening enchantment tables 2023-01-26 16:19:26 -08:00
Josh Roy
933e2e1efa Remove CraftItemStack#setAmount null assignment
This creates a problem with Paper's item serialization
api where deserialized items, which are internally
created as a CraftItemStack, will be completely lost if
#setAmount(0) is invoked (since the underlying handle
is set to null), while a regular Bukkit ItemStack
simply sets the amount field to zero, retaining the
item's data.

Vanilla treats items with zero amounts the same as items
with less than zero amounts, so this code doesn't create
a problem with operations on the vanilla ItemStack.
2023-01-23 19:19:01 -05:00
Lama06
b8ad599ceb Win Screen API
== AT ==
public net.minecraft.server.level.ServerPlayer seenCredits
2023-01-21 13:53:23 +01:00
TreyRuffy
602506fa98 Flying Fall Damage 2022-05-27 02:26:08 -06:00
NonSwag
d9107f8c61 Fix NPE on Allay#stopDancing while not dancing 2022-12-06 23:04:21 +01:00
Jake Potrebic
b141cd3d99 Improve logging and errors
Co-authored-by: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
2022-12-14 15:52:11 -08:00
dawon
f64904e777 Add Sneaking API for Entities 2022-10-19 23:31:53 +02:00
Jake Potrebic
2b90721a45 fix Instruments
properly handle Player#playNote
2022-12-09 01:47:23 -08:00
Shane Freeder
26fe3d0cff Fix premature player kicks on shutdown
When the server is stopping, the default execution handler method will throw a
RejectedExecutionException in order to prevent further execution, this causes
us to lose the actual kick reason. To mitigate this, we'll use a seperate marked
class in order to gracefully ignore these.
2024-04-11 16:37:44 +01:00
Noah van der Aa
e151b6fc3f Friction API 2021-09-15 20:44:22 +02:00
Jake Potrebic
4a416ca85a ItemStack damage API
Adds methods notify clients about item breaks and
to simulate damage done to an itemstack and all
the logic associated with damaging them

== AT ==
public net.minecraft.world.entity.LivingEntity entityEventForEquipmentBreak(Lnet/minecraft/world/entity/EquipmentSlot;)B
2022-05-08 13:35:45 -07:00
Jake Potrebic
0e9f28fe68 Fix async entity add due to fungus trees 2022-03-18 21:30:00 -07:00
Warrior
ba6112b959 Add /paper dumplisteners command
Co-authored-by: TwoLeggedCat <80929284+TwoLeggedCat@users.noreply.github.com>
2022-10-25 21:15:37 +02:00
Lulu13022002
533bc0c468 More vanilla friendly methods to update trades 2022-10-16 16:12:49 +02:00
dawon
9db4bb7ac6 Add Player Warden Warning API
== AT ==
public net.minecraft.server.level.ServerPlayer wardenSpawnTracker
public net.minecraft.world.entity.monster.warden.WardenSpawnTracker ticksSinceLastWarning
public net.minecraft.world.entity.monster.warden.WardenSpawnTracker cooldownTicks
public net.minecraft.world.entity.monster.warden.WardenSpawnTracker increaseWarningLevel()V
2022-10-15 00:46:57 +02:00
Owen1212055
7c891287ed Add Moving Piston API 2021-12-04 13:29:36 -05:00
Noah van der Aa
5c260c7e51 Detect headless JREs
Crashes caused by the missing AWT dependency come up in the support channels fairly often.
This patch detects the missing dependency and stops the server with a clear error message,
containing a link to instructions on how to install a non-headless JRE.
2022-10-22 14:47:45 +02:00
MelnCat
95a2e4ed32 Add entity knockback API 2022-10-16 12:10:17 -07:00
SoSeDiK
7224eecfb1 Elder Guardian appearance API 2022-10-11 20:38:47 +03:00
Jake Potrebic
e56f757b1c Correctly handle interactions with items on cooldown 2022-06-16 21:57:02 -07:00
MelnCat
492ebf1459 Add getDrops to BlockState
Originally added isPreferredTool to BlockData but
upstream added that.
2022-08-12 23:24:37 -07:00
Shane Freeder
084e7e62ad Mitigate effects of WorldCreator#keepSpawnLoaded ret type change
TODO: Remove in 1.21?
2022-09-19 00:13:02 +01:00
Shane Freeder
60026267e3 Configurable chat thread limit
By default, spigot shifts chat over to an unbounded thread pool,
on a normal server, this really offers no gains, the creation of a thread
on submitting to the pool on these servers eats more time vs just running it in
the netty pipeline, however, on servers using plugins which do work in here, there
could be some overall benefits to moving this stuff outside of the pipeline.

In general, this patch does two things:
1) Exposes the core size for the pool, this allows for ensuring that a number of threads
sit around in the pool, mitigating the need for creating new threads; This IS however
caveated, the ThreadPoolExecutor will ONLY create core threads as they're needed, it
just won't allow for us to dip back under the # of core threads, this can potentially
be mitigated by calling prestartCoreThread, however, I'm not sure if there is much justification
for this
2) Exposes a max size for the pool, as stated, by default this is unbounded, for most
servers limiting the size of the pool is going to have 0 effects given how fast chat
is actually processed, this is honestly really just exposed for the misnomers or people
who just wanna ensure that this won't grow over a specific size if chat gets stupidly active
2022-09-18 06:33:17 +01:00
Nex
476de68a14 Added byte array serialization/deserialization for PersistentDataContainers 2022-02-24 16:28:07 +01:00
Jake Potrebic
75c623590f Fire EntityChangeBlockEvent in more places
Co-authored-by: ChristopheG <61288881+chrisgdt@users.noreply.github.com>
Co-authored-by: maxcom1 <46265094+maxcom1@users.noreply.github.com>
2021-08-09 20:45:46 -07:00
José Miguel Moreno
a72acfb245 Fix plugin loggers on server shutdown 2021-06-05 13:45:15 +02:00
Josh Roy
ebdde69c39 Add NamespacedKey biome methods
Co-authored-by: Thonk <30448663+ExcessiveAmountsOfZombies@users.noreply.github.com>
2022-08-14 12:23:11 -04:00
Andrew Steinborn
a1051ff388 Add Velocity IP Forwarding Support
While Velocity supports BungeeCord-style IP forwarding, it is not secure. Users
have a lot of problems setting up firewalls or setting up plugins like IPWhitelist.
Further, the BungeeCord IP forwarding protocol still retains essentially its original
form, when there is brand new support for custom login plugin messages in 1.13.

Velocity's modern IP forwarding uses an HMAC-SHA256 code to ensure authenticity
of messages, is packed into a binary format that is smaller than BungeeCord's
forwarding, and is integrated into the Minecraft login process by using the 1.13
login plugin message packet.
2018-10-08 14:36:14 -04:00
Owen1212055
63ca8a9302 Block Ticking API 2021-12-26 13:23:46 -05:00
Owen1212055
19d28ade48 Collision API 2021-10-06 20:10:44 -04:00
Owen1212055
44f8b39a2c Custom Chat Completion Suggestions API 2022-07-30 11:23:05 -04:00
Owen1212055
ce7cf07354 Warn on plugins accessing faraway chunks 2022-07-29 12:35:19 -04:00
Owen1212055
8cc67f527e More Teleport API 2021-09-05 12:15:59 -04:00
u9g
78f9a96605 Add Player#getFishHook 2022-06-14 19:36:10 -04:00
Jake Potrebic
7cee8d5e02 Fix CCE for SplashPotion and LingeringPotion spawning
Remove in 1.19 along with the SplashPotion and
LingeringPotion interfaces
2022-04-21 18:18:02 -07:00
Jake Potrebic
5cf40e45af Don't broadcast messages to command blocks
Previously the broadcast method would update the last output
in command blocks, and if called asynchronously, would throw
an error
2022-06-16 14:22:56 -07:00
Owen1212055
1f68916ac9 Nameable Banner API 2022-04-07 17:49:25 -04:00
Owen1212055
24d356944c Add missing important BlockStateListPopulator methods
Without these methods it causes exceptions due to these being used by certain feature generators.
2022-06-12 13:25:52 -04:00
Owen1212055
edcdf97059 Dont resent entity on art update 2022-06-08 11:04:47 -04:00
Jake Potrebic
6a51d13dbf Throw exception on world create while being ticked
There are no plans to support creating worlds while worlds are
being ticked themselvess.
2022-03-22 12:44:30 -07:00
Jake Potrebic
01eab6be00 Fix FurnaceInventory for smokers and blast furnaces 2022-01-01 23:11:26 -08:00
Jake Potrebic
c3224863eb Fix OfflinePlayer#getBedSpawnLocation
When calling getBedSpawnLocation on an
instance of CraftOfflinePlayer the world was incorrect
due to the logic for reading the NBT not being up-to-date.
2022-05-30 16:03:36 -07:00
Owen1212055
dedddea65d Expand FallingBlock API
- add auto expire setting
- add setter for block data
- add accessors for block state

== AT ==
public net.minecraft.world.entity.item.FallingBlockEntity blockState

Co-authored-by: Lukas Planz <lukas.planz@web.de>
2021-12-05 14:58:17 -05:00
Noah van der Aa
8c8e7968ab Don't tick markers
Fixes https://github.com/PaperMC/Paper/issues/7276 and https://github.com/PaperMC/Paper/issues/8118
by using a config option that, when set to false, does not add markers to the entity
tick list at all and ignores them in Spigot's activation range checks. The entity tick
list is only used in the tick and tickPassenger methods, so we can safely not add the
markers to it. When the config option is set to true, markers are ticked as normal.
2022-01-07 11:58:26 +01:00
Gero
e80bb1adca Fix CME in CraftPersistentDataTypeRegistry 2021-10-02 20:08:30 +02:00
Shane Freeder
2bf4b6e53d WorldCreator#keepSpawnLoaded 2021-07-03 21:18:28 +01:00
Doc
3dc8a5ce57 Allow changing the EnderDragon podium 2022-04-03 11:31:42 -04:00
Jake Potrebic
96c7383ba4 Cache resource keys and optimize reference Holder tags set
TagKeys are always interned, so we can use a reference hash set for them
2022-03-20 22:06:47 -07:00
SoSeDiK
58f0db0820 Fix new block data for EntityChangeBlockEvent
Also standardizes how to handle EntityChangeBlockEvent before a removeBlock or destroyBlock
call. Always use 'state.getFluidState().createLegacyBlock()' to get the new state instead of
just using the 'air' state.

Also fixes the new block data for EntityBreakDoorEvent (a sub-event from
EntityChangeBlockEvent)

Co-authored-by: Lulu13022002 <41980282+Lulu13022002@users.noreply.github.com>
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
2022-03-21 20:00:53 +02:00
Philip Kelley
1e2e8f4643 Fix saving in unloadWorld
Change savingDisabled to false to ensure ServerLevel's saving logic gets called when unloadWorld is called with save = true
2022-03-16 12:05:59 +00:00
Jason Penilla
c60aaed623 Implement enchantWithLevels API 2022-03-16 20:35:21 -07:00
Jake Potrebic
d18cd1513e Make some itemstacks nonnull 2022-03-15 01:38:15 -07:00
Jason Penilla
94231dffb8 Implement getComputedBiome API 2022-03-14 22:46:05 -07:00
Owen1212055
df181fa967 More Projectile API
== AT ==
public net.minecraft.world.entity.projectile.FishingHook timeUntilLured
public net.minecraft.world.entity.projectile.FishingHook fishAngle
public net.minecraft.world.entity.projectile.ShulkerBullet targetDeltaX
public net.minecraft.world.entity.projectile.ShulkerBullet targetDeltaY
public net.minecraft.world.entity.projectile.ShulkerBullet targetDeltaZ
public net.minecraft.world.entity.projectile.ShulkerBullet currentMoveDirection
public net.minecraft.world.entity.projectile.ShulkerBullet flightSteps
public net.minecraft.world.entity.projectile.AbstractArrow soundEvent
public net.minecraft.world.entity.projectile.AbstractArrow setPickupItemStack(Lnet/minecraft/world/item/ItemStack;)V
public net.minecraft.world.entity.projectile.ThrownTrident dealtDamage
public net.minecraft.world.entity.projectile.Arrow NO_EFFECT_COLOR
public net.minecraft.world.entity.projectile.Projectile hasBeenShot
public net.minecraft.world.entity.projectile.Projectile leftOwner
public net.minecraft.world.entity.projectile.Projectile ownerUUID
public net.minecraft.world.entity.projectile.Projectile preOnHit(Lnet/minecraft/world/phys/HitResult;)V
public net.minecraft.world.entity.projectile.Projectile canHitEntity(Lnet/minecraft/world/entity/Entity;)Z
public net.minecraft.world.entity.projectile.FireworkRocketEntity getDefaultItem()Lnet/minecraft/world/item/ItemStack;
public net.minecraft.world.item.CrossbowItem FIREWORK_POWER

Co-authored-by: Nassim Jahnke <nassim@njahnke.dev>
Co-authored-by: SoSeDiK <mrsosedik@gmail.com>
Co-authored-by: MelnCat <melncatuwu@gmail.com>
Co-authored-by: Lulu13022002 <41980282+Lulu13022002@users.noreply.github.com>
2021-06-22 23:41:11 -04:00
EpicKnarvik97
70809f7640 Expose furnace minecart push values
Adds methods for getting and setting a furnace minecart's push values
2022-03-05 20:58:46 +01:00
Nassim Jahnke
4a5a684c14 Fix falling block spawn methods
Restores the API behavior from previous versions of the server
- Do not call API events
- Do not replace the existing block in the world

== AT ==
public net.minecraft.world.entity.item.FallingBlockEntity <init>(Lnet/minecraft/world/level/Level;DDDLnet/minecraft/world/level/block/state/BlockState;)V
2022-03-04 20:35:19 +01:00
Jake Potrebic
0b5d7ad8d6 Custom Potion Mixes
== AT ==
public-f net.minecraft.server.MinecraftServer potionBrewing
2021-10-07 14:34:55 -07:00
Spottedleaf
299d7beee0 Put world into worldlist before initing the world
Some parts of legacy conversion will need the overworld
to get the legacy structure data storage
2022-02-22 14:21:35 -08:00
Jake Potrebic
0037bf388d Add missing block data API
General purpose patch adding missing getters/setters to BlockData and
its child types.

Co-authored-by: SoSeDiK <mrsosedik@gmail.com>
Co-authored-by: Fabrizio La Rosa <lr.fabrizio@gmail.com>
2021-10-16 22:57:31 -07:00
Jake Potrebic
c21f27243d Configurable sculk sensor listener range
== AT ==
public-f net.minecraft.world.level.gameevent.vibrations.VibrationListener listenerRange
2021-08-19 18:45:42 -07:00
Jake Potrebic
2a974d288d Furnace RecipesUsed API 2022-01-13 15:20:47 -08:00
Jake Potrebic
809e0ae069 Add GameEvent tags 2021-01-03 20:03:35 -08:00
Jason Penilla
fd7f4e0d1a Add missing Validate calls to CraftServer#getSpawnLimit
Copies appropriate checks from CraftWorld#getSpawnLimit
2022-02-12 12:40:50 -07:00
Jake Potrebic
83b4d889b7 Add missing structure set seed configs
The 4 missing structure set seed configs are strongholds, mineshafts,
buried treasure, and ancient cities.

Strongholds use a ring placement scheme which isn't random so they
utilize the world seed by default, this adds a config to override it
for just generating the ring positions.

Mineshafts and Buried Treasure structure sets are special cases
where the "salt" that can be defined for them via datapacks has 0
effect because the difference between the spacing and separation is 1
which is used as the upper bound in the random with salt. So the random
always returns the same int (0) so the salt has no effect. This adds
seeds/salts to the frequency reducer which has a similar effect.

Co-authored-by: William Blake Galbreath <blake.galbreath@gmail.com>
2022-01-13 23:05:53 -08:00
Jason Penilla
c0e7761df1 API for creating command sender which forwards feedback 2022-02-01 15:51:55 -07:00
Jake Potrebic
cf0525cba8 More PotionEffectType API
== AT ==
public net.minecraft.world.effect.MobEffect attributeModifiers
public net.minecraft.world.effect.MobEffect$AttributeTemplate
2021-05-27 21:58:24 -07:00
Owen1212055
0a2552a791 Freeze Tick Lock API 2021-12-26 20:27:43 -05:00
Brody Beckwith
a17ed327b3 Multi Block Change API Implementation 2022-01-14 00:41:11 -05:00
Cryptite
0fd1e5c650 Multiple Entries with Scoreboards 2021-09-21 18:17:33 -05:00
u9g
4ab8912b68 Add missing IAE check for PersistentDataContainer#has 2022-01-03 23:32:42 -05:00
Jason Penilla
25af4f1bec Expose vanilla BiomeProvider from WorldInfo 2022-01-06 15:59:06 -08:00
Owen1212055
e286abbaef Bucketable API 2021-12-26 14:03:17 -05:00
BillyGalbreath
6b1d457aea Expose isFuel and canSmelt methods to FurnaceInventory 2021-12-23 15:32:50 -06:00
Jake Potrebic
9d08734937 Add API for item entity health
== AT ==
public net.minecraft.world.entity.item.ItemEntity health
2021-08-28 09:00:45 -07:00
Jake Potrebic
33f49c215c Entity powdered snow API
== AT ==
public net.minecraft.world.entity.monster.Skeleton inPowderSnowTime
2021-10-24 20:58:43 -07:00
Jake Potrebic
6ad7b27bb3 Improve scoreboard entries 2021-11-04 12:31:24 -07:00
LemonCaramel
c5e4146598 Add more Campfire API 2021-07-16 00:39:03 +09:00
Jason Penilla
8e42edf892 Fix ChunkSnapshot#isSectionEmpty(int) and optimize PalettedContainer copying by not using codecs 2021-12-09 00:08:11 -08:00
Jason Penilla
0919b52439 Fix Spigot growth modifiers
Fixes kelp modifier changing growth for other crops
Also add growth modifiers for glow berries, mangrove propagules,
torchflower crops and pitcher plant crops
Also fix above-mentioned modifiers from having the reverse effect

Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
Co-authored-by: Noah van der Aa <ndvdaa@gmail.com>
Co-authored-by: Lulu13022002 <41980282+Lulu13022002@users.noreply.github.com>
2021-12-03 17:09:24 -08:00
egg82
61353ac496 Add root/admin user detection
This patch detects whether or not the server is currently executing as a privileged user and spits out a warning.
The warning serves as a sort-of PSA for newer server admins who don't understand the risks of running as root.
We've seen plenty of bad/malicious plugins hit markets, and there's been a few close-calls with exploits in the past.
Hopefully this helps mitigate some potential damage to servers, even if it is just a warning.

Co-authored-by: Noah van der Aa <ndvdaa@gmail.com>
2021-09-11 22:55:14 +02:00
Jake Potrebic
e259cfeb72 Fix upstreams block state factories
Sometimes, blocks are changed and then logic is called before the associated
tile entity is removed. When this happens, the factories were relying on the
block at the position, not the tile entity. This change prioritizes using the
tile entity type to determine the block state factory and falls back on
the material type of the block at that location.

== AT ==
public net.minecraft.world.level.block.entity.BlockEntityType validBlocks
2021-10-06 20:50:48 -07:00
Jake Potrebic
5f4779fc86 Fix CraftCriteria defaults map 2021-10-04 22:31:51 -07:00
Noah van der Aa
b2c22e9470 Don't log debug logging being disabled 2021-09-14 16:24:45 +02:00
Bjarne Koll
83a6307788 Fix setPatternColor on tropical fish bucket meta
Prior to this commit, the tropical fish bucket meta would set the body
color to the previous metas pattern colour when updating the pattern
colour.

This commit hence simply fixes this by using the proper body colour
value when updating the pattern color.
2021-11-06 23:15:20 +01:00
Jake Potrebic
18496d0c01 Add missing InventoryType
Upstream did not add a DECORATED_POT inventory type
2023-12-27 16:46:07 -08: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
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
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
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
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
a6362921cc Change EnderEye target without changing other things 2021-08-21 12:13:53 -07:00
Jake Potrebic
0e4e270396 Add PlayerSetSpawnEvent 2021-05-19 18:59:10 -07: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
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
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
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
TwoLeggedCat
750a4590ce Line Of Sight Changes 2021-05-29 14:33:25 -05:00
Jake Potrebic
75225eb102 Add PlayerKickEvent causes 2021-05-15 20:30:45 -07:00
LemonCaramel
cd9caecbde More Lidded Block API 2021-05-23 17:49:51 +09:00
Jake Potrebic
f61b2947ad Add cause to Weather/ThunderChangeEvents 2020-12-02 18:23:26 -08:00
Jake Potrebic
c2b061d759 Improve item default attribute API 2021-05-08 15:01:54 -07:00
BillyGalbreath
1ccedf3a03 Add Mob#lookAt API 2021-05-14 13:42:17 -05:00
Jake Potrebic
fc6a027549 More Enchantment API
== AT ==
public net.minecraft.world.item.enchantment.Enchantment definition

Co-authored-by: Luis <luisc99@icloud.com>
Co-authored-by: Janet Blackquill <uhhadd@gmail.com>
2021-05-06 19:57:58 -07:00
Jake Potrebic
121534e841 ItemStack repair check API 2021-05-15 22:11:11 -07:00
Jake Potrebic
d6b69e74a9 Expand PlayerGameModeChangeEvent 2021-05-15 10:04:43 -07:00
Connor Linfoot
f283a61ad3 Add basic Datapack API
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
2021-05-16 15:07:34 +01:00
MeFisto94
637bb9a05d Add a "should burn in sunlight" API for Phantoms and Skeletons 2021-05-11 00:48:33 +02:00
Jake Potrebic
b70d1e8bdc Inventory#close 2021-05-11 14:54:56 -07:00
Tamion
c8c11363a0 Add HiddenPotionEffect API
== AT ==
public net.minecraft.world.effect.MobEffectInstance hiddenEffect
2023-11-05 09:51:28 +01:00
Owen1212055
f24aec2051 Add EntityBlockStorage#clearEntities() 2021-04-05 18:12:29 -04:00
HexedHero
2329a7b1c8 Add more WanderingTrader API 2021-05-06 14:56:43 +01:00
Nassim Jahnke
3ab2001afb Add Channel initialization listeners 2021-04-29 21:19:33 +02:00
Jason Penilla
b9cab64e46 Implement methods to convert between Component and Brigadier's Message 2021-04-24 02:09:32 -07:00
Jake Potrebic
80878ac918 More World API 2020-07-07 10:52:34 -07:00
Jake Potrebic
12f070c05a add get-set drop chance to EntityEquipment
== AT ==
public net.minecraft.world.entity.Mob getEquipmentDropChance(Lnet/minecraft/world/entity/EquipmentSlot;)F
2021-04-22 00:28:11 -07:00
Jake Potrebic
6a311ade3a add isDeeplySleeping to HumanEntity 2021-04-08 17:36:10 -07:00
Owen1212055
8cf2001602 Set area affect cloud rotation 2021-04-05 16:58:20 -04:00
Jason Penilla
a6eda6cb37 Enhance console tab completions for brigadier commands
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
2021-03-30 16:06:08 -07:00
Nassim Jahnke
85a8224261 Expose protocol version 2021-03-26 11:23:17 +01:00
Jake Potrebic
d0185eb56e Expand world key API 2021-01-06 00:34:04 -08:00
Jake Potrebic
53ea19c9bd Add Block#isValidTool 2020-07-06 12:44:31 -07:00
AlexProgrammerDE
73deb32107 Improve ServerGUI
- Added logo to server frame
- Show tps in the server stats
2020-10-03 08:27:40 +02:00
Tom
90c30bbb0b Expose Tracked Players 2021-02-26 16:24:25 -06:00
Jason Penilla
41fd1852ae Merchant#getRecipes should return an immutable list 2021-02-10 14:53:36 -08:00
Trigary
f8a55d3645 fix dead slime setSize invincibility 2021-02-05 22:12:13 +01:00
ysl3000
6b65e03d85 living entity allow attribute registration 2020-10-24 16:37:44 +02:00
Aleksander Jagiello
0312fd2b42 Add getMainThreadExecutor to BukkitScheduler 2021-01-24 22:17:54 +01:00
BillyGalbreath
6888386225 Allow adding items to BlockDropItemEvent 2021-01-20 14:23:37 -06:00
Nassim Jahnke
a85863338c Expand EntityUnleashEvent 2021-01-29 15:13:11 +01:00
Madeline Miller
b69f8fb10b Add BlockPreDispenseEvent 2021-01-17 13:16:09 +10:00
Jake Potrebic
239e7a6b37 Add RegistryAccess for managing Registries
RegistryAccess is independant from CraftServer and
doesn't require one to be created allowing the
org.bukkit.Registry class to be loaded earlier.

== AT ==
public net.minecraft.server.RegistryLayer STATIC_ACCESS
2023-02-27 18:28:39 -08:00
Mariell Hoversholm
23b8639dbf Add sendOpLevel API 2020-12-29 15:03:03 +01:00
TheViperShow
36eff9b616 Add BlockFailedDispenseEvent 2020-04-22 09:40:38 +02:00
Jake Potrebic
1e05072232 Add WorldGameRuleChangeEvent 2020-12-20 16:41:44 -08:00
Jake Potrebic
b656aa3c21 Zombie API - breaking doors
== AT ==
public net.minecraft.world.entity.monster.Zombie supportsBreakDoorGoal()Z
2020-11-18 11:32:46 -08:00
Madeline Miller
38ea31d1cb API to get Material from Boats and Minecarts
== AT ==
public net.minecraft.world.entity.vehicle.AbstractBoat getDropItem()Lnet/minecraft/world/item/Item;
2020-12-31 12:48:19 +10:00
Aikar
119c616ab9 Additional Block Material API
Faster version for isSolid() that utilizes NMS's state for isSolid instead of the slower
process to do this in the Bukkit API

Adds API for buildable, replaceable, burnable too.
2020-12-30 19:43:01 -05:00
Jake Potrebic
dad7e25da8 Add OBSTRUCTED reason to BedEnterResult 2020-12-24 12:43:39 -08:00
Mark Vainomaa
1cedeb97af Expose LivingEntity hurt direction 2020-12-13 05:32:05 +02:00
BillyGalbreath
b22a956d7c Fix CraftSound backwards compatibility 2020-12-17 15:25:49 -06:00
Jake Potrebic
84581d0c6b Add missing default perms for commands 2020-11-16 12:01:52 -08:00
Nassim Jahnke
e0fe76747b More lightning API
== AT ==
public net.minecraft.world.entity.LightningBolt life
public net.minecraft.world.entity.LightningBolt flashes
2020-07-26 14:44:09 +02:00
Nassim Jahnke
d1d54d35bf Add PlayerItemCooldownEvent 2020-08-25 13:48:33 +02:00
Anrza
791377732e Add LivingEntity#clearActiveItem 2020-07-15 12:08:49 +02:00
Esophose
253e7ed6c8 Fix Player spawnParticle x/y/z precision loss 2020-10-03 18:57:47 -06:00
Ineusia
c068010b34 Add Destroy Speed API
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
2020-10-26 11:48:06 -05:00
Jake Potrebic
5b1f73e2dc Beacon API - custom effect ranges 2020-06-24 12:39:08 -06:00
Alfie Smith
2d042873d8 Item no age & no player pickup 2020-11-07 01:20:33 +00:00
Jason Penilla
9ac98063a0 Fix client lag on advancement loading
When new advancements are added via the UnsafeValues#loadAdvancement
API, it triggers a full datapack reload when this is not necessary. The
advancement is already loaded directly into the advancement registry,
and the point of saving the advancement to the Bukkit datapack seems to
be for persistence. By removing the call to reload datapacks when an
advancement is loaded, the client no longer completely freezes up when
adding a new advancement.
To ensure the client still receives the updated advancement data, we
manually reload the advancement data for all players, which
normally takes place as a part of the datapack reloading.
2020-10-31 11:49:01 -07:00
Mariell Hoversholm
8bac10ce5e Add ignore discounts API 2020-11-09 20:44:51 +01:00
oxygencraft
30de939553 Add getOfflinePlayerIfCached(String) 2020-10-25 18:34:50 +11:00
William Blake Galbreath
691c4ee7b6 Villager#resetOffers 2019-10-07 00:15:37 -05:00
Spottedleaf
f24af9bc9c Optimise getType calls
Remove the map lookup for converting from Block->Bukkit Material
2020-06-03 11:37:13 -07:00
William Blake Galbreath
972b6a6f18 Entity#isTicking 2020-10-03 21:39:16 -05:00
Andrew Steinborn
2f55ab6d4e Lazily track plugin scoreboards by default
On servers with plugins that constantly churn through scoreboards, there is a risk of
degraded GC performance due to the number of scoreboards held on by weak references.
Most plugins don't even need the (vanilla) functionality that requires all plugin
scoreboards to be tracked by the server. Instead, only track scoreboards when an
objective is added with a non-dummy criteria.

This is a breaking change, however the change is a much more sensible default. In case
this breaks your workflow you can always force all scoreboards to be tracked with
settings.track-plugin-scoreboards in paper.yml.
2020-10-03 04:15:09 -04:00
MeFisto94
73b101005b Expose the Entity Counter to allow plugins to use valid and non-conflicting Entity Ids 2020-08-28 01:41:26 +02:00
JRoy
963cd88791 Add additional open container api to HumanEntity
== AT ==
public net/minecraft/world/level/block/state/BlockBehaviour getMenuProvider(Lnet/minecraft/world/level/block/state/BlockState;Lnet/minecraft/world/level/Level;Lnet/minecraft/core/BlockPos;)Lnet/minecraft/world/MenuProvider;
2020-08-26 02:12:31 -04:00
Aikar
aebf9e869b Fix Entity Teleportation and cancel velocity if teleported
Uses correct setPositionRotation for Entity teleporting instead of setLocation
as this is how Vanilla teleports entities.

Cancel any pending motion when teleported.
2020-08-25 20:45:36 -04:00
miclebrick
74de6853f4 Cache block data strings 2018-12-06 19:52:50 -05:00
ysl3000
0c942c8542 Create HoverEvent from ItemStack Entity 2020-07-06 22:18:04 +02:00
Jake Potrebic
97620482eb Add methods to get translation keys
== AT ==
public org.bukkit.craftbukkit.inventory.CraftMetaFirework
public org.bukkit.craftbukkit.inventory.CraftMetaFirework power
public org.bukkit.craftbukkit.inventory.CraftMetaFirework getNBT(Lorg/bukkit/FireworkEffect$Type;)Lnet/minecraft/world/item/component/FireworkExplosion$Shape;

Co-authored-by: MeFisto94 <MeFisto94@users.noreply.github.com>
2020-08-11 19:16:09 +02:00
BillyGalbreath
4f4d4ac73e Add more Evoker API
== AT ==
public net.minecraft.world.entity.monster.Evoker setWololoTarget(Lnet/minecraft/world/entity/animal/Sheep;)V
public net.minecraft.world.entity.monster.Evoker getWololoTarget()Lnet/minecraft/world/entity/animal/Sheep;
2020-08-23 15:28:35 +02:00
Eearslya Sleiarion
2e8691de65 Add BellRingEvent
Add a new event, BellRingEvent, to trigger whenever a player rings a
village bell. Passes along the bell block and the player who rang it.
2020-08-23 13:04:02 +02:00
BillyGalbreath
15b58660bb Add moon phase API 2020-08-23 16:32:11 +02:00
William Blake Galbreath
b77fd7dd24 Fix SpawnChangeEvent not firing for all use-cases 2020-08-22 23:36:21 +02:00
William Blake Galbreath
a7e8ccc630 Add playPickupItemAnimation to LivingEntity 2020-08-23 19:36:22 +02:00
DigitalRegent
0ef48f1dd1 Brand support 2020-04-11 13:10:58 +02:00
mbax
0a7b472bee Fix regex mistake in CB NBT int deserialization
The existing regex is too open and allows for the absence of any actual
number data, detecting an NBT entry of just the letter "i" in upper or
lower case. This causes a single-character NBT entry to be processed as
an integer ending in "i", passing an empty String to to Integer.parseInt,
triggering an exception in loading the item.

This commit forces numbers to be present prior to the ending "i"
letter.
2020-08-17 12:17:37 -04:00
William Blake Galbreath
ea5eaa7503 Add PrepareResultEvent
Adds a new event for all crafting stations that generate a result slot item

Anvil, Grindstone and Smithing now extend this event
2020-07-03 11:58:56 -05:00
William Blake Galbreath
e3bd1e8117 Add entity liquid API
== AT ==
public net.minecraft.world.entity.Entity isInRain()Z
public net.minecraft.world.entity.Entity isInBubbleColumn()Z
2020-07-02 18:11:43 -05:00
Aikar
25ed9118c5 Convert legacy attributes in Item Meta 2020-07-01 04:50:22 -04:00