Commit Graph
29 Commits
Author SHA1 Message Date
BillyGalbreath 93cbf5e356 Fix turtle lag (#1502)
Fix #1501

I just added a condition check to not start a new pathfinder goal if the turtle already has one set.

Needs more testing.

![Timings Comparison](https://i.imgur.com/p9eJQSo.png)
2018-09-28 12:58:06 -05:00
BillyGalbreath f2d9f62537 Honor EntityAgeable#ageLock (#1481)
* test

* Obfuscation helper

* Fix #1459
2018-09-25 09:54:06 -05:00
BillyGalbreath 6d7372445c Expose attack cooldown methods for Player (#1412) 2018-09-22 22:03:53 -05:00
BillyGalbreath 35d16a01a9 Add creative-arrow-despawn-rate (#1411)
* Add creative-arrow-despawn-rate
2018-09-22 21:48:30 -05:00
BillyGalbreath c71f4578ab Add obfuscation helper (aikar's request) (#1468) 2018-09-22 21:28:16 -05:00
BillyGalbreath d28aadb2bd Allow chests to be placed with NBT (#1425)
This restores vanilla behavior of allowing placed chests to retain any Block Entity Tag data.

Upstream added filtering to chests, breaking vanilla behavior, and preventing use of loot table chests as a reward mechanism.

Upon review, we can find no security risk in allowing players to place a chest with NBT data, as Spawn Eggs, Minecarts, command blocks etc all have their own checks.

Additionally, survival mode players, non op players can not create these items anyways. If a player has Creative or Op, they already have high levels of access.

Plus, Chests aren't the only inventory that could have free form items, so this filter was insufficient anyways.
2018-09-09 11:53:23 -05:00
BillyGalbreath 3d3333ff23 Fix #1420 (#1421) 2018-09-07 19:03:38 -05:00
BillyGalbreath 1ee368448e Add ray tracing methods to LivingEntity (#1410)
This method will return the Block a player is looking at while taking into consideration the AABB of each block in the path.

For example, you can look through the 1/4 space of air in a Stair block and get the block behind it instead of the Stair block you are looking past.
2018-09-03 18:59:54 -05:00
BillyGalbreath 7bc21c03e9 Fix explosions not doing damage to entities (#1380) 2018-08-27 12:59:07 -05:00
BillyGalbreath f692535133 Add More Creeper API (#1372) 2018-08-27 02:01:09 -05:00
BillyGalbreath f2e8288481 Add PhantomSpawnEvent (#1375) 2018-08-27 01:51:20 -05:00
BillyGalbreath 67eef6701b 1.13: Slime Patherfinder Events (#1246)
Replaces PR #1161 for 1.13

Resolves #930 

Adds new slime pathfinder related events. All events can be cancelled.
- `SlimePathfindEvent` is the base event of all added events. Cancelling this event will cancel all pathfinders.
- `SlimeWanderEvent` is called when slimes wander around by either swimming or moving/jumping forward. Cancelling this event will prevent slimes from moving around and jumping, but they will still look around and target players.
- `SlimeSwimEvent`is called when slimes are swimming in water/lava. Cancelling will prevent the slimes from moving/jumping in water/lava.
- `SlimeChangeDirectionEvent` is called when a slime changes directions. It contains the new `yaw` position the slime wants to change to, and it can be set to another value. Cancelling this event will prevent slimes from changing directions (except for when targeting players).
- `SlimeTargetLivingEntityEvent` is called when a slime targets a player. NMS uses EntityLiving here so it is named this. Contains the LivingEntity the slime has targeted. Cancelling this event will prevent the slime from targeting the entity and will make it lose current focus.

Adds `Slime#canWander()` and `Slime#setWander(boolean)` for a more persistent control (does not persist server restarts) over all 4 pathfinder types without the spammy event having to be cancelled a bajillion times a second.

Video demonstration: https://youtu.be/8hcLqazmO28

Test plugin: https://pastebin.com/cFgcgdWV
2018-08-24 09:40:14 -05:00
BillyGalbreath 7d3b4f409c Fix MC-124320 (#1369) 2018-08-23 12:02:57 -05:00
BillyGalbreath 66d52954dc 1.13: Player launch projectile event (#1249)
Replaces PR #1193 for 1.13

I'm pretty sure I got all player launched projectiles (except arrows). Let me know if I missed any.

This fixes a use-case specific issue that was discovered [here](https://www.spigotmc.org/threads/projectilehitevent-doesnt-work-in-survival-mode.327097/page-2#post-3059433). I have a use-case example a few posts down, [here](https://www.spigotmc.org/threads/projectilehitevent-doesnt-work-in-survival-mode.327097/page-2#post-3060204).
2018-08-17 16:55:40 -05:00
BillyGalbreath 6dd8604bfd [1.13] Hand for bucket events (#1300)
This adds the `getHand()` method to the `PlayerBucketEvent`s
2018-08-07 09:44:44 -05:00
BillyGalbreath 720f7d920e SkeletonHorse Additions (#1283) 2018-08-04 20:12:41 -05:00
BillyGalbreath 28d01d85cc 1.13: EnderDragon Events (#1247)
Replaces PR #1185 for 1.13

Add some new cancellable enderdragon events dealing with its fireball shooting and the areaeffectcloud it spawns. Based on [talking with someone with a specific use-case](https://www.spigotmc.org/threads/cancel-projectilehitevent.326466/) this was [confirmed to work](http://i.imgur.com/ezlfpKC.png) for them in PM.
2018-07-28 01:03:10 -05:00
BillyGalbreath 63bf2ee267 Add "getNearbyXXX" methods to Location (#1160) 2018-06-20 20:30:09 -05:00
BillyGalbreath 283a4b7d60 [CI-SKIP] Clarify Event#callEvent() JavaDoc (#1158) 2018-06-18 15:42:39 -05:00
BillyGalbreath 4a55e34625 Make shield blocking delay configurable (#1154)
Resolves #1153
2018-06-16 14:54:35 -05:00
BillyGalbreath b36c43bc6b [CI-SKIP] Add BillyGalbreath to MIT list (#1037) 2018-03-09 11:00:48 -06:00
BillyGalbreath b89d7add43 PlayerAdvancementCriterionGrantEvent (#978) 2018-01-21 12:23:34 -06:00
BillyGalbreath 19afa58c90 Ocelot despawns should honor nametags and leash (#821) 2017-08-07 22:26:44 -05:00
BillyGalbreath 568f82f3f8 Reset spawner timer when spawner event is cancelled (#819) 2017-08-07 22:25:59 -05:00
BillyGalbreath a86bd09bb7 PlayerAttemptPickupItemEvent (#732) 2017-06-11 19:46:11 -05:00
BillyGalbreath 899f4969c1 PlayerPickupItemEvent#setFlyAtPlayer (#683)
* PlayerPickupItemEvent#setFlyAtPlayer
2017-06-11 19:43:59 -05:00
BillyGalbreath e91f3880b7 EntityPickupItemEvent (#679)
EntityPickupItemEvent
2017-06-11 19:42:01 -05:00
BillyGalbreath d1f99dde16 Item#canEntityPickup (#680)
Item#canEntityPickup
2017-06-11 19:40:42 -05:00
BillyGalbreath 5d4b4bd35d Add fromBottle flag to Experience Orbs (#584)
* Add fromBottle flag to Experience Orbs
2017-01-20 09:01:53 -06:00