Commit Graph

108 Commits

Author SHA1 Message Date
asofold
a9564ea8fd [BLIND] Implement MC 1.5 snow levels with an extra block-flag. 2013-03-13 20:27:55 +01:00
asofold
a2b1412ab1 Switch 1.4.x snow level handling to an extra flag. 2013-03-13 20:09:07 +01:00
asofold
e35f0585ae Rename simplified fluid level flag. 2013-03-13 19:34:35 +01:00
asofold
15f08f13a9 Prepare 1.5 blocks with block flags. Add unused stuff.
More like a safety commit.
1. Add compatibility block flags for MC 1.5 blocks.
2. Add commented out / unused stuff (not really for 1.5).
2013-03-13 10:16:56 +01:00
asofold
555ae62b78 Allow "default" as flag, which will add the previously set flags. 2013-03-13 06:31:09 +01:00
asofold
4cbefc0184 Trim flag inputs for more tolerance. 2013-03-13 06:30:24 +01:00
asofold
5b324a1a81 Fix and adjust basic move-debug output.
1. Let the basic move info be printed first, extended info gets printed
exra. This allows better printf-debugging, because the move info comes
first in any case :).
2. Show "correct" potion-effect strength.
2013-03-12 21:37:14 +01:00
asofold
fc788f55c4 [Bleeding] Optimize preparation for PlayerLocation use.
1. Only collect flags for survivalfly.
2. Set all properties for the to location if it is the same position as
the from location.
2013-03-12 09:59:52 +01:00
asofold
d60c77b66a Confine bounding boxes and y-distance for flag collection.
This leads to less blocks visited. (Cleanup pending.)
2013-03-12 04:25:45 +01:00
asofold
ae0cdff5f2 Remove debug message. 2013-03-11 06:34:58 +01:00
asofold
ba8ebb2a61 Fix cauldron workarounds. 2013-03-11 06:34:39 +01:00
asofold
d4616f415d [Bleeding] Various fixes for collision logic and consequent changes.
General:
- Wrong flags checked or flags checked in the wrong way.
- isPassable should use collidesBlock.
- collidesBlock should not see high-value-only matches as collisions.
- collidesCenter returns true for the case of collision (...).

Liquid blocks:
- New flag introduced to model rough liquid height for flowing liquids.
- One more workaround condition for moving in/off liquids.
- Use exact bounding-box for liquids checking in PlayerLocation.
- Check for water first in PlayerLocation.isInLiquid.

Other:
- Alter some block flags and workarounds.
- (other)
2013-03-11 06:01:39 +01:00
asofold
2fe9f1e668 Higher default capacity for CoordMap instances in BlockCache. 2013-03-10 00:30:00 +01:00
asofold
f882c8bc8c Another attempt to set the bounding box (use Math.round). 2013-03-09 20:04:16 +01:00
asofold
dfc8e7c5a7 Attempt to fix issues with falling through narrow spots.
The bounding box gets "corrected" by decreasing maxX and maxZ slightly.
This is not a generic approach, might get replaced by something else
later on.
2013-03-09 17:13:33 +01:00
asofold
c23482fcf5 Fix standing on cactus. 2013-03-08 23:08:53 +01:00
asofold
157e957122 Add comments. 2013-03-08 03:05:32 +01:00
asofold
5500cd15bf More on-ground: Faster return + fixing some workarounds.
Question remains if this opens bypasses. At first glance it seems good.
2013-03-07 18:26:16 +01:00
asofold
eb4c537e65 Revert too fast return, add other, comments, indentation. 2013-03-07 03:28:40 +01:00
asofold
08de1cb576 Tweak isOnGround for faster exclusion. 2013-03-07 02:34:52 +01:00
asofold
9a5b988735 Higher or same height... 2013-03-07 00:21:12 +01:00
asofold
0543eb8200 Don't count blocks as ground the players foot is in. 2013-03-07 00:11:45 +01:00
asofold
db21e49576 Player must be above getBlockHeight. 2013-03-06 21:06:19 +01:00
asofold
83abefb630 Fix walking on a block below COCOA. 2013-03-06 20:36:00 +01:00
asofold
11628b2863 [BLEEDING] Squash a couple of spiders.
Reworking parts of the on-ground judgment to exclude blocks the player
is inside of rather than standing on them.
2013-03-06 19:19:49 +01:00
asofold
0eaf9587d8 Add null check and refine preconditions for on-ground shortcut. 2013-03-06 04:08:20 +01:00
asofold
f20fc8575d isOnGround: Fix shape judgment for shape-changing blocks. 2013-03-05 21:49:16 +01:00
asofold
8762d38020 Fix isOnGround issue with shape judgment. 2013-03-05 21:36:30 +01:00
asofold
3ad9ba3993 Fix isOnGround stopping loop with "walls". 2013-03-05 21:23:18 +01:00
asofold
2b0ab5cae3 Reset block-flags with setYonGround. Add setter for block-flags. 2013-03-05 20:10:37 +01:00
asofold
d7110b3239 Adjust/fix moving debug output. 2013-03-05 19:45:01 +01:00
asofold
de44ea43a4 Fix for flags + adjust debug output to show flags and exact coordinates
on higher debugLevel.
2013-03-05 18:26:10 +01:00
asofold
354511b88f isOnGround: Fix for flags. 2013-03-05 17:31:37 +01:00
asofold
f7d9441174 isOnGround: Add null check, move some things to methods. 2013-03-05 17:14:43 +01:00
asofold
0194d1fcc8 Tweak isOnGround: Faster exclusions for walls. 2013-03-05 17:00:06 +01:00
asofold
22974751e6 Re-order isOnGround for better overview. 2013-03-05 16:54:12 +01:00
asofold
ce6a8b4498 Adjust on-ground handling: fix and bring back "shortcut" check.
It is not just a shortcut, it also prevents survivalfly alerts in case
the player is stuck.
2013-03-05 07:53:37 +01:00
asofold
1cc18db8be Reorder isOnGround, remove unreliable "short-cut". 2013-03-04 22:24:44 +01:00
asofold
c805caa553 RayTracing: Add ability to check number of steps done.
Now available in the abstract base class.
2013-03-01 21:43:26 +01:00
asofold
2d0b2bace0 Add comments and javadocs. 2013-03-01 18:54:48 +01:00
asofold
bf0e8350ec More caching for on-ground checking in PlayerLocation.
Remember the minimal yOnGround for having found ground and the maximal
yOnGround for not having found ground. Does not apply for all
xz/y-margin parameters, yet.
2013-03-01 18:37:30 +01:00
asofold
e5767e3290 Remove hopefully not needed extension for y-bounds for isOnGround. 2013-03-01 17:35:07 +01:00
asofold
d429f8c597 Add safety check to stop ray-tracing if coordinates don't change. 2013-03-01 15:13:53 +01:00
asofold
e7cfdd4b3e Make sure RayTracing only advances if really moving into that
direction.
2013-03-01 02:22:04 +01:00
asofold
15a2165a9c Fix passable ray-tracing not stopping after collision. 2013-02-28 23:24:43 +01:00
asofold
63cc892cde Too much space. 2013-02-28 18:12:16 +01:00
asofold
31faf7f11e Adjust available build parameters: TEST_LEVEL and DEBUG_LEVEL
Not yet too much in use, though.
2013-02-28 18:09:42 +01:00
asofold
da4b142aa9 Add module: NCPCompatBukkit
Seems better to have a dedicated module for this as well, since other
modules might be built against different versions of the Bukkit-API,
potentially.
2013-02-28 03:40:40 +01:00
asofold
e0b2eb753c Add getInt and getLong with bounds parameters. 2013-02-27 15:34:45 +01:00
asofold
7a84ed371b Add module for build parameter info.
This is needed with the current technique in order to have it available
at the time of testing NCPCommons.
2013-02-27 00:46:56 +01:00