Jump to content

mardiff

Members
  • Posts

    158
  • Joined

  • Last visited

Everything posted by mardiff

  1. You need to setTextureName() to getTextureName(). That's why it says you have a missing tile name in the error log. Simply add setTextureName("modid:blocktexturename") to the constructor.
  2. Reference your blocks and items as blocks and items, not as ids. Ids no longer exist in 1.7. Also, if you used override annotations you would realize that idDropped no longer exists and has been changed to this: public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_) {
  3. First of all, you need to change the serverSideRequired in the network mod annotation to be true....
  4. Check CJLetsGame's comment on here: www.minecraftforge.net/forum/index.php/topic,14997.msg76326.html#msg76326
  5. You never defined the length of furnaceItemStacks
  6. If you just want to view a certain file then type it in in a class and control click it. This will open the declaration.
  7. And so how would I fix this? Packets?
  8. I was trying to read an integer that is stored in the tile entity from the gui. When I read it in the tile entity it reads the correct value, but in the gui it always returns 0. I'm not quite sure what's going on, and it's extremely frusturating. Thanks for the help.
  9. That should be correct as long as those names match the unlocalized name you registered. The problem is most likely in the file location. Make sure it's in assets/modid/lang/en_US.lang. Also make sure it's a .lang file, not a .lang.txt file.
  10. Can't fix your problem unless we know what you did wrong. Code please.
  11. If you're in eclipse and you see the name of a class, you can either right click on it and click open declaration, or control click on the name itself. Both will bring you to the class.
  12. If you don't know how to do something that's already in vanilla, look at the vanilla code.
  13. Is there an item/block already occupying 875 or 1131? If not, try setting it to something above 4096.
  14. I mean, the id in the config still says 31743 (and item ids take the number and add 256 to avoid conflicts with vanilla), so it doesn't seem like anything is wrong.
  15. I believe this is the method you're looking for: public int quantityDropped(int meta, int fortune, Random random) { return quantityDroppedWithBonus(fortune, random); }
  16. Thanks a lot guys. I actually didn't want NBT so it could be balanced, but anyways it works great now!
  17. My goal is to create a working handheld furnace. I've found workarounds to making the entity tick (the items onUpdate() method), but the tile entity is unable to read the item stacks in it's slot. I don't even know what to look for as this problem seems extremely weird to have. Any help would be appreciated. Here's the item code: package com.mardiff.handheld.item; import net.minecraft.block.BlockFurnace; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; import net.minecraft.world.chunk.Chunk; import com.mardiff.handheld.HandheldBase; import com.mardiff.handheld.inventory.ContainerHandheldFurnace; import com.mardiff.handheld.tileentity.TileHandheldFurnace; public class ItemHandheldFurnace extends Item { public ItemHandheldFurnace(int par1) { super(par1); setCreativeTab(CreativeTabs.tabMisc); setMaxStackSize(1); setTextureName("furnace_front_on"); } @Override /** * Called whenever this item is equipped and the right mouse button is pressed. Args: itemStack, world, entityPlayer */ public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer player) { System.out.println("clicked"); player.openGui(HandheldBase.instance, 0, world, (int)player.posX, (int)player.posY, (int)player.posZ); return itemstack; } @Override public void onUpdate(ItemStack par1ItemStack, World par2World, Entity par3Entity, int par4, boolean par5) { if(par3Entity != null && par3Entity instanceof EntityPlayer) { EntityPlayer player = (EntityPlayer)par3Entity; if(player.openContainer instanceof ContainerHandheldFurnace) { TileHandheldFurnace tilehandheld = new TileHandheldFurnace(); tilehandheld.beginUpdating(); tilehandheld.updateEntity(); tilehandheld.validate(); } } } } I realize that making a new tile entity every update may be the problem, but then how would I get the entity to randomly tick (since tile entities don't tick unless they're in block form)?
  18. mcmod.info is in the src/minecraft folder too.
  19. Vswe does some great tutorials on GUIs. Coming from an established modder, it's entertaining, and it's both elaborate but to the point.
  20. To be honest, I've never even looked through there. Using System.out.println is just a basic java function that doesn't require any knowledge of modding.
  21. He says to use System.out.println to actually see which parts of your code are being called. If you don't know what that is, go learn java first. It may seem like a hassle, but you won't be able to do anything at all by yourself without it. As to pertaining to your problem with the furnace, your updateFurnaceBlockState is never actually being called. With vanilla furnaces, this is called in the updateEntity() method, and your updateEntity() method is both commented out and never actually calls the updateFurnaceBlockState method. Without that part, a block schedule is never actually called, and therefore your furnace will never change it's state.
  22. To dev909, the setTextureName takes a string without .png. The register icon method wants the string with .png at the end. Additionally, only one is needed, and it's also recommended to only use one.
  23. The .zip is just like being in the /src/Minecraft folder. It should directly open to the top package of your code and the assets, along with the mcmod.info
  24. /minecraft/assets. I'm doing this away from my computer so I'm bound to forget stuff like that.
  25. Actually, the folder doesn't have to match your modid. Most people like to, but you can just change the texture code to be lowercase and leave the modid in whatever you want.
×
×
  • Create New...

Important Information

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