Commit Graph

1349 Commits

Author SHA1 Message Date
asofold 350908cb47 [BLEEDING] Scan for ground with the void-to-void set back policy.
In case a player is above the void (no ground / liquid / web / climbable
underneath), they're teleported directly to the void.

Further adjustments:
* A flag for cobweb has been added.
* MovingUtil.getApplicableSetBackLocation / signature.

Missing:
* Precise scan (and set back policy down-to-ground, and what not).
* Special cases: illegal move, passable, morepackets. Some need an extra
policy.
* Standing on entities? Quite testing with scannning down to the void,
perhaps it'll be "ok" with a more complex scanning result, scanning for
entities near start and end only.
2018-03-01 21:12:25 +01:00
asofold a641137176 Route set back getting through a utility method (for most).
Preparation for set back policies.

Special cases missing: illegal move, passable, more packets.
2018-03-01 11:36:28 +01:00
asofold a3027eb6ce Further fiddle with sf vl relaxation. Use the move count instead of ms.
* Allow to relax with normal lift-off envelope, provided clean
descending (and not having had a violation since last lift off ground).
* (Maintain a flag for violation since lift off.)
* (Use the move count for vl freeze instead of milliseconds.)

Related:
* (Also set sfVLInAir with hover violations.)
2018-03-01 10:43:51 +01:00
asofold 04e631733b Merge branch 'master' of https://github.com/NoCheatPlus/NoCheatPlus.git 2018-02-28 12:34:29 +01:00
asofold 79e3cc9046
Add in-air VL freeze. Regain hbuf if not frozen 2018-02-28 12:11:32 +01:00
asofold b68265dd56
Update MovingConfig.java 2018-02-28 12:03:12 +01:00
asofold 99b75084ea
Update DefaultConfig.java 2018-02-28 11:56:25 +01:00
asofold 356bdd217c
Add config paths for extended leniency settings. 2018-02-28 11:48:15 +01:00
asofold 2de92a9476
Make all of hover @GlobalConfig. 2018-02-28 11:22:10 +01:00
asofold 30902ec352 [BROKEN] Data storage overhaul (basics). (+)
(SAFETY COMMIT)

Largely breaking change.
* Interfaces in front of data types (and 'managers'), some interfaces
removed.
* Data and configuration fetching.
* Check activation checking (config flags, isEnabled, hasBypass).
* CheckType (activation checks, factories removed).
* Lots of collateral signature changes, including IPlayerData.

The (I)WorldDataManager stores per-world data (+ per world per check
type).
* Raw configurations.
* Typical flags: check activation, debug, lag adaption.
* Generic data, such as check configurations or per world check data.

The (I)PlayerDataManager stores per player data.
* Check Data.
* Typical flags: debug
* Exemption
* Check data (and config cache).
* Further mappings and later OfflinePlayerData.
* The registration interface will allow defining, how instances are
handled for registered types (factory, proxy, what on world change, what
on logout, global removal handler, per player removal handler).

(I)PlayerData is intended to be/become the central access point.
* External interface is IPlayerData now.
* Per player debug flags, exemptions.
* Fetching configuration and data: local cache, relaying fetching to
registered factories and proxy-registries/storage (e.g. fetching
configuration from per world storage).

Other fixes/changes:
(+) Extend the debug player command (set true/false, reset to world
default, arbitrary check types).
(+) PlayerData maintains a currentWorldIdentifier (to be used instead of
ChatData in future).
(+) The WorldConfigProvider getAll implementation returns a
LinkedHashSet now, avoiding duplicates.
(+) Move DefaultGenericInstanceRegistry to NCPCore.
(+) Thread-safety considerations for DefaultGenericInstanceRegistry.
(+) Don't log errors on hasBypass checking. TBD: Instead intercept
during listener methods (or even as a feature within the listener node:
e.g. @ThreadContext(primaryThread=true, skipOffContext=true,
cancelOffContext=true).
(+) Add fight.wrongturn permissions to plugin.yml.
(+) Missing GPLv3 headers.

Broken/Missing:
* WorldData inheritance from default: propagate all changes done
directly to the default config to children (all worlds that don't have
an explicit world_config.yml set) - possibly add an OverrideState or
similar, (NONE, FROM_DEFAULT, EXPLICIT) and don't override EXPLICIT if
coming from the default. Calling override on the default WorldData is
not to be confused with calling override for WorldDataManager (override
for all worlds as EXPLICIT).
* Organize overriding for special circumstances (version dependent
activation  and the like). Might want to add registered override
handlers to be called on reload automatically.
* Store generic per check type per world data in the WorldDataManager,
such as configurations and per-world check data. TBD: Factories, cleanup
(!).
* Most efficient referencing (IWorldCheckTypeNode, IHandle<something>?).
* All the registry stuff (see PlayerData).
* Use interfaces for auto registry (and a flag within
RegistrationContext?) - world unload, world change, player join / leave.
* (Data expiration handling including transition to IOfflinePlayerData,
because now data is a little heavier.)
* Further details.
2018-02-26 12:15:53 +01:00
david b513e6dfbd Use Entity Id's instead of Player Name 2018-02-14 18:09:12 +01:00
asofold 806e3c2ef8 The Bukkit Metadata API base implementation is thread-safe.
(Checking can be turned off.)
2018-02-11 15:05:06 +01:00
asofold 4a7efdc3a4 Add identity checks with various implementations of equals(Object). 2018-02-11 14:21:14 +01:00
asofold 4705f75fa0 Lock NCPAPIProvider against changing.
(Not really the best example application for ILockable.)
2018-02-11 13:52:56 +01:00
asofold 7b8390dd5a Implement some kind of support for locking of registered items.
(Or registry items.)
2018-02-11 13:29:51 +01:00
asofold d3a66b01ba [BLIND] Add fight.wrongturn: Just kick for invalid pitch. 2018-02-10 10:24:04 +01:00
asofold cec4a4d129 [BLEEDING][BREAKING] New implementation for exemption. (+)
* Store the per check type flags within PlayerData/PlayerCheckTypeTree.
Access methods within PlayerData.
* (More) thread-safe access, with the twist that alterations are mostly
done within the thread-context (primary thread vs. asynchronous).
(+) Mimic legacy behavior, by non-nested entries. However untouched
nested entries are possible, creating ExemptionContext instances with
other negative ids.
(-) No ExemptionRegistry is implemented. This just aims at replacing the
internals, without altering the (legacy) behavior.
2018-02-08 12:48:33 +01:00
asofold eb41f4397a Add GPLv3 headers where missing. 2018-02-08 08:43:32 +01:00
asofold 0bfa016fc2 Iterate over the changed permissions.
Assume the referenced permissions in the cache to be rather complete,
and the changed ones to be few.
2018-02-08 08:35:37 +01:00
asofold 6dbb7d4299 [BREAKING ] Lazy permission updating.
* Each asynchronous permission check yields an update request anyway,
thus frequent bulk update requests have been removed.
* With join and world change, lazy permission updating is requested.

Breaking:
* Remove CheckConfig.getCachePermissions().
2018-02-08 01:27:47 +01:00
asofold 4bfc4f2cd2 Fix heavyLoad constant. Include TickTask.getLag.
The original idea had been to just count an abstract value for load, so
the number of permission checks per tick stays limited, however that
doesn't scale with the CPU power and other.
2018-02-07 23:44:46 +01:00
asofold 3d8eb00981 Despite soon to be replaced by thread-safe read, warn her.
*here.
2018-02-07 18:52:18 +01:00
asofold eabd648ad7 Skip (most) lazy permission updating in case of heavy load. (+)
This doesn't account for lag, but keeps the impact down slightly. Not
sure this is really useful.

(+) Only run set back for online players. Quitting has to be handled
differently.
(+) Comments.
2018-02-07 18:46:03 +01:00
asofold 5d5e45e2df Set default child permissions in plugin.yml. 2018-02-07 16:54:03 +01:00
asofold 6f4c61d8f3 [BREAKING] Remove legacy behavior for notify permissions.
* Remove the old per-world permission cache.
* Use the new permission caching feature.
* Always use permission subscriptions.

Pitfalls:
* Permission subscriptions might fail under certain conditions
(legacy?).
2018-02-07 15:15:34 +01:00
asofold ad87137711 [BREAKING] Fix fall damage with jump effect (for most).
Only count the fall height below the set back y from lift-off (rather).

Breaking:
* Adjust method signatures and public visibility / interface for NoFall.
2018-02-06 14:53:42 +01:00
asofold f6519ef289 isInfinite... 2018-02-06 13:46:26 +01:00
asofold 658de28fcd lostground: adjust for equipped end portal frame.
Allow slightly lower amounts of negative y-Distance.
2018-02-06 12:36:07 +01:00
asofold 715a49d1bd Passable / initially colliding blocks: catch 1.5 height.
Just check bounds vs. blocks up to 0.5 blocks lower within
BlockProperties.collectInitiallyColliding.
2018-02-06 12:17:27 +01:00
asofold 3c9809817a Improvements on piston + slime block.
Issues with bunny hopping remain (...), but this might help with
elevators.

Use of velocity entries has been made more strict (directly use, remove
previously queued ones).
2018-02-05 23:13:06 +01:00
asofold c45a31b979 [BLIND] Switch rule definition to a list of strings. (+)
(+) Extend/alter slightly, e.g. added a regex example.

Replacement characters are not needed, and default values won't keep
reappearing.

Tests pending, e.g. dump with the upcoming registry log.
2018-02-02 23:49:58 +01:00
asofold 08aaa5fb1c PermissionPolicy: Rename to/from config. Clarify defaults. 2018-02-02 22:43:53 +01:00
asofold 97d59045ae [BLEEDING][BREAKING][INSTABLE] Swiftly throw in permission caching.
Benefits:
* Improves performance, where permission lookup has major impact, with
timeout based lookup, static permissions (skip permission check
entirely), and world/offline based invalidation. (Once fully
implemented.)
* Hopefully more efficient: use Bukkit Permission for faster defaults.
* (Allows control over how which permission is to be
updated/invalidated, which is useful per se.)

Risks:
* Complex changes yield bugs.
* Other plugins depending on NCP might break.
* Cache incoherence might happen (permissions are changed dynamically +-
unintended malconfiguration, or in case of bugs).
* (Endless loops certainly have all been fixed.)

Breaking:
* Lots of more or less internal API has been changed or removed: Check,
CheckType, CheckUtils, TickTask, ...
* Permission checking behavior has been altered.

Rough points:
* Implement a permission cache within PlayerData.
* Remove the player tasks and permission updates in favour of handling
those within DataManager and PlayerData.
* Adjust everything else to it (partly TBD).
* Updating sets of permissions (e.g. for CHAT) is done more lazily now,
i.e. one per 10 ticks). An actual permission check would still yield an
update next tick (asynchronous).
* Fixed/extended random spots (DualCollection, MiniListener registration
support, StringUtil).

Missing:
* Basic implementation
  * Cleanup after logout (stages: 1. non-essential like permissions,
2. unrecoverable like set-back location, 3. complete data removal).
* Coverage
  * Might have missed spots.
  * NoCheatPlus.nameSetPerms should be replaced by caching + default
config for world-wise updating.
  * Command permissions are always checked. At least for players,
cache based lookup should get implemented.
  * More unit tests.
* Extended configurability: Per-world settings/policies.
* Efficiency
  * Not all parts of the implementation are 100%/optimal yet.
2018-01-30 23:09:34 +01:00
asofold e7aa12141a Fix overrides not respecting external side conditions. 2018-01-21 18:56:17 +01:00
asofold 6bf5b4c180 Support configuration for breaking time overrides. 2018-01-21 18:39:32 +01:00
asofold 1a8c292015 Support overriding the block breaking time for specific side conditions.
Relatively cheap addition, done:
* Internal API within BlockProperties.

Missing:
* Support configuration: compatibility.blocks.breakingtime
* Support a command to update by the last n mined blocks (!). Needs
storing all side conditions within BlockBreakKey and convenience methods
for getBlockBreakKey + use internally.
2018-01-21 18:11:03 +01:00
asofold cdbd49785e Adjust breaking time of stone axe vs iron block. 2018-01-21 16:44:08 +01:00
asofold 6d04795850 Bogo-fix first attack after data removal triggering...
fight.noswing.
2018-01-20 01:03:49 +01:00
asofold b60d63d2e2 Only accept public methods for now. 2018-01-20 00:50:16 +01:00
asofold c2dcc600b5 Use public visibility for event handler methods. 2018-01-20 00:37:20 +01:00
asofold 09a963ed49 Add GPLv3 headers where missing. 2018-01-17 23:52:50 +01:00
asofold 37127c1f2b [BLEEDING][BREAKING] Use a new internal event registry.
The old ListenerManager is removed, new system in place. Removed
doesManageListeners(). (The new system isn't that new, but it's been
fixed and adapted to using RegistrationOrder.)

New
* Register all Bukkit events via the new EventRegistryBukkit.
* This way listeners can be ordered by numeric priority and tags
(regular expressions for beforeTag and afterTag).
* Unregistering listeners is possible (a listener node stays in the
Bukkit registry, but only one per event).
* It's possible to add listeners with minimal impact (MiniListener).
* The registry registers by event class 'hard' i.e., no relations
between already registered classes are checked.
* Order isn't necessarily stable nor even reproducible for randomized
start conditions with the same elements.

Point
* Compatibility hooks can easily place event listeners
before/after/between NCP default listeners, without resorting to tricks
like 'load-before'.
* Future registry of NCP itself: unregistering listeners is necessary
for runtime-removable checks, order is useful if not necessary, to be
able to add check listeners at any point of time.

Breaks:
* Anything relying on the previous (optional) managelisteners feature.

Missing:
* Lots of testing/inspection.
* Ensure all NCP listeners are coming with name/tag at least.
* Provide meaningful tags/RegistrationOrder for fine grained access
(e.g. after feature.moving but before feature.inventory).
* Change cncp to hard depend on NCP and use listener priorities.
2018-01-17 12:42:32 +01:00
asofold f7571dcf2f [BREAKING] Move std. annotations into RegistrationOrder. Add more.
* The annotations made for RegistrationOrder are defined in there.
* Add RegisterMethodWithOrder (method) for event handlers.
* Add RegisterEventsWithOrder (type) for default order with listeners.
2018-01-16 21:08:45 +01:00
asofold 243d8dd6c8 Fix premature non-abort. Return boolean for simplicity with traversal. 2018-01-16 12:02:29 +01:00
asofold 2b469a4613 Add traversal methods. 2018-01-16 11:31:54 +01:00
asofold c9d2a5de74 Simplify using CheckTypeUtils. 2018-01-16 11:02:34 +01:00
asofold 361b37962d Move methods from hooks.APIUtils to utilities.CheckTypeUtil.
(Not specific to hooks anymore.)
2018-01-16 10:18:55 +01:00
asofold 1d96fb32a1 An unmodifiable list. 2018-01-16 09:53:30 +01:00
asofold 3e81499fa6 Add a CheckTypeTree for fully spanned check-type-related structures. 2018-01-16 00:18:17 +01:00
asofold 532eef14a2 [BLEEDING] Partial overhaul for CheckType.
Yes
* Remove the UNKNOWN type.
* All types except ALL have a parent now.
* All types have a type now.
* APIUtils: Add getDirectChildren for distinction.

No
* APIUtils doesn't collect the descendants in a generic way yet.
2018-01-16 00:10:33 +01:00
asofold 073220cc01 Clarify APIUtils methods meaning by renaming, deprecate former. 2018-01-15 23:19:41 +01:00
asofold adc0d16d73 Add a type for check types (future may have multiple levels). 2018-01-15 23:07:04 +01:00
asofold a25dc44501 [BLIND] Include other blocks in the multi protocol block patch, rename. 2018-01-15 22:16:09 +01:00
asofold e8cf861150 Disable the MultiClientProtocolWaterLilyPatch with unit tests. 2018-01-15 22:00:17 +01:00
asofold 01aaccbf54 Fixes and extension for Activation. (+)
(+) Always return Activation, not IActivation.
(+) Add unitTest() and notUnitTest().
2018-01-15 21:59:39 +01:00
asofold 30b293e735 Rename DummyNoCheatPlusAPI to UnitTestNoCheatPlusAPI for the prefix.
Allows determining the state of the system more easily.
2018-01-15 21:45:41 +01:00
asofold 13b00a6b8e Fix APIUtils not returning an unmodifiable collection. Change to Set.
Using the LinkedHashSet directly.
2018-01-15 21:20:50 +01:00
asofold 5cf2613f36 Should mention... 2018-01-15 13:10:44 +01:00
asofold def7d61bc5 Test for NPCs with the Inventory.Open check. (+)
(+) Note: If it's fired asynchronously, meta data isn't checked, due to
that not being thread-safe. In future extra checks for (demanded to be)
thread-safe external plugin APIs can be added (reflection only).
(+) Add comments to PlayerData, concerning future treatment of name-uuid
mappings and retaining data.
2018-01-15 13:02:30 +01:00
asofold 7fdd6a586b Register the ExemptionSettings instance in use as generic instance. 2018-01-15 12:31:00 +01:00
asofold dc4849f3a8 [BLEEDING] Do not delete PlayerData instances for online players. (+)
(+) Add getPlayerName for exact case name getting from internal storage.
2018-01-14 16:31:38 +01:00
asofold 8e11fe8184 removeDataPrecisely: Don't create ANY debug text if debug is false. (+)
(+) Add/alter comments with PlayerData removal.
(+) Remove comment to store PlayerData by UUID.
2018-01-14 14:39:12 +01:00
asofold 01f6db48b0 Correct javadocs. 2018-01-04 00:04:08 +01:00
asofold c6aec5ed09 Implement F_MIN_HEIGHT16_1 and F_MIN_HEIGHT16_15. Clarify javadocs.
Only applying with GROUND_HEIGHT set, these flags allow setting a
minimum height for passability and ground workarounds, covering two
typical cases.

Due to a range of hard coded workarounds being in place already, these
flags won't apply for all blocks. See getGroundMinHeight.
2018-01-03 23:57:12 +01:00
md_5 df3344409b Fix server version detection logic 2017-12-21 14:00:27 +11:00
asofold af44f13fbd [BREAKING] BlockCache: rename getTypeId to getType. 2017-12-18 01:19:49 +01:00
asofold ce98d2aa54 [BLEEDING] Fix native access modules. 2017-12-18 01:14:23 +01:00
asofold 7fb960275d [BLIND] Use MinecraftServer.getVersion, if no version was detected. 2017-12-16 16:51:46 +01:00
asofold 7c5d67b1d4 Fixes and adjustments with String ids.
* Start renaming methods internally (getType for getting Material) -
unfinished.
* Temporary fix for the NCPCompatbukkit/cbreflect module: fetch NMS
blocks by id until we have a mapping and/or something efficient and
future proof in place.
2017-12-16 16:14:41 +01:00
md_5 c564289ef3 Fix default message params 2017-12-08 14:59:55 +11:00
md_5 1e988f24a0 Fix import location 2017-12-06 21:45:58 +11:00
md_5 3a111dc4a5 Remove Block IDs 2017-12-06 16:55:29 +11:00
asofold 7e43deaa28 Cancel interaction for players who are not online. 2017-05-31 21:03:46 +02:00
asofold afe080f1c2 Use cancel.dead as id instead of canceldead. 2017-05-31 21:00:42 +02:00
asofold 0b2882c58b Revert allowing placing boats on ground.
Placing boats on ground is possible at least down to CraftBukkit
1.4.5-R1.0, thus the reason for having the boatsanywhere feature solely
is to prevent abuse. Thus allowing to place boats on ground does not
really provide a 'fix'. In order to allow placing boats anywhere, the
configuration flag has to be altered.

It may be worth a discussion, if we want checks to prevent Minecraft
features at all. A proper fix for abuse would be more complicated,
involving checking the estimated bounding box of the placed boat not to
collide with blocks neither with entities while being on ground-.
Determining the bounding box and re-checking with entity spawn might be
the more complicated part, as for the rest API/Infrastructure exists.
2017-05-31 14:22:51 +02:00
asofold b441c1ea88 Allow placing boats on ground for MC 1.12 with protocol support plugins.
Allowing it with protocol support plugins is added, assuming that
they'll allow 1.12 too.

Missing:
* The vehicle.envelope check must be made (more) precise, as moving on
ground is possible with a boat since 1.12, specifically on ice they can
reach high speeds. Without more close modeling, they'll be able to use
this for speeding.
2017-05-28 21:30:44 +02:00
asofold 049a925fb3 Move multi protocol plugin activation to a utility. 2017-05-28 21:03:21 +02:00
asofold ddc0436e43 Fix boatsanywhere not recognizing other than oak boats.
Other:
* Add and use BlockProperties.isWater.
2017-05-26 14:13:02 +02:00
asofold 8b02a7ce4c Fix fastbreak/grace not being read correctly. 2017-05-17 11:11:44 +02:00
asofold 982eecbfcf Remove unused member. 2017-05-17 10:56:47 +02:00
asofold 135d3e812b Change usage to resemble the format of other descriptions and documents. 2017-05-14 14:34:17 +02:00
asofold 416a2d4ef3 Extend the capabilities of the 'ncp log stream ...' command.
* Allow specifying to remove color definitions (both Minecraft default
and with '&') and to replace color definitions that use '&'. Append
?color or ?nocolor after the level definition. (Shortcuts: c, col / nc,
noc, nocol, nocolor). Either of both can be set, not both.
* Log to multiple streams with individual levels and color flags by
separating stream definitions with '+'.
2017-05-14 14:07:30 +02:00
asofold 89ae23997d Fix CONCRETE_POWDER id. 2017-05-14 12:14:50 +02:00
asofold 8ea1d9e664 Detect Minecraft version with -pre suffix (MC 1.12-pre...). 2017-05-14 12:13:56 +02:00
asofold 9e763c2584 [BLIND] Add 1.12 blocks. 2017-05-14 12:07:49 +02:00
asofold b5b6e782ed Add cmdc action - like cmd just with replacing color codes. 2017-05-13 20:45:21 +02:00
asofold b0161dfac8 Don't use super.getMessage. Format/clarify. 2017-05-13 20:31:52 +02:00
asofold 620b5ea40b Add command: ncp log stream stream_id[@level] message....
Any registered stream id can be used (default streams are defined in
fr.neatmonster.nocheatplus.logging.Streams, in theory other plugins
might register their own ones).

Shortcuts are:
* ncp log stream notify message... (ingame notification, info level)
* ncp log stream debug message... (trace file, fine level)
* ncp log stream status message... (file + console, info level)
* ncp log stream init message... (file + console, info level)

Shortcuts do support setting the level, e.g. status@severe.

Due to string parsing these are not as efficient as hooking into the API
would be, naturally.
2017-05-13 13:22:50 +02:00
asofold 861ead1cac Set both NoFall and MC fall distance both on UNKNOWN teleport and ...
when appropriate.
2017-05-12 23:24:17 +02:00
asofold 076bf52e24 Fix undoing of cancelled set-back teleports. 2017-05-12 21:16:59 +02:00
asofold 9478daaa02 Prepare new block flags. Add comments.
To model differing behavior of fluids, i.e. half fall distance per
in-lava move vs. zero fall distance once in water, block flags will be
used. To really do this the NoFall check will be altered to account for
new flags. Once at it, the check should also treat from and to
independently of each other - there are some inconsistencies, such as
how oFallMaxY is set.

Further flags are reserved for MIN_HEIGHT..., indicating that
compatibility will be improved without compromising protection too much.
Thus instead of making a block entirely passable, you could set a
specific min height flag alongside ground_height (and possibly height
for max. height), in order to allow walking between level x and y but
not below (think of grass_path).
2017-05-12 21:11:41 +02:00
asofold 6347527c1c Set thisMove.flyCheck only when the/a check is run. 2017-05-09 23:30:25 +02:00
asofold 0c6cb6577d Use the lower eye height when gliding with elytra (selected checks).
* Block checks (interact/place/break): reach and direction.
* Random other places, like BlockProperties.getBreakingDuration.
2017-05-09 22:04:50 +02:00
asofold 344b032d49 Fix / "refine" elytra handling. Set all maxheight to 128.
* Lift-off side conditions.
* Force stop gliding for some side conditions, to avoid freezing.
* Set maxheight to 128 for elytra and levitation too (mods/plugins/etc)
- better refine checks to catch stuff.
* Fix special flags not getting set with initializing ModelFlying from
config.
* Debug log exceeding the maxheight setting.
* Mostly harmless: Add interfaces and access methods, including
convenience methods.
* Don't store methods in Bridge1_9.

Issues left, not limited to:
* Boost not recognized on occasion.
* Gliding state kept when submerged in water and moving normally like
when not gliding, e.g. ascending (head in water / fully submerged).
* Elytra lift off not accepted: Gliding state set near the water
surface, but survivalfly check runs. Might be fixed already, though.
2017-05-09 15:31:13 +02:00
asofold 9505c0747d Use another special flag for ascension while gliding. Do/fix locking. 2017-05-07 21:45:47 +02:00
asofold 87374fe396 [BREAKING] Change ModelFlying to a more flexible method of setup.
Breaks what used ModelFlying in any other way than setting up by config.

Use setters with chaining and a lock() method to lock against changes,
provide copy-constructor.
2017-05-07 21:31:22 +02:00
asofold d306c32922 Adjust the vertical ascend speed for spectator mode. 2017-05-07 16:26:33 +02:00
asofold 7cd2303c45 Increase the default horizontal speed for spectator mode by 30. 2017-05-07 15:58:01 +02:00
asofold c87e878311 [BLEEDING] Adjust to the lowered height when gliding with elytra.
This is incomplete, as some pre-checks are still done with the full
bounds (flying just under web will put you to sf). Efficiency-wise there
could also be a more light-weight adjustment.

Attack areas are left too, e.g. flying (with or without boost) to
underwater, then end gliding to effectively clip with the head into
/through the block above. 

With the lowered height it's also possible to get into odd spots, so
after stopping to glide you'll not be able to get out anymore.
2017-05-07 14:20:54 +02:00
asofold c0b0a2fac3 Allow precise setting of all the height-related properties. 2017-05-07 14:16:43 +02:00