Commit Graph

2836 Commits

Author SHA1 Message Date
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
f18e7e46d1 [BLEEDING] Guards for activation of IAtributeAccess implementations. 2016-06-09 23:40:09 +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
537eb79e09 no luck. 2016-06-09 16:44:44 +02:00
asofold
eba5886212 spigot-server 2016-06-09 16:42:52 +02:00
asofold
fe3f115095 Test build vs. spigot. 2016-06-09 16:40:14 +02:00
asofold
3cdfa4b971 [BLIND] Add block-info for MC 1.10. 2016-06-09 13:27:43 +02:00
asofold
f12aa93454 Update CompatCBDev to MC 1.10. 2016-06-09 13:02:37 +02:00
asofold
e4f02595ba Dedicated module for Spigot (CB) 1_9_r2 (MC 1.9.4).
(+ Prepare 1_10_r1 build parameters.)
2016-06-09 12:41:33 +02:00
asofold
294afd4f89 Allow ProtocolLib 4.0.2 and later on MC 1.10. 2016-06-09 12:12:11 +02:00
asofold
33d85a8d79 Set version to 3.15.0-SNAPSHOT for MC 1.10. 2016-06-09 09:41:02 +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
asofold
2aa14a6d86 Use PlayerMoveData instead of PlayerLocation rather.
More or less random places, where it is easy to overview.
2016-06-06 18:46:27 +02:00
asofold
100d3c8917 1.9.x special case: climbable trap doors. 2016-06-06 17:14:04 +02:00
asofold
785fe554e0 Change config default for 'ingoreallowflight' to true.
Should favor fixing issues with transitions between fly-nofly or
allow-flight-whatever rather.
2016-06-06 11:39:20 +02:00
asofold
016d5894de Add the 'ncp stopwatch' command.
Taken from CG/customplg.
2016-06-03 21:43:08 +02:00
asofold
6e688cc3ff Make boatsanywhere configurable. 2016-06-03 08:59:10 +02:00
asofold
4e91a9d5fc Ready for UEFA EC: GPLv3 headers.
Might need more training still.
2016-06-02 20:33:21 +02:00
asofold
b212440b97 Call removeInvalid more. (+ Use addFirst.)
* Call removeInvalid if many elements are queued on add (cheat not
sending moving events, player takes damage), and on clear, in order to
allow detection of unused velocity with not sending moves.
* Add get+set for unusedActive.
2016-06-02 19:25:40 +02:00
asofold
bc3948cd11 [BLEEDING][BLIND] Debug only: unused vertical velocity.
Simplistic unused vertical velocity tracking for starters. Only
activates with debugging set.
Needs on-the-fly debugging (all) or at least debug set for moving
(config: checks.moving.debug: true), and needs debug set for fight to
check on damage/attack (config: checks.fight.debug).

Method is simple, roughly: Keep track when the player has last been on
ground, or when their head had been blocked. Based on that, we can
attempt to judge if invalidated velocity entries might be cheating. 

There is more aspects to cover, and this is not a check, it just will
debug information to the log file. Would appreciate feedback on if/what
this will log with noknockback cheats on :) (false positives are most
welcome as well).
2016-06-02 11:25:43 +02:00
asofold
b1b30aba9b Reduce warning level for NoCheatPlus. 2016-06-01 21:30:50 +02:00
asofold
6290eb85c6 Remove deprecated default (location trace).
We'll add something that makes sense later on.
2016-06-01 21:23:33 +02:00
asofold
68c4ab2bf2 Review dual wielding.
* Account for off hand in more places.
* Use bridge methods to get rid of warnings for now.
* Adds utility methods to CheckUtils.
* Do not allow left click on off hand (knockback).
2016-06-01 20:00:37 +02:00
asofold
241ff08d47 FastConsume: account for off-hand on cancel. 2016-05-31 08:27:42 +02:00
asofold
5a4f93c1ed Use AuxMoving instead of storing a XyMoveInfo instance. 2016-05-31 08:14:52 +02:00
asofold
184662bb04 Refactor to split off EntityDamageByEntityEvent handler. 2016-05-31 07:36:40 +02:00
asofold
9a6a890932 Do check for the expected size as well. 2016-05-31 07:06:51 +02:00
asofold
7f2bfe10f4 If there is one thing about contributing that is EASY TO DO IT IS
FINDING BUGS LIKE THIS EVEN SERVER OWNERS FIND THEM WITHOUT LOOKING AT
THE CODE. Then again perhaps, who's in charge of the QR for this
plugin??
2016-05-30 22:48:25 +02:00
asofold
a02c328f33 Simplify (I)TraceEntry: remove lastDistSq. 2016-05-29 20:08:16 +02:00
asofold
2ade022179 Change implementation of LocationTrace. No merging based on distance.
Since merging by distance only creates false positives (one would have
to increase the bounding box for an entry, but the angles would never be
100% right), we never merge, instead we don't add a new entry if the
position is the same, the time value is not updated in this case. For
validity of an entry you always have to consider the time span until the
previous (younger) entry or until now for the latest entry.

Rough changes:
* Use an interface for accessing trace entries.
* Use a linked structure for the actual trace.
* Use maximum age and size to limit the number of stored entries.
* Use a pool to somewhat limit object creation (size may need
configuration or scaling with number of players).
* Since the trace starts empty, have the field be final.
* Keep trace elements if settings are changed, cut size if necessary.
* Remove obsolete tests.

Potentially missing:
* Usage of LocationTrace has not been checked if we need to account for
the time of the latest entry not necessarily being updated (!).
* New tests, e.g. accounting for the expiration of entries.

Follow ups:
* (Extend fight/loop checks to a latency window mechanism.)
2016-05-29 19:35:52 +02:00
asofold
75aa1b500b Use an interface for trace entries: ITraceEntry
Upcoming changes will roughly be:
* Change implementation to a double linked structure.
* Implement/use something like ListIterator.
* Never merge entries, instead use some pool and time/extre-n as limits.
* A basic latency window implementation just for the LocationTrace for
preliminary experiments. [Track hit/miss all time + recent so and so
seconds, some extra cancelling/invalidation mechanics, allow to test
complement 0->window start and possibly window-end-> max latency for
some cases, cancelling mechanics may contain a buffer or a mixture of a
buffer relating to average miss rate]
2016-05-29 15:02:28 +02:00
asofold
2abb502a60 Add configurability for exemption settings. 2016-05-29 13:34:09 +02:00
asofold
22072a2175 SetExemptionSettings has to be a static method. 2016-05-29 13:09:45 +02:00
asofold
fb687970f7 Scrolling to the right. 2016-05-29 12:36:42 +02:00
asofold
347d4d3795 ExemptionSettings: meta data and npcs (no config yet).
Wild card exempt NPCs by default, encapsulate meta data checks here (if
exempted, if is NPC).

With these default settings Citizens NPCs should be exempted by default,
also all custom Player implementations that extend the Bukkit interface
NPC (not sure if such still exists).

Follow ups:
* Configurability.
* Exemption tickets to prevent others overriding your exemptions
(later).
2016-05-29 12:30:30 +02:00
asofold
a161609f14 Ensure we're not the idiots, this time. 2016-05-29 11:25:11 +02:00
asofold
51893791d6 Account for off-hand item in FightListener.
Affects:
* Assumptions about knock back.
* Illegal items check (despite probably obsolete/outdated).
2016-05-27 14:22:45 +02:00
asofold
8cb046a1b3 Cover higher levels of the levitation effect.
Hard-coded-ish.
2016-05-26 12:57:28 +02:00
asofold
ba91842122 Fix dealing damage if getAllowFlight returns true. Keep configurable.
Kept configurable to enable increasing difficulty for fly plugins use,
e.g. to allow players to fly within certain regions, but still deal fall
damage on falling.
2016-05-25 18:55:45 +02:00
asofold
0c6617d636 Player moving: Debug log for states of allowFlight, flying and gliding. 2016-05-25 14:21:53 +02:00
asofold
ec193117ce Debug log view and bottom/top inventory on inventory click. 2016-05-24 17:45:39 +02:00
asofold
f009a14fab Clarify function of this method. 2016-05-23 09:24:33 +02:00
asofold
696b0509c1 Fix npe. 2016-05-22 22:29:27 +02:00
asofold
0d0b42d247 Add hidden configuration for horizontal speed cap for vehicles.
Section at: checks.moving.vehicle.envelope.hdistcap
Default is 4 (extreme move fall-back) at 'default'.
Other entries by bukkit entity type name, if desired.

This allows forcing set backs for testing in a convenient way, e.g. with
setting the value to 0.3 for boat/default.
2016-05-22 21:03:44 +02:00