Jump to content

Animefan8888

Forge Modder
  • Posts

    6157
  • Joined

  • Last visited

  • Days Won

    59

Everything posted by Animefan8888

  1. GL has a number of capabilities that can be enabled or disabled. Before you actually render anything you may need to change several of these. After you are done rendering, you should disable any capabilities you enabled and enable any capabilities you disabled. Doing this prevents strange behaviour when something else is rendered. The call to enableLighting() is present after OP finishes rendering because they called disbleLighting() before they started rendering. Does it really matter if he calls GLStateManager.pushMatrix() and GLStateManager.popMatrix() though?
  2. Why are you sending the packet there? You should be sending it after changing the value and did you update your registry to say Side.CLIENT instead of Side.SERVER?
  3. Could you provide a screen shot or tell me what exactly is "dimming"?
  4. It can't be done with JSON, not sure about obj, but you can use a TESR (maybe an IBakedModel...).
  5. Two things, when you register your packet it needs to be Side.CLIENT because the client should be receiving the packet and you will need to send this packet as shown in diesiebens tutorial everytime you change the mana.
  6. Try moving the handler to its own class file.
  7. No your MessageHandler not your ManaSyncMessageClient.
  8. Is it always blacked out in the overworld? Is it always perfect in the end? What about the nether?
  9. Try adding a zero argument constructor to your MessageHandler.
  10. Why is "cover" an [] and why are you writing "variant=oak".... take a look at the docs. http://mcforge.readthedocs.io/en/latest/blockstates/forgeBlockstates/
  11. You should be sending the message to the client and you just copied the code diesieben made... Look at that nice comment he left // or Minecraft.getMinecraft() on the client Plus you never check if the player has your capability anymore. Last thing I would name your message something like ManaSyncMessageClient. This way you know that it is a client recieved message and what it does specifically.
  12. No not like that if you look at the tutorials message handler implementation you will see he uses a IThreadListener. This is because the game has its own thread and the network has its own thread. Also you should have a setMana method in your capability somewhere to do this. One last thing did you really make a IMessage implementation called Messages?
  13. Packet#toBytes() is your write and Packet#fromBytes() is your read. So ByteBufUtils.writeVarInt(to, toWrite, maxSize); ByteBufUtils.readVarInt(buf, maxSize); // OR buf.writeInt(value); buf.readInt();
  14. It is indeed a networking thing, you will need to use packets. But don't worry packets are easy. Diesieben has a great tutorial on them and the network itself. http://www.minecraftforge.net/forum/index.php?topic=20135.0
  15. Why not try it in the final loop or even in the Recipes.addEnrichment(...) method.
  16. MalformedJsonException, it says what to do in the crash report, you should also look at your JSON.
  17. Try GLStateManager.disableLighting(); And if that doesn't work post your rendering code.
  18. It is because you are using the IItemPropertyGetter inside your constructor, so the players spawn point wont change, because the constructor is only called once.
  19. Close but in your validate method call worldObj.getTileEntity(te.getPos()) == null instead of if the pos is null.
  20. Side note only use a GuiHandler if you have both a Container and a Gui otherwise just use Minecraft.getMinecraft().displayGuiScreen(new GuiBook());
  21. Your code won't work because you are checking to see if the worlds version of the te is invalid. Really the simplest way to do this would be to loop through like you are, but without the invalid check and only add. (Side note why do you need a map? The TE stores its BlockPos). Once you have added them check through the currently a map for TEs that are invalid. Or check if the TE still exists in the World by doing World#getTileEntity(listTE.getPos()) != null. Or similar.
  22. I don't suppose there is an event for Chat Opened in Forge? There is an OpenGui event look under the net.minecraftforge.events package
×
×
  • Create New...

Important Information

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