
LordMastodonFTW
Members-
Posts
129 -
Joined
-
Last visited
Everything posted by LordMastodonFTW
-
Hello, does anyone know of a way I could make a model for armor using GL? I know there is a tutorial for 1.7, but from what I saw it supported 1.6, not 1.7. In addition, it used Techne and I'd rather use GL.
-
You are literally missing a t in the name of the textures folder in the assets directory. That is all.
-
[1.7.10] Golden apple equivelent - Potion effects HELP
LordMastodonFTW replied to untamemadman's topic in Modder Support
Also, just as a side note, there are much better/simpler/cleaner ways to deal with unlocalized names than Pahimar's. Like this one, created by diesieben: public void setBaseName(String base) { setBlockName(MyMod.MOD_ID + "." + base); setBlockTextureName(MyMod.MOD_ID + ":" + base); } -
[1.7.10] Golden apple equivelent - Potion effects HELP
LordMastodonFTW replied to untamemadman's topic in Modder Support
Sorry to beat a dead horse, but it has to be done. How does the golden apple do it? I'm going to give you a hint because you are not getting it. The name of the method you should be implementing starts with on and ends with Eaten. Those are the hints you will be getting, do with them what you will. -
Ok, I'll admit I expected a teensee bit of copy/paste, but I thank you for not giving it to me. I have now learned more than if I had copy/pasted. I think my main problem was figuring out where to throw the exception to open the GUI. However, I have now solved the problem with your help, so if you could lock the thread I would be grateful.
-
[1.7.10] Golden apple equivelent - Potion effects HELP
LordMastodonFTW replied to untamemadman's topic in Modder Support
Again, I have worded it wrong. I never meant new World instance specifically, I meant new instance of the file itself, not the World file. Please forgive me for being a n00b at English. -
If you would like, I can give you an example of a block that on placed would summon gag blocks wherever they needed to be. The way I did it was create an Item, and on right click the item would place the gag blocks, but I'm pretty sure it wouldn't be that hard to change over the code from onItemRightClick to onBlockAdded.
-
. I KNOW this is not a a java support forum, and I didn't expect this to be one. I asked a question about forge, and I expected some actual help, instead of "Go learn java" and such. I expected "You should throw that here, because this is how it works." or something helpful like that. Not a 40 reply long debate over whether or not I know myself where I should throw it. If I knew where I should throw it, WHY WOULD I BE ASKING YOU? Listen to your actual logical sense. If I knew where and what and how and everything I should be doing, then I wouldn't have asked for help on this forum, now would I? You have provided me with nothing but cryptic answers that state that I should be throwing it, and I'm not. Now, since I obviously do not know what I should be doing, I'M ASKING YOU. You are telling me to go to a java support forum, since apparently it is INCREDIBLY hard to just type out what I'm doing wrong and what I SHOULD be doing. I guess it's a lot easier to think of cryptic answers than just blatantly writing what I should be doing. Please explain to me why it was so hard to tell me what to do, so that I can just grasp the logic in a 40-reply debate. I'm not complaining about getting pointed in the right direction by LexManos, he actually provided useful information. I'm just saying that a 40-reply debate could have been completely avoided if diesieben had simply provided the answer, instead of telling me to go learn java. LexManos didn't understand that I don't know java too well, and therefore provided an answer that was short, concise, and helpful. Yes, much of the confusion did arise because I did not understand much about these GuiScreens, being new to them. Diesieben most of the time provided answers that pointed me in the correct direction, however did not for some reason lead me to the answer. Had he, after being informed that I do not know exceptions, provided me with the answer, he would have rendered himself much more helpful.
-
[1.7.10] Golden apple equivelent - Potion effects HELP
LordMastodonFTW replied to untamemadman's topic in Modder Support
Just recreate the file structure, or make an instance of the file that add the method. -
Solved it. Many thanks to your help. NOT.
-
But WHERE/HOW do I throw it?
-
[1.7.10] Golden apple equivelent - Potion effects HELP
LordMastodonFTW replied to untamemadman's topic in Modder Support
It means it's probably a private method. You could try recreating the original Golden Apple file structure and using that. -
If you don't manage to get it bigger than one block, try making the placement of one block place multiple blocks using world.setBlock and then cancel the default onBlockHighlightedEvent, and make a new one to make it seem like it's bigger than one block, when it's really not. If you're trying to make it something like 1.4 blocks wide, then you will have to make multiple block types.
-
[1.7.10] Golden apple equivelent - Potion effects HELP
LordMastodonFTW replied to untamemadman's topic in Modder Support
Do it the same way Golden "Notch" Apples do it. -
Then can you at least tell me what I should be doing? I will go look at a tutorial later today, as I have something I need to do now, but at least let me know how I can fix my problem.
-
It's actually quite simple. In your block class's constructor, type: this.setBlockBounds(minX, minY, minZ, maxX, maxY, maxZ); This is the simplest way of doing it. Please note, do not actually write minX and such, write the actual numbers you would like. There are definitely much better ways of doing it, like this one: public AxisAlignedBB getCollisionBoundingBoxFromPool (World w, int x, int y, int z) { setBlockBounds(minX, minY, minZ, maxX, maxY, maxZ); return AxisAlignedBB.getBoundingBox(x + this.minX, y + this.minY, z + this.minZ, x + this.maxX, y + this.maxY, z + this.maxZ); } @SideOnly(Side.CLIENT) public AxisAlignedBB getSelectedBoundingBoxFromPool(World w, int x, int y, int z) { setBlockBounds(minX, minY, minZ, maxX, maxY, maxZ); return AxisAlignedBB.getBoundingBox(x + this.minX, y + this.minY, z + this.minZ, x + this.maxX, y + this.maxY, z + this.maxZ); } If you would like to set the bounds based on metadata: public void setBlockBoundsBasedOnState(IBlockAccess iba, int x, int y, int z) { float pixel = 1F/16F; if(iba.getBlockMetadata(x, y, z) < metadataYouWouldLike) { this.setBlockBounds(pixel*4, 0, pixel*4, 1-pixel*4, 1, 1-pixel*4); } else { this.setBlockBounds(0, 0, 0, 1, 1, 1); } } So, as you can see, it is not too difficult. After you have done that, simply render the block to be more than 16 pixels in your render file and you are good to go.
-
I know the part about exceptions. They are thrown most of the time in a try/catch statement. The are basically the boolean of try/catch statements and if the catch part of the statement happens you can use the exception to log what went wrong and things like that. Another way to describe them is the else of an if statement. However, you said specifically not to use a try/catch statement inside my invalidFingerprint method, so the only other option I could think of is throwing the exception off of the class, which doesn't make sense because the code inside of there would never be fired.
-
The invalidFingerprint method throws the exception right after the first line, can't you see it? It specifically says, "throws CustomModLoadingErrorDisplayException". If there is any other place where I should be doing this, please let me know.
-
Aha. Yes, I do agree with you diesieben, that is much cleaner and simpler. Pahimar's version adds a lot of confusing methods, and he does not explain them very well, to his detriment. I still do not understand why that substring hackyness is even there. Seppitm, use the method diesieben just described, as mine/Pahimar's is much more confusing.
-
Ok, I understood that part about the buttons, I already knew that, but either it's not throwing the exception even though it's printing the log, or I'm missing something completely. Here's my new code: public class GuiInvalidFingerprint extends CustomModLoadingErrorDisplayException { @Override public void initGui(GuiErrorScreen errorScreen, FontRenderer fontRenderer) { } @Override public void drawScreen(GuiErrorScreen errorScreen, FontRenderer fontRenderer, int mouseRelX, int mouseRelY, float tickTime) { errorScreen.drawDefaultBackground(); errorScreen.drawCenteredString(fontRenderer, "Invalid Fingerprint Error!", errorScreen.width / 2, errorScreen.height - 60 + 20, 16777215); errorScreen.drawString(fontRenderer, "Your mod 'Atomic Fusion' seems to have", errorScreen.width / 2 - 140, errorScreen.height - 60 + 60, 10526880); errorScreen.drawString(fontRenderer, "an invalid fingerprint. This means that", errorScreen.width / 2 - 140, errorScreen.height - 60 + 60 + 18, 10526880); errorScreen.drawString(fontRenderer, "in all likelihood, this version has been", errorScreen.width / 2 - 140, errorScreen.height - 60 + 60 + 27, 10526880); errorScreen.drawString(fontRenderer, "tampered with, and may contain a virus.", errorScreen.width / 2 - 140, errorScreen.height - 60 + 60 + 36, 10526880); errorScreen.drawString(fontRenderer, "It is suggested that you download it again", errorScreen.width / 2 - 140, errorScreen.height - 60 + 60 + 45, 1025880); errorScreen.drawString(fontRenderer, "from the official site, which can be found", errorScreen.width / 2 - 140, errorScreen.height - 60 + 60 + 54, 1025880); errorScreen.drawString(fontRenderer, "under 'Atomic Fusion', in the 'Mods' page", errorScreen.width / 2 - 140, errorScreen.height - 60 + 60 + 63, 1025880); errorScreen.drawString(fontRenderer, "of your startup screen.", errorScreen.width / 2 - 140, errorScreen.height - 60 + 60 + 72, 1025880); } } And the invalidFingerprint method: @EventHandler() public void invalidFingerprint(FMLFingerprintViolationEvent e) throws CustomModLoadingErrorDisplayException { if (References.FINGERPRINT.equals("FraWrk273tx9")) { LogHelper.info(Messages.CORRECT_FINGERPRINT_MESSAGE); } else { LogHelper.warn(Messages.INVALID_FINGERPRINT_MESSAGE); } }
-
[1.7.10] Issues with Pipe connections (mechanical)
LordMastodonFTW replied to Minothor's topic in Modder Support
Didn't really think of that, thanks for bringing that up. In that case, it is probably not a good idea to do it specifically the way I pseudo coded it, maybe have the renderer rely on the mechanical connection, but it probably would be a good idea to find some way to get the code to realize that in the event of either connection not happening, make it happen so that things work. -
Ahhh. Yes, that makes a lot more sense. StatCollector.translateToLocal(unlocalizedName) is definitely the way to go. However, having looked at the source, I don't completely understand how that method works, but I guess it does. @diesieben07: Yes, I know that code is from Pahimar. It just works so well that I showed it to seppitm. What's so BS about it?