Jump to content

npomroy

Members
  • Posts

    5
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

npomroy's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. I have tried adding setBlockToAir to breakBlock but it had no effect. The problem doesn't seem to be with the block breaking(it appears to break for a split second) it seems that there is a bit of code causing it to return.
  2. Problem fixed by checking if !world.isRemote before running the onBlockActivated code (Thanks go to theEpicTekkit, and also SaoModder) I am currently working on my first mod. I have a block that is supposed to be destroyed in the onBlockActivated method and it appears that is does get destroyed but only for a split second. It seems as if the problem is in the block regenerating but in all my searching I could not find a reason for the regen. I am new to programming in general so I may have made a stupid mistake somewhere that I cannot see. The block has a tile entity that is successfully destroyed the first time by onBlockActivated. Also the items you get in onBlockActivated are only received the first time. The block in question is "TrapBuoy". You place it by using a BaitedLobsterTrap on the surface of the water. if the water is deep enough a trap will spawn on the sea floor. when right clicked after a delay the trap and buoy should disappear and the player receives the trap, buoy, rope, and fish. The trap disappears just fine however the buoy reappears immediately. Right clicking again will destroy the block(after a delay) without getting any items. Github: https://github.com/npomroy/MineHr Side Issue: If you have read this far I have another problem but I have not yet really worked on it. I have an issue with a tile entity. In the gui that I have made, the test slot is inaccessible for some reason(you can put items in but you cannot take them out). It seems like the slot isn't linking with the correct inventory. I have been unable to write the itemstack to the NBT as well. I greatly appreciate any and all help PS I am also happy to help anyone else if there is anything I can do with my so far limited knowledge.
×
×
  • Create New...

Important Information

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