Added tooltips for unobtainable ores. (#2663)
This commit is contained in:
parent
a813368c5e
commit
c4625762d1
3 changed files with 24 additions and 7 deletions
|
@ -381,6 +381,8 @@ public class TRContent {
|
|||
|
||||
private final static Map<Ores, Ores> deepslateMap = new HashMap<>();
|
||||
|
||||
private final static Map<Ores, Ores> unDeepslateMap = new HashMap<>();
|
||||
|
||||
public enum Ores implements ItemConvertible {
|
||||
// when changing ores also change data/techreborn/tags/items/ores.json for correct root advancement display
|
||||
// as well as data/minecraft/tags/blocks for correct mining level
|
||||
|
@ -432,6 +434,7 @@ public class TRContent {
|
|||
Ores(TRContent.Ores stoneOre) {
|
||||
this((OreDistribution) null);
|
||||
deepslateMap.put(stoneOre, this);
|
||||
unDeepslateMap.put(this, stoneOre);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -444,6 +447,11 @@ public class TRContent {
|
|||
return deepslateMap.get(this);
|
||||
}
|
||||
|
||||
public TRContent.Ores getUnDeepslate() {
|
||||
Preconditions.checkArgument(isDeepslate());
|
||||
return unDeepslateMap.get(this);
|
||||
}
|
||||
|
||||
public boolean isDeepslate() {
|
||||
return name.startsWith("deepslate_");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue