b2201c8c59
Further cleanup to general AABB handling
2018-11-24 19:17:03 +00:00
75f364fcf2
Level: Remove obsolete \$direct parameter from setBlock()
...
this parameter was previously used to send blocks with a different set of flags, immediately, to players. However, the flags have been demonstrated useless and the direct sending is pointless now since packets are buffered now per session, so we might as well take advantage of the batched block update sending.
2018-09-27 16:15:07 +01:00
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
01f12d6147
Merge branch 'release/3.3'
2018-09-18 12:32:12 +01:00
107192c753
Bed: fixed block-pick giving wrong colour items
2018-09-18 12:31:53 +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
2b8405e6ee
Make use of Bearing::opposite()
2018-09-13 19:35:47 +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
31c187f366
Bed: fixed recursion when setting state to something it already is
...
fixes #2236
2018-06-13 04:16:52 -04:00
ac5a91b67e
Cleaned up bool comparison mess
2018-03-19 14:10:55 +00:00
906d7eb176
Lang: Move TranslationContainer and TextContainer to \pocketmine\lang namespace
...
why the hell were they ever put in \pocketmine\event in the first place??
This change was suggested many months ago but I forgot all about it.
2018-02-04 20:03:30 +00:00
8d7c65585c
Enchantment: Implement Silk Touch ( #1912 )
2018-01-14 13:37:27 +00:00
3a0cbd1cd4
Block: Cleaned up double-block break handling, close #1862 , close #1525
...
This now removes the need for recursing around for structures comprised of multiple blocks. Instead, override getAffectedBlocks() to return all blocks that need to be deleted when the current block is deleted, and make sure that only one half of the block drops something. When a player breaks one of the blocks, all the blocks affected by that block will also be destroyed, creating particles and sounds where appropriate.
This fixes creative drops for double plants and beds.
2018-01-03 13:01:05 +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
74b074753f
Bulk addition of constant visibilities
...
thanks PhpStorm inspections plugin for annoying the shit out of me until
I did this.
2017-11-21 14:44:10 +00:00
3a80ec4db8
Add bed too far message
2017-11-19 10:22:04 +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
cebb4b35f6
Fixed beds not getting deleted properly in survival
...
the anti-instabreak kicked in twice... damned anti-cheat... luckily the player is not needed for this part
2017-10-09 10:49:30 +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
876659cc73
Item factory refactor and added capability to register custom items
2017-08-21 17:49:26 +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
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
8957dbf08e
Use occupied bitflag and added distance check for beds
...
must be < 2 blocks from either half of the bed
2017-07-30 20:02:48 +01:00
2d626d1d90
Improved Beds, fixed bed tiles not getting removed for other halves
...
relates to #880
2017-07-30 19:57:10 +01:00
253db40a11
Fixed bed placement with head over a transparent block
2017-07-30 19:50:47 +01:00
1f4e6535bb
Added Bed tile and support for coloured beds
2017-07-30 19:34:06 +01:00
6ae24c5c19
Removed unnecessary methods Block->canBeActivated() and Item->canBeActivated() (needless extra confusion)
2017-07-30 18:14:43 +01:00
2a7b736f18
Heap of bugfixes, cleanup and PHP 7 upgrades
2017-07-13 19:18:56 +01:00
51b0673b4b
Bite the bullet and enable strict types on everything
2017-06-07 12:53:16 +01:00
5c281c6435
Merged #103
2017-02-15 14:58:41 +00:00
9004417456
Fixed file headers ( #255 )
2017-01-13 16:57:05 +00:00
f3c46b12c5
Block breaking part 1
2015-07-27 20:31:55 +02:00
62ba36b474
New TextPacket, second part!
2015-03-19 20:27:51 +01:00
747f7685e7
Fix formatting issues due to bad IDE settings
2014-12-07 16:30:04 +01:00
a98da3bab1
Renamed old getID() calls to getId()
2014-12-07 15:21:32 +01:00
af82d616c1
Block creating and property handling rewrite, part2
2014-12-07 02:20:26 +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