Commit Graph

891 Commits

Author SHA1 Message Date
fb02071a9d Traits suck. Fixed missed getDamage() from 9ad0ea85c7 2019-02-27 16:50:51 +00:00
08673172c7 Grass: Avoid usage of meta 2019-02-27 13:03:23 +00:00
9ad0ea85c7 Rename two misleadingly-named functions 2019-02-27 12:59:12 +00:00
440dd21550 Merge branch '3.6' 2019-02-26 19:59:24 +00:00
6c92a2e88b Ladder: be more strict about resetting fall distance
closes #2790
2019-02-26 19:54:57 +00:00
97deadc59f PackedIce: fixed dropping without silk touch, closes #2789 2019-02-26 19:48:18 +00:00
ceaf969203 EnderChest: fix hierarchy 2019-02-26 19:41:56 +00:00
cb91afcc00 Added SkullType enum, some cleanup to skull handling
this is still more ugly than I'd like it to be because of the way the blockfactory currently works.
2019-02-26 18:27:30 +00:00
edf4a719d5 DyeColor: add RGB colour values 2019-02-26 17:16:35 +00:00
9afcd72fb6 Flatten FlowerPot tile into its block (mostly) 2019-02-26 16:31:38 +00:00
53af7f5da8 Implemented dragon egg 2019-02-26 15:35:37 +00:00
2d51622b12 Implemented frosted ice 2019-02-26 15:34:48 +00:00
6124f93cb4 Player: Clean up item frame drop-item hack
This is now re-routed through a newly-created attack-block handler.
Closes #339
2019-02-25 18:40:04 +00:00
fb378d9091 BlockFactory: fixed auto complete 2019-02-24 18:41:12 +00:00
0f7f5362b8 Revert "Block: Get rid of state bitmasks"
This reverts commit b7b05e729e.

Apparently this was premature, because we still need these things to deal with default state remapping.
2019-02-24 18:30:18 +00:00
b7b05e729e Block: Get rid of state bitmasks
This story dates back to the days when getVariantBitmask() was introduced. The purpose of this function was to allow the variant info to be extracted from the metadata, for use with item drops. This was later changed to state bitmask for reasons I don't clearly recall.
In the great 4.0 refactor, we now store variant magic numbers separately, so we don't need any generic bitmask to split up variant and state information anymore. Variant is now only ever serialized and never deserialized. The same thing goes for blockIDs. States are read from the world by matching the full stateID against a table of prefilled known blocks, so the variant doesn't need to be deserialized - only the state does, and the state metadata readers already do bit fuckery by themselves and don't need this mask - notice how little actual changes were required to get rid of this?
2019-02-24 14:42:53 +00:00
6edd4fd9c7 BlockFactory: added getAllKnownStates() 2019-02-24 13:40:59 +00:00
73305a7425 oops, formatting issue 2019-02-24 13:22:11 +00:00
899081e1b9 Level: fixed randomTickBlocks, also delete some useless code
the randomTickBlocks thing is populated with state IDs anyway, not variants...
2019-02-24 13:10:45 +00:00
369a1e1472 Tripwire: fixed block picking 2019-02-24 12:41:44 +00:00
832ad0501a Tripwire: added missing flag
it's unclear what the purpose of this flag is. It appears to always be set on placement and is never changed at any other time. The result is that the hitbox becomes larger when it is set.
2019-02-24 12:19:15 +00:00
97687f2236 Dye, banner and bed items now store DyeColor objects instead of using magic meta values 2019-02-24 10:48:40 +00:00
0bd1c1529e Block: Rename getItem() to asItem()
this has clearer meaning and is less likely to collide with other things.
2019-02-24 10:23:40 +00:00
ff35736bf9 ItemFrame: added ROTATIONS constant 2019-02-23 18:27:47 +00:00
998dcb421e Flatten Item Frame implementation into its block (mostly)
This exposes nice API on the ItemFrame class, while keeping the tile bullshit out of sight so that we can remove it later on.
2019-02-23 18:19:31 +00:00
a5c260352d Infect remaining places with PHP 7.1 nullable typehints 2019-02-22 12:16:45 +00:00
3037f45a0c Implement new dye types, split bonemeal and cocoa beans into their own classes 2019-02-22 11:43:48 +00:00
2bfcd25848 Fixed typo in Repeater name 2019-02-21 18:41:04 -05:00
f9da0f3ece Sapling: remove dead TODO 2019-02-21 13:09:05 +00:00
eabd8ce026 Fixup pressure plate hierarchy 2019-02-21 13:06:08 +00:00
28d01025b0 Improve consistency of handling coloured and wooden blocks
this is ugly, but less ugly than the earlier version.
2019-02-21 12:13:21 +00:00
0120585aee Block: name is no longer nullable 2019-02-21 11:37:21 +00:00
635fb5dde4 Clean up ID flattening hacks 2019-02-21 10:38:29 +00:00
89fce7712a Block: Clean up internal constructor inconsistencies
I don't dare look how big this commit is or how many bugs it introduced...
2019-02-20 19:21:51 +00:00
e93464f318 SnowLayer: fixed 8x layers being replaceable
this also fixes some placement bugs.
2019-02-20 16:29:34 +00:00
7170d9009d Enchantment: more static getters, firehose magic numbers
This is similar in nature to 646fea5a4e.

On a side note: Migrating this way is a pain in the ass due to lack of types. What the heck is int supposed to mean?!?!?!?! At least if we wanted to go _back_ to magic numbers, it would be easy to locate everything with an Enchantment typehint...
2019-02-20 13:45:50 +00:00
2c8a065b94 Standardise SNAKE_CASE for surrogate enums 2019-02-20 11:14:07 +00:00
36e9db4c07 Generate methods for surrogate enums, nip stupidity in the bud
this also allows changing the internal implementation later without breaking plugins.
2019-02-20 11:09:22 +00:00
88c4b836f0 Make factory register methods less verbose 2019-02-20 10:24:44 +00:00
f351a86653 Flatten double slabs into Slab pseudo-variant 2019-02-19 11:14:06 +00:00
18f765338c Slab: fixed replacing $blockReplace not creating double slab when not clicking on the replaced block itself 2019-02-19 11:09:11 +00:00
bf71ddb0b5 Snow layers now fall as expected 2019-02-19 10:01:57 +00:00
a4c3ee20b2 Extract Fallable into trait + interface
Traits are inferior to components in pretty much every aspect imaginable :(
2019-02-19 09:58:10 +00:00
6174f1e0ae Pumpkin: fix BC issue, fix lit pumpkin rotation 2019-02-18 20:02:23 +00:00
6f4cec6465 add some blocks introduced in 1.9 2019-02-18 20:01:50 +00:00
a95ecb3ff9 FenceGate: implement in-wall checks 2019-02-18 19:00:58 +00:00
6f7c63e2a8 ItemFrame: add has-map bit
this makes the frame appear to cover the full block instead of the usual size.
2019-02-18 17:41:15 +00:00
8f26c3a2d4 Fix bonemeal count not reduced by CocoaBlock (#2773) 2019-02-18 16:31:07 +00:00
12dd6adfcc Block: Derive light filter level based on isTransparent() return
this might be dynamic.
2019-02-18 13:27:22 +00:00
6cdd716c34 Merge branch '3.6' 2019-02-18 13:12:29 +00:00