OSDN Git Service

手榴弾追加
[chemicraft/chemicraft.git] / common / chemicraft / ItemGrenade.java
1 package chemicraft;
2
3 import java.util.List;
4
5 import net.minecraft.src.Item;
6 import net.minecraft.src.ItemStack;
7 import net.minecraft.src.NBTTagCompound;
8 import net.minecraft.src.NBTTagList;
9
10 public class ItemGrenade extends Item {
11
12         protected ItemGrenade(int par1) {
13                 super(par1);
14         }
15
16         @Override
17         public void addInformation(ItemStack par1ItemStack, List par2List) {
18                 NBTTagList var1 = par1ItemStack.getTagCompound().getTagList("Effect");
19
20                 for(int i = 0;i < 3;i++){
21                         if(!((NBTTagCompound)var1.tagAt(0)).getString("GrenadeEffect" + i).equals("")){
22                                 par2List.add(
23                                                 ((NBTTagCompound)var1.tagAt(0)).getString("GrenadeEffect" + i)
24                                                 );
25                         }
26                 }
27         }
28
29         @Override
30         public String getTextureFile(){
31                 return "/chemicraft/items/items.png";
32         }
33
34 }