Jump to content

Abastro

Forge Modder
  • Posts

    1075
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by Abastro

  1. Use reflection to resize the array. System#arraycopy would be needed for that. (NOTE: You should check the size of the array before resizing it, because some mods do it too.)
  2. You can open player inventory using Minecraft#displayGuiScreen(new GuiInventory(this.thePlayer)).
  3. You should draw ToolTip after super.drawScreen(x, y, f) called.
  4. Maybe doing that in RenderTickEvent.Pre would solve the glitching problem.
  5. I don't know much on behaviors of mobs, but force the mob to have certain velocity would work. Use the method 'setVelocity' for that.
  6. You can subscribe ClientTickEvent and play the background music randomly.
  7. The important thing is : You have to set up your own Gui Handler and let it give the Container in getServerGuiElement, and the Gui in getClientGuiElement... How many times should I say this;
  8. Oh, I'm not saying to you when 'The code is totally wrong'. It seems that OP doesn't know basic java. So it would be more helpful to tell him/her 'Learn Basic Java', I think.
  9. Well, you should understand basic java to do this. The code is totally wrong. Learn basic java, please. To laci200270: Do not just provide copy-paste code.. It is far from how learning works.
  10. There's the integrated server though, which I'm not sure if it would count or not. The method is in FMLCommonHandler which I would guess means it's common between server/client, that or a stupid name for the class. Yes but it would not work on Integrated Server.
  11. What.. That code would crash when you enters SMP server. There is no MinecraftServer instance in client side! + When you have to UPDATE something, then you should do that on the server. That means, you need to send packet to the server.
  12. Weird lighting glitch would be from tooltip rendering. As I said, render the Tooltip AFTER everything is rendered. And item overlapping cannot happen if item is rendered before the overlay is rendered... So, post your current code.
  13. Check if maxVien - minVien is negative. You might miswrite the parameters.
  14. No, it will solve this problem: http://i.imgur.com/Lqfv5jY.png + I said this thing wrong: You should render the item after the overlay is rendered. You should render item before the overlay is rendered. And, draw the tooltip after everything is rendered.
  15. You should render the item after the overlay is rendered.. There is no other way for this. + It would be your UV problem. Don't use drawTexturedModalRect. since it uses fixed u/x rate, it would use wrong UV and might cause problems like yours. Instead make your own version for that. There you should set the (u,v) to (0,1),(1,1),(1,0),(0,0).
  16. First, make a class implementing IMessage. Then put the packet bytestream reading/writing code into the fromBytes(read) and toBytes(write) in the class. (you should store fields like captainId and hookId in the class) and make another class implementing IMessageHandler, and in the method 'onMessage' do what you want when packet is received.
  17. How does your texture look like? Does it contain 4 images?
  18. Since the Gui is yours, You can just draw the overlay Gui after the main Gui is drawn, in the method 'drawScreen'.
  19. Did you build your mod via 'gradle build'?
  20. Probably it's because your ore is too rare to find. Try adjusting the chance value around 100.
  21. Is the render method being called?
  22. Yes it would. (Because the itemstack in crafting slot is a real stack, not ghost or something)
  23. If you got a crash, post the crash report.
  24. Of course you can do that. Use IRecipe to add NBT when crafted by player. (There is a tutorial for getting player from IRecipe in Tutorial section in this forum) And in addToolTip add the player name to the tooltip.
  25. Mainly api is for those who want compatibility, and dev is for those who want total addons. (AFAIK) Anyway You have to check the mod documentation, since there could be some exceptions.
×
×
  • Create New...

Important Information

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