Commit Graph

18818 Commits

Author SHA1 Message Date
Techcable 85be8cc620 Improve BlockPosition inlining
Normally the JVM can inline virtual getters by having two sets of code, one is the 'optimized' code and the other is the 'deoptimized' code.
If a single type is used 99% of the time, then its worth it to inline, and to revert to 'deoptimized' the 1% of the time we encounter other types.
But if two types are encountered commonly, then the JVM can't inline them both, and the call overhead remains.

This scenario also occurs with BlockPos and MutableBlockPos.
The variables in BlockPos are final, so MutableBlockPos can't modify them.
MutableBlockPos fixes this by adding custom mutable variables, and overriding the getters to access them.

This approach with utility methods that operate on MutableBlockPos and BlockPos.
Specific examples are BlockPosition.up(), and World.isValidLocation().
It makes these simple methods much slower than they need to be.

This should result in an across the board speedup in anything that accesses blocks or does logic with positions.

This is based upon conclusions drawn from inspecting the assenmbly generated bythe JIT compiler on my microbenchmarks.
They had 'callq' (invoke) instead of 'mov' (get from memory) instructions.
2016-11-30 20:56:58 -06:00
BillyGalbreath 925d397466 PlayerLaunchProjectileEvent 2018-07-21 03:11:03 -05:00
BillyGalbreath a949eef7aa PlayerElytraBoostEvent 2018-07-21 01:59:59 -05:00
BillyGalbreath e054d501fb EnderDragon Events 2018-07-21 01:51:27 -05:00
Aikar eb528f5f37 add more information to Entity.toString()
UUID, ticks lived, valid, dead
2018-07-19 01:13:28 -04:00
Aikar 904c0460cc Vex#get/setSummoner API
Get's the NPC that summoned this Vex and
Allow setting the vex's summoner

Co-authored-by: BillyGalbreath <Blake.Galbreath@GMail.com>
2018-07-04 15:30:22 -04:00
Aikar 3430a002d1 InventoryCloseEvent Reason API
Allows you to determine why an inventory was closed, enabling plugin developers
to "confirm" things based on if it was player triggered close or not.
2018-07-03 21:56:23 -04:00
Brokkonaut 7749dcdd84 Implement World.getEntity(UUID) API 2018-07-03 16:08:14 +02:00
BillyGalbreath b7f23ee86d Add config to disable ender dragon legacy check 2018-06-22 10:38:31 -05:00
Aikar f6e7cce227 RangedEntity API
Allows you to determine if an entity is capable of ranged attacks,
and to perform an attack.
2018-06-26 22:00:49 -04:00
Aikar 26c0e7e3d9 LivingEntity Active Item API
API relating to items being actively used by a LivingEntity
such as a bow or eating food.

== AT ==
public net/minecraft/world/entity/LivingEntity completeUsingItem()V
public net/minecraft/server/level/ServerPlayer completeUsingItem()V

Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
2018-06-29 00:21:28 -04:00
Aikar dddd41ac34 Expand Explosions API
Add Entity as a Source capability, and add more API choices, and on Location.

Co-authored-by: Esoteric Enderman <90862990+EsotericEnderman@users.noreply.github.com>
Co-authored-by: Bjarne Koll <git@lynxplay.dev>
2018-06-20 23:17:24 -04:00
Brokkonaut 991875920d Add entity knockback events
- EntityKnockbackEvent
- EntityPushedByEntityAttackEvent
- EntityKnockbackByEntityEvent

Co-authored-by: aerulion <aerulion@gmail.com>
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
2018-06-18 15:46:23 +02:00
Aikar d68fcd321f PlayerReadyArrowEvent
Called when a player is firing a bow and the server is choosing an arrow to use.
Plugins can skip selection of certain arrows and control which is used.
2018-06-18 01:12:53 -04:00
BlackHole 9a04cd8ee3 SPIGOT-1637: Update bungeecord-chat to 1.9-SNAPSHOT 2016-03-02 17:01:03 +01:00
md_5 ec51994608 SPIGOT-1584: Entity mount / dismount events are backwards 2016-03-02 06:41:39 +11:00
md_5 97d21d612c Rebuild patches 2016-03-01 17:36:41 +11:00
md_5 b04e7cb3a8 SPIGOT-1546: Use isPassenger, not misleading getVehicle 2016-03-01 14:47:13 +11:00
md_5 ed6fb19564 Patch rebuild 2016-03-01 11:27:36 +11:00
md_5 3a8393c53a Patch rebuild. 2016-03-01 11:23:45 +11:00
md_5 1aea01cf29 Fix accidental omission of R revision number in version. 2016-03-01 11:08:52 +11:00
Zach Brown 26eb457a39 Paper 1.9 2016-02-29 17:09:49 -06:00
md_5 cf5b4b8828 Update to Minecraft 1.9 2016-03-01 08:33:06 +11:00
Zach Brown a74ba1694d Submodules 2016-02-29 17:03:38 -06:00
Joseph Hirschfeld 4856ba746b Add exception reporting events 2016-02-28 20:15:51 -05:00
Sudzzy 4ad4421f85 Fix inter-world teleportation glitches
People are able to abuse the way Bukkit handles teleportation across worlds since it provides a built in teleportation safety check.

To abuse the safety check, players are required to get into a location deemed unsafe by Bukkit e.g. be within a chest or door block. While they are in this block, they accept a teleport request from a player within a different world. Once the player teleports, Minecraft will recursively search upwards for a safe location, this could eventually land within a player's skybase.

Example setup to perform the glitch: http://puu.sh/ng3PC/cf072dcbdb.png
The wanted destination was on top of the emerald block however the player ended on top of the diamond block. This only is the case if the player is teleporting between worlds.
2016-02-28 18:34:19 +00:00
md_5 02af1ff93f SPIGOT-1499: Outdated server message not working 2016-02-21 19:22:37 +11:00
Aikar fbdb33981e Fix ServerListPingEvent flagging as Async 2016-02-24 00:32:44 -06:00
Aikar 3b4630072e More timings for scheduler 2016-02-23 22:35:34 -06:00
Aikar 5fbb42de01 Make Timings use less passes in its benchmark 2016-02-23 21:31:01 -06:00
Techcable 1bdbffaf84 Improve title API
Uses title objects instead of individual update methods
2016-02-17 19:03:21 -07:00
Joseph Hirschfeld 21591b3dbd Add velocity warnings
Issues #12 & #18
2016-02-22 21:31:24 -06:00
Zach Brown 401ca5d1e0 Merge pull request #38 from Ichbinjoe/findPortals
Add configurable portal search radius
2016-02-22 21:20:02 -06:00
Zach Brown 09c69ae4df Update CB 2016-02-21 04:28:47 -06:00
Zach Brown 004b2d584f Proper maven repo details 2016-02-21 04:12:03 -06:00
Joseph Hirschfeld f119608227 Add configurable portal search radius 2016-02-21 01:33:37 -05:00
Joseph Hirschfeld ef8b3744c9 Change implementation of tile entity removal list 2016-02-20 21:34:29 -06:00
Joseph Hirschfeld 37cd02bd35 Ensure inv drag is in bounds - Fixes #30 2016-02-20 20:06:47 -06:00
Jedediah Smith d498084c93 Player Tab List and Title APIs 2016-02-16 19:55:21 -06:00
Zach Brown e42db95777 Move bungeecord chat APIs out of spigot subclasses 2016-02-16 19:55:05 -06:00
Zach Brown 8e4a0c9deb Merge pull request #31 from kashike/feature/better-exceptions
Be a bit more informative in maxHealth exception
2016-02-16 18:48:14 -06:00
Riley Park d00f718b65 Be a bit more informative in maxHealth exception 2016-02-16 14:37:03 -08:00
Thinkofdeath d3809b12af Fix Furnace Minecarts losing all of their velocity on corners 2016-02-15 23:19:18 -06:00
Zach Brown b90bec092f There wasn't anything here
http://i.imgur.com/AxtzziK.gif
2016-02-15 20:10:47 -06:00
DemonWav 4e6b15d6bf Fix tab completeion ignoring the old non-location tab complete
Closes GH-28
2016-02-15 19:52:09 -06:00
Zach Brown b0092d1f74 Merge pull request #27 from kashike/feature/commandmap
Expose server CommandMap
2016-02-15 12:07:29 -06:00
Riley Park 8b42b27076 Expose server CommandMap 2016-02-15 07:11:57 -08:00
Zach Brown 1a1422fd41 Ignore version formatting errors
We have so many random strings around at the moment this will be better for now
2016-02-15 08:31:45 -06:00
Zach Brown eedfd912d2 Some people just have bad days 2016-02-15 08:24:39 -06:00
Zach Brown 8ffb9ef6ea Downgrade versioning plugin, fix build 2016-02-15 08:22:37 -06:00