Everything posted by Bugzoo
-
[1.7.10] Item NBT Wont Work?
And how do I get the UUID
-
[1.7.10] Item NBT Wont Work?
Im not sure on how to get the players username
-
[1.7.10] Item NBT Wont Work?
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); } } }
-
[1.7.10] Can't Get Hitbox Right
I made a model but cant seem to get the hitbox to surround the whole thing [/img]
-
[1.7.10] Made Techne Model Too Small
I accidentaly made my model too small, so I was wondering if there is anyway to make it bigger without totaly redoing my model
-
Texture dont work in minecraft
you dont use the registerBlockIcon() method in 1.7, but if your using 1.6, then update
-
[1.7.10] Spawn Entity Infront Of Player On Item Right-Click
what the title said
-
[1.7.10] Consume Inventory Item
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
-
Item Render In Hand[UNSOLVED] [1.7.10]
Can we still have some screenshots?
-
[1.7.10] Give Player Written Book
I dont know how to use NBT, could you link me to a tutorial?
-
[1.7.10] Give Player Written Book
I want to give the player a book that has already been written, how would I do this
-
[1.7.10] Give Player Item Every 5 Minecraft Days
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
-
[1.7.10] Give Player Item Every 5 Minecraft Days
Ok den.
-
[1.7.10] Give Player Item Every 5 Minecraft Days
Can I have some code on how I would do this?
-
[1.7.10] Give Player Item Every 5 Minecraft Days
Only when the player is online
-
[1.7.10] Give Player Item Every 5 Minecraft Days
I want to give the player an item every 5 minecraft days, how would I do that
-
[1.7.10] Give player random items
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
-
[1.7.10] Give player random items
What did you have as your array?
-
[1.7.10] Give player random items
I'm still not getting any items when I right click
-
[1.7.10] Give player random items
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};
-
[1.7.10] Give player random items
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
-
[1.7.10] Give player random items
anybody?
-
[1.7.10] Give player random items
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
-
[1.7.10] Give player random items
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)};
-
[1.7.10] Give player random items
That doesnt seem to be giving me any items at all
IPS spam blocked by CleanTalk.