Added tooltips for unobtainable ores. (#2663)

This commit is contained in:
Ayutac 2021-12-30 20:42:51 +01:00 committed by GitHub
parent a813368c5e
commit c4625762d1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 24 additions and 7 deletions

View file

@ -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_");
}