Jump to content

Bugzoo

Members
  • Posts

    268
  • Joined

  • Last visited

Everything posted by Bugzoo

  1. And how do I get the UUID
  2. Im not sure on how to get the players username
  3. The item SHOULD have the creators name on hover, but there is no information when I hover over the Item package com.bugzoo.FinancialMod; import java.util.List; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.EnumChatFormatting; import net.minecraft.world.World; public class ItemCreditCard extends Item { public ItemCreditCard(){ setMaxStackSize(1); setUnlocalizedName("CreditCard"); setCreativeTab(FinancialMod.financialTab); } @Override public void onCreated(ItemStack itemStack, World par2World, EntityPlayer player) { itemStack.stackTagCompound = new NBTTagCompound(); itemStack.stackTagCompound.setString("owner", player.PERSISTED_NBT_TAG); } public void addInformation(ItemStack itemStack, EntityPlayer player, List list, boolean par4) { if (itemStack.stackTagCompound != null) { String owner = itemStack.stackTagCompound.getString("owner"); int code = itemStack.stackTagCompound.getInteger("code"); list.add("owner: " + owner); } } }
  4. I made a model but cant seem to get the hitbox to surround the whole thing [/img]
  5. I accidentaly made my model too small, so I was wondering if there is anyway to make it bigger without totaly redoing my model
  6. you dont use the registerBlockIcon() method in 1.7, but if your using 1.6, then update
  7. I've tried using this player.inventory.consumeInventoryItem(Items.iron_ingot); But it consumes all the iron ingots, and I just want it to consume 1
  8. Can we still have some screenshots?
  9. I dont know how to use NBT, could you link me to a tutorial?
  10. I want to give the player a book that has already been written, how would I do this
  11. This is a lootcrate mod, so it is very important I get this working. And yes I do understand what he recommended, I just dont know how I would do it
  12. Can I have some code on how I would do this?
  13. Only when the player is online
  14. I want to give the player an item every 5 minecraft days, how would I do that
  15. Thank you, this works. I dont know how I didnt think of that earlier. But im having a problem where sometimes it gives me 3 items, sometimes 4 and sometimes 5
  16. What did you have as your array?
  17. I'm still not getting any items when I right click
  18. Still doesnt give me any items ItemClass: package com.bugzoo.Lootcube; import java.util.List; import java.util.Random; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.world.World; public class ItemPokepack extends Item{ public ItemPokepack(){ setMaxStackSize(1); setUnlocalizedName("pokePack"); } public Item stack; @Override public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer player){ Random rand = new Random(); for(int m = 0; m < 6; m++) { int r = rand.nextInt(Lootcube.pokelist.length - 1); stack = Lootcube.pokelist[r]; player.inventory.addItemStackToInventory(new ItemStack(stack)); player.inventory.consumeInventoryItem(this); } return new ItemStack(stack); } @SideOnly(Side.CLIENT) @Override public void addInformation(ItemStack itemstack, EntityPlayer player, List dataList, boolean b){ dataList.add("Pack Of Random Pokemon Cards"); } } List: public static Item[] pokelist = {Cascoon, Silcoon, Purugly, Gothita, Watchog, Dunsparce};
  19. I cant return stack because it will only be made if the for loop runs. And if i make a public ItemStack variable, that just crashes the game
  20. anybody?
  21. I found out that if I even give the player pokeList[1] it doesnt give the player anything, so it must be something up with the array
  22. package com.bugzoo.Lootcube; import java.util.Random; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.world.World; public class ItemPokepack extends Item{ public ItemPokepack(){ setMaxStackSize(1); setUnlocalizedName("pokePack"); } @Override public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer player){ Random rand = new Random(); for(int m = 0; m < 6; m++) { int r = rand.nextInt(Lootcube.pokelist.length - 1); ItemStack stack = Lootcube.pokelist[r]; player.inventory.addItemStackToInventory(stack); } return itemStack; } } MyList: public static ItemStack[] pokelist = {new ItemStack(Cascoon), new ItemStack(Silcoon), new ItemStack(Purugly), new ItemStack(Gothita), new ItemStack(Watchog), new ItemStack(Dunsparce), new ItemStack(Sunkern), new ItemStack(Wormadam), new ItemStack(Patrat), new ItemStack(Luvdisk), new ItemStack(Mewtwo), new ItemStack(Charizard), new ItemStack(Arceus), new ItemStack(Lugia), new ItemStack(Slaking), new ItemStack(Dragonite), new ItemStack(Mew)};
  23. That doesnt seem to be giving me any items at all
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.