Commit Graph

1181 Commits

Author SHA1 Message Date
asofold
30c3a40622 Towards vehicles with multiple passengers. 2017-04-02 18:55:32 +02:00
asofold
f7a11bbc95 Comments: Attribute.GENERIC_MAX_HEALTH / IGenericInstanceHandle. 2017-04-02 17:49:53 +02:00
asofold
0491fa7805 Use getWidth and getHeight for Bukkit entities, once available.
* Simplify MC version string.
2017-04-02 17:23:17 +02:00
asofold
c017d00866 Don't run legacy sweep attack detection, if the DamageCause exists. 2017-04-02 16:43:01 +02:00
asofold
4d84a9f512 Use MovingData.debug here. 2017-04-02 15:08:27 +02:00
asofold
c5e1f6ba2b [BLEEDING][BREAKING] Player move set back: cancel event + schedule TP.
Because Spigot changed to fire the teleport following an altered move
end point with TeleportCause.PLUGIN, we have to alter set back handling,
so we can ensure to keep TeleportCause.UNKNOWN for setting back players.

Instead of altering the move end point, the event is just cancelled, and
a teleport is scheduled (with a dedicated TickTask method). Uncancelled
moving events mean removing scheduled teleports.

[BLEEDING]
* Comparably simple change - more places and special cases may still be
uncovered.

[BREAKING]
* Plugins that may rely on the exact sequence of things within NCP, as
it used to be.

Random
* Change "set-back" to "set back" everywhere for simplicity, and to
obfuscate the actual code changes.
* Set backs are now going through MovingListener.onCancelledMove instead
of MovingListener.onMoveMonitorNotCancelled.
* Illegal move handling would still use event.setTo.
2017-04-02 15:01:23 +02:00
asofold
8b3dcff7c4 Simplify onTick, let JIT decide. 2017-04-01 18:52:09 +02:00
asofold
d324fc02fd Log details in flylong, and always for file+console.
* Split log messages: ingame vs. console+file
* Alter flylong to contain tags.

Performance-wise, it's not optimal that flylong is the same as flyfile
at this stage. Not sure if to remove flylong in favor of using flyfile,
to indicate it means details - main objective is to get minimal details
into the violation log, even if people edit it out of the ingame chat
messages.
2017-04-01 16:10:11 +02:00
asofold
6aeef95fb7 [BREAKING] Don't use TelelportCause.PLUGIN to avoid confusion (p+v).
Players and vehicles:
Instead always use UNKNOWN, as that is what results from
PlayerMoveEvent.setTo(newTo), as we use it for setting back players.

This should break functionality that relies on TeleportCause.PLUGIN
being used, possibly more likely with vehicles.
2017-04-01 14:29:57 +02:00
asofold
e3d5b70db8 Order.
(See if hooks work now.)
2017-02-22 23:16:38 +01:00
asofold
c046658c86 Allow the elytra model for creative mode, when not flying. 2017-02-22 22:51:04 +01:00
asofold
7ee946c899 [BLIND] Slowness hack for walkSpeed and attributes.
And:
* Move default walkSpeed/dlySpeed constants to Magic.
2017-02-21 19:26:46 +01:00
asofold
0ae9e962ab Add a method to remove all block change entries for certain coordinates. 2017-02-07 22:30:31 +01:00
asofold
514945f936 Cap additum for hacc at 10. 2017-02-05 12:54:25 +01:00
asofold
6f1b97c932 Add a simplified method to add custom (fake) block changes.
Internally, the tick is stored with a change id, so we can reuse a
changeId, if the tick is still the same, preserving rough order, as the
changeId should at least increase with the tick.
2017-02-03 23:49:26 +01:00
asofold
6f51fc531b isRedundant: Do check for null before calling equals.
(So far intended use always has an IBlockCacheInstance set.)
2017-02-03 22:58:47 +01:00
asofold
e129b58a6f Expire entries based on interval of validity, if set.
If a position has many entries, the oldest valid state deserves being
accounted for.
2017-02-03 22:07:29 +01:00
asofold
4cc747d8f4 Provide a public method to add custom/fake block change entries.
This isn't the last word on a public API, there likely will be the
following additions.
* One more simplified method with a minimal signature for simple
(non-push) entries (worldId, x, y, z, previousState).
* Optimized methods for adding multiple entries at once. Likely for
adding multiple entries of the same type/data/shape. Plus perhaps
simplified signatures to do without changeId and tick.

(Not sure if there will be need for a method allowing for a collection
of a to be defined class combining x+y+z+previousState.)

This will evolve based on feedback from GitHub issues.
2017-02-03 21:36:41 +01:00
asofold
a4596ede1a Don't skip processing if blocks are there (...). 2017-02-01 17:53:23 +01:00
asofold
72b454bbab [BLEEDING] Elytra boost: Who tested the other version!? 2017-01-29 19:20:47 +01:00
asofold
c2449ac08a [BLEEDING] Elytra boost: track and allow ascend.
Lots of issues remain with elytra, with and without boost. Selection:
* maxheight will trigger with the rocket feature, naturally. Mendable by
increasing it via configuration
(checks.moving.creativelfly.model.elytra.vertical.maxheight). Not sure
we'll just increase the limit or alter how it's dealt with (e.g. also
for sf: lock to a max / high slope value, independently of the set-back
and world height, alter as necessary).
* All sorts of transitions, e.g. onto ground, into water.
* Loss of boost right after adding (not sure if already fixed).
* What with hover, actually?
* Is the flight duration infinite with power 127?
* Issues with ascending after descending, even without boost?
2017-01-29 19:00:52 +01:00
asofold
8237fbca57 Fix NoFall issues on Spigot/MC 1.7.10.
Changes contain:
* MCAccess.dealFallDamageFiresAnEvent -> true
* Always log basic data on (handled) fall damage events.
* Add a tag for the cancel reason with NoFall. Alter the default alert
message.
* Move 3.0 to Magic.
* Set the skipping flag correctly on allowFlight being set.
2017-01-22 23:36:55 +01:00
asofold
5b0807847f Don't give silent permissions as child permissions by default. 2017-01-17 01:03:55 +01:00
asofold
272aaf3063 Don't test block change activity before the extreme move check runs.
(+ only test activity, if the extreme move check was passed.)
2017-01-08 16:17:21 +01:00
asofold
6bcaef9057 Disambiguate + fix redundant method call. 2017-01-08 16:08:21 +01:00
asofold
f560e756f5 isSameShape: with early return on either parameter being null. 2016-12-30 19:16:24 +01:00
asofold
cf04ee5a5d Track the current world name in ChatData for now. 2016-12-29 14:43:10 +01:00
asofold
b6ae8049b7 [BLEEDING] Ignore Minecraft fall distance if it's greater than tracked.
Fall damage is adjusted or cancelled, if the Minecraft fall distance is
greater than the distance(s) tracked by NCP (per move diffs, maximum y).
Intention is to prevent (speeding by) self damage by abusing Minecraft
dealing fall for untracked moves.
Issue: https://github.com/NoCheatPlus/Issues/issues/338
2016-12-29 00:19:55 +01:00
asofold
d85ee35d99 8465c40d93 (commitcomment-20312231) 2016-12-28 21:52:15 +01:00
asofold
8465c40d93 Register .silent check permission in postEnable.
Issue: https://github.com/NoCheatPlus/Issues/issues/353)
2016-12-28 10:37:34 +01:00
asofold
1ba300f3af [BREAKING] Move matchBlockFace to MapUtil.
(Likely no one is using this by now.)
2016-12-27 15:33:36 +01:00
asofold
b406204ce2 [BREAKING] Move isBadCoordinate to LocUtil. 2016-12-27 15:30:51 +01:00
asofold
68eec44f14 [BREAKING] Move LocUtil to utilities.location 2016-12-27 15:28:36 +01:00
asofold
d69dc0b44d [BLEEDING] Double trouble potential: NaN, infinity.
+ random Formatting + random fix (same angle checked twice in TrigUtil).
2016-12-27 15:26:26 +01:00
asofold
17db0bdcfe Comment: More work needed towards null world compatibility. 2016-12-27 15:04:28 +01:00
asofold
9d01191bcd cleanup: null checks. 2016-12-19 07:42:50 +01:00
asofold
dcfdec79e2 Intercept UnsupportedOperationException in getWorldConfig.
TemporaryPlayer issue: https://github.com/NoCheatPlus/Issues/issues/335
2016-12-19 00:11:22 +01:00
asofold
0ea8d379d0 Fix magic not used correctly. Indicate stuff. 2016-12-18 15:11:04 +01:00
asofold
1c024c072c [BLEEDING] First version of horizontal push.
New issue:
* Horizontal push can lead to vdistrel violations with yDistance = 1,
even with air blocks next to the foot position.
2016-12-18 00:33:13 +01:00
asofold
7646476993 Fix nested vehicle check on vehicle enter. 2016-12-17 19:44:40 +01:00
asofold
c9a744a7d3 [BLEEDING][BREAKING] Next step on past bounce with pistons.
Steps done:
* Add more velocity with less preconditions.
* Handle push with the player being just above the block where a slime
block is pushed to.
* Exception for vdistrel.
* Breaking:Move verVelUsed from MovingData to PlayerMoveData.

Gameplay issues remaining:
* Still too often fall damage is dealt.
* Friction envelope gets hidden with past-ground being set too often
(vdistsb).
* Potential for more edge cases.

Missing abuse prevention:
* Reinstate invalidation of past entries (currently turned off to
progress at all, will need another iteration).
* More confined preconditions.
* More/better invalidation conditions for velocity set for bounce
effects.
2016-12-17 15:39:54 +01:00
asofold
cf3ea4a1e2 [BLEEDING] One more step on slimes with pistons.
* Less fall damage.
* Flag all velocity added due to slime bouncing appropriately.
* Experimental concept for splitting up velocity, likely to be altered /
removed.
* Add a flag for (faked) pvp velocity.

NOTE: Invalidation of past entries has been deactivated to progress on detecting the stupid past bouncing at all. This will need another iteration.
2016-12-17 15:02:26 +01:00
asofold
6d28354f11 [BLEEDING] Consider an NPE fixed.
(Assume this doesn't result in an endless loop.)
2016-12-12 20:30:42 +01:00
asofold
6de231ac54 [BLEEDING][BREAKING] Shift entry points for past state bounce.
Lots of issues remain, but vertical push/bounce with pistons is much
improved. Still there are show stoppers (false positives remain, as well
as occasional fall damage).

Use same/similar entry points, like static/classic bounce checking in
MovingListener. SurvivalFly still keeps one exception with the
after-failure Y_POS block move check.

Also check: https://github.com/NoCheatPlus/Issues/issues/5
2016-12-10 21:49:57 +01:00
asofold
9dca93e650 Don't add bluntly redundant block change entries.
Match vs. the last entry of existing entries for those coordinates.
Seems to be better with piston retract events.
2016-12-07 22:18:53 +01:00
asofold
9a6a370f1d [BLEEDING] Adjustments + more slime+piston support (incomplete).
There are typical cases to cover:
* Extra falling height.
* Fall damage where a slime block had been.

Thus adding a specialized method for bounce (just foot position) instead
of using the full bounds would be better, preferably just check within
the MovingListener (set bounce / adjust velocity there).
2016-12-07 22:10:04 +01:00
asofold
06c2cadf7f Add skipping conditions for redstone current change. 2016-12-07 21:18:29 +01:00
asofold
ef9492b0bc Use the activation flag(s). Comments. 2016-12-07 10:12:52 +01:00
asofold
5afcfdea96 Add access methods for getting a BlockChangeEntry matching flags.
(Slime blocks ahead, somehow.)
2016-12-07 00:34:40 +01:00
asofold
0cd07d2f2a COmments- 2016-12-06 15:21:33 +01:00
asofold
602abfe55b Fix margin not being used for hasActivity. Distinguish shuffle.
(+ Set useBlockChangeTracker before testing for bounce.)
2016-12-06 14:26:21 +01:00
asofold
068a523833 [BLEEDING] Cover blocks changed by entities for a change. 2016-12-06 14:11:17 +01:00
asofold
e6673de09e [BLEEDING] Sketch one approach for on-ground with past states.
Still incomplete, could contain bugs (endless loops, perhaps).
Invalidation
mechanics may need to be refined.

Not covered:
* Exemption for moves resulting from horizontal push/pull.

*
2016-12-06 13:28:37 +01:00
asofold
3cd7625516 [BREAKING] Make an extra package for block change tracking.
* Split off the BlockChangeReference, BlockChangeListener.
2016-12-05 14:29:57 +01:00
asofold
da01ac1a48 Not AVR. 2016-12-01 13:09:17 +01:00
asofold
cc52581437 Missing check for null. 2016-11-30 12:42:05 +01:00
asofold
f5396e5d91 Split off lazy expiration from getBlockChangeEntry. 2016-11-30 11:32:48 +01:00
asofold
8e3c4d3b8c Tick should be int for now. 2016-11-30 11:13:22 +01:00
asofold
4e58ff980c Random/ alter on-ground logic (might fix fences+some abuse).
* In case of non-full bounds + variable, allow ground to be found
underneath. Can concern fences (tested on 1.11).
* There has been a probably misplaced/leftover check assuming the block
above to be passable, without checking for it (iMaxY). Since the
access.getMaxBlockY() has already been checked, this part appears to be
not of use, thus iMaxY has been removed from the signature together with
this exception.

If this causes something, please provide debug logs / circumstances :).
2016-11-30 00:35:08 +01:00
asofold
3a6c0a4945 Add block changes via redstone events for door/gate like blocks.
This is unfinished, but gives an outlook on what we may be able to do
with this.
* Double doors are not covered (upper/lower half are).
* Interaction with levers / directly with doors is not covered.
* Only doors + gates (not sure what else there is).
* More fine grained configurability is missing (+ only register
listeners if needed).
* Possibly other things.

Tracking BlockRedstone seems to be more promising than BlockPhysics, as
long as we don't have to inspect neighbour blocks to check for door like
blocks at all.
2016-11-29 15:18:45 +01:00
asofold
26b4c7a376 Prepare adding block changes without direction. 2016-11-29 14:01:57 +01:00
asofold
65777e0e32 Debug log the timing window for the BlockChangeTracker, Adjust comments.
Currently the oldest available entries are used, as if the player had
the maximum allowed latency always. Later on, at least attempting to hit
a global latency estimate (+window) should be attempted.

We'll still have a (moderate) fast-forward implementation to see what
opportunistic checking can do on live servers (elevators, doors etc.).
2016-11-29 13:20:38 +01:00
asofold
00b4dc5545 Format, adapt getCorrectedBounds to use a node. 2016-11-28 23:14:40 +01:00
asofold
380ed8a185 Log resetting of fastconsume data for the obvious spots. 2016-11-28 22:24:51 +01:00
asofold
e926f34963 [BLEEDING][BREAKING] Rework internals to use IBlockCacheNode (rough).
Intention is to work towards passing stored IBlockCacheNode instances to
methods in BlockProperties, i.e. to have
isOnGroundInAnOverlyOpportunisticWay implemented.

If you need one of the old BlockProperties signatures (or a more
simplified one), just open a GitHub issue.

This is a slightly peculiar change.
* Passing node and nodeAbove is a little bit odd, despite seemingly
efficient at present.
* Later we might need a BlockCache instance that busies about past
states (currently too complicated to implement).
* Uncertain impact (could perform better, could perform worse).
* Possibly left out a couple of places.
* Might have introduced bugs (fast forward).

On the other hand there may be a lot of other types of changes, if we
ever go for a less opportunistic implementation, which can not be
estimated simply, so this may be about the best that can be done, to get
a quick step in.
2016-11-28 14:30:57 +01:00
asofold
21505cf4fa Use the appropriate variable here.
Wondering about Double.MAX_VALUE...
2016-11-28 10:14:17 +01:00
asofold
c80ca6c8a6 Split off the per-block logic in isOnGround.
Already have the signature use IBlockCacheNode for node+nodeAbove, like
it will be done with other methods like collidesBlock.

This will allow calling this with past block states, once other methods
have been adapted as well.
2016-11-28 00:07:43 +01:00
asofold
511bcfd4ad More useful method naming and behavior for getting IBlockCacheNodeS. 2016-11-28 00:04:30 +01:00
asofold
4fdca46ccb Cap the message letter count (128 length), to allow 1.11 messages. 2016-11-27 12:14:46 +01:00
asofold
a97ae0171c It's vertical here. 2016-11-26 23:42:18 +01:00
asofold
baf09380f7 Check activity before using the BlockChangeTracker. 2016-11-26 22:57:28 +01:00
asofold
d96abe9a3e Keep track of cuboids of block change activity (resolution of 32). 2016-11-26 22:38:00 +01:00
asofold
c26c3cb0c6 Maintain a validity interval (ticks) of an entry in an efficient way. 2016-11-26 15:55:50 +01:00
asofold
371afd91d0 Need to call updateFinal within MovingListener.
Necessary with multiple checks updating the BlockChangeReference/span.
2016-11-26 14:41:22 +01:00
asofold
5939e1e206 Add per-path build numbers. Activate BlockChangeTRacker by default. 2016-11-26 14:16:08 +01:00
asofold
206d627e9b Skip the legacy bull shit.
(Let's hope this doesn't enable anything unwaynted :p.)
2016-11-25 23:08:49 +01:00
asofold
dec6ef1412 Opportunistic passable checking. 2016-11-25 23:06:06 +01:00
asofold
93b71bb316 Clarify. 2016-11-25 21:29:47 +01:00
asofold
9abe1ae3d2 Move + rename updateBlockChangeRef. 2016-11-25 21:18:20 +01:00
asofold
30979935ce Ensure not to update with an older block change entry. +comments. 2016-11-25 21:08:01 +01:00
asofold
c477f1af72 More neutral naming (rather blockMove than push). 2016-11-25 19:11:47 +01:00
asofold
574390f90d Add 1.11 blocks. Add/alter comments. 2016-11-25 11:32:26 +01:00
asofold
0a834624ac Comment on height150 (with axis tracing). 2016-11-24 16:19:18 +01:00
asofold
ae44be5740 Allow sub classes to query for ignored blocks. 2016-11-24 16:18:31 +01:00
asofold
f372d76272 Suggest removal of world name tracking. 2016-11-24 11:18:21 +01:00
asofold
d01951a10e Use an IBLockCacheNode for passing a node + private constants.
Within BlockProperties BlockCache and IBlockCacheNode ("read only") get
passed, removing id/data/shape from arguments. If a property is not set
in the node, it'll be fetched from the block cache, but the node is not
updated from outside the BlockCache. For subsequent calls, the node
would be updated by the block cache, if it isn't a node stored by the
BlockChangeTracker from an earlier time, and similar.

This way, opportunistic passable checking can be implemented, by
switching to cached nodes instead of id/data/shape arguments with lazy
fetching from BlockCache.

The name IBlockCacheNode seems to be appropriate, since we'll pass it
alongside with a BlockCache anyway.
2016-11-23 23:51:11 +01:00
asofold
85460d5cca Comments (simplify/complement some, add headers). 2016-11-23 21:07:53 +01:00
asofold
bb5afe0d2e Add retention policy etc. to MethodOrder. 2016-11-22 19:09:03 +01:00
asofold
2cf064b3a9 Detect 1.11 horse types.
We do have increased issues on layered snow, possibly due to lost-ground
or bounding box. At least other horse types can be used somehow at all.
2016-11-22 12:35:27 +01:00
asofold
da40bd06e2 Keep track of past block states within BlockChangeTracker.
We only have pistons for now, previous states of blocks are not yet used
for anything with this commit.
2016-11-21 01:09:37 +01:00
asofold
67a500ede9 Implement getBlockCacheNode correctly (no interface). 2016-11-20 23:39:15 +01:00
asofold
cc538ee5a5 First BlockCache implementation using nodes.
(USe bounds instead of shape for the nodes as well.)
2016-11-20 20:36:50 +01:00
asofold
62455f4504 Start sketching out BlockCacheNode use. 2016-11-20 15:11:54 +01:00
asofold
24b45ae5d9 Rename BlockChangeReference.entry to lastUsedEntry, comments. 2016-11-20 14:51:08 +01:00
asofold
7fb1da6dc5 FORMAT +comments +fibbity. 2016-11-19 14:26:03 +01:00
asofold
ba15cfc267 [BLIND] Keep track of the position a player teleports to the end from.
Cross-world teleport to the end issue: set back hard, if the player
moves to the position they set off from the last world, which seems to
be a bug with some server types/versions at present (!?).
2016-11-06 20:04:59 +01:00
asofold
f3eb4f22ff Debug log hacc as well. 2016-11-06 18:48:46 +01:00
asofold
5e2e11dd10 Keep track of the world name in NetData, for use with CatchAllAdapter.
Some packets arrive with a null world for a player, possibly sent by
plugins - thus attempt to use a stored world name.

This is just a hot fix attempt.
2016-11-05 21:13:43 +01:00
asofold
b8746efcb7 Include the entire MC 1.10.x range with ProtocolLib 4.1 and later. 2016-11-02 19:10:46 +01:00
asofold
cad500edc7 Adjust hacc limit for liquid to 1.8.8 clients for now. 2016-11-02 09:50:46 +01:00
asofold
bea35e610a Ensure resetting hacc only happens with head obstructed. 2016-11-02 09:35:19 +01:00
asofold
518f2f08da More block flags: HEIGHT8_1 and ALLOW_LOWJUMP (see description below).
Attempt to enable workarounds for lily pads with servers that support
multiple client versions. Add to the configuration at
compatibility.blocks.overrideflags:
WATER_LILY: default+ign_passable+ground_height+height8_1

HEIGHT8_1 just means 1/8 height (0.125).

The ALLOW_LOWJUMP flag was intended to be used in case of
ground_height+height100 or the like leading to issues with
sprint-jumping due to the low jump detection, however other special
casing checks for bunny hopping let this still fail (less than before,
but still), thus this flag might get removed. Keeping it for now, to
provide some kind of toolkit.
2016-11-01 13:42:05 +01:00
asofold
3d141f3125 [BLEEDING][INSTABLE] Attempt to know when the bloody bunny can't fly.
Technically, tracking actual speed / base speed seems promising, done
here via using the liftOffEnvelope that is maintained anyway, adding a
counter and sum value. [Base speed is something like the allowed speed,
without accounting for specialties like bunny hopping.]

Limits are checked for moving in ground+air or water+air and are
currently hard-coded. This simplistic first-step-in may easily yield all
sorts of false positives and other random issues, handle with care.
2016-11-01 00:40:34 +01:00
asofold
7023fdb2af Fix passable fp with 2-high ceiling.
Can't judge side effects, concerning other passable like tests telling
the head to be inside a block by the micro margin, while passable allows
such a move now.
2016-10-31 22:00:52 +01:00
asofold
48a7e9c0e1 Run passable ignoring sneaking. Adjust box height for REL. 2016-08-07 15:18:45 +02:00
asofold
cec7927850 Allow friction on ladders anyway (not only with velocity set). 2016-08-07 15:18:18 +02:00
asofold
7243ab7538 Quick fix attempt for placed material issues with off-hand. 2016-07-20 10:03:17 +02:00
asofold
514877e1d1 Another reason for dynamic check type registration. 2016-06-27 06:52:33 +02:00
asofold
fc24fe529c [BLEEDING] Overall packet spam check for pre-1.9.
Not sure if this really pays, if most people use protocol-support
plugins that limit packets anyway. There could be some future use, e.g.
generic rate limiting with configurable implementation.

Other:
* New methods for RawConfigFile+ConfigManager to check for
AlmostBooleanS.
* Add all net check permissions to plugin.yml.
2016-06-26 22:18:43 +02:00
asofold
b420f34f23 Add a method to test activation via AlmostBoolean for all configs. 2016-06-26 14:37:03 +02:00
asofold
2623a1ae5c Add a sequence count to DataPacketFlying.
Set with adding to the flyingQueue.
2016-06-25 10:57:43 +02:00
asofold
cce7e76211 The idea of choosing a simple implementation was to skip debugging. 2016-06-24 23:38:27 +02:00
asofold
889d21c1d5 Add convenience method to set the AABB. 2016-06-24 20:54:08 +02:00
asofold
050760afd2 Complete initial draft for ICollideRayVsAABB.
(Blind/untested.)
2016-06-24 20:38:43 +02:00
asofold
a38e63d4a9 Let DataLocation extend IGetPositionWithLook.
(+Implement DataLocation.hashCode.)
2016-06-24 19:15:14 +02:00
asofold
3bdb5414ae Simple and incomplete implementation for ICollideRayVsAABB. 2016-06-24 19:04:44 +02:00
asofold
de2db16d08 Correction/clarify. 2016-06-24 10:09:43 +02:00
asofold
7df0f74d5d vehicle.envelope: Minecarts.
The envelope check will need more adaption for false positives, e.g. for
skipped moves with boats.
2016-06-24 09:55:55 +02:00
asofold
67e7b95901 Allow walking on soil at the reported height (~1.10.2). 2016-06-23 22:41:18 +02:00
asofold
99df1f65da Let's have different climb speed thresholds for ascend and descend.
Configurability ... later.
2016-06-23 20:23:18 +02:00
asofold
c9efd7b76c Add locking against changes to generic registrations.
Let default implementation use registration nodes.
2016-06-22 23:04:44 +02:00
asofold
97129c13d6 Watching football yields... 2016-06-22 18:59:49 +02:00
asofold
f32f4f6080 [BREAKING] Rename ICollide to ICollideBlocks. Add interface.
* ICollideBlocks matches the interface better. If we ever need ICollide
for something common (e.g. set(ICollisionSetup) allows to fetch
information about start conditions and run generic tests !? not really
sure if such will happen...)
* Add ICollideRayVsAABB, to prepare other types of direction/visible
checking (enable more precision, but also configurable leniency).
2016-06-21 10:58:16 +02:00
asofold
863b89763d [BREAKING] Move more classes around.
This time the focus is on the utilities package.

Possibly used, but not really official API:
* Move block cache to a 'map' sub-package.
* Move RichBounds/RichEntity/Player-Location and TrigUtil to a location
sub-package.

Not really official API, likely not used:
* Move AttribUtil to compat, since it belongs there.
* Split off direction check methods to collision.CollisionUtil.
* Move static BlockCache methods to map.MapUtil.
* Move food related methods from CheckUtils to InventoryUtil.
* Move vehicle/passenger related methods from CheckUtils to
PassengerUtil.

Not breaking:
* Move IdUtil to commons.
2016-06-21 09:56:50 +02:00
asofold
2c614cce91 Prepare a more strict fight.direction check. 2016-06-20 22:56:43 +02:00
asofold
d8e8ecdeb0 One more header. 2016-06-20 22:32:21 +02:00
asofold
7130fed017 Add a minimized interface for the odd width and height getting. 2016-06-20 22:21:34 +02:00
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