
NuclearFej
Members-
Posts
72 -
Joined
-
Last visited
Everything posted by NuclearFej
-
Bump
-
I'm on 1.5.2, the DynamicTexture class doesn't exist (yet, I assume). The MapItemRenderer class seems to generate the texture on the fly, and I can't quite figure out how it works (sorry). Perhaps I'm looking in the wrong place. I want to draw images (other players' faces) on the overlay (with health bar, XP bar, etc). Is making a Texture the best way to do this? If not, what is? Thanks! EDIT: Here's what I think I should be doing, correct me where I'm wrong: I want to use drawTexturedModelRectFromIcon (sic) in the Gui class. In order to do that, I need to pass in an Icon. Of course I can't instantiate an Icon (basic Java) so I need to use the only class that implements it, TextureStitched. In order to use TextureStitched, I have to pass in a Texture in the init method. Thus, why I want to create a Texture. The easiest way to do this appears to be the makeTexture method in the TextureManager class, but I'm not sure what all of the parameters do - leading back to my initial question. Another way to do it is to use createEmptyTexture and then call transferFromImage on the resulting object, but then I still run into the same problem manifested differently: I don't know what the second or fifth parameters of that method do (although I'm pretty sure the second does nothing). While I'm at it: what do u and v refer to? (Take for example the method addVertexWithUV)
-
How would I go about that? I've looked through the code, only reference I can find is to the URL of the skin file. Where can I get the texture from (client-side)? Thanks!
-
I need to draw other players' faces from their skins.
-
Hey everyone. Basically all I want to do is to draw a BufferedImage to the screen. Here's the relevant section of my code: TextureManager.instance().makeTexture("playerFace" + e.getName(), 0, 8, 8, 0, 6408, 9728, 9728, false, e.getFace()).bindTexture(0); drawTexturedModalRect(0, 0, 0, 0, 8, ; I don't really understand what most of the parameters in the makeTexture method do (except for the width, height, and BufferedImage ones), nor the one in bindTexture. Can someone explain what each actually does? Additionally, as is, the code outputs this when run. I assume a problem with a parameter causes this: 2013-08-22 22:44:23 [sEVERE] [Minecraft-Client] ########## GL ERROR ########## 2013-08-22 22:44:23 [sEVERE] [Minecraft-Client] @ Post render 2013-08-22 22:44:23 [sEVERE] [Minecraft-Client] 1280: Invalid enum Thanks guys!
-
If you made edits into a base class, you have to inject bytecode for all modifications. You shouldn't do it half-way. Why (and how)? Is it absolutely necessary? I mean, if you can do this: why not avoid bytecode (and therefore being a coremod) alltogether? After all, if (and I totally believe you) why should I bother with it anyway? I'm not worried about compatibility.
-
Check line 22 in the TestOreWorldGen class. You need to put a (variable == null) or (variable != null) check in there to make sure the variable is never null. If you'd like a little more detailed help, can you post that class?
-
It would be a bit more helpful if you could post the entire error, not just that one line. Is there not a stacktrace? If not, check your logs.
-
You don't. Use the -Dfml.coreMods.load=MAIN_CLASS VM argument. The latter. If ModMetadata.description is null that happens. Thank you! Both of those suggestions worked. Please tell me if these definitions are wrong (seriously, I'd like to know): Mod: adds new classes, can inject bytecode Coremod: adds new classes and/or changes existing ones Although isn't the difference more or less history, as in 1.6 they became one and the same? I want to change existing classes. In fact, I have, and it works in Eclipse. What changes between the build environment and the "real world", so to speak? Additionally, why should I not make it a coremod? I don't quite follow, sorry. Thanks for the help, guys!
-
Can anyone answer my questions? Thanks!
-
Thanks for the help guys! Unfortunately from that problem comes three more.. 1. It does not load in Eclipse anymore. How can I fix it so that it will? The mod itself does load in the Minecraft client, the registerBus method is called as well as all of the initialization events, but... 2. If you click on the mod's name under the Mods menu, the game crashes with this stacktrace: as well as this: 3. If I attempt to run singleplayer (haven't tested multiplayer) a field which previously caused no problem (in Eclipse) no longer seems to exist. This is the stacktrace: Aimon is the name of the mod. currentClass is a field containing an enum type that I created. Why would it not exist? Because it is starting up, perhaps? No, wait, it can't be - the code has a check to make sure that the player isn't null. If the field was merely unpopulated, it would have been a NullPointerException, right? Why does the field not exist? The field is in the EntityPlayer class. Am I not allowed to add fields to Minecraft base classes? Thanks again!
-
Hey everyone. My problem probably isn't that hard to those of you with more experience than I. My coremod works just fine in Eclipse/MCP. How do I release it? I've created META-INF/MANIFEST.MF, it points to a dummy loader class (which implements IFMLLoadingPlugin, of course) which in turn points to the main mod class. I get a duplicate, though, as the @Mod annotation is still in there. I can see that it is replaced by the methods in the interface ModContainer, so I'm comfortable with getting rid of it, but what about the @NetworkMod annotation? How do I implement that in a coremod? I need to be able to point to my packet handler. But do tell me if I'm wrong - in a coremod, you don't use the @Mod, @NetworkMod or @Instance annotations, right? What about @Init, @PreInit, etc? Besides that, what do I need to do that Forge already does for you in a non-coremod? (Additionally, I get exceptions when I run the mod outside of MCP; this may or may not be related. I don't know.) Thanks for your help guys!
-
The block ID represents the type of block, not the block itself. For example, if you have four dirt blocks, they all have the same ID. I believe that you don't have to worry about the block IDs changing too much. If you call the getBlockId(x,y,z) method on dirt for example, whatever it returns will always equal Block.dirt.blockID.
-
[Advice] A known modder ripped off entire class files from my mod
NuclearFej replied to Vertice's topic in Modder Support
As SenpaiSubaraki said, it is your code and your copyright. You have plenty of options for recourse. (I am not a lawyer.) If he refuses to remove the code from the mod, you can sue him for quite a bit of money. Tell him that. It's not just an empty threat; you can find out his real name and location through a variety of means. Besides legal recourse, very few web hosts will host copyright-infringing material. You can get it taken down with a DMCA request (assuming the host is in the US). I don't know where it is hosted, but it is likely that the file host will stop hosting the files, whoever that may be. Just contact whoever hosts the files to get info. Edit: oh yeah, duh, just tell the community who it is that stole the code for now. Real easy, people will boycott that mod and ask for its removal if you present good evidence. -
This might be able to help: http://www.minecraftforum.net/topic/1365474-gui-tutorials/
-
No, it's quite new. To be honest, I don't know why it exists...can anyone offer some clarification on that?
-
This is not the place for individual mod support, this is support for people writing their own mods. That said, without the original modder's help, there isn't really much we can do.
-
You don't need to. Just use Entity.getEntityData() to get an NBTTagCompound. Then you can set your own custom tags (data) by calling methods on that object, like setString for example. Then you can use getString (or getInteger, or getIntArray, etc.) to get your custom data back. For another way to do it, check out this: http://www.minecraftforge.net/wiki/How_to_use_NBT_Tag_Compound
-
If you do not understand Java, I highly suggest you look at some tutorials. It is for your own benefit, and it will help you as a modder. You'll just "get" a lot more.
-
Why are you trying to save an entity? You probably do not need to. Only save the information you need. You can only save primitive Java types with a few exceptions.
-
You cannot pass in your Block. You must pass in one of the public Materials in net.minecraft.block.Material, as Chibill said, or you can create your own Material. It's much easier to do the former, of course. If you want to do the latter, just look at the javadoc for the Material constructor and ask if you still have any questions.
-
In your item constructor, put: LanguageRegistry.addName(this, "Your Item Name Here"); EDIT: Ah, wait, I missed a word - let me get back to you on this. EDIT 2: Check this out - it looks like you need to pass in the names one at a time while also passing in an ItemStack with the desired damage value: http://www.minecraftforge.net/wiki/Metadata_Based_Subblocks#Block_and_Language_Registration
-
When I run update_patches.bat, only commands.patch is updated. I assume this is wrong because none of my code is in the file. This is wrong, right? Of course, I had to change update_patches.bat because the paths were incorrect. I have a feeling that this is what is causing the problem. Of course, the script runs, but it only changes commands.patch. update_patches.bat: @echo off ..\mcp\runtime\bin\python\python_mcp update_patches.py ..\mcp . Output: Creating patches Creating commands.py patch Thanks for the info! EDIT: My apologies. I was running the wrong one.
-
I edit the patches, correct?
-
Check out ItemRecord.java, especially the onItemUse method. That is where the code for the built-in music discs is, so you should be able to extend that class in order to make your own.