mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-10-24 18:37:38 +00:00
Store references to the registered items
This means we can avoid several rather ugly instances of getItemBlock and a cast. We also derive the ItemBlock's registered name from the block's name, which makes the register a little less ugly.
This commit is contained in:
@@ -22,9 +22,9 @@ public class JEIComputerCraft implements IModPlugin
|
||||
@Override
|
||||
public void registerItemSubtypes( ISubtypeRegistry subtypeRegistry )
|
||||
{
|
||||
subtypeRegistry.registerSubtypeInterpreter( Item.getItemFromBlock( ComputerCraft.Blocks.turtle ), turtleSubtype );
|
||||
subtypeRegistry.registerSubtypeInterpreter( Item.getItemFromBlock( ComputerCraft.Blocks.turtleExpanded ), turtleSubtype );
|
||||
subtypeRegistry.registerSubtypeInterpreter( Item.getItemFromBlock( ComputerCraft.Blocks.turtleAdvanced ), turtleSubtype );
|
||||
subtypeRegistry.registerSubtypeInterpreter( ComputerCraft.Items.turtle, turtleSubtype );
|
||||
subtypeRegistry.registerSubtypeInterpreter( ComputerCraft.Items.turtleExpanded, turtleSubtype );
|
||||
subtypeRegistry.registerSubtypeInterpreter( ComputerCraft.Items.turtleAdvanced, turtleSubtype );
|
||||
|
||||
subtypeRegistry.registerSubtypeInterpreter( ComputerCraft.Items.pocketComputer, pocketSubtype );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user