Commit Graph

246 Commits

Author SHA1 Message Date
asofold
d8733f873b [Bleeding] Kill Jesus!
Just kidding. Introduces a lift-off medium tracking for jumping to be
able to limit the maximum jump-phase for lifting off water.
2013-02-01 06:51:21 +01:00
asofold
4f125728f2 Add javadocs and comments. 2013-02-01 06:16:01 +01:00
asofold
7e4ad21f4f Prevent ascension over max jump phase for normal jumping/moving.
Adds a "dirty"-flag, set on receiving velocity. If a player still
ascends while exceeding max-jump-phase, a violation will be triggered,
regardless of the taken distance. This has not been tested against hacks
yet, and might well have little effect. It does aim against step and
block-jumping on protected regions, but there might be another limiting
method necessary to make this fully effective.
2013-01-31 10:01:46 +01:00
asofold
f38822e4d5 Add some initial values. 2013-01-31 09:23:20 +01:00
asofold
fd9bb76202 Refactor parts of actions to NCPCompat.
This is not finished, log action is missing still.
2013-01-30 14:05:39 +01:00
asofold
dc5a1bd19f Consistency fixes for reloading the configuration.
Mostly MCAccess must be reset after reloading the configuration, a rare
case, but wanted for testing. For this a component has been added, which
allows automatic setting of MCAccess on reload, in consequence the
CheckListener registers all checks as components with the NoCheatPlusAPI
(CheckListener.addCheck).

Components can not be registered twice anymore.

All TickListeners will be removed in onDisable.

Possibly others.
2013-01-30 04:22:06 +01:00
asofold
8c3ed77c7c Also remove clear parkedInfo in case of reload or data removal. 2013-01-30 03:17:18 +01:00
asofold
8c2bda2b70 Use BLockProperties.isOnGroundOrResetCond. 2013-01-30 03:12:24 +01:00
asofold
04b1341e43 Attempt to fix survivalfly false positives on login in water (seldom). 2013-01-30 03:06:30 +01:00
asofold
87e350aa81 Add in-game debug to fight.critical. 2013-01-30 01:23:22 +01:00
asofold
f9691c3ea8 Fix NoFall violations with ender-pearls. 2013-01-30 01:22:19 +01:00
asofold
b00bb9a014 Hint at new god mode check [not yet in]. 2013-01-29 23:50:58 +01:00
asofold
9ddb91f7fd Add comment. 2013-01-29 16:36:12 +01:00
asofold
eda657b6de Fix and optimize hover checking.
Fix: reset players hover ticks if moves are not checked (sleep, dead,
vehicle, disabled).

Optimize: Only check on-ground, if the players hover tick counts
reach the limit. Players are reset when moving anyway.
2013-01-29 14:00:28 +01:00
asofold
a8f326d855 MAXIMALLY. 2013-01-29 03:48:08 +01:00
asofold
562f1da59b Assume maximally 20 attacks / moves per second. 2013-01-29 03:46:31 +01:00
asofold
acd8afcdc2 Use the xz-distance for the moment. 2013-01-29 03:23:39 +01:00
asofold
c40b9fac22 Add tags to improbable. Currently only the tags triggering the violation
are shown, probably useful for debugging.
2013-01-29 03:16:10 +01:00
asofold
d8701a7ea6 Add target-location heuristic to reduce false positives with improbable. 2013-01-29 02:51:51 +01:00
asofold
0fb299b39f Don't check backwards sprinting after being hit. 2013-01-28 09:18:03 +01:00
asofold
04e7b2a09b Munchhausen can be enabled now. 2013-01-28 09:17:31 +01:00
asofold
4324d4fe74 [Bleeding] Lessen trouble with boats. 2013-01-26 07:42:56 +01:00
asofold
1e29c03251 Re-order methods. 2013-01-26 06:56:23 +01:00
asofold
99e7994b76 Fix morepackets(vehicle) set back never executing. 2013-01-26 00:16:18 +01:00
asofold
333cffd0d5 Fix last damage-tick by entity attack being reset while dead, renamings. 2013-01-26 00:08:17 +01:00
asofold
9bd7745690 Change the way morepackets(vehicle) teleports player and vehicle.
Player gets ejected, then both teleport then re-enter. Includes some
sanity checks. Also should work for players exiting vehicles. Might
conflict with Worldguard region flags and similar. [Missing: proper
treatment of vehicle-enter/exit.]
2013-01-25 22:12:40 +01:00
asofold
ed09b58074 Set data.teleported for hover violations. 2013-01-25 14:38:41 +01:00
asofold
509347e78b Update a TODO. 2013-01-25 00:14:43 +01:00
asofold
405f33e90e Remove debug output for boats. 2013-01-24 23:53:39 +01:00
asofold
85131dcadb [BLEEDING] Re-sharpen NoFall, configurable.
Fall damage events for violations are not cancelled anymore due to the
"moved too quickly" bypass. Instead the player is dealt 3 more damage
than normal and added to the hover checking if that is activated.
Further a config flag allows to specify if to reset the NoFall data, set
to false by default, thus victims of Minecraft false-positives are at
doubled suffering.
punished
2013-01-24 23:49:31 +01:00
asofold
944f3469d0 Random safeguard for breaking-time (fastbreak). 2013-01-23 18:30:30 +01:00
asofold
6a70f0a010 Accoutn for lag in chat.commands. 2013-01-23 03:07:17 +01:00
asofold
cce67ac67c Account for TickTask resetting. 2013-01-23 03:06:52 +01:00
asofold
07d8573e9e [Bleeding] Check vehicle-morepackets for players riding pigs. 2013-01-22 18:43:04 +01:00
asofold
b54b558322 Minor tweak :p. 2013-01-21 02:10:08 +01:00
asofold
f0ea06bea6 Also ignore hover for players inside of vehicles. 2013-01-21 02:08:25 +01:00
asofold
4f3e4fad65 (Not putting hover in at respawn due to chunk sending.) 2013-01-20 17:18:36 +01:00
asofold
0eaa8fd1b5 Ignore dead / sleeping directly on hover. 2013-01-20 06:53:31 +01:00
asofold
ee1f410dae [SAFETY COMMIT, REFACTOR, BREAKING]
Moving big parts of code between sub-projects. Some refactoring was
needed to unlink some classes. Deprecated methods removed. Some utility
methods were moved to differently named utilities. Few signatures
changed (e.g. BlockProperties.init). Most changes should only concern
bugs or developers who dug into some NCP deeply (not sure those exist).
It should still all be there.
2013-01-20 04:18:08 +01:00
asofold
f3a5e572b3 Set last damage cause for NoFall.dealDamage. 2013-01-18 22:18:42 +01:00
asofold
c0ddeef104 Fix players counting for logins checks if already denied to login.
Also lets "tempkick" feature come first.
2013-01-18 00:09:42 +01:00
asofold
fd2469490a [Bleeding] Replace LagMeasureTask by TickTask.
Contains some fixes. Removes the debugging message for lag. Might
in some places use wild guesses for lag estimation
(TickTask.getLag(1000) < 1.5).
2013-01-17 01:47:07 +01:00
asofold
e34ad4fcdf Fix concurrent modification exception for a part.
Only set the hover ticks on teleporting events. On setting back players
in MovingListener.onTick, this will be prevented now. However actions
might still cause trouble, so some non-blocking stuff would be good here
(a removeFroHover set, some other way of keeping track).
2013-01-15 18:32:31 +01:00
asofold
9850a0e3bb [BLEEDING] Add simple hover check. 2013-01-14 18:49:49 +01:00
asofold
6cfe46c117 Make resetting fall distance for teleports configurable. 2013-01-14 02:24:11 +01:00
asofold
e05275fd73 A little more grace for fast falling (vacc). 2013-01-14 02:09:31 +01:00
asofold
5879fba502 [Bleeding] Set the players fall distance on successful teleports.
Might cause issues.
2013-01-14 01:55:13 +01:00
asofold
fed73d519b [Bleeding] Adapt teleport handling to cancelled events better.
Also will invalidate currently processed moving events.
2013-01-14 01:49:27 +01:00
asofold
0e9826cb14 [Bleeding] Re-arrange move-handling on highest and monitor level.
Remove uncancelling events. Ignore sleeping [might need adaption to
not trigger anything on getting up], account for cancelled events
and reset postions and feed yawrate accordingly.
2013-01-14 01:09:38 +01:00
asofold
a158b169d2 [Bleeding] NoFall: Try to delay damage on violations.
Cancel damage events rather than keeping fall distance plus damaging the
player. This should punish players less for bugs in MC or NCP, while
still dealing the accurate damage.
The players can still keep hovering, but that's what the hover checks
will be for.
2013-01-13 23:30:51 +01:00
asofold
f0c1f34438 [Bleeding] Holzhammer 2.
MovingData: Set set backs and teleported to private visibility in order
to be able to rule out potential sources of inconsistencies. Also set
morepackets set-backs to null rather than to the same reference of
set-back (onSetBack).
2013-01-09 20:44:54 +01:00
asofold
5c8e76ecba Reset to the players location on join. Adaptions to set-back use. 2013-01-09 19:20:43 +01:00
asofold
c82e92863d Holzhammer. 2013-01-09 00:12:53 +01:00
asofold
7ee13cce09 Also debug set back in the moving listener. 2013-01-07 19:09:34 +01:00
asofold
3cbae00fbb Adapt debug logging to show full move always. 2013-01-07 19:01:03 +01:00
asofold
c262337940 Adjustments with set-backs. 2013-01-05 19:20:05 +01:00
asofold
15d2346dea MovingData.onSetBack: also reset more-packets/vehicle set-backs. 2013-01-05 12:28:04 +01:00
asofold
92adc71ccd Comment out remainders of horizontal accounting. 2013-01-05 12:25:40 +01:00
asofold
afe98203f0 Add hidden config flag to be able disable lag adaption
globally.
2013-01-04 17:31:29 +01:00
asofold
1564115dd0 [Bleeding] Optimizations and corrections for set-backs. 2013-01-04 17:21:34 +01:00
asofold
c73aa0edac Add convenience methods for set-back locations to MovingData. 2013-01-04 17:14:46 +01:00
asofold
530f85c03c Details about morepackets set-back. 2013-01-04 16:51:42 +01:00
asofold
65a7bf8b36 [Bleeding] Account for server side lag in blockplace.fastplace. 2013-01-04 16:47:11 +01:00
asofold
8bb35fec94 [Bleeding] Account for server side lag in inventory.instantbow. 2013-01-04 15:55:21 +01:00
asofold
1b350af75f [Bleeding] Account for server side lag in combined.improbable. 2013-01-04 15:45:19 +01:00
asofold
a32a428d08 [Bleeding] Account for server side lag in combined.yawrate. 2013-01-04 15:38:37 +01:00
asofold
202a3ec0c9 [Bleeding] Account for server side lag in fight.speed. 2013-01-04 14:49:11 +01:00
asofold
adf91b88d6 [Bleeding] Account for lag for vertical accounting in
moving.survivalfly.
2013-01-04 14:42:04 +01:00
asofold
e514cc2425 [Bleeding] Account for lag in blockbreak.frequency. 2013-01-04 14:34:42 +01:00
asofold
581cdef7bb [Bleeding] Account for lag in blockbreak.fastbreak. 2013-01-04 14:21:08 +01:00
asofold
b85cd17688 Add hidden lag flag to abstract CheckConfig. 2013-01-04 13:56:35 +01:00
asofold
47faa014bf [experimental] Reset yawrate on teleports. 2013-01-04 13:29:45 +01:00
asofold
f4680da0d4 Further adjustments to Improbable (feed).
Just feed weights to improbable instead of checking for some places,
getting rid of some unnecessary violations cascading. Also feed for
fighting speed violations.
2012-12-29 22:10:45 +01:00
asofold
05c7699937 Use a defensive method for yaw difference for the angle check. 2012-12-29 16:47:03 +01:00
asofold
7f17420606 More % for yaw. 2012-12-29 16:23:04 +01:00
asofold
f9d44cd661 Add "strict" flag to blockbreak.fastbreak.
This allows to count break...break instead of interact...break, if set
to false.
2012-12-28 20:00:05 +01:00
asofold
a823e6dd1e Use absolute yaw difference for comparison. 2012-12-28 19:47:03 +01:00
asofold
802c1bef06 Add comment for future changes. 2012-12-28 19:35:43 +01:00
asofold
1759c1003f yawrate: Add judgement about stationary yaw.
This prevents adding up small yaw-differences for many cases.
2012-12-28 19:32:04 +01:00
asofold
4800efbf2a Various adaptions to the use of the Improbable check.
Fix fight.reach input for long distance hits (might increase problems).
Remove some inputs, remove some event-cancelling (but keep input).
Lower some weights.
2012-12-28 19:16:54 +01:00
asofold
2ea4c8ef6a Add defensive comments. 2012-12-28 00:17:27 +01:00
asofold
d38b09bc1f Use LogUtil for logging exceptions. 2012-12-27 19:51:24 +01:00
asofold
b566bc1d00 Actually do clear logins data on reloading. 2012-12-27 18:16:08 +01:00
asofold
09e16a7231 Clear chat.logins data on reload. 2012-12-27 15:31:50 +01:00
asofold
eca6706a14 Fix yawrate for a part. 2012-12-21 09:59:51 +01:00
asofold
3dd7bfc64f Leave some defaults to the default config. 2012-12-18 01:23:08 +01:00
asofold
1011b36d6a Might have fixed the bed-leave check. 2012-12-18 01:16:52 +01:00
asofold
1e701f01f6 Bind spawn-egg dupe-prevention to the items check to allow turning it
off.
2012-12-17 21:55:00 +01:00
asofold
e7a643c692 Add comment. 2012-12-17 21:52:35 +01:00
asofold
13bf0eb705 [Bleeding] Adjust assumeground-set-back. 2012-12-17 21:16:34 +01:00
asofold
f9625af03b Increment jumpphase after debug output. 2012-12-17 20:07:53 +01:00
asofold
c6a4cf2ab7 Correct some things about width/length of entities.
This might have caused lag and all sorts of problems with moving, such
as getting pulled back near cobweb or water. [Still fp in survivalfly
left.]
2012-12-17 19:15:21 +01:00
asofold
432c7607aa Store MCAccess in PlayerLocation and MoveInfo. 2012-12-17 18:05:01 +01:00
asofold
817ac36f8b Comments, order, init values. 2012-12-17 17:57:07 +01:00
asofold
6e523ee46e More logical order. 2012-12-14 10:49:37 +01:00
asofold
f21ffd68cb RAW split setup (does not compile in eclipse). 2012-12-13 22:48:56 +01:00