742fbc25c3
BlockFactory: fixed 0 being assumed to be default if used
...
this defeated the whole point of adding this code ...
2018-10-20 21:42:34 +01:00
39d1196e4c
Leaves: fix performance issue introduced by block meta nuke
2018-10-13 12:28:33 +01:00
f671da99a6
BlockFactory: fix failing test
2018-10-12 21:40:45 +01:00
7af7783cc8
BlockFactory: Register block to id|variant without setting state to allow non-zero default states
...
This will be needed to deal with things like chest/furnace which don't use 0 as a valid state (these both use facing horizontal for rotation, and vertical is invalid, so 0 would mean downwards facing which is invalid.
2018-10-12 20:05:44 +01:00
0520598584
BlockFactory: skip blockstates which corrupt the metadata
...
if the metadata doesn't match what was inputted when reading back, it's an invalid state and should not be registered.
2018-10-12 19:49:26 +01:00
873b64259d
Torch: remove trailing comma
2018-10-12 19:07:43 +01:00
d151a89037
Vine: don't break when a supported vine is above, closes #2452
2018-10-12 18:38:52 +01:00
a944641509
Torch: Fix placement issues when clicking the bottom of a block, closes #2453 ( #2474 )
2018-10-12 12:26:44 +01:00
139aaa5577
Protect Item->count
2018-10-07 14:34:04 +01:00
a430f7f4f7
Allow static properties and state masks to vary based on variant
2018-10-06 17:33:28 +01:00
78bb0145aa
Remove unused imports from Block namespace
2018-10-05 18:31:06 +01:00
4608ecde9b
Merge branch 'release/3.3'
2018-10-05 18:29:37 +01:00
495fdbd19f
Move block and network namespaces away from PluginManager->callEvent()
...
the original step that wasn't supposed to cause conflicts, caused messy conflicts... so I might as well do this part too
2018-10-05 18:22:49 +01:00
77fd57e11a
Removed wtf from Liquid
2018-10-01 16:20:35 -04:00
94936d0f6b
Fixed CPU leak in falling water block updating
...
The cause of this was the flow decay of falling water changing, but the flow decay is ignored for falling water. This caused the block to be repeatedly set to itself, triggering local block updates, causing the disease to spread in large falling water bodies and cause immense amounts of lag.
2018-10-01 16:15:49 -04:00
74486d6880
Remove some state meta constants from API visibility
2018-09-30 14:43:55 +01:00
274a4d892f
Rail: detect state and then place, not vice versa
2018-09-30 14:35:57 +01:00
1a2312418b
Fixed assert failure when placing northeast/northwest powered rails
2018-09-30 14:17:30 +01: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
594a2041b6
Trapdoor: fix bad meth in comment
2018-09-28 16:44:30 +01:00
2600cf5977
Split some block variants into their own classes where behaviour differs
2018-09-28 16:21:03 +01:00
e038c4295d
Clean up abhorrent mess of Slab placement code
2018-09-27 18:46:01 +01:00
35d51570be
Add and make use of Block->isSameType()
2018-09-27 17:59:06 +01:00
8910c93de1
Slab: slight reduction of code repetition
2018-09-27 16:45:06 +01:00
0b49ec46c6
Deduplicate Pumpkin/Melon stem code
2018-09-27 16:24:35 +01: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
8a8f1d84ff
EnchantingTable: fix BB
2018-09-27 11:29:23 +01:00
e6a1398992
EndRod: fix BB rotation on X/Z axes
...
this was very apparent with the new code, less so with the magic meta values...
2018-09-27 02:36:39 -04:00
f2c960cfd8
Added on/off handling for buttons and levers
2018-09-26 19:19:35 +01:00
9651b3f470
Crops: micro optimization - check age before generating random number (faster)
...
I don't have any idea how much benefit this will provide in real terms, but it may be significant.
2018-09-24 16:48:19 +01:00
a195e940db
Fixed BB and right-click action for daylight sensor
2018-09-24 16:37:18 +01:00
a77e05f875
Implement corner stair BB handling
2018-09-24 16:25:17 +01:00
0b989925d7
whitespace
2018-09-23 18:41:57 +01:00
c501c740a1
Get rid of Block->canPassThrough()
...
This is only implemented in 1 place where the collision box should just be zero anyway, so there's no point this existing.
There's a lot of other blocks which should have bounding boxes without collision boxes as well, but that's outside the scope of this commit.
2018-09-23 17:05:03 +01:00
4f200c5183
Merge branch 'release/3.3'
2018-09-23 16:35:53 +01:00
06f00020cd
Merge branch 'release/3.2' into release/3.3
2018-09-23 16:35:20 +01:00
7b0836d399
Merge branch 'release/3.1' into release/3.2
2018-09-23 16:35:11 +01:00
cea146e335
Thin: use bounding box instead of collision boxes
2018-09-23 16:35:01 +01:00
1427da0aeb
Clean up item handling of blocks
2018-09-23 14:21:37 +01:00
ed1c511c3c
Hacks for dealing with negative item IDs...
2018-09-23 14:14:58 +01:00
9d2e9e1663
Fixed torch facing bug with wrong metadata
...
torches cannot face down
2018-09-21 19:45:52 +01:00
02d5f4da85
fix merge error
2018-09-21 19:32:59 +01:00
a093ba3ed9
thanks git
2018-09-21 19:30:04 +01:00
4a7f8fd9d9
Implemented behaviour for cocoa pods
2018-09-21 19:28:31 +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
6b44f99dfb
Merge branch 'release/3.2' into release/3.3
2018-09-20 16:50:04 +01:00
33d3fff3c5
Merge branch 'release/3.1' into release/3.2
2018-09-20 16:49:57 +01:00
7c092b93b4
Fixed bug when placing blocks by clicking on redstone ore
2018-09-20 16:49:50 +01:00
9b4d82630b
BlockFactory: remove $solid
...
this is premature optimization and will run into problems once we enter the flattening.
2018-09-20 16:26:15 +01:00