
Bugzoo
Members-
Posts
268 -
Joined
-
Last visited
Everything posted by Bugzoo
-
And how do I get the UUID
-
Im not sure on how to get the players username
-
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); } } }
-
I made a model but cant seem to get the hitbox to surround the whole thing [/img]
-
I accidentaly made my model too small, so I was wondering if there is anyway to make it bigger without totaly redoing my model
-
you dont use the registerBlockIcon() method in 1.7, but if your using 1.6, then update
-
what the title said
-
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
-
Can we still have some screenshots?
-
I dont know how to use NBT, could you link me to a tutorial?
-
I want to give the player a book that has already been written, how would I do this
-
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
-
Ok den.
-
Can I have some code on how I would do this?
-
Only when the player is online
-
I want to give the player an item every 5 minecraft days, how would I do that
-
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
-
What did you have as your array?
-
I'm still not getting any items when I right click
-
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};
-
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
-
anybody?
-
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
-
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)};
-
That doesnt seem to be giving me any items at all