Jump to content

Abastro

Forge Modder
  • Posts

    1075
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by Abastro

  1. So you want to know how to setup your addon development environment? Here is an easy(probably easiest) way: Just make folder named 'libs' in your project directory and put the mods on which you want to build addon. Then just 'gradle setupDecompWorkspace eclipse' (or idea, if you are using Intellij)
  2. Does this line: System.out.println(9+ext.getCurrentSkillLevel(SpellLib.LUMOS)) always gives value over 9?
  3. There is ItemStack version of getItemStack in the Item class: public ItemStack getContainerItem(ItemStack itemStack) You can use it to migrate/modify NBT of the container item.
  4. You should not ever use client-only methods/class if it is neither in proxy nor with sideonly annotation, even if you have something like if(worldObj.isRemote). Although it would never be called, The code snippet will be loaded anyway. I recommend you to move the EntityFX spawning code into the proxy class.
  5. Just make your own Event class, and post instance of the event when it is needed.
  6. Post the Cbronzeblock class code, since the problem is there.
  7. You cannot do that for block texture, since direct GL calls are prohibited in 1.8 You should find another way.. So why do you have to draw my texture as full bright?
  8. Override onRightClick in Item class, and just return itemstack with the other item in the method.
  9. Your question was : 'How do I get the EntityPlayer on the Server Side?' I think it is definitely related with 'You don't even need to get the EntityPlayer for what you want'.
  10. Yes, because you might have gone to wrong direction. As diesieben said, it seems that you even don't need the player instance.
  11. Does your mod get loaded after the Thaumcraft mod loaded? You should make your mod loaded after Thaumcraft if you want to add the recipe on the preInit.
  12. You just need to follow some tutorials.. There are tons of tutorials about containers and guis for basic tileentity on Internet. Just take one and follow that.
  13. It's because it is not enough. You should set up your own Container class and Gui class, and You should make the GuiHandler give the Container in getServerGuiElement, and the Gui in getClientGuiElement! Seriously, did you look into any Gui tutorial?
  14. What.. You should use this method: 'EntityPlayerMP#openGui', because it needs interaction between the Server World and the Client. As you already set up your Gui Handler, what you need to do is just setting your container for the PasswordLockScreen.
  15. You should understand what you are doing before coding... GuiHandler should exist on both Server side and Client side. So you should not have it in your ServerProxy.. I already said, you should make an independent GuiHandler class implementing IGuiHandler.
  16. You should not copy-paste the code unless you know what the code does and what you are doing.. So what shape do you want? And check if doRender code has been called. If it is not getting called, then it is regardless of the model code.
  17. 1. Has the method 'doRender' been called? 2. GlStateManager.scale(-1.0F, -1.0F, 1.0F); will invert the model and would result in not rendering the inverted faces. Why did you scaled it -1.0?
  18. So it just go to a block that any player would interacted in any time? then I was wrong.
  19. It is the mcDefaultResourcePack field on Minecraft class. Since it is private, you need reflection for that. And there is FileResourcePack and FolderResourcePack, they would be useful for your needs.
  20. 1. Do not register the eventhandler to the event bus if it is unnecessary. You just need to register it on the MinecraftForge event bus. 2. Please post the code related with your tools. The problem might be from there.
  21. Like this??? public void registerNetworkStuff(){ NetworkRegistry.INSTANCE.registerGuiHandler(MainRegistry.modInstance, new GuiHandler()); } within the server proxy? Here is the full server proxy class: public class ServerProxy implements IGuiHandler { public void registerRenderThings() { } public int addArmor(String armor) { return 0; } public void registerNetworkStuff(){ NetworkRegistry.INSTANCE.registerGuiHandler(MainRegistry.modInstance, new GuiHandler()); } public void registerTileEntities(){ GameRegistry.registerTileEntity(TileEntityGemSmelter.class, MainRegistry.MODID); } @Override public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) { // TODO Auto-generated method stub return null; } @Override public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) { // TODO Auto-generated method stub return null; } I don't realy know what to do with the last two methots, so i left them blank for now, Is that the problem? What.. Gui Handler Should be on the Both Side! But you implement the interface on ServerProxy.. You should make an independent class implementing IGuiHandler. + And you hadn't ever set up the handler, it shouldn't be just returning null! So the exception is a matter of course.
  22. So when the NPC needs the player, it follows the way to a player? Then you should need nearest player. If it is not the case, please specify when it needs to call a player and why. In any case, I'm sure that choosing random player would be really bad idea.
  23. You should teleport the player to the another dimension when he/she got to the boundary of the world.. It would be really wonky so don't do that when it is unnecessary. So why do you need dimensions to be 'side by side'?
  24. You need an IResource implementation to load an external resource and add it to the defaultResourcePack. You may need some reflection stuff to reach the field. and I strongly recommend making your own folder in the minecraft directory, since putting in mods folder would break some mods.
  25. It sounds like it could be wrong. Can you specify why you need player when it spawns?
×
×
  • Create New...

Important Information

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