Jump to content

BuddingDev

Members
  • Posts

    237
  • Joined

  • Last visited

Everything posted by BuddingDev

  1. Can anyone tell me what went wrong in the bottom of the TE class, when I am doing Nbt IO? I dont seem to b able to save any variable despite any changes!
  2. Now, it is even more interesting: Block Class: http://pastebin.com/5jTBbcXt TE Class: http://pastebin.com/9jPebGpV Now, I have more amended parts. But, everytime I right click onto the block, It always say TileEntity#worldObj#isRemote is true, so, server never responded...?
  3. a) But I need to acquire info from that specific tile entity. Do I use World#getTileEntity(Stuff) instead? b) No problem. I registered it.
  4. OK, that Block instance is solved. BUT, problem is, updateEntity() does not go server-side after the world is reloaded... WorldObj#isRemote always return true after the world is reloaded.
  5. OK, I got that. Problem is solved. I heal and increase the total health of the player at an interval. (So, when he is healed, he gains some max health) For example, he is healed 2 hearts and gained 2 hearts for max health. Then, he dies, with his current health larger than normal. (Say, he dies with max health = 100) Then, his health is back to normal (20). I intercepted PlayerRespawnEvent, and have the health adjusted back to normal.
  6. That image is exactly what I am using... OK, I admit I am an noob.
  7. OK, I'll go clear this time: I want a TIleEntity that follows a block, and generates a counter per tick (or more). That TileEntity generates counters per ticks. Which is fine. When I load my world to see if it has any problems, it gave me this: java.lang.InstantiationException: com.wwy.mod.te.techno.TETechnoReplenisher Block class: http://pastebin.com/3rH3qXnh TE Class: http://pastebin.com/uipjaJ7U Interestingly, even the "heal and boost" ability does not activate, it still generates counters... EDIT: So, my objective is, when the counter (datum variable) reaches 1000, find a random player with lowest health, and then heal him ,and boost him.
  8. OK, I'll try to find all these 4 classes by myself.
  9. Yeah.... I know how to use "instanceof" know how to use "extends" know how to use"abstract"... But then you just said that "for simplt text you have ChatComponentText". Then is there any "complex" types?
  10. Here is a few questions that I dont quite understand: 1. How to IO tileEntity data on world IO? (Do I need to call read/write NBT at any position?) 2. TileEntities act strange when reloaded. It always execute client-side. Is this related to Question 1?
  11. The main thing is that I dont know which Forge classes implements IChatComponent
  12. So, I found EntityPlayer#addChatComponentMessage() and EntityPlayer#addChatMessage(); Need help on that.
  13. Any clue where that list of (yeah) events are at? So I can go there and browse and choose what I want?
  14. Is it possible to somehow intercept any event fired from Forge? Like, when that pig died, I want it to spawn another pig? Or make some explosion? or drop more porkchop? Yeah, I know something is called @SubscribeEvent... But How exactly to use it?
  15. I know there is a feature in Forge to let you set a block's meta and change its corresponding features. But then how do I, for example, have different texture per each meta block? And how do I really change that block's meta? Help would be really appreciated.
  16. I plan to increase the player's health up, and up. (Of course, I will add some more code to limit that.) And THEN after that player died and respawn, I want their health back to normal. That is: The player is alive, he has a max of 100 health Unfortunately he is killed by a great mass of blowin creepers Now, he respawns, he have 20 health, as much as the default. How do I do that?
  17. I want to output some string to the chat. I have always used Minecraft#getMinecraft()#thePlayer#sendChatMessage(Stuff) to do so. But recently, after some error happened, and I got help on here, I realise that chunk of code may cause error in the Server. So what should I do to output something onto the chat?
  18. Oh, I got it!!! That TileEntity in my world is from an old version... That explains the strange behavior.
  19. Just found that my code doesnt execute in server. Anyways: TileEntity in question: http://pastebin.com/DycFqfRq
  20. Seriously, does anyone know how to heal ANY entity through code?
  21. More than Infinity% sure I have my code print who's being targetted, and yeah, no NullPointer baddies, it points to me, but no health updates!!!
  22. Looks like it is LivingHealEvent. Not sure how to use it, but you've got a start.
  23. It does not seem right... Here's my code: EntityPlayer priority = the nearest player from tile entity; if (!worldObj.isRemote) { priority.heal(20); } I tried falling from a cliff and come back, but it does not heal me! My debug printings suggest the TileEntity has found me as a target, but it does not heal!
  24. I tried entity.heal(20);, but it seems it doesnt work. Do I need to call additional functions / do it in server side?
  25. Then How to use that Modifier? and Where is it located?
×
×
  • Create New...

Important Information

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