Jump to content

BuddingDev

Members
  • Posts

    237
  • Joined

  • Last visited

Everything posted by BuddingDev

  1. I was thinking what my new mod could do. Then, I thought of increasing the player's health. I know I can do that through giving player Absorbtion or stuff like that, but I dont want to. Any clues?
  2. It isnt any bug. The logs still output normally, for example: Loading world: How-many% Player has joined the world and then it brings me back.
  3. I am trying to make a simple GUI that when opened shows the current world time. I want the time to be updated per tick, but I cant figure out where the "update" function is called. Any clues?
  4. It is still happening till now. When you are loading up the world, and if you are extremely unlucky to encounter this bug, the log tells you that you have entered a single-player world, but the GUI brings you back to the title screen. Then when you tries to reload by re-entering the target world, the game unloads the world and loads it back! Usually you may be sent back to the original spawn-point...
  5. Quite confused when scrolling through the member functions. For example: How does drawString(Different parameters) work?
  6. SO is 1.7.10 maintained now?
  7. Eh... What is for 1.8??? Then what is their equivalent in 1.7.10?
  8. Now I want to make some serious work on GUI making. But first can anyone explain what are GUIScreen, Containers, and / or other possible related classes? And their relationships with each other?
  9. I havent modded for a while, and I found my Forge is extremely outdated. Now I want to update and re-setup my work place. But firstly, I forgot where to download the offline documentation. Any clues?
  10. And, how to change block texture when the TE has some updates?
  11. Do I have to set the blockType of TE manually?
  12. So, I just need to make a reference of the instance in init method? And other classes obey this, right? (At least, I know Items function like that.)
  13. Then how to replace a block? I still dont know how.
  14. I am attempting to do it in TileEntity: this.worldObj.setBlock(this.xCoord, this.yCoord, this.zCoord, new WhateverBlock("WhateverArgs")); And it seems that the WhateverBlock disappears as stated...
  15. I am having problem with replacing blocks that holds a TileEntity. So, calling world.setBlock() does not visually replace the block. When I attempt to place a new block (wood, for example) on top of them, the block disappears and the wood replaces it. So: What should I do to ensure the block is changed properly? (Server-side?)
  16. What is the value of ForgeDirection.flag? And what does it represent? I thought it is 0, 1, 2, 3, 4, 5 But it showed me 0, 1, 2, 4, 8...
  17. So it may be just a program code-writing style issue... Anyway it is kinda fixed for now.
  18. Oh, what... So where is the world initialised...? So it may just be a program style issue...
  19. WEIRD, now that it gave me some more info now: [server thread/INFO]: <Player860> X: -225 [server thread/INFO]: <Player860> Y: 105 [server thread/INFO]: <Player860> Z: 237 [server thread/INFO]: <Player860> World: net.minecraft.client.multiplayer.WorldClient@59027d30 but still it crashed. K, even more info: public TEMCGController() { this.world = this.worldObj; } It is getting more crazy.
  20. K, here are more info: Problematic function: ("world" is set to "worldObj", to make life easier) (MultipleControllerException is a self-made Exception class. But I cant test its functionality because this code fails... and the Exception appear later in the code (which is not shown)) private void checkBound() throws MultipleControllerException { for (int i=0; i<6; i++) { ForgeDirection dir = ForgeDirection.getOrientation(i); int x = dir.offsetX + xCoord; int y = dir.offsetY + yCoord; int z = dir.offsetZ + zCoord; TileEntity tile; // DEBUG if (world.isRemote) { Minecraft.getMinecraft().thePlayer.sendChatMessage("X: " + x); Minecraft.getMinecraft().thePlayer.sendChatMessage("Y: " + y); Minecraft.getMinecraft().thePlayer.sendChatMessage("Z: " + z); Minecraft.getMinecraft().thePlayer.sendChatMessage("World: " + world); } tile = world.getTileEntity(x, y, z); } What the game printed: (What the game gave me:) can't even print anything. Conclusion: somehow the "world" variable failed. (BTW, nice Forge loading GUI!!!)
  21. I am attempting to update Forge first, just in case...
  22. I cant find the errors!!! I have all coordinates passing in legit. (That should work!!!)
  23. I made world as this.worldObj (This code is in a class extending from TileEntity)
  24. I am confused. Why this gives me NullPointer? TileEntity tile = world.getTileEntity(x, y, z); I intend to check null the next line, but then it crashed at that line.
  25. In case you want to know what happened when killing with hands only: ********Java checks && before ||********** (You can check that) so, when your current "item" is hand (which is null): player.inventory.getCurrentItem().getItem() != null // false, it is null. && player.inventory.getCurrentItem().getItem() == Main.keyKingdom) // false because of the statement just now. || player.inventory.getCurrentItem().getItem() == Main.keyKingdomD // Cannot compare. LHS is null. If you want to keep your chunk of code, MAKE SO MUCH SURE you add brackets to the item-checking after the null-checking. In this way, if the null-checking finds out it's null, then you wont accidentally access the pointer when checking for its type.
×
×
  • Create New...

Important Information

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