Skip to content

Commit

Permalink
remove ExNi stuff (in Gregification)
Browse files Browse the repository at this point in the history
  • Loading branch information
serenibyss committed Aug 18, 2021
1 parent 0cb6427 commit 3e599b5
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,10 @@ public void registerOreDict() {
}

private void registerSpecialOreDict(ItemStack item, Material material, OrePrefix prefix) {
if (prefix.getAlternativeOreName() != null) {
OreDictUnifier.registerOre(item, prefix.getAlternativeOreName(), material);
}
if (prefix.equals(OrePrefix.dust)) OreDictUnifier.registerOre(item, OrePrefix.DUST_REGULAR, material);
else if (prefix.equals(OrePrefix.oreChunk))
OreDictUnifier.registerOre(item, OrePrefix.oreGravel.name(), material);
else if (prefix.equals(OrePrefix.oreEnderChunk))
OreDictUnifier.registerOre(item, OrePrefix.oreEndstone.name(), material);
else if (prefix.equals(OrePrefix.oreNetherChunk))
OreDictUnifier.registerOre(item, OrePrefix.oreNetherrack.name(), material);
else if (prefix.equals(OrePrefix.oreSandyChunk))
OreDictUnifier.registerOre(item, OrePrefix.oreSand.name(), material);

if (material == Materials.Plutonium239) {
OreDictUnifier.registerOre(item, prefix.name() + material.toCamelCaseString() + "239");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,6 @@ public class MaterialIconType {
public static final MaterialIconType pipeNonuple = new MaterialIconType("pipeNonuple");

// USED FOR GREGIFICATION ADDON
public static final MaterialIconType oreChunk = new MaterialIconType("oreChunk");
public static final MaterialIconType oreEnderChunk = new MaterialIconType("oreEnderChunk");
public static final MaterialIconType oreNetherChunk = new MaterialIconType("oreNetherChunk");
public static final MaterialIconType oreSandyChunk = new MaterialIconType("oreSandyChunk");
public static final MaterialIconType seed = new MaterialIconType("seed");
public static final MaterialIconType crop = new MaterialIconType("crop");
public static final MaterialIconType essence = new MaterialIconType("essence");
Expand Down
16 changes: 10 additions & 6 deletions src/main/java/gregtech/api/unification/ore/OrePrefix.java
Original file line number Diff line number Diff line change
Expand Up @@ -238,12 +238,6 @@ public class OrePrefix {

// Used for Gregification Addon TODO Don't do these here post De-Enum

// Ex Nihilo Compat
public static final OrePrefix oreChunk = new OrePrefix("oreChunk", -1, null, MaterialIconType.oreChunk, ENABLE_UNIFICATION, null);
public static final OrePrefix oreEnderChunk = new OrePrefix("oreEnderChunk", -1, null, MaterialIconType.oreEnderChunk, ENABLE_UNIFICATION, null);
public static final OrePrefix oreNetherChunk = new OrePrefix("oreNetherChunk", -1, null, MaterialIconType.oreNetherChunk, ENABLE_UNIFICATION, null);
public static final OrePrefix oreSandyChunk = new OrePrefix("oreSandyChunk", -1, null, MaterialIconType.oreSandyChunk, ENABLE_UNIFICATION, null);

// Myst Ag Compat
public static final OrePrefix seed = new OrePrefix("seed", -1, null, MaterialIconType.seed, ENABLE_UNIFICATION, null);
public static final OrePrefix crop = new OrePrefix("crop", -1, null, MaterialIconType.crop, ENABLE_UNIFICATION, null);
Expand Down Expand Up @@ -424,6 +418,8 @@ private static void excludeAllGems(Material material) {
public final List<MaterialStack> secondaryMaterials = new ArrayList<>();
public float heatDamage = 0.0F; // Negative for Frost Damage

private String alternativeOreName = null;

public OrePrefix(String name, long materialAmount, @Nullable Material material, @Nullable MaterialIconType materialIconType, long flags, @Nullable Predicate<Material> condition) {
Preconditions.checkArgument(!PREFIXES.containsKey(name), "OrePrefix " + name + " already registered!");
this.name = name;
Expand Down Expand Up @@ -545,6 +541,14 @@ private void runGeneratedMaterialHandlers() {
currentProcessingPrefix.set(null);
}

public void setAlternativeOreName(String name) {
this.alternativeOreName = name;
}

public String getAlternativeOreName() {
return alternativeOreName;
}

// todo clean this up
public String getLocalNameForItem(Material material) {
String specifiedUnlocalized = "item." + material.toString() + "." + this.name;
Expand Down
1 change: 0 additions & 1 deletion src/main/java/gregtech/common/items/MetaItems.java
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,6 @@ private MetaItems() {
add(OrePrefix.wireFine);
add(OrePrefix.rotor);
add(OrePrefix.lens);
add(OrePrefix.oreChunk);
add(OrePrefix.turbineBlade);
add(OrePrefix.toolHeadSword);
add(OrePrefix.toolHeadPickaxe);
Expand Down

0 comments on commit 3e599b5

Please sign in to comment.