Commit Graph

954 Commits

Author SHA1 Message Date
asofold
bfc6422115 Move entity last position and look access to another package. 2016-06-20 22:14:35 +02:00
asofold
4653b46579 Quickly add box margins to LocationTrace/ITraceElement.
* Remove SharedContext.
2016-06-20 22:07:53 +02:00
asofold
65525f3c14 [BREAKING] Move interfaces that don't auto register outside of feature.
registry.feature is rather meant for stuff that registers automatically
with adding as a component to the NoCheatPlus API.

Package organization isn't done in a very consistent way, this is just
taking a step into looking at how it would/could look like.

Likely that kind of separation can't be kept, so things will in the end
be organized by their main topic perhaps, and a registry implementation
will have to state what will be registered in what way, and possibly
have a method to allow checking what's possible to register.
2016-06-20 18:51:07 +02:00
asofold
fc90c7ef20 More headers. 2016-06-19 17:27:07 +02:00
asofold
b6088c3e3a [BLEEDING][BREAKING] Registry changes concerning MCAccess.
Main objective is to get rid of too complex setMCAccess methods and to
be able to store handles rather permanently instead.

* Remove MCAccessHolder.
* Add/refine interfaces and implementations.
* Change constructors.
2016-06-19 16:55:44 +02:00
asofold
92252a9dc4 [BREAKING] Rename the new DisableListener to IDisableListener.
(Plus call in reverse order of registration.)
2016-06-19 12:29:53 +02:00
asofold
d4acad924a Change order in onDisable (DisableListener, exemption, hooks).
The idea is to change internals towards having a 'default'
DisableListener executing onDisable before the data removal of checks
and DataManager have been called, thus plugins or even checks might
still access all sorts data with disabling the plugin.
2016-06-19 12:01:37 +02:00
asofold
bb8c8f4156 Add missing GPLv3 headers + accidentally add useless javadoc comments. 2016-06-18 17:57:16 +02:00
asofold
9c9210e411 Make illegal move kick messages configurable. 2016-06-18 17:39:45 +02:00
asofold
307374254b Fixes for handling illegal vehicle coordinates.
* Only load chunks, if there is no illegal coordinates.
* If there is no valid set-back on receiving illegal coordinates,
attempt to recover from past move / current (bug), or kick.
2016-06-18 17:28:50 +02:00
asofold
2bf3e14ab9 More on GenericInstanceRegistry.
* Add a way to stay updated about the latest registration state for a
class.
* Add a class for the registry.
* Let the registry log all registrations.
* Make super interfaces for LogManager (simple logging of
String/Throwable).

Missing:
* More streams (REGISTRY, PLAYER/CHECK_STATUS/EVENTS or just CHECKS at
least). Make status rather the plugin status. Registry could have an
extra file.
* More efficient IGenericInstanceHandle use (wrap + reference counting).
2016-06-16 22:23:54 +02:00
asofold
0868e30994 Allow to detect delegate players for some contexts. Other fix(es).
Attempt to treat fake players less Concept is subject to change, might
want fall-back methods or skipping native access in general where it's
not needed (thus not need to check for native entities).

Other
* Don't insert dataMan into disableListeners twice.
2016-06-16 01:30:19 +02:00
asofold
d5b45e53f9 Add support for IPostRegisterRunnable.
Allows to register with the generic instance registry for another class,
after component registration, with implementing this method.
2016-06-16 00:04:46 +02:00
asofold
77465b09e3 [BREAKING] Move (registry) interfaces to sub-packages.
This is neither complete nor final. Intentions are to group interfaces
better, rather organizing packages in a flat way.

At some point there will be other major move-arounds, but that'll
hopefully be a point where we have a better idea of where to put what
(...). For now the approach is to move interfaces/things rather where
it's not interfering with profane exemption API use, preferably neither
taking down the top level API layer
(NoCheatPlusAPI). 

Added deprecated interfaces to prevent cncp to break too quickly.

Outlook:
* Classes that are rather only expected to be used internally for setup
will likely get moved around freely.
* Classes that have been added since last release might also get moved
around freely.
2016-06-15 16:13:59 +02:00
asofold
87d3e5149b Notes. 2016-06-15 14:40:15 +02:00
asofold
48bc795fd5 Make limiting parameters for block change tracking accessible.
(Not yet in use by default.
2016-06-15 13:51:36 +02:00
asofold
c7f19bdbe6 Add PISTON_MOVING_PIECE as a default exception for now. 2016-06-15 13:50:48 +02:00
asofold
e8ff907f45 Implement peekFlyingQueue. 2016-06-15 01:03:32 +02:00
asofold
f87307562b Make the maximum for the horizontal buffer configurable (sf). 2016-06-15 00:44:22 +02:00
asofold
acca3244a8 Also detect v123.5 for plugin versions. 2016-06-14 10:17:01 +02:00
asofold
b6fa205508 Allow some friction upwards on climbable for now.
Seems to mostly concern receiving velocity when on ground, though.

Issues remain with vdistrel when moving off climbable.
2016-06-14 00:18:41 +02:00
asofold
8aced9d116 Use a class for version checking with ProtocolLib. 2016-06-14 00:16:30 +02:00
asofold
637f94f579 Food level is ignored for sprinting with getAllowFlight returning true. 2016-06-13 14:22:04 +02:00
asofold
e543d905dd Extend debug logging for blockinteract (rate limited). 2016-06-13 13:44:21 +02:00
asofold
d948357b46 Destructive hot fix for item duplication via end portals.
Configurable. Falling blocks, piston, end portal, roughly. Destructive:
the entity is removed.

(In addition some of the feature tags are added regardless activation
flags, because 'ncp reload' could change things anyway.)

Feel free to suggest alternatives/variations...
2016-06-13 00:14:15 +02:00
asofold
5e15dc8c9b [BLEEDING] Load chunks for vehicles too. 2016-06-12 20:23:05 +02:00
asofold
245f5389a0 [BLEEDING] Add the capability to load chunks on moving and teleporting.
Except with join/respawn, the methods will not load chunks if close by
past moves have extra properties set, assuming the chunks are already
loaded then.
2016-06-12 20:07:01 +02:00
asofold
3bfd3a7aff Use a getter for the xz-margin at the used resolution. 2016-06-12 16:55:24 +02:00
asofold
da8b056a69 Decouple legacy code.
Easier to make configurable, easier to remove.
2016-06-11 20:23:36 +02:00
asofold
fec027d41d Comments. 2016-06-11 20:04:38 +02:00
asofold
bd68362197 Implement equals and hashCode for BlockPositionGet. 2016-06-11 19:09:25 +02:00
asofold
6269ca9cb4 Fix standing on TRAP_DOOR (and the like). 2016-06-11 16:38:14 +02:00
asofold
ed10330657 [BREAKING] Remove ignorepassable config support. 2016-06-11 16:37:34 +02:00
asofold
2ff0076e69 [BLEEDING] Switch implementation for moving.passable.
Switch to AxisTracing instead of RayTracing. This means most workarounds
are removed, including some (legacy) performance saving tweaks.
2016-06-11 15:49:49 +02:00
asofold
ec333fb432 Implement ignoreInitiallyColliding for (Passable) AxisTracing.
Not really adding general purpose implementations for
BlockPositionContainer, likely good enough for what we need for the time
being.
2016-06-11 13:50:28 +02:00
asofold
b2d7c29814 [BLEEDING] Alter 'ignoreFirst' mechanics with collision checking.
Change to 'ignoreInitiallyColliding' and only ignore the first block, if
it really is colliding right now. The flag is not resetting with
set(...) anymore.
2016-06-11 12:39:25 +02:00
asofold
720386a0e2 Patch up ascending with minecarts. 2016-06-10 15:12:00 +02:00
asofold
f1ffb23686 Elaborate on ray-tracing with and/or passable.
* Add capability to cut margins opposite to the moving direction for
AxisTracing (extend interface(s)).
2016-06-10 13:36:04 +02:00
asofold
5d0d5d411d Meanwhile ... passable and ray-racing... and fixes.
* Increase precision of debug logging.
* Fix iteration conditions for the axes.
* Fix margins for collidesFence (method + THICK_FENCE workaround
parameter).
2016-06-10 11:29:25 +02:00
asofold
181502cdd4 More on Passable/RayTracing.
* Prepare more debugging.
* Move collides flag into RayTracing.
2016-06-10 08:46:09 +02:00
asofold
19312bdbfa [BREAKING] More on passable and ray tracing.
* Make RayTracing and PassableRayTracing implement interfaces. (rough,
not used in tests yet etc.).
* Optimize ray tracing use in BlockProperties.
* Add an axis-wise implementation (buggy, hardly tested, thus not used
yet).
2016-06-10 00:23:56 +02:00
asofold
765383834b [BREAKING] Generic instance based attribute access.
MCAccess will be split into smaller providers with time, so do expect
more breaking changes of this type. If this is an issue, please contact
us, so we can see how to smoothen things. E.g. we could still make
MCAccess an aggregate, that just delegates to the more fine grained
providers, or we could provide other 
(default) aggregates.

This also adds a Bukkit-based provider for future updates.
2016-06-09 20:14:39 +02:00
asofold
8ba1f2cf74 Minimize code for one generic instance factory instance. 2016-06-09 18:22:23 +02:00
asofold
3cdfa4b971 [BLIND] Add block-info for MC 1.10. 2016-06-09 13:27:43 +02:00
asofold
f2d0123ee0 [BLEEDING] Pigs can climb.
Known false positives:
* Transition to air / blocks above (Step up / other).
2016-06-08 18:52:23 +02:00
asofold
b35805adc8 [BLEEDING] Evolution has made pigs both wider and reach down farther. 2016-06-08 00:10:32 +02:00
asofold
6ff2578653 Fix trap door on top side above ladder.
(Typical last-minute addition over-doing workaround confinement.)
2016-06-07 13:42:18 +02:00
asofold
129733a32f Add groundMinHeight value for THICK_FENCE (1.0). 2016-06-07 13:10:53 +02:00
asofold
ce315664bc Fix block flags set to same values (fences/gates). 2016-06-07 13:04:58 +02:00
asofold
a664686c83 [BLEEDING] Envelope checks for more than boats.
Simplistic in-air treatment and very short testing for false positives.

Unfinished, likely lots of edge cases and issues are yet to be mended.
2016-06-06 22:48:57 +02:00