mirror of
https://github.com/GTNewHorizons/WirelessCraftingTerminal.git
synced 2026-10-26 14:34:11 +00:00
Moved sources an resources
This commit is contained in:
1 parent
7a485cd53c
commit
e117e7a9fc
172 files changed
+84
-122
No files matched your search
@@ -1,50 +0,0 @@
|
||||
package net.p455w0rd.wirelesscraftingterminal.integration;
|
||||
|
||||
import java.lang.invoke.MethodHandle;
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import crazypants.enderio.enchantment.EnchantmentSoulBound;
|
||||
import net.minecraft.enchantment.EnchantmentHelper;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import p455w0rdslib.util.ReflectionUtils;
|
||||
|
||||
/**
|
||||
* @author p455w0rd
|
||||
*
|
||||
*/
|
||||
public class EnderIO {
|
||||
|
||||
public static boolean isLoaded() {
|
||||
return Loader.isModLoaded("EnderIO");
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
public static boolean isSoulBound(ItemStack stack) {
|
||||
if (isLoaded() && crazypants.enderio.config.Config.enchantmentSoulBoundEnabled) {
|
||||
try {
|
||||
MethodHandle GET_SOULBOUND = ReflectionUtils.findFieldGetter(crazypants.enderio.enchantment.Enchantments.class, "soulBound");
|
||||
EnchantmentSoulBound soulbound = (EnchantmentSoulBound) GET_SOULBOUND.invoke(crazypants.enderio.enchantment.Enchantments.getInstance());
|
||||
MethodHandle GET_ID = ReflectionUtils.findFieldGetter(crazypants.enderio.enchantment.EnchantmentSoulBound.class, "id");
|
||||
int soulboundId = (int) GET_ID.invoke(soulbound);
|
||||
//int soulboundId = crazypants.enderio.config.Config.enchantmentSoulBoundId;
|
||||
Map<Short, Short> enchants = EnchantmentHelper.getEnchantments(stack);
|
||||
if (enchants != null) {
|
||||
Iterator i = enchants.keySet().iterator();
|
||||
while (i.hasNext()) {
|
||||
int enchId = (int) i.next();
|
||||
if (soulboundId != enchId) {
|
||||
continue;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Throwable e) {
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
+1
-1
@@ -29,7 +29,7 @@ import net.p455w0rd.wirelesscraftingterminal.reference.Reference;
|
||||
@Mod(modid = Reference.MODID, acceptedMinecraftVersions = "[1.7.10]", name = Reference.NAME, version = Reference.VERSION, guiFactory = Reference.GUI_FACTORY, dependencies = "" + "required-after:Forge@[" + net.minecraftforge.common.ForgeVersion.majorVersion + '.' // majorVersion
|
||||
+ net.minecraftforge.common.ForgeVersion.minorVersion + '.' // minorVersion
|
||||
+ net.minecraftforge.common.ForgeVersion.revisionVersion + '.' // revisionVersion
|
||||
+ net.minecraftforge.common.ForgeVersion.buildVersion + ",);" + "required-after:appliedenergistics2@[rv3-beta-1,);required-after:p455w0rdslib;after:NotEnoughItems;")
|
||||
+ net.minecraftforge.common.ForgeVersion.buildVersion + ",);" + "required-after:appliedenergistics2@[rv3-beta-1,);after:NotEnoughItems;")
|
||||
|
||||
public class WirelessCraftingTerminal {
|
||||
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loaded 100 of 172 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user