Added features to MetaBlock
This commit is contained in:
parent
6538fb4929
commit
aa6de6177c
1 changed files with 22 additions and 13 deletions
|
@ -4,7 +4,7 @@ import java.util.HashMap;
|
|||
|
||||
import net.minecraft.block.Block;
|
||||
|
||||
public class MetaBlock {
|
||||
public class MetaBlock implements Comparable {
|
||||
|
||||
private static final int MAX_METADATA = 16;//I think this is 16?
|
||||
|
||||
|
@ -48,5 +48,14 @@ public class MetaBlock {
|
|||
return block[metadata];
|
||||
}
|
||||
|
||||
@Override
|
||||
public int compareTo(Object o) {
|
||||
return block.getUnlocalizedName().compareTo(((MetaBlock) o).block.getUnlocalizedName());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return block.getUnlocalizedName() + ":" + metadata;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue