46 Commits

Author SHA1 Message Date
Dylan K. Taylor
2c8a065b94 Standardise SNAKE_CASE for surrogate enums 2019-02-20 11:14:07 +00:00
Dylan K. Taylor
f351a86653 Flatten double slabs into Slab pseudo-variant 2019-02-19 11:14:06 +00:00
Dylan K. Taylor
18f765338c Slab: fixed replacing $blockReplace not creating double slab when not clicking on the replaced block itself 2019-02-19 11:09:11 +00:00
Dylan K. Taylor
b2201c8c59 Further cleanup to general AABB handling 2018-11-24 19:17:03 +00:00
Dylan K. Taylor
e038c4295d Clean up abhorrent mess of Slab placement code 2018-09-27 18:46:01 +01:00
Dylan K. Taylor
35d51570be Add and make use of Block->isSameType() 2018-09-27 17:59:06 +01:00
Dylan K. Taylor
8910c93de1 Slab: slight reduction of code repetition 2018-09-27 16:45:06 +01:00
Dylan K. Taylor
75f364fcf2 Level: Remove obsolete \$direct parameter from setBlock()
this parameter was previously used to send blocks with a different set of flags, immediately, to players. However, the flags have been demonstrated useless and the direct sending is pointless now since packets are buffered now per session, so we might as well take advantage of the batched block update sending.
2018-09-27 16:15:07 +01:00
Dylan K. Taylor
56d9943b0d Nuke Block->meta, split into variant and state properties, lots of cleanup
This is a major change to the way block metadata is handled within the PM core. This separates variant metadata (which really ought to be part of the ID) from state metadata, and in a couple of cases flattens separate states of blocks together.

The result of this is that invalid variants can be much more easily detected, and additionally state handling is much cleaner since meta is only needed at the serialize layer instead of throughout the code.
2018-09-21 19:28:10 +01:00
Dylan K. Taylor
f7f06c993d Make block constructors not write to this->meta directly 2018-09-16 14:10:40 +01:00
Dylan K. Taylor
c0962a47be Block: Use parent::place() instead of setBlock() directly 2018-09-13 12:54:03 +01:00
Dylan K. Taylor
f218868338 Separate facing/bearing handling from Vector3, deobfusticate a ton of @shoghicp old code 2018-09-05 19:56:14 +01:00
Dylan K. Taylor
99a0c2a188 Block: Make recalculation of BB non-dependent on block position
This now computes BBs relative to 0,0,0 and then offsets them as appropriate. This requires less boilerplate code and also furthers the goal of separating block types from instances.
2018-06-21 19:58:28 +01:00
Dylan K. Taylor
4f8e4f0522
Add EOF newlines where missing (bulk) (#1836)
This should solve issues with people making GitHub PRs and having the web editor messing things up. GitHub Web Editor sucks :(
2017-12-20 11:56:36 +00:00
Dylan K. Taylor
d1db27016e s/facePos/clickVector/
clickVector better describes this
2017-10-27 19:05:26 +01:00
Dylan K. Taylor
716c1f29b4 Fixed slabs again 2017-10-24 10:23:07 +01:00
Dylan K. Taylor
d2dc49cd9c Refactor Slab logic away from WoodenSlab, added StoneSlab2 and its double 2017-10-18 19:27:54 +01:00
Dylan K. Taylor
4950157f1d How did this escape notice? 2017-08-16 13:08:30 +01:00
Dylan K. Taylor
6b7a382625 import cleanup and missing strict types declare 2017-08-07 15:42:46 +01:00
Dylan K. Taylor
561d8e7a39 Regenerated block/item id lists and refactored some names for consistency with MCPE 2017-08-04 12:17:24 +01:00
Dylan K. Taylor
21887b283f Removed some copy-pasted code, fix leaves2 drops 2017-07-30 17:22:28 +01:00
Dylan K. Taylor
51b0673b4b Bite the bullet and enable strict types on everything 2017-06-07 12:53:16 +01:00
Dylan K. Taylor
9004417456 Fixed file headers (#255) 2017-01-13 16:57:05 +00:00
SOFe
58ff381557 PhpStorm automated formatting (#11)
* PhpStorm reformatting

* Tuned PhpStorm reformatting

* Improved ItemIds and BlockIds formatting

* Tuned more PhpStorm reformatting

* Improved string concatenation
2016-10-03 19:05:48 +08:00
Intyre
94b79ac28a
Tool tier added to getDrops 2015-10-11 00:52:44 +02:00
willowmaster66
a3bce67d35 Updating blocks and items
Added new blocks/items and added constants to existing blocks/items for
clearer recipe making.
2015-09-18 22:17:24 +02:00
Shoghi Cervantes
0380e9009a Added block break tool type, fixed falling sand, fixed duplicated jungle leaves 2015-07-27 20:31:55 +02:00
Shoghi Cervantes
26c9eed82e Added all block hardness 2015-07-27 20:31:55 +02:00
Shoghi Cervantes
02ba9ffc16
Improved entity movement ySize offset 2015-04-08 22:09:06 +02:00
Shoghi Cervantes
747f7685e7 Fix formatting issues due to bad IDE settings 2014-12-07 16:30:04 +01:00
Shoghi Cervantes
a98da3bab1 Renamed old getID() calls to getId() 2014-12-07 15:21:32 +01:00
Shoghi Cervantes
a0d4bff385 Block creating and property handling rewrite, part1 2014-12-07 01:53:27 +01:00
Shoghi Cervantes
8601405a88 Fixed CPU leak 2014-10-31 21:07:00 +01:00
Shoghi Cervantes
289bc56b4b Blocks now save their bounding box, fixed entity block collision check 2014-10-29 15:43:23 +01:00
Shoghi Cervantes
7abf52e615 Implemented Vector3 List and AxisAlignedBB Pool to decrease object allocation 2014-10-27 15:39:20 +01:00
Shoghi Cervantes
1eec333501 Save block bounding boxes, improves block cache 2014-10-13 18:38:00 +02:00
Shoghi Cervantes
593b0497b0 Fixed #1750 cannot place slabs against blocks 2014-09-22 11:58:15 +02:00
Shoghi Cervantes
50b2f55583 Increased movement error range 2014-09-15 23:53:08 +02:00
Shoghi Cervantes
ac4b4b08fd Fixed Level::setBlock() old calls 2014-09-05 11:00:13 +02:00
Shoghi Cervantes
3731e74696 Added Slab bounding box 2014-08-30 02:14:24 +02:00
Shoghi Cervantes
eab86f5f90 Replaced array() with [] 2014-08-28 17:04:22 +02:00
Shoghi Cervantes
b064f1e71a Removed collision check crash on Slab 2014-06-28 02:38:04 +02:00
Shoghi Cervantes
6cbd39de9b Added Inventory interfaces and types, updated long array() to [] 2014-05-22 18:59:16 +02:00
Shoghi Cervantes
0be679c9d5 Updated method names: getMetadata() & setMetadata() to getDamage() & setDamage() on Block and Item classes 2014-05-22 18:37:28 +02:00
Shoghi Cervantes
c1546aac9c Updated Position to use Weak / strong references for Level objects 2014-05-22 04:14:06 +02:00
Shoghi Cervantes
dd17652aca Fixed wrong paths 2014-04-01 05:06:12 +02:00