File tree Expand file tree Collapse file tree 5 files changed +27
-3
lines changed
src/main/java/fr/alasdiablo/janoeo Expand file tree Collapse file tree 5 files changed +27
-3
lines changed Original file line number Diff line number Diff line change 11package fr .alasdiablo .janoeo .block ;
22
3+ import fr .alasdiablo .janoeo .block .util .RedstoneOreUtils ;
34import net .minecraft .block .BlockState ;
45import net .minecraft .block .RedstoneOreBlock ;
56import net .minecraft .block .SoundType ;
@@ -18,7 +19,7 @@ public EndRedstoneOre(String registryName) {
1819 .hardnessAndResistance (4f )
1920 .harvestLevel (2 )
2021 .harvestTool (ToolType .PICKAXE )
21- .func_235838_a_ (( p ) -> 9 )
22+ .func_235838_a_ (RedstoneOreUtils . isLit ( 9 ) )
2223 );
2324 this .setRegistryName (registryName );
2425 }
Original file line number Diff line number Diff line change 11package fr .alasdiablo .janoeo .block ;
22
3+ import fr .alasdiablo .janoeo .block .util .RedstoneOreUtils ;
34import net .minecraft .block .BlockState ;
45import net .minecraft .block .RedstoneOreBlock ;
56import net .minecraft .block .SoundType ;
@@ -18,7 +19,7 @@ public NetherRedstoneOre(String registryName) {
1819 .func_235861_h_ ()
1920 .harvestLevel (2 )
2021 .harvestTool (ToolType .PICKAXE )
21- .func_235838_a_ (( p ) -> 9 )
22+ .func_235838_a_ (RedstoneOreUtils . isLit ( 9 ) )
2223 );
2324 this .setRegistryName (registryName );
2425 }
Original file line number Diff line number Diff line change 11package fr .alasdiablo .janoeo .block ;
22
3+ import fr .alasdiablo .janoeo .block .util .RedstoneOreUtils ;
34import net .minecraft .block .RedstoneOreBlock ;
45import net .minecraft .block .SoundType ;
56import net .minecraft .block .material .Material ;
@@ -15,7 +16,7 @@ public RedstoneOre(String registryName) {
1516 .func_235861_h_ ()
1617 .harvestLevel (2 )
1718 .harvestTool (ToolType .PICKAXE )
18- .func_235838_a_ (( p ) -> 9 )
19+ .func_235838_a_ (RedstoneOreUtils . isLit ( 9 ) )
1920 );
2021 this .setRegistryName (registryName );
2122 }
Original file line number Diff line number Diff line change 1+ package fr .alasdiablo .janoeo .block .util ;
2+
3+ import net .minecraft .block .BlockState ;
4+ import net .minecraft .state .properties .BlockStateProperties ;
5+
6+ import java .util .function .ToIntFunction ;
7+
8+ public class RedstoneOreUtils {
9+
10+ public static ToIntFunction <BlockState > isLit (int lightValue ) {
11+ return (states ) -> states .get (BlockStateProperties .LIT ) ? lightValue : 0 ;
12+ }
13+ }
Original file line number Diff line number Diff line change @@ -74,4 +74,12 @@ public class Registries {
7474 public static final String IRON_GRAVEL_ORE = "iron_gravel_ore" ;
7575 public static final String GOLD_GRAVEL_ORE = "gold_gravel_ore" ;
7676
77+ public static final String COAL_BASALT_ORE = "coal_basalt_ore" ;
78+ public static final String DIAMOND_BASALT_ORE = "diamond_basalt_ore" ;
79+ public static final String EMERALD_BASALT_ORE = "emerald_basalt_ore" ;
80+ public static final String GOLD_BASALT_ORE = "gold_basalt_ore" ;
81+ public static final String IRON_BASALT_ORE = "iron_basalt_ore" ;
82+ public static final String LAPIS_BASALT_ORE = "lapis_basalt_ore" ;
83+ public static final String REDSTONE_BASALT_ORE = "redstone_basalt_ore" ;
84+
7785}
You can’t perform that action at this time.
0 commit comments