Fixed debugBlock registering tileEntities
This commit is contained in:
parent
d048d92da4
commit
113706820b
2 changed files with 6 additions and 1 deletions
|
@ -104,7 +104,7 @@ public class BlockDebug extends BlockMachine implements IExtraObjectInfo
|
|||
{
|
||||
for (DebugBlocks block : DebugBlocks.values())
|
||||
{
|
||||
if (block.enabled)
|
||||
if (block.enabled && block.clazz != null && block.name != null)
|
||||
{
|
||||
list.add(new Pair<String, Class<? extends TileEntity>>(block.name, block.clazz));
|
||||
}
|
||||
|
@ -157,6 +157,7 @@ public class BlockDebug extends BlockMachine implements IExtraObjectInfo
|
|||
private DebugBlocks(String name, Class<? extends TileEntity> clazz)
|
||||
{
|
||||
this.name = name;
|
||||
this.clazz = clazz;
|
||||
}
|
||||
|
||||
private DebugBlocks(String name, Class<? extends TileEntity> clazz, String texture)
|
||||
|
|
|
@ -24,6 +24,10 @@ public class Pair<L, R>
|
|||
@Override
|
||||
public int hashCode()
|
||||
{
|
||||
if(left == null || right == null)
|
||||
{
|
||||
super.hashCode();
|
||||
}
|
||||
return left.hashCode() ^ right.hashCode();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue