Commit Graph

9331 Commits

Author SHA1 Message Date
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
6cb263fcca BlockFactory: enforce stricter checks
this can help catch out variant-related bugs.
2019-02-24 17:59:09 +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
023fecabac Added an annoying consistency check for BlockFactory
This test is intended to enforce that the BlockFactory always has the same blocks in it from one commit to the next. Since there are a lot of changes going on right now around this, it's important that this is checked because bugs can go under the radar when large changes are happening.

The consistency check will need to be regenerated whenever a new block is registered, new states are found or when things are removed.
2019-02-24 13:56:55 +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
a3907377f5 Merge branch '3.6' 2019-02-24 12:14:40 +00:00
0c3b136a8d Player: fixed removeWindow() sometimes removing GUI / crashing clients 2019-02-24 12:14:19 +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
878c704597 Remove another dead function 2019-02-23 17:15:50 +00:00
49f9605620 Level: Allow tiles to be sent with regular block updates 2019-02-23 17:01:59 +00:00
eadb1d310e Level->sendBlocks() now syncs tiles 2019-02-23 16:53:29 +00:00
e1ef52c7c3 TileFactory: remove dead function 2019-02-23 15:57:53 +00:00
991483938c SubChunk: remove legacy crap 2019-02-23 13:18:37 +00:00
66a1b35767 Merge branch '3.6' 2019-02-23 11:05:23 +00:00
79b7e08e60 Silence NetworkStackLatencyPacket spam from dev builds 2019-02-23 11:03:50 +00:00
0daf695825 Merge branch '3.6' 2019-02-23 10:51:28 +00:00
2540dacdd7 PluginManager: fixed suffix split handling 2019-02-23 10:51:06 +00:00
f669677d17 BlockTest: fixed failing test
this is a bad fix, but it doesn't matter a whole lot. The problem stems from furnace not having a valid 0 variant, so things go haywire when the default mapped 0 variant is registered to LIT_FURNACE because the default state is of course unlit.
2019-02-22 18:56:14 +00:00
707faef0f7 BlockTest: remove redundant name test
name is mandatory in the constructor now, so this isn't necessary anymore.
2019-02-22 18:54:21 +00:00
0f2f05fbb9 Merge branch '3.6' 2019-02-22 18:14:17 +00:00
f1078e3909 3.6.4 is next 2019-02-22 18:07:48 +00:00
2f43b054de Release 3.6.3 3.6.3 2019-02-22 18:07:00 +00:00
23b5d64535 Merge branch '3.5' into 3.6 2019-02-22 18:03:51 +00:00
9afa0e5483 Release 3.5.13 3.5.13 2019-02-22 17:56:44 +00:00
4eaea54b0e TaskScheduler: fixed wrong typehints
These methods never return null.
2019-02-22 17:47:28 +00:00
9c085799e6 Removed leftover import from 3d1502c9ad 2019-02-22 12:56:14 +00:00
c26544475e More PHP 7.1 nullables 2019-02-22 12:55:34 +00:00
73a565355b Make some forced-optional nullable parameters non-optional, PHP 7.1 style
these parameters did not make any sense to be optional, but were forced to be this way because of the way nullable types worked before 7.1.
2019-02-22 12:54:00 +00:00
a5c260352d Infect remaining places with PHP 7.1 nullable typehints 2019-02-22 12:16:45 +00:00
461233db09 ItemFactory: Sort items lexicographically ascending 2019-02-22 11:52:22 +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
fd4a441f3a Level: add unregisterChunkListenerFromAll()
it's not expected for chunk listeners to have to track all the chunks they are listening to under normal circumstances.
2019-02-21 14:51:16 +00: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
e063c567be Merge remote-tracking branch 'origin/master' into block-id-object 2019-02-21 10:41:25 +00:00