Commit Graph

3001 Commits

Author SHA1 Message Date
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
e7aab4272e Use https for dbo. 2016-12-04 14:35:07 +01:00
asofold
da01ac1a48 Not AVR. 2016-12-01 13:09:17 +01:00
asofold
e644b44753 Mention the reflection based module. 2016-12-01 12:04:05 +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
ea9c5a1b19 FastConsume: disable the instanteat check on reloading the
configuration.
2016-11-26 14:52:47 +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
892af50209 Ensure to keep handles forever, once fetched.
(Less headaches with reloading the configuration and similar.)
2016-11-25 22:25:51 +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
6c73ab005e Properly unregister disabled handles, lazily.
Actually, proper would be to unregister the handle properly on disabling
it, not with the next fetch.
2016-11-24 00:40:58 +01:00