13 Commits

Author SHA1 Message Date
Dylan K. Taylor
1e9e179ec0 Fixed Block consistency check failure since 943906cc6b8a95c62ed7227466de5500eb7548b0 2019-03-01 08:24:25 +00:00
Dylan K. Taylor
9ad0ea85c7 Rename two misleadingly-named functions 2019-02-27 12:59:12 +00:00
Dylan K. Taylor
202aef9846 fix failing tests 2019-02-26 16:35:33 +00:00
Dylan K. Taylor
d7e73705c2 consistency check regen script now emits which states were added/removed 2019-02-26 16:35:14 +00:00
Dylan K. Taylor
6cb263fcca BlockFactory: enforce stricter checks
this can help catch out variant-related bugs.
2019-02-24 17:59:09 +00:00
Dylan K. Taylor
023fecabac Added an annoying consistency check for BlockFactory
This test is intended to enforce that the BlockFactory always has the same blocks in it from one commit to the next. Since there are a lot of changes going on right now around this, it's important that this is checked because bugs can go under the radar when large changes are happening.

The consistency check will need to be regenerated whenever a new block is registered, new states are found or when things are removed.
2019-02-24 13:56:55 +00:00
Dylan K. Taylor
f669677d17 BlockTest: fixed failing test
this is a bad fix, but it doesn't matter a whole lot. The problem stems from furnace not having a valid 0 variant, so things go haywire when the default mapped 0 variant is registered to LIT_FURNACE because the default state is of course unlit.
2019-02-22 18:56:14 +00:00
Dylan K. Taylor
707faef0f7 BlockTest: remove redundant name test
name is mandatory in the constructor now, so this isn't necessary anymore.
2019-02-22 18:54:21 +00:00
Dylan K. Taylor
6ab171d629 Fixed unit tests 2019-02-21 10:41:06 +00:00
Dylan K. Taylor
15d4201c3a Fixed tests broken by 88c4b836f09278a2d81a14356ff3c29ce465de1d 2019-02-20 11:16:08 +00:00
Dylan K. Taylor
cdb17b1cee Fixed broken test 2018-10-06 17:39:11 +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
9d16863b1a Convert some TesterPlugin tests into PHPUnit tests, add PHPUnit configuration 2018-06-05 19:33:21 +01:00