7b3993730a
Block: Replace Color and WoodType magic numbers with type-safe objects
...
this provides automatic type safety without the need for magic number value checking everywhere.
2019-02-12 13:52:59 +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
e66b1953de
Block: added flame encouragement and flammability properties
2018-04-10 09:58:08 +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
d99e9513b0
Remove some redundant constructor overrides
2017-10-19 16:42:14 +01:00
d2dc49cd9c
Refactor Slab logic away from WoodenSlab, added StoneSlab2 and its double
2017-10-18 19:27:54 +01:00
f148c366f9
Use Block->getVariant() more, get rid of hardcoded bitmasks
2017-10-18 17:46:24 +01:00
d8b1757ebc
added some nullable and void typehints to Block API
2017-10-11 18:45:40 +01:00
c09d782503
Fix #145 , take 2 (slab placement in half gaps doesn't work) ( #1411 )
2017-10-01 16:19:59 +01:00
1b5fed983b
Revert "Fixed slab placement, close #145 ", reopen #145 , close #1314
...
This reverts commit f2ff0198cc
.
2017-09-21 14:41:18 +01:00
6d5620606e
Block->place() parameter refactor to make things clearer
2017-08-26 14:41:49 +01:00
02f42eba48
Move block registration to its own class
2017-08-20 18:05:01 +01:00
8475c63426
Remove redundant brackets from WoodenSlab
2017-08-20 11:02:34 +01:00
f2ff0198cc
Fixed slab placement, close #145
2017-08-20 10:52:07 +01:00
c394aea803
Replaced more literal ints with Vector3 constants
2017-08-20 10:43:48 +01:00
e1d894057c
Changed face position floating-point params to Vector3s
2017-08-20 10:23:34 +01:00
41c6cb6f97
Added Block->getVariantBitmask(0 to cut down on getDrops() boilerplate, fixed several blocks incorrectly retaining meta when broken
2017-08-18 19:49:28 +01:00
d8f0dd6db8
Changed Block->getDrops() to return Item[]
2017-08-18 11:21:33 +01:00
83af4dcd59
Block API typehints
2017-08-17 13:50:19 +01:00
6efa4343b1
Cleaned up fuel duration handling, fixed some fuel items not working in furnaces
2017-08-17 10:22:47 +01:00
021dbd65d7
Cleaned up some copy-pasted code for coloured blocks names
2017-08-16 14:38:41 +01:00
561d8e7a39
Regenerated block/item id lists and refactored some names for consistency with MCPE
2017-08-04 12:17:24 +01:00