Moved sources an resources

This commit is contained in:
Johann Bernhardt committed 2021-12-19 23:22:40 +01:00
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;
}
}
@@ -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 {
Loaded 100 of 172 files, more files were not shown because too many files have changed in this diff. Show more