c7070788f9
Rename and repurpose Block->diffusesSkyLight to blocksDirectSkyLight
...
this new form allows skipping some useless checks during sky light calculation and also allows getting rid of the last hard dependency on core Block classes.
We're getting real close to native light now.
2020-09-08 22:40:05 +01:00
bf401421fa
Implemented bamboo ( #3762 )
2020-08-16 20:39:51 +01:00
2b044195a5
Update for pocketmine/math Axis refactor
2020-08-06 14:38:54 +01:00
909f3f39de
Block: get rid of getRuntimeId()
...
the runtime ID mapping should be non-global in case of multiple protocols.
2020-07-06 11:18:29 +01:00
2cd67aed72
Block: fixed crash on block factory clone
2020-06-29 22:40:35 +01:00
da3f0752a6
Block: make getAllSides() and getHorizontalSides() use underlying Vector3 generators
2020-06-29 22:13:07 +01:00
670ad9eb9d
Position: rename getWorldNonNull() to getWorld(), remove original getWorld()
2020-06-29 21:19:46 +01:00
fc22fd80d8
Eradicate remaining usages of Position->getWorld()
2020-06-29 21:03:55 +01:00
43ae1a5cb4
Block: make getAllSides() and getHorizontalSides() return generators
2020-06-29 20:54:51 +01:00
01d221b794
imports cleanup
2020-06-28 17:50:49 +01:00
f1048aeaa3
Block: rework addVelocityToEntity() to avoid vector3 mutation
2020-06-27 21:38:24 +01:00
1ef6e5e17b
TileFactory now only manages loading tiles from NBT, not direct creation
...
my objective is to make this use proper constructors like entities, but there's a couple of obstacles to get around first.
2020-06-21 00:47:02 +01:00
8e2b9b686b
Block: Invert default behaviour of silk touch (more logical)
...
Now, blocks do not respond to silk touch unless specifically opted into. Since this always involves custom drops in one way or another, it's easy enough to figure out which blocks need to be marked for silk touch - anything that overrides getDrops, getDropsForCompatibleTool or getSilkTouchDrops is a block which _might_ need to be flagged. Using these criteria to reduce the number of blocks needing to be checked, I was able to manually invert the behaviour as needed.
This fixes reoccurring bugs with blocks erroneously dropping themselves whenever new blocks are added and someone forgot to set that flag, granting players access to internal blocks with strange behaviour.
2020-05-21 13:02:36 +01:00
3f1f135a59
remove a couple more Position->getWorld() usages
2020-05-19 21:38:51 +01:00
8a8b1b0b97
Remove Position->setWorld()
2020-05-19 18:33:16 +01:00
6b037d6a4c
RuntimeBlockMapping: these IDs are not static any more
2020-05-11 12:40:55 +01:00
ac5cf2443e
convert TileFactory to singleton
2020-04-26 01:11:30 +01:00
287bf4274f
move RuntimeBlockMapping to convert package
2020-04-24 12:42:43 +01:00
5a94af40e2
Convert ItemFactory to singleton
2020-04-24 00:18:31 +01:00
aa1828aa98
RuntimeBlockMapping is now a singleton instead of static class
...
this prepares for a fully dynamic block mapper, as well as allowing a small performance improvement to chunk encoding by eliding the constant lazy-init checks.
2020-04-23 21:09:58 +01:00
86e051b7bf
Merge commit 'a2543ff80d2906bccda1a4e2fdbd9d8e7d147fb3'
2020-04-18 17:33:05 +01:00
055b13a6cf
strip extra blank lines (php-cs-fixer)
2020-01-22 15:14:10 +00:00
67bcc1c0fb
phpdoc armageddon for master, pass 1
2020-01-22 11:55:03 +00:00
0f718ea28b
Merge commit '8726604899d1a371567141e0831ed570d3233356'
2019-12-25 14:19:35 +00:00
4898a35613
cleanup block dual bounding box clusterfuck
...
"bounding box" serves no tangible purpose, only collision boxes do right now.
2019-08-15 17:23:55 +01:00
73b2669712
remove World->isFullBlock(), add Block->isFullCube(), clean up some BB mess
2019-08-15 16:22:54 +01:00
e29ac514d7
Block->getBoundingBox() and Block->getCollisionBoxes() are now final
...
Force usage of Block->recalculateBoundingBox() and Block->recalculateCollisionBoxes()
2019-08-15 16:16:08 +01:00
53ab860db5
first shot making Block not extend Position
...
this makes some stuff a lot less pretty, but this seems to be the bare minimum necessary to do this task. It can be enhanced later.
2019-08-05 16:44:09 +01:00
1fcec87b98
Block: remove unused function
2019-08-03 17:13:02 +01:00
5499ac620c
Removed pocketmine subdirectory, map PSR-4 style
2019-07-30 19:14:57 +01:00