1427da0aeb
Clean up item handling of blocks
2018-09-23 14:21:37 +01: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
960fdb433e
Merge branch 'release/3.3'
2018-09-20 16:50:11 +01:00
aa05650994
Fixed block picking for mob heads
2018-09-20 13:11:45 +01:00
f7f06c993d
Make block constructors not write to this->meta directly
2018-09-16 14:10:40 +01:00
c0962a47be
Block: Use parent::place() instead of setBlock() directly
2018-09-13 12:54:03 +01:00
f218868338
Separate facing/bearing handling from Vector3, deobfusticate a ton of @shoghicp old code
2018-09-05 19:56:14 +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
8d7c65585c
Enchantment: Implement Silk Touch ( #1912 )
2018-01-14 13:37:27 +00: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
6abf880e44
Block: Drop unnecessary parameters for ItemFactory::get()
2017-12-13 18:37:04 +00:00
56f1a6ba37
Block: Migrated all trivial drops code to getDropsForCompatibleTool()
...
getDrops() should now be overridden only for special cases. There are some non-trivial overrides left that are going to need some extra work to clean up.
2017-12-13 12:49:58 +00:00
d1db27016e
s/facePos/clickVector/
...
clickVector better describes this
2017-10-27 19:05:26 +01:00
d8b1757ebc
added some nullable and void typehints to Block API
2017-10-11 18:45:40 +01:00
b7a9e10d49
Some cleanup to how tiles are created
2017-10-11 18:08:08 +01:00
78ca2f2e58
fix heads rotating 45 degrees when placed facing north
2017-10-09 18:12:56 +01:00
97dbf61236
Remove some no-longer-needed item classes
2017-10-09 12:31:57 +01:00
6d5620606e
Block->place() parameter refactor to make things clearer
2017-08-26 14:41:49 +01:00
876659cc73
Item factory refactor and added capability to register custom items
2017-08-21 17:49:26 +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
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
6b7a382625
import cleanup and missing strict types declare
2017-08-07 15:42:46 +01:00
561d8e7a39
Regenerated block/item id lists and refactored some names for consistency with MCPE
2017-08-04 12:17:24 +01:00