File tree Expand file tree Collapse file tree
common/src/main/java/net/blay09/mods/clienttweaks Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44import net .blay09 .mods .shogi .ShogiValue ;
55import net .blay09 .mods .shogi .scope .ShogiScope ;
66import net .minecraft .core .component .DataComponents ;
7+ import net .minecraft .world .item .BlockItem ;
78import net .minecraft .world .item .ItemStack ;
8- import net .minecraft .world .item .Items ;
99import net .minecraft .world .level .block .Blocks ;
1010import net .minecraft .world .level .block .state .BlockState ;
1111
@@ -15,10 +15,7 @@ public final class ClientTweaksRules {
1515 public static final ShogiScope SCOPE = Shogi .scope (ClientTweaks .id ("rules" ), scope -> scope .setDefaultNamespaces (List .of ("clienttweaks" , "shogi" )));
1616
1717 public static final ShogiValue <ItemStack , Boolean > isTorch = SCOPE .booleanValue (ClientTweaks .id ("is_torch" ), itemStack ->
18- itemStack .is (Items .TORCH )
19- || itemStack .is (Items .COPPER_TORCH )
20- || itemStack .is (Items .REDSTONE_TORCH )
21- || itemStack .is (Items .SOUL_TORCH ));
18+ itemStack .getItem () instanceof BlockItem blockItem && blockItem .getBlock ().defaultBlockState ().getLightEmission () > 0 );
2219 public static final ShogiValue <ItemStack , Boolean > isTool = SCOPE .booleanValue (ClientTweaks .id ("is_tool" ), itemStack ->
2320 itemStack .has (DataComponents .TOOL ));
2421 public static final ShogiValue <ItemStack , Boolean > isFood = SCOPE .booleanValue (ClientTweaks .id ("is_food" ), itemStack ->
You can’t perform that action at this time.
0 commit comments