d72e4cb9a1
Tile: remove createNBT(), add create(), createFromData(), createFromItem()
2018-12-10 19:40:37 +00:00
8dbeda69a7
Make use of Facing::rotateY() to reduce boilerplate
2018-12-07 10:49:12 +00:00
39e383a175
Entity: add getHorizontalFacing(), clean up some boilerplate code
2018-12-05 20:27:43 +00:00
3f3bdaeba5
Use dynamic state detection to localize stateinfo stored in tiles (hack)
2018-11-24 19:43:02 +00:00
b2201c8c59
Further cleanup to general AABB handling
2018-11-24 19:17:03 +00:00
8e6a5813ea
Don't auto-create tiles on activate
...
this complicates the code unnecessarily and doesn't produce the desired effect in most cases anyway.
2018-09-28 20:12:41 +01:00
35d51570be
Add and make use of Block->isSameType()
2018-09-27 17:59:06 +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
1bb4daa7d1
Fixed mess of rotations being inverted
2018-09-16 17:37:36 +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
7b7917939a
Cleaned up Container lock handling
2018-06-03 13:42:04 +01:00
6ce728169e
Chest: Remove redundant unpairing code from onBreak()
...
This is already done in the Level.
2018-01-03 12:08:35 +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
55d0684565
Move block-breaking tool-type constants to a BlockToolType interface
2017-12-12 13:45:52 +00:00
aa399a1109
migrate to new CompoundTag API ( #1515 )
2017-11-10 15:38:21 +00:00
6ff1088a57
fix chest AABB
2017-10-27 19:16:06 +01: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
8fafef2f7f
Added tagType parameter to ListTag constructor, remove some boilerplate code
2017-10-08 13:28:01 +01:00
138d85307b
Fixed double chests being openable when the other half has a solid block above it, close #1165
2017-09-01 16:50:55 +01:00
6d5620606e
Block->place() parameter refactor to make things clearer
2017-08-26 14:41:49 +01:00
8ce833bf74
Stripped redundant trailing commas
2017-08-25 12:41:49 +01:00
b8ade18888
Fixed double plants and beds sometimes dropping in creative
2017-08-21 19:25:04 +01:00
02f42eba48
Move block registration to its own class
2017-08-20 18:05:01 +01:00
e1d894057c
Changed face position floating-point params to Vector3s
2017-08-20 10:23:34 +01:00
0e24596aed
Changed block construction calls to Block::get()
2017-08-19 13:46:17 +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
2103c981a9
Replaced literal ints with Vector3 constants for Block->getSide() calls
2017-08-04 13:33:23 +01:00
6ae24c5c19
Removed unnecessary methods Block->canBeActivated() and Item->canBeActivated() (needless extra confusion)
2017-07-30 18:14:43 +01:00
51b0673b4b
Bite the bullet and enable strict types on everything
2017-06-07 12:53:16 +01:00
c21197ef17
Removed entanglement between chunks and providers. WARNING: BREAKING API CHANGES.
...
- All entity and tile constructors now require a \pocketmine\level\Level instead of a \pocketmine\level\format\Chunk.
- Chunk->getProvider() and Chunk->setProvider() have been removed.
- Chunk::__construct() has had the $provider parameter removed.
- Chunk->unload() has had the unused $save parameter removed.
- ChunkEvents now take a Level parameter instead of going through the Chunk
API bump to 3.0.0-ALPHA4
2017-02-21 17:08:45 +00: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
42e8120961
Remove creative container open checks (lines up with 0.14)
2016-09-28 13:59:53 +01:00
7f8b39a63c
Renamed NBT tags to have Tag in the name
2015-08-23 00:25:29 +02:00
fcba9596d6
Added CanDestroy and Lock tag
2015-08-07 22:20:01 +02:00
696edfd31f
Added custom block data (example, chests), better deep checking of same NBT
2015-08-07 17:24:35 +02:00
75b7b03857
Added support for more NBT data, renaming inventories, fixed tags not being saved, added support for tags in /give
2015-08-07 16:28:27 +02: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
f88aed1208
Fixed NBT parsing on false properties
2015-04-20 13:57:16 +02:00
747f7685e7
Fix formatting issues due to bad IDE settings
2014-12-07 16:30:04 +01:00
af82d616c1
Block creating and property handling rewrite, part2
2014-12-07 02:20:26 +01:00