Commit Graph

36 Commits

Author SHA1 Message Date
asofold 62df128efd [BLEEDING][BREAKING] MC 1.13 Material changes, first batch.
First batch:
* Initialize blocks somehow, so no errors nor missing blocks happen
during startup.

Possibly Missing:
* There might be references of removed/renamed material (blocks/items)
throughout the code.
* Some blocks may behave different now/then.

Missing:
* Block#getData may not reflect (all?) properties anymore.
* Block shape getting is missing. Block shapes are now (potentially)
more complex to process. Concept might be to keep a double array for the
rough bounds, and add an (optional +- null) array of arrays for sub
shapes, if present (IBlockCacheNode). So a first rough update is more
simple/compatible.
2018-08-20 12:37:51 +02:00
asofold 82f50dda71 Put Material.isTransparent into a method for later distinction. 2018-08-13 09:23:51 +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 4e91a9d5fc Ready for UEFA EC: GPLv3 headers.
Might need more training still.
2016-06-02 20:33:21 +02:00
asofold 2f50cca03d [BLEEDING] Fixes and additions for the compatibility layer.
* Make attribute methods consistent (remove the sprint boost modifier
from the generic speed multiplier, because it's inconsistent).
* Add missing implementations.
* Adjust default sprinting speed modifier.
* Add more guards for the latest compat module (1.8_R3).
* Add a reflection based compat module for CB, to cover minor updates.
* Possibly other minor fixes/changes.

[Hail "insufficient data written"!]
2015-06-06 16:14:36 +02:00
asofold cb62547fc0 More complete go on speed attributes.
* Undo the sprint boost modifier until we add it (minimize code change).
* Implement methods for MCAccess implementations down to 1_6_R1.
2015-05-30 02:22:49 +02:00
asofold 2450636f3c [BLEEDING] First go on generic speed attribute support. 2015-05-29 00:33:16 +02:00
asofold 067ce0d5a5 Vanish-o. 2015-03-21 11:58:37 +01:00
asofold ef1ef05115 Spaces. 2015-03-20 23:35:36 +01:00
asofold ccf9242402 Update entity widths in NCPCompatBukkit. 2015-03-20 23:23:59 +01:00
asofold f0c5552873 [SAFETY COMMIT] Redo with proper assignment (details see below).
Contained changes:
- Melon and pumpkin block break timings: 1.8-specific, keep workaround.
- Don't run all horizontal move checking if no move.
- Utility method for checking for air.
- Some formatting.
2015-01-04 20:06:05 +01:00
asofold 3eab23ae92 [BLEEDING] First attempt to make slime blocks work. 2014-12-10 00:45:08 +01:00
asofold fa87287c97 Adapt some version strings according to ~ intended use. 2014-12-02 02:03:40 +01:00
asofold 1eb8d98860 Spaces again. 2014-11-03 22:23:04 +01:00
asofold 7dba18cf67 Add entity widths to MCAccessBukkit. Compile with Bukkit 1.7.2-R0.3.
* "Swiftly" add entity widths to MCAccessBukkit (mostly switch).
* Compile CompatBukkit with Bukkit 1.7.2-R0.3 from now on.
2014-11-03 22:19:38 +01:00
asofold b6c146ce64 Remove getKeepAliveTime from MCAccess.
It does not seem to become accessible any time soon, while packet level
access allows to fetch it.
2014-07-17 14:33:38 +02:00
asofold 75224adf63 Reduce use of using block-ids in more places.
* Use Material directly in more places.
* Hide id-getting within BlockProperties.

TODO:
* BlockInit, BlockFlags + use of those.
* Possibly other.
2014-06-13 12:01:44 +02:00
asofold c93edcbbe9 Remove direction correction, as it does not seem to be effective. 2014-05-15 10:44:34 +02:00
asofold 6dbe33b310 Update actually supported versions for some MCAccess modules. 2014-04-22 22:20:16 +02:00
asofold 59054b402b Add Methods to correct yaw and pitch to MCAccess.
An implementation for NCPCompatBukkit is missing.

Note that the native access can not set lastYaw nor lastPitch in
PlayerConnection (private), but it could set lastYaw and lastPitch in
EntityPlayer.

Can't guarantee this actually helps with stuff like derp/magnet, because
we can not really set the outcome of a PlayerMoveEvent without
rubberbanding the whole planet. Hacks could send enough packets per tick
to keep freezing people - we might be able to keep track of yaw/pitch
correction and cancel (most) attacking for the same tick after yaw
correction (invalidate "same" with in-bounds yaw).
2014-04-21 14:16:11 +02:00
asofold 8d5a0b1dca Rough update for 1.7.2 blocks.
Adds an ice flag to BlockProperties.
2013-12-01 21:46:44 +01:00
asofold 875b9bdac5 BukkitCompat: Attempt to get the CommandMap by reflection. 2013-08-10 02:27:17 +02:00
asofold f17378b3e0 More cleanup for health API changes. 2013-07-15 12:31:37 +02:00
asofold a8d1aded59 [BLEEDING] Adapt to health changes + set NCPCore dependency to 1.6.1. 2013-07-10 01:55:56 +02:00
asofold e1babee538 MCAccess: Get rid of Block_i method. 2013-07-09 12:05:06 +02:00
asofold e69741f5dc Simplify MCAccess version tags for support of multiple sub-versions. 2013-07-09 11:47:16 +02:00
asofold 670f403f11 [BLEEDING/INSTABLE] Add 1.6.2 native support, DROP 1.6.1 support. 2013-07-09 11:34:19 +02:00
asofold d11e91f2e4 [BLEEDING/INSTABLE] Roughly adjust to 1.6.1 Bukkit API changes. 2013-07-02 12:13:33 +02:00
asofold 8f862fb3f6 Outer space again! 2013-06-07 15:23:40 +02:00
asofold 6519ea1e19 Update supported versions of MCAccessBukkit. 2013-05-21 15:07:23 +02:00
asofold 8d0751fa64 [Safety commit] Prepare better mod support for blockbreak (slowly).
Not yet in place, but setting up new package structure to split off some
things from BlockProperties. Likely not final.
2013-05-21 15:02:51 +02:00
asofold 22ffb43ddf [BLEEDING] Testing: ender-pearl glitch use (first sketch, read details).
* This method is "hard-coded" and not configurable yet.
* Prevent throwing and teleporting into blocks directly, prevent
the second throw on glitching into a one thick ceiling (might lead to
lots of passable violations at present).
* If stuck in a block with the feet (not sand/gravel) without being on
ground, throwing is prevented.
* Some dependencies were updated, hopefully without conflicts for
backwards compatibility (untested).
2013-04-22 21:46:49 +02:00
asofold 3f2780fe7d Fix block-flag-setup for bukkit-api-only.
Allow all blocks that get the IGN_PASSABLE flag set but which the player
can stand on to be ground from height 0 on (GROUND_HEIGHT, takes
effect unless for blocks with an explicit workaround). Set IGN_PASSABLE
and GROUND_HEIGHT for ENDER_PORTAL_FRAME explicitly.
2013-03-11 07:50:44 +01:00
asofold 212438dd7b MCAcessBukkit: Also make Glowstone an exception. 2013-03-01 19:34:44 +01:00
asofold b2be3b9474 NCPBukkitCompat: Ensure some full blocks are not ignored by passable. 2013-03-01 19:10:00 +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