mirror of
https://github.com/GTNewHorizons/NotEnoughEnergistics.git
synced 2026-11-25 06:14:40 +00:00
add mod priority list
This commit is contained in:
1 parent
807e8cbdb9
commit
ae0e23eac5
6 files changed
+41
-8
No files matched your search
@@ -1,8 +1,5 @@
|
||||
package com.github.vfyjxf.nee.utils;
|
||||
|
||||
import static com.github.vfyjxf.nee.NEEConfig.transformBlacklist;
|
||||
import static com.github.vfyjxf.nee.NEEConfig.transformPriorityList;
|
||||
|
||||
import com.github.vfyjxf.nee.NotEnoughEnergistics;
|
||||
import com.google.gson.Gson;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
@@ -16,6 +13,8 @@ import net.minecraft.nbt.NBTTagCompound;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import static com.github.vfyjxf.nee.NEEConfig.*;
|
||||
|
||||
public final class ItemUtils {
|
||||
|
||||
public static Gson gson = new Gson();
|
||||
@@ -124,4 +123,15 @@ public final class ItemUtils {
|
||||
return false;
|
||||
}
|
||||
|
||||
public static ItemStack getPreferModItem(ItemStack[] items) {
|
||||
for (String currentId : transformPriorityModList) {
|
||||
for(ItemStack stack : items){
|
||||
GameRegistry.UniqueIdentifier itemId = GameRegistry.findUniqueIdentifierFor(stack.getItem());
|
||||
if(currentId.equals(itemId.modId)){
|
||||
return stack;
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user