mirror of
https://github.com/GTNewHorizons/Electro-Magic-Tools.git
synced 2026-11-18 19:29:29 +00:00
Move Nano/Quantum armor pieces to GT Hazard API (#91)
This commit is contained in:
1 parent
a1151399fc
commit
367f37c7d5
6 files changed
+57
-6
No files matched your search
+1
-1
@@ -10,5 +10,5 @@ dependencies {
|
||||
api('net.industrial-craft:industrialcraft-2:2.2.828-experimental:dev')
|
||||
api('thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev')
|
||||
|
||||
compileOnly('com.github.GTNewHorizons:GT5-Unofficial:5.09.51.176:dev')
|
||||
compileOnly('com.github.GTNewHorizons:GT5-Unofficial:5.09.51.227:dev')
|
||||
}
|
||||
@@ -4,12 +4,16 @@ import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import cpw.mods.fml.common.Optional;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import emt.EMT;
|
||||
import emt.util.EMTConfigHandler;
|
||||
import gregtech.api.hazards.Hazard;
|
||||
import gregtech.api.hazards.IHazardProtector;
|
||||
|
||||
public class ItemNanoBootsTraveller extends ItemElectricBootsTraveller {
|
||||
@Optional.Interface(iface = "gregtech.api.hazards.IHazardProtector", modid = "gregtech")
|
||||
public class ItemNanoBootsTraveller extends ItemElectricBootsTraveller implements IHazardProtector {
|
||||
|
||||
public ItemNanoBootsTraveller(ArmorMaterial material, int par3, int par4) {
|
||||
super(material, par3, par4);
|
||||
@@ -51,4 +55,10 @@ public class ItemNanoBootsTraveller extends ItemElectricBootsTraveller {
|
||||
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) {
|
||||
return EMT.TEXTURE_PATH + ":textures/models/nanobootstravel.png";
|
||||
}
|
||||
|
||||
@Override
|
||||
@Optional.Method(modid = "gregtech")
|
||||
public boolean protectsAgainst(ItemStack itemStack, Hazard hazard) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -4,12 +4,16 @@ import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import cpw.mods.fml.common.Optional;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import emt.EMT;
|
||||
import emt.util.EMTConfigHandler;
|
||||
import gregtech.api.hazards.Hazard;
|
||||
import gregtech.api.hazards.IHazardProtector;
|
||||
|
||||
public class ItemQuantumBootsTraveller extends ItemElectricBootsTraveller {
|
||||
@Optional.Interface(iface = "gregtech.api.hazards.IHazardProtector", modid = "gregtech")
|
||||
public class ItemQuantumBootsTraveller extends ItemElectricBootsTraveller implements IHazardProtector {
|
||||
|
||||
public ItemQuantumBootsTraveller(ArmorMaterial material, int par3, int par4) {
|
||||
super(material, par3, par4);
|
||||
@@ -51,4 +55,10 @@ public class ItemQuantumBootsTraveller extends ItemElectricBootsTraveller {
|
||||
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) {
|
||||
return EMT.TEXTURE_PATH + ":textures/models/quantumbootstravel.png";
|
||||
}
|
||||
|
||||
@Override
|
||||
@Optional.Method(modid = "gregtech")
|
||||
public boolean protectsAgainst(ItemStack itemStack, Hazard hazard) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -21,6 +21,7 @@ import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.event.entity.living.LivingFallEvent;
|
||||
|
||||
import cpw.mods.fml.common.Optional;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@@ -28,6 +29,8 @@ import emt.EMT;
|
||||
import emt.client.model.ModelSpecialArmor;
|
||||
import emt.init.EMTItems;
|
||||
import emt.util.EMTConfigHandler;
|
||||
import gregtech.api.hazards.Hazard;
|
||||
import gregtech.api.hazards.IHazardProtector;
|
||||
import ic2.api.item.ElectricItem;
|
||||
import ic2.api.item.IC2Items;
|
||||
import ic2.core.IC2;
|
||||
@@ -38,7 +41,8 @@ import ic2.core.item.armor.ItemArmorElectric;
|
||||
import ic2.core.util.StackUtil;
|
||||
import thaumcraft.api.IRunicArmor;
|
||||
|
||||
public class ItemInfusedQuantumChestplate extends ItemArmorElectric implements IRunicArmor {
|
||||
@Optional.Interface(iface = "gregtech.api.hazards.IHazardProtector", modid = "gregtech")
|
||||
public class ItemInfusedQuantumChestplate extends ItemArmorElectric implements IRunicArmor, IHazardProtector {
|
||||
|
||||
public static AudioSource audioSource;
|
||||
protected static ArrayList<Integer> potionRemovalCost = new ArrayList<Integer>();
|
||||
@@ -564,4 +568,10 @@ public class ItemInfusedQuantumChestplate extends ItemArmorElectric implements I
|
||||
public int getRunicCharge(ItemStack itemStack) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Optional.Method(modid = "gregtech")
|
||||
public boolean protectsAgainst(ItemStack itemStack, Hazard hazard) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -6,12 +6,16 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import cpw.mods.fml.common.Optional;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import emt.EMT;
|
||||
import gregtech.api.hazards.Hazard;
|
||||
import gregtech.api.hazards.IHazardProtector;
|
||||
import ic2.api.item.IC2Items;
|
||||
|
||||
public class ItemNanoGoggles extends ItemElectricGoggles {
|
||||
@Optional.Interface(iface = "gregtech.api.hazards.IHazardProtector", modid = "gregtech")
|
||||
public class ItemNanoGoggles extends ItemElectricGoggles implements IHazardProtector {
|
||||
|
||||
public ItemNanoGoggles(ArmorMaterial material, int renderIndex, int armorType) {
|
||||
super(material, renderIndex, armorType);
|
||||
@@ -50,4 +54,10 @@ public class ItemNanoGoggles extends ItemElectricGoggles {
|
||||
public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) {
|
||||
IC2Items.getItem("nightvisionGoggles").getItem().onArmorTick(world, player, itemStack);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Optional.Method(modid = "gregtech")
|
||||
public boolean protectsAgainst(ItemStack itemStack, Hazard hazard) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -14,15 +14,20 @@ import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ISpecialArmor;
|
||||
|
||||
import cpw.mods.fml.common.Optional;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import emt.EMT;
|
||||
import emt.util.EMTConfigHandler;
|
||||
import gregtech.api.hazards.Hazard;
|
||||
import gregtech.api.hazards.IHazardProtector;
|
||||
import ic2.api.item.ElectricItem;
|
||||
import ic2.api.item.IElectricItem;
|
||||
import ic2.api.item.IMetalArmor;
|
||||
|
||||
public class ItemNanoWing extends ItemThaumiumReinforcedWing implements IElectricItem, ISpecialArmor, IMetalArmor {
|
||||
@Optional.Interface(iface = "gregtech.api.hazards.IHazardProtector", modid = "gregtech")
|
||||
public class ItemNanoWing extends ItemThaumiumReinforcedWing
|
||||
implements IElectricItem, ISpecialArmor, IMetalArmor, IHazardProtector {
|
||||
|
||||
public static int maxCharge = 1000000;
|
||||
public int tier = 3;
|
||||
@@ -176,4 +181,10 @@ public class ItemNanoWing extends ItemThaumiumReinforcedWing implements IElectri
|
||||
public Item getEmptyItem(ItemStack itemStack) {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Optional.Method(modid = "gregtech")
|
||||
public boolean protectsAgainst(ItemStack itemStack, Hazard hazard) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user