aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/core/item
diff options
context:
space:
mode:
Diffstat (limited to 'src/Java/gtPlusPlus/core/item')
-rw-r--r--src/Java/gtPlusPlus/core/item/ModItems.java3
-rw-r--r--src/Java/gtPlusPlus/core/item/general/ItemSulfuricAcidPotion.java28
2 files changed, 30 insertions, 1 deletions
diff --git a/src/Java/gtPlusPlus/core/item/ModItems.java b/src/Java/gtPlusPlus/core/item/ModItems.java
index 685d918ae6..cfd8fae7b0 100644
--- a/src/Java/gtPlusPlus/core/item/ModItems.java
+++ b/src/Java/gtPlusPlus/core/item/ModItems.java
@@ -228,6 +228,7 @@ public final class ModItems {
public static Item itemPlateVanadium;
+ public static Item itemSulfuricPotion;
@@ -294,7 +295,7 @@ public final class ModItems {
itemGemShards = new ItemGemShards("itemGemShards", "Gem Shards", AddToCreativeTab.tabMisc, 32, 0, "They glitter in the light", EnumRarity.rare, EnumChatFormatting.GRAY, false, Utils.rgbtoHexValue(182, 114, 18)).setTextureName(CORE.MODID + ":itemHeliumBlob");
itemHalfCompleteCasings = new ItemHalfCompleteCasings("itemHalfCompleteCasings", "Half Complete Casing", AddToCreativeTab.tabMisc, 32, 0, "This isn't quite finished yet.", EnumRarity.common, EnumChatFormatting.GRAY, false, Utils.rgbtoHexValue(255, 255, 255)).setTextureName("gregtech" + ":" + "gt.metaitem.01/" + "761");
-
+ itemSulfuricPotion = new ItemSulfuricAcidPotion("itemSulfuricPotion", "Thowable Vial of Sulfuric Acid", "Burn your foes alive!").setTextureName(CORE.MODID + ":itemSulfuricAcidPotion");
//Start meta Item Generation
ItemsFoods.load();
diff --git a/src/Java/gtPlusPlus/core/item/general/ItemSulfuricAcidPotion.java b/src/Java/gtPlusPlus/core/item/general/ItemSulfuricAcidPotion.java
new file mode 100644
index 0000000000..885919dccb
--- /dev/null
+++ b/src/Java/gtPlusPlus/core/item/general/ItemSulfuricAcidPotion.java
@@ -0,0 +1,28 @@
+package gtPlusPlus.core.item.general;
+
+import gtPlusPlus.core.creative.AddToCreativeTab;
+import gtPlusPlus.core.entity.projectile.EntitySulfuricAcidPotion;
+import gtPlusPlus.core.item.base.CoreItem;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.EnumRarity;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.EnumChatFormatting;
+import net.minecraft.world.World;
+
+public class ItemSulfuricAcidPotion extends CoreItem {
+
+ public ItemSulfuricAcidPotion(String unlocalizedName, String displayName, String description) {
+ super(unlocalizedName, displayName, AddToCreativeTab.tabMisc, 16, 0, description, EnumRarity.common, EnumChatFormatting.GRAY, false, null);
+ }
+
+ public ItemStack onItemRightClick(ItemStack item, World world, EntityPlayer player) {
+ if (!player.capabilities.isCreativeMode) {
+ --item.stackSize;
+ }
+ world.playSoundAtEntity(player, "random.bow", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F));
+ if (!world.isRemote) {
+ world.spawnEntityInWorld(new EntitySulfuricAcidPotion(world, player));
+ }
+ return item;
+ }
+} \ No newline at end of file