115 Commits

Author SHA1 Message Date
Dylan K. Taylor
dd914e0752 Block: move all legacy metadata constants into a dedicated class
this makes it easier to see what is using metadata (and makes it easier to get rid of later).
2019-05-16 16:55:44 +01:00
Dylan K. Taylor
1898db840d BlockFactory: more collapsible region things 2019-05-16 14:36:02 +01:00
Dylan K. Taylor
ff2600a0d0 Regenerated TODOs for BlockFactory and ItemFactory
also added //region and //endregion for IDE collapsibility
2019-05-16 14:20:51 +01:00
Dylan K. Taylor
5024de38b8 added more types of stone slab 2019-05-15 18:15:25 +01:00
Dylan K. Taylor
fd413b512e Remove useless Dandelion class
this class is line-for-line identical to the Flower class.
2019-05-12 18:42:49 +01:00
Dylan K. Taylor
9e72bc91a2 Separate block break-info to a separate dynamic unit 2019-05-10 16:24:59 +01:00
Dylan K. Taylor
3be5de4570 Separate WoodenTrapdoor from Trapdoor, fixed iron trapdoors being valid furnace fuel, closes #2914 for bleeding-edge 2019-05-09 19:30:18 +01:00
Dylan T
3cd6e12e71
Renaming "Level" -> "World" (#2907)
This has been a pain point for a long time due to the misleading nature of the name "level". It's also confusing when trying to do things like getting the XP level of the player or such, and also does not translate well to other languages.

This transition was already executed on the UI some time ago (language strings) and now it's time for the same change to occur on the API.

This will burn a lot of plugins, but they'll acclimatize. Despite the scary size of this PR, there isn't actually so many changes to make. Most of this came from renaming `Position->getLevel()` to `Position->getWorld()`, or cosmetic changes like changing variable names or doc comments.
2019-05-07 14:47:28 +01:00
Dylan K. Taylor
80a6fc5dd1 BlockFactory: remove deprecated functions 2019-04-02 19:15:29 +01:00
Dylan K. Taylor
f638845ef6 Merge branch '3.7' 2019-03-29 15:16:27 +00:00
Dylan K. Taylor
8e9f787d33 Implement runtimeID table randomization, closes #2841 2019-03-29 14:35:06 +00:00
Dylan K. Taylor
d9134f28e4 Rename CobblestoneWall -> Wall 2019-03-23 19:50:07 +00:00
Dylan K. Taylor
2a3e6dcf00 Rename BlockIds -> BlockLegacyIds 2019-03-23 19:46:31 +00:00
Dylan K. Taylor
79ef8e0803 Replace all legacy blockID references with BlockIds:: 2019-03-23 19:44:33 +00:00
Dylan K. Taylor
f84d7ad70d sync block TODOs 2019-03-23 19:21:11 +00:00
Dylan K. Taylor
6efdac63d0 added new Wood block 2019-03-23 19:18:25 +00:00
Dylan K. Taylor
06a37cc462 Fixed "wood" collision
why the fuck Mojang...
2019-03-23 19:08:17 +00:00
Dylan K. Taylor
1e096a408a Cram Nether Portal
again, this is here for the state handling and the implementation is unfinished.
2019-03-23 18:38:14 +00:00
Dylan K. Taylor
74e134136d Make Infested Stone blocks known
this is not remotely a complete implementation, it's just here to make PM aware of these states so that world conversion can be handled correctly. A full implementation will come later.

Any blocks added in this fashion should be marked with a //TODO so future maintainers can find which blocks need work.
2019-03-23 18:28:29 +00:00
Dylan K. Taylor
a8fa8572e1 partial sea pickle implementation 2019-03-23 18:11:27 +00:00
Dylan K. Taylor
905cb7544a hack in different wood sign types 2019-03-23 15:44:28 +00:00
Dylan K. Taylor
2966e87aae BlockFactory: Regenerate TODO list 2019-03-21 14:33:56 +00:00
Dylan K. Taylor
7f4b76aa86 Implemented blue ice 2019-03-12 19:38:03 +00:00
Dylan K. Taylor
48427290c9 Regenerated BlockFactory TODOs 2019-03-10 19:53:55 +00:00
Dylan K. Taylor
437750785f Implemented barrier block 2019-03-10 19:53:55 +00:00
Dylan K. Taylor
c2a069afd3 Implemented a bunch of new wood blocks 2019-03-10 19:53:24 +00:00
Dylan T
8f1bc5d497
Flatten wall_banner and wall_sign into single blocks (#2798)
This comes with some problems, but the problems are more bearable than the previous code.
2019-03-08 16:37:26 +00:00
Dylan K. Taylor
943906cc6b Partial comparator implementation
this supports placement, toggling compare/subtract mode, simple stuff. No redstone functionality yet.
This is needed for blockstate mapping in blockfactory.
2019-02-28 19:26:47 +00:00
Dylan K. Taylor
9ad0ea85c7 Rename two misleadingly-named functions 2019-02-27 12:59:12 +00:00
Dylan K. Taylor
53af7f5da8 Implemented dragon egg 2019-02-26 15:35:37 +00:00
Dylan K. Taylor
2d51622b12 Implemented frosted ice 2019-02-26 15:34:48 +00:00
Dylan K. Taylor
fb378d9091 BlockFactory: fixed auto complete 2019-02-24 18:41:12 +00:00
Dylan K. Taylor
0f7f5362b8 Revert "Block: Get rid of state bitmasks"
This reverts commit b7b05e729e4fcfbe74786342882d011f004658fa.

Apparently this was premature, because we still need these things to deal with default state remapping.
2019-02-24 18:30:18 +00:00
Dylan K. Taylor
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
Dylan K. Taylor
6edd4fd9c7 BlockFactory: added getAllKnownStates() 2019-02-24 13:40:59 +00:00
Dylan K. Taylor
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
Dylan K. Taylor
369a1e1472 Tripwire: fixed block picking 2019-02-24 12:41:44 +00:00
Dylan K. Taylor
a5c260352d Infect remaining places with PHP 7.1 nullable typehints 2019-02-22 12:16:45 +00:00
Dylan K. Taylor
2bfcd25848 Fixed typo in Repeater name 2019-02-21 18:41:04 -05:00
Dylan K. Taylor
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
Dylan K. Taylor
635fb5dde4 Clean up ID flattening hacks 2019-02-21 10:38:29 +00:00
Dylan K. Taylor
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
Dylan K. Taylor
2c8a065b94 Standardise SNAKE_CASE for surrogate enums 2019-02-20 11:14:07 +00:00
Dylan K. Taylor
88c4b836f0 Make factory register methods less verbose 2019-02-20 10:24:44 +00:00
Dylan K. Taylor
f351a86653 Flatten double slabs into Slab pseudo-variant 2019-02-19 11:14:06 +00:00
Dylan K. Taylor
6f4cec6465 add some blocks introduced in 1.9 2019-02-18 20:01:50 +00:00
Dylan K. Taylor
b8adfd6948 edu: implement coloured and underwater torches 2019-02-18 11:37:57 +00:00
Dylan K. Taylor
cd733c658b Implement hard glass & hard glass pane 2019-02-18 10:50:29 +00:00
Dylan K. Taylor
00b92eaa40 BlockFactory: Sort entries lexicographically ascending 2019-02-17 19:44:48 +00:00
Dylan K. Taylor
1496eefb8b Regenerated TODOs for item and b,locks
this sucks because it doesn't tell us anything about things that are meta values of other things (like dyes), but it's enough to start with.
2019-02-12 19:15:19 +00:00