89fce7712a
Block: Clean up internal constructor inconsistencies
...
I don't dare look how big this commit is or how many bugs it introduced...
2019-02-20 19:21:51 +00:00
b2201c8c59
Further cleanup to general AABB handling
2018-11-24 19:17:03 +00:00
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
f7f06c993d
Make block constructors not write to this->meta directly
2018-09-16 14:10:40 +01:00
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
05af87e1d4
Strip empty lines at the end of classes
2018-06-11 13:19:23 +01:00
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
55d0684565
Move block-breaking tool-type constants to a BlockToolType interface
2017-12-12 13:45:52 +00:00
d8b1757ebc
added some nullable and void typehints to Block API
2017-10-11 18:45:40 +01:00
83af4dcd59
Block API typehints
2017-08-17 13:50:19 +01:00
51b0673b4b
Bite the bullet and enable strict types on everything
2017-06-07 12:53:16 +01:00
61d354a4ea
Block constructor mass-replace to fix #963 and related issues
2017-06-05 10:02:27 +01:00
9004417456
Fixed file headers ( #255 )
2017-01-13 16:57:05 +00:00
6fc435da0e
Imports rearrangement
2016-10-03 00:43:46 +08:00
0380e9009a
Added block break tool type, fixed falling sand, fixed duplicated jungle leaves
2015-07-27 20:31:55 +02:00
26c9eed82e
Added all block hardness
2015-07-27 20:31:55 +02:00
747f7685e7
Fix formatting issues due to bad IDE settings
2014-12-07 16:30:04 +01:00
a0d4bff385
Block creating and property handling rewrite, part1
2014-12-07 01:53:27 +01:00
8601405a88
Fixed CPU leak
2014-10-31 21:07:00 +01:00
289bc56b4b
Blocks now save their bounding box, fixed entity block collision check
2014-10-29 15:43:23 +01:00
7abf52e615
Implemented Vector3 List and AxisAlignedBB Pool to decrease object allocation
2014-10-27 15:39:20 +01:00
1eec333501
Save block bounding boxes, improves block cache
2014-10-13 18:38:00 +02:00
3eb8ca0d13
Added Soul Sand bounding box
2014-08-30 23:47:39 +02:00
dd17652aca
Fixed wrong paths
2014-04-01 05:06:12 +02:00