aboutsummaryrefslogtreecommitdiff
path: root/main/java/gregtech/common/items/behaviors
diff options
context:
space:
mode:
authoraerospark <lukefay12@gmail.com>2015-06-23 15:29:05 -0700
committeraerospark <lukefay12@gmail.com>2015-06-23 15:29:05 -0700
commita1504799f44ba2debdfef06317f24e7f9c1129d6 (patch)
tree53e53ff64d2902c639951bd1d41f942ee171f836 /main/java/gregtech/common/items/behaviors
parentb803f59de5a66fcb4ef53e117b912fbbc2841392 (diff)
downloadGT5-Unofficial-a1504799f44ba2debdfef06317f24e7f9c1129d6.tar.gz
GT5-Unofficial-a1504799f44ba2debdfef06317f24e7f9c1129d6.tar.bz2
GT5-Unofficial-a1504799f44ba2debdfef06317f24e7f9c1129d6.zip
strip linenumbers
Diffstat (limited to 'main/java/gregtech/common/items/behaviors')
-rw-r--r--main/java/gregtech/common/items/behaviors/Behaviour_Arrow.java258
-rw-r--r--main/java/gregtech/common/items/behaviors/Behaviour_Arrow_Potion.java132
-rw-r--r--main/java/gregtech/common/items/behaviors/Behaviour_Crowbar.java126
-rw-r--r--main/java/gregtech/common/items/behaviors/Behaviour_DataOrb.java230
-rw-r--r--main/java/gregtech/common/items/behaviors/Behaviour_DataStick.java74
-rw-r--r--main/java/gregtech/common/items/behaviors/Behaviour_Hoe.java136
-rw-r--r--main/java/gregtech/common/items/behaviors/Behaviour_Lighter.java274
-rw-r--r--main/java/gregtech/common/items/behaviors/Behaviour_None.java164
-rw-r--r--main/java/gregtech/common/items/behaviors/Behaviour_Plunger_Essentia.java106
-rw-r--r--main/java/gregtech/common/items/behaviors/Behaviour_Plunger_Fluid.java112
-rw-r--r--main/java/gregtech/common/items/behaviors/Behaviour_Plunger_Item.java152
-rw-r--r--main/java/gregtech/common/items/behaviors/Behaviour_PrintedPages.java80
-rw-r--r--main/java/gregtech/common/items/behaviors/Behaviour_Prospecting.java286
-rw-r--r--main/java/gregtech/common/items/behaviors/Behaviour_Scanner.java88
-rw-r--r--main/java/gregtech/common/items/behaviors/Behaviour_Scoop.java114
-rw-r--r--main/java/gregtech/common/items/behaviors/Behaviour_Screwdriver.java112
-rw-r--r--main/java/gregtech/common/items/behaviors/Behaviour_Sense.java106
-rw-r--r--main/java/gregtech/common/items/behaviors/Behaviour_SensorKit.java104
-rw-r--r--main/java/gregtech/common/items/behaviors/Behaviour_SoftHammer.java250
-rw-r--r--main/java/gregtech/common/items/behaviors/Behaviour_Sonictron.java282
-rw-r--r--main/java/gregtech/common/items/behaviors/Behaviour_Spray_Color.java274
-rw-r--r--main/java/gregtech/common/items/behaviors/Behaviour_WrittenBook.java76
22 files changed, 1768 insertions, 1768 deletions
diff --git a/main/java/gregtech/common/items/behaviors/Behaviour_Arrow.java b/main/java/gregtech/common/items/behaviors/Behaviour_Arrow.java
index 0b59f2772a..ff13e1287b 100644
--- a/main/java/gregtech/common/items/behaviors/Behaviour_Arrow.java
+++ b/main/java/gregtech/common/items/behaviors/Behaviour_Arrow.java
@@ -1,132 +1,132 @@
-/* 1: */ package gregtech.common.items.behaviors;
-/* 2: */
-/* 3: */ import gregtech.api.enums.SubTag;
-/* 4: */ import gregtech.api.items.GT_MetaBase_Item;
-/* 5: */ import gregtech.api.util.GT_Utility;
-/* 6: */ import gregtech.api.util.GT_Utility.GT_EnchantmentHelper;
-/* 7: */ import gregtech.api.util.GT_Utility.ItemNBT;
-/* 8: */ import gregtech.common.entities.GT_Entity_Arrow;
-/* 9: */ import net.minecraft.block.BlockDispenser;
-/* 10: */ import net.minecraft.dispenser.IBlockSource;
-/* 11: */ import net.minecraft.dispenser.IPosition;
-/* 12: */ import net.minecraft.enchantment.Enchantment;
-/* 13: */ import net.minecraft.entity.Entity;
-/* 14: */ import net.minecraft.entity.EntityLivingBase;
-/* 15: */ import net.minecraft.entity.player.EntityPlayer;
-/* 16: */ import net.minecraft.entity.player.PlayerCapabilities;
-/* 17: */ import net.minecraft.entity.projectile.EntityArrow;
-/* 18: */ import net.minecraft.item.ItemStack;
-/* 19: */ import net.minecraft.nbt.NBTTagCompound;
-/* 20: */ import net.minecraft.util.EnumFacing;
-/* 21: */ import net.minecraft.world.World;
-/* 22: */
-/* 23: */ public class Behaviour_Arrow
-/* 24: */ extends Behaviour_None
-/* 25: */ {
-/* 26: 22 */ public static Behaviour_Arrow DEFAULT_WOODEN = new Behaviour_Arrow(GT_Entity_Arrow.class, 1.0F, 6.0F);
-/* 27: 23 */ public static Behaviour_Arrow DEFAULT_PLASTIC = new Behaviour_Arrow(GT_Entity_Arrow.class, 1.5F, 6.0F);
-/* 28: */ private final int mLevel;
-/* 29: */ private final Enchantment mEnchantment;
-/* 30: */ private final float mSpeedMultiplier;
-/* 31: */ private final float mPrecision;
-/* 32: */ private final Class<? extends GT_Entity_Arrow> mArrow;
-/* 33: */
-/* 34: */ public Behaviour_Arrow(Class<? extends GT_Entity_Arrow> aArrow, float aSpeed, float aPrecision)
-/* 35: */ {
-/* 36: 31 */ this(aArrow, aSpeed, aPrecision, null, 0);
-/* 37: */ }
-/* 38: */
-/* 39: */ public Behaviour_Arrow(Class<? extends GT_Entity_Arrow> aArrow, float aSpeed, float aPrecision, Enchantment aEnchantment, int aLevel)
-/* 40: */ {
-/* 41: 35 */ this.mArrow = aArrow;
-/* 42: 36 */ this.mSpeedMultiplier = aSpeed;
-/* 43: 37 */ this.mPrecision = aPrecision;
-/* 44: 38 */ this.mEnchantment = aEnchantment;
-/* 45: 39 */ this.mLevel = aLevel;
-/* 46: */ }
-/* 47: */
-/* 48: */ public boolean onLeftClickEntity(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, Entity aEntity)
-/* 49: */ {
-/* 50: 44 */ if ((aEntity instanceof EntityLivingBase))
-/* 51: */ {
-/* 52: 45 */ GT_Utility.GT_EnchantmentHelper.applyBullshitA((EntityLivingBase)aEntity, aPlayer, aStack);
-/* 53: 46 */ GT_Utility.GT_EnchantmentHelper.applyBullshitB(aPlayer, aEntity, aStack);
-/* 54: 47 */ if (!aPlayer.capabilities.isCreativeMode) {
-/* 55: 47 */ aStack.stackSize -= 1;
-/* 56: */ }
-/* 57: 48 */ if (aStack.stackSize <= 0) {
-/* 58: 48 */ aPlayer.destroyCurrentEquippedItem();
-/* 59: */ }
-/* 60: 49 */ return false;
-/* 61: */ }
-/* 62: 51 */ return false;
-/* 63: */ }
-/* 64: */
-/* 65: */ public boolean isItemStackUsable(GT_MetaBase_Item aItem, ItemStack aStack)
-/* 66: */ {
-/* 67: 56 */ if ((this.mEnchantment != null) && (this.mLevel > 0))
-/* 68: */ {
-/* 69: 57 */ NBTTagCompound tNBT = GT_Utility.ItemNBT.getNBT(aStack);
-/* 70: 58 */ if (!tNBT.getBoolean("GT.HasBeenUpdated"))
-/* 71: */ {
-/* 72: 59 */ tNBT.setBoolean("GT.HasBeenUpdated", true);
-/* 73: 60 */ GT_Utility.ItemNBT.setNBT(aStack, tNBT);
-/* 74: 61 */ GT_Utility.ItemNBT.addEnchantment(aStack, this.mEnchantment, this.mLevel);
-/* 75: */ }
-/* 76: */ }
-/* 77: 64 */ return true;
-/* 78: */ }
-/* 79: */
-/* 80: */ public boolean canDispense(GT_MetaBase_Item aItem, IBlockSource aSource, ItemStack aStack)
-/* 81: */ {
-/* 82: 69 */ return true;
-/* 83: */ }
-/* 84: */
-/* 85: */ public ItemStack onDispense(GT_MetaBase_Item aItem, IBlockSource aSource, ItemStack aStack)
-/* 86: */ {
-/* 87: 74 */ World aWorld = aSource.getWorld();
-/* 88: 75 */ IPosition tPosition = BlockDispenser.func_149939_a(aSource);
-/* 89: 76 */ EnumFacing tFacing = BlockDispenser.func_149937_b(aSource.getBlockMetadata());
-/* 90: 77 */ GT_Entity_Arrow tEntityArrow = (GT_Entity_Arrow)getProjectile(aItem, SubTag.PROJECTILE_ARROW, aStack, aWorld, tPosition.getX(), tPosition.getY(), tPosition.getZ());
-/* 91: 78 */ if (tEntityArrow != null)
-/* 92: */ {
-/* 93: 79 */ tEntityArrow.setThrowableHeading(tFacing.getFrontOffsetX(), tFacing.getFrontOffsetY() + 0.1F, tFacing.getFrontOffsetZ(), this.mSpeedMultiplier * 1.1F, this.mPrecision);
-/* 94: 80 */ tEntityArrow.setArrowItem(aStack);
-/* 95: 81 */ tEntityArrow.canBePickedUp = 1;
-/* 96: 82 */ aWorld.spawnEntityInWorld(tEntityArrow);
-/* 97: 83 */ if (aStack.stackSize < 100) {
-/* 98: 83 */ aStack.stackSize -= 1;
-/* 99: */ }
-/* 100: 84 */ return aStack;
-/* 101: */ }
-/* 102: 86 */ return super.onDispense(aItem, aSource, aStack);
-/* 103: */ }
-/* 104: */
-/* 105: */ public boolean hasProjectile(GT_MetaBase_Item aItem, SubTag aProjectileType, ItemStack aStack)
-/* 106: */ {
-/* 107: 91 */ return aProjectileType == SubTag.PROJECTILE_ARROW;
-/* 108: */ }
-/* 109: */
-/* 110: */ public EntityArrow getProjectile(GT_MetaBase_Item aItem, SubTag aProjectileType, ItemStack aStack, World aWorld, double aX, double aY, double aZ)
-/* 111: */ {
-/* 112: 96 */ if (!hasProjectile(aItem, aProjectileType, aStack)) {
-/* 113: 96 */ return null;
-/* 114: */ }
-/* 115: 97 */ GT_Entity_Arrow rArrow = (GT_Entity_Arrow)GT_Utility.callConstructor(this.mArrow.getName(), -1, null, true, new Object[] { aWorld, Double.valueOf(aX), Double.valueOf(aY), Double.valueOf(aZ) });
-/* 116: 98 */ rArrow.setArrowItem(aStack);
-/* 117: 99 */ return rArrow;
-/* 118: */ }
-/* 119: */
-/* 120: */ public EntityArrow getProjectile(GT_MetaBase_Item aItem, SubTag aProjectileType, ItemStack aStack, World aWorld, EntityLivingBase aEntity, float aSpeed)
-/* 121: */ {
-/* 122:104 */ if (!hasProjectile(aItem, aProjectileType, aStack)) {
-/* 123:104 */ return null;
-/* 124: */ }
-/* 125:105 */ GT_Entity_Arrow rArrow = (GT_Entity_Arrow)GT_Utility.callConstructor(this.mArrow.getName(), -1, null, true, new Object[] { aWorld, aEntity, Float.valueOf(this.mSpeedMultiplier * aSpeed) });
-/* 126:106 */ rArrow.setArrowItem(aStack);
-/* 127:107 */ return rArrow;
-/* 128: */ }
-/* 129: */ }
+package gregtech.common.items.behaviors;
+
+import gregtech.api.enums.SubTag;
+import gregtech.api.items.GT_MetaBase_Item;
+import gregtech.api.util.GT_Utility;
+import gregtech.api.util.GT_Utility.GT_EnchantmentHelper;
+import gregtech.api.util.GT_Utility.ItemNBT;
+import gregtech.common.entities.GT_Entity_Arrow;
+import net.minecraft.block.BlockDispenser;
+import net.minecraft.dispenser.IBlockSource;
+import net.minecraft.dispenser.IPosition;
+import net.minecraft.enchantment.Enchantment;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EntityLivingBase;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.entity.player.PlayerCapabilities;
+import net.minecraft.entity.projectile.EntityArrow;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.EnumFacing;
+import net.minecraft.world.World;
+
+public class Behaviour_Arrow
+ extends Behaviour_None
+{
+ public static Behaviour_Arrow DEFAULT_WOODEN = new Behaviour_Arrow(GT_Entity_Arrow.class, 1.0F, 6.0F);
+ public static Behaviour_Arrow DEFAULT_PLASTIC = new Behaviour_Arrow(GT_Entity_Arrow.class, 1.5F, 6.0F);
+ private final int mLevel;
+ private final Enchantment mEnchantment;
+ private final float mSpeedMultiplier;
+ private final float mPrecision;
+ private final Class<? extends GT_Entity_Arrow> mArrow;
+
+ public Behaviour_Arrow(Class<? extends GT_Entity_Arrow> aArrow, float aSpeed, float aPrecision)
+ {
+ this(aArrow, aSpeed, aPrecision, null, 0);
+ }
+
+ public Behaviour_Arrow(Class<? extends GT_Entity_Arrow> aArrow, float aSpeed, float aPrecision, Enchantment aEnchantment, int aLevel)
+ {
+ this.mArrow = aArrow;
+ this.mSpeedMultiplier = aSpeed;
+ this.mPrecision = aPrecision;
+ this.mEnchantment = aEnchantment;
+ this.mLevel = aLevel;
+ }
+
+ public boolean onLeftClickEntity(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, Entity aEntity)
+ {
+ if ((aEntity instanceof EntityLivingBase))
+ {
+ GT_Utility.GT_EnchantmentHelper.applyBullshitA((EntityLivingBase)aEntity, aPlayer, aStack);
+ GT_Utility.GT_EnchantmentHelper.applyBullshitB(aPlayer, aEntity, aStack);
+ if (!aPlayer.capabilities.isCreativeMode) {
+ aStack.stackSize -= 1;
+ }
+ if (aStack.stackSize <= 0) {
+ aPlayer.destroyCurrentEquippedItem();
+ }
+ return false;
+ }
+ return false;
+ }
+
+ public boolean isItemStackUsable(GT_MetaBase_Item aItem, ItemStack aStack)
+ {
+ if ((this.mEnchantment != null) && (this.mLevel > 0))
+ {
+ NBTTagCompound tNBT = GT_Utility.ItemNBT.getNBT(aStack);
+ if (!tNBT.getBoolean("GT.HasBeenUpdated"))
+ {
+ tNBT.setBoolean("GT.HasBeenUpdated", true);
+ GT_Utility.ItemNBT.setNBT(aStack, tNBT);
+ GT_Utility.ItemNBT.addEnchantment(aStack, this.mEnchantment, this.mLevel);
+ }
+ }
+ return true;
+ }
+
+ public boolean canDispense(GT_MetaBase_Item aItem, IBlockSource aSource, ItemStack aStack)
+ {
+ return true;
+ }
+
+ public ItemStack onDispense(GT_MetaBase_Item aItem, IBlockSource aSource, ItemStack aStack)
+ {
+ World aWorld = aSource.getWorld();
+ IPosition tPosition = BlockDispenser.func_149939_a(aSource);
+ EnumFacing tFacing = BlockDispenser.func_149937_b(aSource.getBlockMetadata());
+ GT_Entity_Arrow tEntityArrow = (GT_Entity_Arrow)getProjectile(aItem, SubTag.PROJECTILE_ARROW, aStack, aWorld, tPosition.getX(), tPosition.getY(), tPosition.getZ());
+ if (tEntityArrow != null)
+ {
+ tEntityArrow.setThrowableHeading(tFacing.getFrontOffsetX(), tFacing.getFrontOffsetY() + 0.1F, tFacing.getFrontOffsetZ(), this.mSpeedMultiplier * 1.1F, this.mPrecision);
+ tEntityArrow.setArrowItem(aStack);
+ tEntityArrow.canBePickedUp = 1;
+ aWorld.spawnEntityInWorld(tEntityArrow);
+ if (aStack.stackSize < 100) {
+ aStack.stackSize -= 1;
+ }
+ return aStack;
+ }
+ return super.onDispense(aItem, aSource, aStack);
+ }
+
+ public boolean hasProjectile(GT_MetaBase_Item aItem, SubTag aProjectileType, ItemStack aStack)
+ {
+ return aProjectileType == SubTag.PROJECTILE_ARROW;
+ }
+
+ public EntityArrow getProjectile(GT_MetaBase_Item aItem, SubTag aProjectileType, ItemStack aStack, World aWorld, double aX, double aY, double aZ)
+ {
+ if (!hasProjectile(aItem, aProjectileType, aStack)) {
+ return null;
+ }
+ GT_Entity_Arrow rArrow = (GT_Entity_Arrow)GT_Utility.callConstructor(this.mArrow.getName(), -1, null, true, new Object[] { aWorld, Double.valueOf(aX), Double.valueOf(aY), Double.valueOf(aZ) });
+ rArrow.setArrowItem(aStack);
+ return rArrow;
+ }
+
+ public EntityArrow getProjectile(GT_MetaBase_Item aItem, SubTag aProjectileType, ItemStack aStack, World aWorld, EntityLivingBase aEntity, float aSpeed)
+ {
+ if (!hasProjectile(aItem, aProjectileType, aStack)) {
+ return null;
+ }
+ GT_Entity_Arrow rArrow = (GT_Entity_Arrow)GT_Utility.callConstructor(this.mArrow.getName(), -1, null, true, new Object[] { aWorld, aEntity, Float.valueOf(this.mSpeedMultiplier * aSpeed) });
+ rArrow.setArrowItem(aStack);
+ return rArrow;
+ }
+}
/* Location: F:\Torrent\minecraft\jd-gui-0.3.6.windows\gregtech_1.7.10-5.07.07-dev.jar
diff --git a/main/java/gregtech/common/items/behaviors/Behaviour_Arrow_Potion.java b/main/java/gregtech/common/items/behaviors/Behaviour_Arrow_Potion.java
index ac0d341e73..a6c8b139ab 100644
--- a/main/java/gregtech/common/items/behaviors/Behaviour_Arrow_Potion.java
+++ b/main/java/gregtech/common/items/behaviors/Behaviour_Arrow_Potion.java
@@ -1,69 +1,69 @@
-/* 1: */ package gregtech.common.items.behaviors;
-/* 2: */
-/* 3: */ import gregtech.api.enums.SubTag;
-/* 4: */ import gregtech.api.items.GT_MetaBase_Item;
-/* 5: */ import gregtech.common.entities.GT_Entity_Arrow_Potion;
-/* 6: */ import java.util.Random;
-/* 7: */ import net.minecraft.enchantment.Enchantment;
-/* 8: */ import net.minecraft.entity.Entity;
-/* 9: */ import net.minecraft.entity.EntityLivingBase;
-/* 10: */ import net.minecraft.entity.player.EntityPlayer;
-/* 11: */ import net.minecraft.entity.projectile.EntityArrow;
-/* 12: */ import net.minecraft.item.ItemStack;
-/* 13: */ import net.minecraft.potion.PotionEffect;
-/* 14: */ import net.minecraft.world.World;
-/* 15: */
-/* 16: */ public class Behaviour_Arrow_Potion
-/* 17: */ extends Behaviour_Arrow
-/* 18: */ {
-/* 19: */ private final int[] mPotions;
-/* 20: */
-/* 21: */ public Behaviour_Arrow_Potion(float aSpeed, float aPrecision, int... aPotions)
-/* 22: */ {
-/* 23:19 */ super(GT_Entity_Arrow_Potion.class, aSpeed, aPrecision);
-/* 24:20 */ this.mPotions = aPotions;
-/* 25: */ }
-/* 26: */
-/* 27: */ public Behaviour_Arrow_Potion(float aSpeed, float aPrecision, Enchantment aEnchantment, int aLevel, int... aPotions)
-/* 28: */ {
-/* 29:24 */ super(GT_Entity_Arrow_Potion.class, aSpeed, aPrecision, aEnchantment, aLevel);
-/* 30:25 */ this.mPotions = aPotions;
-/* 31: */ }
-/* 32: */
-/* 33: */ public boolean onLeftClickEntity(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, Entity aEntity)
-/* 34: */ {
-/* 35:30 */ if ((aEntity instanceof EntityLivingBase)) {
-/* 36:30 */ for (int i = 3; i < this.mPotions.length; i += 4) {
-/* 37:30 */ if (aEntity.worldObj.rand.nextInt(100) < this.mPotions[i]) {
-/* 38:30 */ ((EntityLivingBase)aEntity).addPotionEffect(new PotionEffect(this.mPotions[(i - 3)], this.mPotions[(i - 2)], this.mPotions[(i - 1)], false));
-/* 39: */ }
-/* 40: */ }
-/* 41: */ }
-/* 42:31 */ return super.onLeftClickEntity(aItem, aStack, aPlayer, aEntity);
-/* 43: */ }
-/* 44: */
-/* 45: */ public EntityArrow getProjectile(GT_MetaBase_Item aItem, SubTag aProjectileType, ItemStack aStack, World aWorld, double aX, double aY, double aZ)
-/* 46: */ {
-/* 47:36 */ if (!hasProjectile(aItem, aProjectileType, aStack)) {
-/* 48:36 */ return null;
-/* 49: */ }
-/* 50:37 */ GT_Entity_Arrow_Potion rArrow = new GT_Entity_Arrow_Potion(aWorld, aX, aY, aZ);
-/* 51:38 */ rArrow.setArrowItem(aStack);
-/* 52:39 */ rArrow.setPotions(this.mPotions);
-/* 53:40 */ return rArrow;
-/* 54: */ }
-/* 55: */
-/* 56: */ public EntityArrow getProjectile(GT_MetaBase_Item aItem, SubTag aProjectileType, ItemStack aStack, World aWorld, EntityLivingBase aEntity, float aSpeed)
-/* 57: */ {
-/* 58:45 */ if (!hasProjectile(aItem, aProjectileType, aStack)) {
-/* 59:45 */ return null;
-/* 60: */ }
-/* 61:46 */ GT_Entity_Arrow_Potion rArrow = new GT_Entity_Arrow_Potion(aWorld, aEntity, aSpeed);
-/* 62:47 */ rArrow.setArrowItem(aStack);
-/* 63:48 */ rArrow.setPotions(this.mPotions);
-/* 64:49 */ return rArrow;
-/* 65: */ }
-/* 66: */ }
+package gregtech.common.items.behaviors;
+
+import gregtech.api.enums.SubTag;
+import gregtech.api.items.GT_MetaBase_Item;
+import gregtech.common.entities.GT_Entity_Arrow_Potion;
+import java.util.Random;
+import net.minecraft.enchantment.Enchantment;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EntityLivingBase;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.entity.projectile.EntityArrow;
+import net.minecraft.item.ItemStack;
+import net.minecraft.potion.PotionEffect;
+import net.minecraft.world.World;
+
+public class Behaviour_Arrow_Potion
+ extends Behaviour_Arrow
+{
+ private final int[] mPotions;
+
+ public Behaviour_Arrow_Potion(float aSpeed, float aPrecision, int... aPotions)
+ {
+ super(GT_Entity_Arrow_Potion.class, aSpeed, aPrecision);
+ this.mPotions = aPotions;
+ }
+
+ public Behaviour_Arrow_Potion(float aSpeed, float aPrecision, Enchantment aEnchantment, int aLevel, int... aPotions)
+ {
+ super(GT_Entity_Arrow_Potion.class, aSpeed, aPrecision, aEnchantment, aLevel);
+ this.mPotions = aPotions;
+ }
+
+ public boolean onLeftClickEntity(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, Entity aEntity)
+ {
+ if ((aEntity instanceof EntityLivingBase)) {
+ for (int i = 3; i < this.mPotions.length; i += 4) {
+ if (aEntity.worldObj.rand.nextInt(100) < this.mPotions[i]) {
+ ((EntityLivingBase)aEntity).addPotionEffect(new PotionEffect(this.mPotions[(i - 3)], this.mPotions[(i - 2)], this.mPotions[(i - 1)], false));
+ }
+ }
+ }
+ return super.onLeftClickEntity(aItem, aStack, aPlayer, aEntity);
+ }
+
+ public EntityArrow getProjectile(GT_MetaBase_Item aItem, SubTag aProjectileType, ItemStack aStack, World aWorld, double aX, double aY, double aZ)
+ {
+ if (!hasProjectile(aItem, aProjectileType, aStack)) {
+ return null;
+ }
+ GT_Entity_Arrow_Potion rArrow = new GT_Entity_Arrow_Potion(aWorld, aX, aY, aZ);
+ rArrow.setArrowItem(aStack);
+ rArrow.setPotions(this.mPotions);
+ return rArrow;
+ }
+
+ public EntityArrow getProjectile(GT_MetaBase_Item aItem, SubTag aProjectileType, ItemStack aStack, World aWorld, EntityLivingBase aEntity, float aSpeed)
+ {
+ if (!hasProjectile(aItem, aProjectileType, aStack)) {
+ return null;
+ }
+ GT_Entity_Arrow_Potion rArrow = new GT_Entity_Arrow_Potion(aWorld, aEntity, aSpeed);
+ rArrow.setArrowItem(aStack);
+ rArrow.setPotions(this.mPotions);
+ return rArrow;
+ }
+}
/* Location: F:\Torrent\minecraft\jd-gui-0.3.6.windows\gregtech_1.7.10-5.07.07-dev.jar
diff --git a/main/java/gregtech/common/items/behaviors/Behaviour_Crowbar.java b/main/java/gregtech/common/items/behaviors/Behaviour_Crowbar.java
index 7fb185a7a4..07fa993422 100644
--- a/main/java/gregtech/common/items/behaviors/Behaviour_Crowbar.java
+++ b/main/java/gregtech/common/items/behaviors/Behaviour_Crowbar.java
@@ -1,66 +1,66 @@
-/* 1: */ package gregtech.common.items.behaviors;
-/* 2: */
-/* 3: */ import gregtech.api.GregTech_API;
-/* 4: */ import gregtech.api.items.GT_MetaBase_Item;
-/* 5: */ import gregtech.api.util.GT_ModHandler;
-/* 6: */ import gregtech.api.util.GT_Utility;
-/* 7: */ import java.util.Map;
-/* 8: */ import net.minecraft.block.Block;
-/* 9: */ import net.minecraft.entity.player.EntityPlayer;
-/* 10: */ import net.minecraft.init.Blocks;
-/* 11: */ import net.minecraft.item.ItemStack;
-/* 12: */ import net.minecraft.world.World;
-/* 13: */
-/* 14: */ public class Behaviour_Crowbar
-/* 15: */ extends Behaviour_None
-/* 16: */ {
-/* 17: */ private final int mVanillaCosts;
-/* 18: */ private final int mEUCosts;
-/* 19: */
-/* 20: */ public Behaviour_Crowbar(int aVanillaCosts, int aEUCosts)
-/* 21: */ {
-/* 22:18 */ this.mVanillaCosts = aVanillaCosts;
-/* 23:19 */ this.mEUCosts = aEUCosts;
-/* 24: */ }
-/* 25: */
-/* 26: */ public boolean onItemUseFirst(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ)
-/* 27: */ {
-/* 28:24 */ if (aWorld.isRemote) {
-/* 29:25 */ return false;
-/* 30: */ }
-/* 31:27 */ if (GT_ModHandler.getModItem("Railcraft", "fluid.creosote.bucket", 1L) != null) {
-/* 32:27 */ return false;
-/* 33: */ }
-/* 34:28 */ Block aBlock = aWorld.getBlock(aX, aY, aZ);
-/* 35:29 */ if (aBlock == null) {
-/* 36:29 */ return false;
-/* 37: */ }
-/* 38:30 */ byte aMeta = (byte)aWorld.getBlockMetadata(aX, aY, aZ);
-/* 39:33 */ if (aBlock == Blocks.rail)
-/* 40: */ {
-/* 41:34 */ if (GT_ModHandler.damageOrDechargeItem(aStack, this.mVanillaCosts, this.mEUCosts, aPlayer))
-/* 42: */ {
-/* 43:35 */ aWorld.isRemote = true;
-/* 44:36 */ aWorld.setBlock(aX, aY, aZ, aBlock, (aMeta + 1) % 10, 0);
-/* 45:37 */ aWorld.isRemote = false;
-/* 46:38 */ GT_Utility.sendSoundToPlayers(aWorld, (String)GregTech_API.sSoundList.get(Integer.valueOf(0)), 1.0F, -1.0F, aX, aY, aZ);
-/* 47: */ }
-/* 48:40 */ return true;
-/* 49: */ }
-/* 50:42 */ if ((aBlock == Blocks.detector_rail) || (aBlock == Blocks.activator_rail) || (aBlock == Blocks.golden_rail))
-/* 51: */ {
-/* 52:43 */ if (GT_ModHandler.damageOrDechargeItem(aStack, this.mVanillaCosts, this.mEUCosts, aPlayer))
-/* 53: */ {
-/* 54:44 */ aWorld.isRemote = true;
-/* 55:45 */ aWorld.setBlock(aX, aY, aZ, aBlock, aMeta / 8 * 8 + (aMeta % 8 + 1) % 6, 0);
-/* 56:46 */ aWorld.isRemote = false;
-/* 57:47 */ GT_Utility.sendSoundToPlayers(aWorld, (String)GregTech_API.sSoundList.get(Integer.valueOf(0)), 1.0F, -1.0F, aX, aY, aZ);
-/* 58: */ }
-/* 59:49 */ return true;
-/* 60: */ }
-/* 61:51 */ return false;
-/* 62: */ }
-/* 63: */ }
+package gregtech.common.items.behaviors;
+
+import gregtech.api.GregTech_API;
+import gregtech.api.items.GT_MetaBase_Item;
+import gregtech.api.util.GT_ModHandler;
+import gregtech.api.util.GT_Utility;
+import java.util.Map;
+import net.minecraft.block.Block;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.init.Blocks;
+import net.minecraft.item.ItemStack;
+import net.minecraft.world.World;
+
+public class Behaviour_Crowbar
+ extends Behaviour_None
+{
+ private final int mVanillaCosts;
+ private final int mEUCosts;
+
+ public Behaviour_Crowbar(int aVanillaCosts, int aEUCosts)
+ {
+ this.mVanillaCosts = aVanillaCosts;
+ this.mEUCosts = aEUCosts;
+ }
+
+ public boolean onItemUseFirst(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ)
+ {
+ if (aWorld.isRemote) {
+ return false;
+ }
+ if (GT_ModHandler.getModItem("Railcraft", "fluid.creosote.bucket", 1L) != null) {
+ return false;
+ }
+ Block aBlock = aWorld.getBlock(aX, aY, aZ);
+ if (aBlock == null) {
+ return false;
+ }
+ byte aMeta = (byte)aWorld.getBlockMetadata(aX, aY, aZ);
+ if (aBlock == Blocks.rail)
+ {
+ if (GT_ModHandler.damageOrDechargeItem(aStack, this.mVanillaCosts, this.mEUCosts, aPlayer))
+ {
+ aWorld.isRemote = true;
+ aWorld.setBlock(aX, aY, aZ, aBlock, (aMeta + 1) % 10, 0);
+ aWorld.isRemote = false;
+ GT_Utility.sendSoundToPlayers(aWorld, (String)GregTech_API.sSoundList.get(Integer.valueOf(0)), 1.0F, -1.0F, aX, aY, aZ);
+ }
+ return true;
+ }
+ if ((aBlock == Blocks.detector_rail) || (aBlock == Blocks.activator_rail) || (aBlock == Blocks.golden_rail))
+ {
+ if (GT_ModHandler.damageOrDechargeItem(aStack, this.mVanillaCosts, this.mEUCosts, aPlayer))
+ {
+ aWorld.isRemote = true;
+ aWorld.setBlock(aX, aY, aZ, aBlock, aMeta / 8 * 8 + (aMeta % 8 + 1) % 6, 0);
+ aWorld.isRemote = false;
+ GT_Utility.sendSoundToPlayers(aWorld, (String)GregTech_API.sSoundList.get(Integer.valueOf(0)), 1.0F, -1.0F, aX, aY, aZ);
+ }
+ return true;
+ }
+ return false;
+ }
+}
/* Location: F:\Torrent\minecraft\jd-gui-0.3.6.windows\gregtech_1.7.10-5.07.07-dev.jar
diff --git a/main/java/gregtech/common/items/behaviors/Behaviour_DataOrb.java b/main/java/gregtech/common/items/behaviors/Behaviour_DataOrb.java
index 3d0107180c..5738962c10 100644
--- a/main/java/gregtech/common/items/behaviors/Behaviour_DataOrb.java
+++ b/main/java/gregtech/common/items/behaviors/Behaviour_DataOrb.java
@@ -1,118 +1,118 @@
-/* 1: */ package gregtech.common.items.behaviors;
-/* 2: */
-/* 3: */ import gregtech.api.items.GT_MetaBase_Item;
-/* 4: */ import gregtech.api.util.GT_Utility;
-/* 5: */ import java.util.List;
-/* 6: */ import net.minecraft.item.ItemStack;
-/* 7: */ import net.minecraft.nbt.NBTTagCompound;
-/* 8: */ import net.minecraft.nbt.NBTTagList;
-/* 9: */
-/* 10: */ public class Behaviour_DataOrb
-/* 11: */ extends Behaviour_None
-/* 12: */ {
-/* 13: */ public List<String> getAdditionalToolTips(GT_MetaBase_Item aItem, List<String> aList, ItemStack aStack)
-/* 14: */ {
-/* 15:15 */ if (!getDataTitle(aStack).equals(""))
-/* 16: */ {
-/* 17:16 */ aList.add(getDataTitle(aStack));
-/* 18:17 */ aList.add(getDataName(aStack));
-/* 19: */ }
-/* 20:19 */ return aList;
-/* 21: */ }
-/* 22: */
-/* 23: */ public static void copyInventory(ItemStack[] aInventory, ItemStack[] aNewContent, int aIndexlength)
-/* 24: */ {
-/* 25:23 */ for (int i = 0; i < aIndexlength; i++) {
-/* 26:24 */ if (aNewContent[i] == null) {
-/* 27:25 */ aInventory[i] = null;
-/* 28: */ } else {
-/* 29:27 */ aInventory[i] = GT_Utility.copy(new Object[] { aNewContent[i] });
-/* 30: */ }
-/* 31: */ }
-/* 32: */ }
-/* 33: */
-/* 34: */ public static String getDataName(ItemStack aStack)
-/* 35: */ {
-/* 36:32 */ NBTTagCompound tNBT = aStack.getTagCompound();
-/* 37:33 */ if (tNBT == null) {
-/* 38:33 */ return "";
-/* 39: */ }
-/* 40:34 */ return tNBT.getString("mDataName");
-/* 41: */ }
-/* 42: */
-/* 43: */ public static String getDataTitle(ItemStack aStack)
-/* 44: */ {
-/* 45:38 */ NBTTagCompound tNBT = aStack.getTagCompound();
-/* 46:39 */ if (tNBT == null) {
-/* 47:39 */ return "";
-/* 48: */ }
-/* 49:40 */ return tNBT.getString("mDataTitle");
-/* 50: */ }
-/* 51: */
-/* 52: */ public static NBTTagCompound setDataName(ItemStack aStack, String aDataName)
-/* 53: */ {
-/* 54:44 */ NBTTagCompound tNBT = aStack.getTagCompound();
-/* 55:45 */ if (tNBT == null) {
-/* 56:45 */ tNBT = new NBTTagCompound();
-/* 57: */ }
-/* 58:46 */ tNBT.setString("mDataName", aDataName);
-/* 59:47 */ aStack.setTagCompound(tNBT);
-/* 60:48 */ return tNBT;
-/* 61: */ }
-/* 62: */
-/* 63: */ public static NBTTagCompound setDataTitle(ItemStack aStack, String aDataTitle)
-/* 64: */ {
-/* 65:52 */ NBTTagCompound tNBT = aStack.getTagCompound();
-/* 66:53 */ if (tNBT == null) {
-/* 67:53 */ tNBT = new NBTTagCompound();
-/* 68: */ }
-/* 69:54 */ tNBT.setString("mDataTitle", aDataTitle);
-/* 70:55 */ aStack.setTagCompound(tNBT);
-/* 71:56 */ return tNBT;
-/* 72: */ }
-/* 73: */
-/* 74: */ public static ItemStack[] getNBTInventory(ItemStack aStack)
-/* 75: */ {
-/* 76:60 */ ItemStack[] tInventory = new ItemStack[256];
-/* 77:61 */ NBTTagCompound tNBT = aStack.getTagCompound();
-/* 78:62 */ if (tNBT == null) {
-/* 79:62 */ return tInventory;
-/* 80: */ }
-/* 81:64 */ NBTTagList tNBT_ItemList = tNBT.getTagList("Inventory", 10);
-/* 82:65 */ for (int i = 0; i < tNBT_ItemList.tagCount(); i++)
-/* 83: */ {
-/* 84:66 */ NBTTagCompound tag = tNBT_ItemList.getCompoundTagAt(i);
-/* 85:67 */ byte slot = tag.getByte("Slot");
-/* 86:68 */ if ((slot >= 0) && (slot < tInventory.length)) {
-/* 87:69 */ tInventory[slot] = GT_Utility.loadItem(tag);
-/* 88: */ }
-/* 89: */ }
-/* 90:72 */ return tInventory;
-/* 91: */ }
-/* 92: */
-/* 93: */ public static NBTTagCompound setNBTInventory(ItemStack aStack, ItemStack[] aInventory)
-/* 94: */ {
-/* 95:76 */ NBTTagCompound tNBT = aStack.getTagCompound();
-/* 96:77 */ if (tNBT == null) {
-/* 97:77 */ tNBT = new NBTTagCompound();
-/* 98: */ }
-/* 99:79 */ NBTTagList tNBT_ItemList = new NBTTagList();
-/* :0:80 */ for (int i = 0; i < aInventory.length; i++)
-/* :1: */ {
-/* :2:81 */ ItemStack stack = aInventory[i];
-/* :3:82 */ if (stack != null)
-/* :4: */ {
-/* :5:83 */ NBTTagCompound tag = new NBTTagCompound();
-/* :6:84 */ tag.setByte("Slot", (byte)i);
-/* :7:85 */ stack.writeToNBT(tag);
-/* :8:86 */ tNBT_ItemList.appendTag(tag);
-/* :9: */ }
-/* ;0: */ }
-/* ;1:89 */ tNBT.setTag("Inventory", tNBT_ItemList);
-/* ;2:90 */ aStack.setTagCompound(tNBT);
-/* ;3:91 */ return tNBT;
-/* ;4: */ }
-/* ;5: */ }
+package gregtech.common.items.behaviors;
+
+import gregtech.api.items.GT_MetaBase_Item;
+import gregtech.api.util.GT_Utility;
+import java.util.List;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.nbt.NBTTagList;
+
+public class Behaviour_DataOrb
+ extends Behaviour_None
+{
+ public List<String> getAdditionalToolTips(GT_MetaBase_Item