Abastro
Forge Modder-
Posts
1075 -
Joined
-
Last visited
-
Days Won
2
Everything posted by Abastro
-
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)
-
Does this line: System.out.println(9+ext.getCurrentSkillLevel(SpellLib.LUMOS)) always gives value over 9?
-
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.
-
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.
-
Just make your own Event class, and post instance of the event when it is needed.
-
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?
-
How do I get the EntityPlayer on the Server Side?
Abastro replied to ashjack's topic in Modder Support
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'. -
How do I get the EntityPlayer on the Server Side?
Abastro replied to ashjack's topic in Modder Support
Yes, because you might have gone to wrong direction. As diesieben said, it seems that you even don't need the player instance. -
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.
-
[1.7.10][Solved]GUI that chnges tile entity variables doesn't work
Abastro replied to Enginecrafter's topic in Modder Support
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. -
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?
-
[1.7.10][Solved]GUI that chnges tile entity variables doesn't work
Abastro replied to Enginecrafter's topic in Modder Support
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. -
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.
-
[1.8] Need help with Custom Projectile rendering
Abastro replied to SteveKunG's topic in Modder Support
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. -
[1.8] Need help with Custom Projectile rendering
Abastro replied to SteveKunG's topic in Modder Support
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? -
How do I get the EntityPlayer on the Server Side?
Abastro replied to ashjack's topic in Modder Support
So it just go to a block that any player would interacted in any time? then I was wrong. -
[1.7.10] How do I load an external texture onto an Entity?
Abastro replied to ashjack's topic in Modder Support
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. -
Auto-Smelting Tools Event Handler Help [SOLVED]
Abastro replied to rustyminer28's topic in Modder Support
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. -
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.
-
How do I get the EntityPlayer on the Server Side?
Abastro replied to ashjack's topic in Modder Support
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. -
[1.7.10] How do I load an external texture onto an Entity?
Abastro replied to ashjack's topic in Modder Support
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. -
How do I get the EntityPlayer on the Server Side?
Abastro replied to ashjack's topic in Modder Support
It sounds like it could be wrong. Can you specify why you need player when it spawns?