Fix GameData.findBlock
This commit is contained in:
parent
b6664c76c5
commit
e6d8fde415
1 changed files with 2 additions and 3 deletions
|
@ -155,13 +155,12 @@ public class GameData {
|
||||||
|
|
||||||
static Item findItem(String modId, String name)
|
static Item findItem(String modId, String name)
|
||||||
{
|
{
|
||||||
return (Item)getMain().iItemRegistry.getObject(modId + ":" + name);
|
return getMain().iItemRegistry.getObject(modId + ":" + name);
|
||||||
}
|
}
|
||||||
|
|
||||||
static Block findBlock(String modId, String name)
|
static Block findBlock(String modId, String name)
|
||||||
{
|
{
|
||||||
String key = modId + ":" + name;
|
return getMain().iBlockRegistry.getObject(modId + ":" + name);
|
||||||
return getMain().iBlockRegistry.containsKey(key) ? getMain().iBlockRegistry.getObject(key) : null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static UniqueIdentifier getUniqueName(Block block)
|
static UniqueIdentifier getUniqueName(Block block)
|
||||||
|
|
Loading…
Reference in a new issue