Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Althonos

Members
  • Content Count

    23
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Althonos

  • Rank
    Tree Puncher

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!
  1. It works perfectly, many thanks my friend. Solved timer:
  2. So it says 20 ticks is equivalent to one second, unless the computer is slower, then ticks happen at a slower rate. Is there a way to guarantee one second will pass? When twenty ticks isn't guaranteed to be one second.
  3. Trying to make it so, if the conditions are set up, the itemStack.stackTagCompound has some values changed every second. If Minecraft does things in ticks, how would I do it using ticks? I thought that Minecraft could essentially use any ordinary Java method?
  4. So in an item class, I'm overriding the onItemUse like so The issue is, I have a java.util.timer declaration inside of it, and it refuses to allow me to edit the ItemStack itemStack variable since it is not final. However, if it is final, it doesn't let me edit it anyway. The java.util.Timer This is the error I get in the little lightbulb on the left: Cannot refer to the non-final local variable itemStack defined in an enclosing scope. I found a java forum that had the same issue, however their solution was of no use to me. http://stackoverflow.com/que
  5. That's.. Odd.. I set it so if you just hold right click it will break all the blocks you look at and drop them.. It works perfectly. Damages the item, drops the blocks which I can pickup, and removes the blocks.. But not if there's a timer? Edit: Nevermind with the timer thing. The other issue above is still.. An issue, though.
  6. I do not call onItemUse manually, but let it happen normally through @Override. I have almost completely integrated NBTTagCompound as well. @Override public boolean onItemUse(ItemStack itemStack, EntityPlayer entityPlayer, World world, int posX, int posY, int posZ, int p_77648_7_, float p_77648_8_, float p_77648_9_, float p_77648_10_){
  7. I have changed onItemUse(parameters) to onItemUseFirst(parameters) and now, when I set the block to air, it seems to work. That is, until I try to place a block touching the said block or remove a block touching it. When I interact with the removed block in any way, the broken block reappears. For instance, Method is called Block is replaced by air I try to place a block over air Old block reappears in same position I must really be missing something..
  8. This is the output of the suggested println statement; [sTDOUT]: [com.zacharysturtz.items.OrangePickaxe:onItemUse:63]: onItemUse [Client]; isReady:true The timers I call reset the isReady boolean. I have tested that it does actually execute the if (isReady) statement at the desired time. The issue is with the first bit you said, how would I fix it so it renders server-side as well? Also, I will look in to the NBT status flags you were talking about.
  9. I have a custom pickaxe that extends ItemPickaxe, the goal is for the onItemUse method to dig out a hole in front of it whenever the right click happens. What actually happens is for a second, it replaces the blocks with the desired block (air), then fixes it to it's original position. It also refuses to damage the item (inside of the same method) My hypothesis is that it's reverting any changes made during onItemUse. Does anyone know why, and how to fix it? Class for the pickaxe: One more thing -- The bit I have about the ItemEntity inside of the dropItem method, it never a
  10. Ah, I hadn't thought of using the unlocalized name to check. I have the coordinates, my only issue is checking to see if it's a vanilla chest. Would the unlocalized name for a vanilla chest be tile.container.chest?
  11. As the title says, what I wish to do is check for a specific type of block at pre-defined coordinates. I have a custom block, I have the location setup to check for the block. What I wish to do is trigger an event whenever a TileEntityChest is placed next to my block (Adjacent to it's x or z axis). The only issue is I don't know how to check if it's a TileEntityChest. I thought of something like if (adjacentXPos != new TileEntityChest()){} Sadly, however, that didn't work. I can check if they're null just fine by doing if (adjacentXPos != null){} Any input is apprec
  12. Solved, took me awhile because I am slightly retarded. Finished slab class: Finished ItemSlab class: Finished slab creation: Finished Registery (Inside of preinit):
  13. Okay, so, I implemented a class that extends ItemSlab. The issue is that I'm getting an ID overlap. (Two of the same Id, I think) So it crashes Minecraft upon startup. ItemSlab class: The use of the class: Error Log (Some of it): (Edit) For additional reference, here is the source GameData.class method where the error points to:
  14. Hello, I have a custom slab class, these custom slabs function normally. Aside from two things; One: The slabs do not stack, when I place them on each-other there's a big empty space. Two: When I click in with the scroll wheel of my mouse, it gives me a stone slab instead. It's the same thing with any custom block that extends a vanilla block, is there a method to fix this? Picture of my problem: http://postimg.org/image/g97zuc2fp/ I have also tried to register the "ItemSlab" in postInit from the following tutorial (Changing the syntax to 1.7.10 myself), but it was of
  15. Ah! I can't believe I made such a stupid mistake. Sorry, thanks for catching it. It works perfectly now, also, there were two reasons to me not renaming the variables; One: I didn't know what they meant (Now I do, thanks to you.) Two: I didn't see the need to at the time, but now that I think about it, my code looks so much prettier. Anyway, problem solved!
×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.