File tree Expand file tree Collapse file tree
worldedit-core/src/main/java/com/sk89q/worldedit/world Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -77,7 +77,6 @@ public BlockType getBlockType() {
7777 return this .blockType ;
7878 }
7979
80- @ Override
8180 public BlockMaterial getMaterial () {
8281 return WorldEdit .getInstance ().getPlatformManager ()
8382 .queryCapability (Capability .GAME_HOOKS ).getRegistries ().getBlockRegistry ().getMaterial (this );
Original file line number Diff line number Diff line change 1919
2020package com .sk89q .worldedit .world .registry ;
2121
22+ import com .sk89q .worldedit .internal .util .NonAbstractForCompatibility ;
2223import com .sk89q .worldedit .registry .state .Property ;
2324import com .sk89q .worldedit .util .formatting .text .Component ;
2425import com .sk89q .worldedit .world .block .BlockState ;
@@ -68,7 +69,13 @@ default String getName(BlockType blockType) {
6869 *
6970 * @param blockState the block state
7071 * @return the material, or null if the material information is not known
72+ * @apiNote This must be overridden by new subclasses. See {@link NonAbstractForCompatibility}
73+ * for details
7174 */
75+ @ NonAbstractForCompatibility (
76+ delegateName = "getMaterial" ,
77+ delegateParams = { BlockType .class }
78+ )
7279 @ Nullable
7380 default BlockMaterial getMaterial (BlockState blockState ) {
7481 return getMaterial (blockState .getBlockType ());
You can’t perform that action at this time.
0 commit comments