SHsuperCM
Members-
Posts
264 -
Joined
-
Last visited
-
Days Won
1
Everything posted by SHsuperCM
-
It's ok, I think I'm on to something, testing now and will post here the solution for anyone that needs..
-
Ok, so I wrote this: public void drawSplitString(FontRenderer fontRenderer, String str, int x, int y, int wrapWidth, float size, int textColor) { GL11.glScalef(size,size,size); float mSize = (float)Math.pow(size,-1); fontRenderer.drawSplitString(str,x,y,wrapWidth,textColor); GL11.glScalef(mSize,mSize,mSize); } inside the GuiScreen extension and put in GuiQuestBook this: this.drawSplitString(mc.fontRendererObj,showedQuest.getQuestDescription(),(this.width / 2) - 102,160,225,0.9f,Integer.parseInt("FFFFFF",16)); and it produced: Any ideas on how to fix it? EDIT, for some reason refreshing made up this: and now the text looks wierd..
-
Ok, so I have GuiQuestBook.class that has some information in it like quests' names, levels, difficulty etc.. What it also has is a description that changes while doing the quest(it tells usally what to do), The problem is, the gui has a texture which is limited in size and some of the descriptions go beyond the texture. So, as the title might suggest, I'm trying to do a word wrap to keep the description within the texture. I've tried looking for ways to do it but found nothing that works.. One thing to keep in mind is that im scaling the text also using GL so I need it to work with any scale multiplier, I wrote this method on my GuiScreen extension: public void drawString(FontRenderer fontRendererIn, String text, int x, int y, float size, int color) { GL11.glScalef(size,size,size); float mSize = (float)Math.pow(size,-1); this.drawString(fontRendererIn,text,x,y,color); GL11.glScalef(mSize,mSize,mSize); } The width I'm aiming for with this is 225 pxls and the scale size I'm using is 0.9f btw..
-
From what I understand, FML is supposed to make sure all mods can work together by adding its own ways of adding stuff..... I want to add a button element to the "esc menu" of the game that I can direct to my own gui.... The only way I know of to do that is by listening to gui changes and checking for that gui, then overriding it with my own clone of it... I looked a bit online with no luck of finding any answer so I came to the forum as usall...
-
Forge Server Offline Mode - How protect accounts?
SHsuperCM replied to RuizOrc's topic in General Discussion
One thing you can do which is what I'm doing, Is make a dummy mod that does nothing for both server and client and make it so the server requires the mod to connect(built in with an universal mod) and only the friends have the mod.. its not that difficult as a hacker to still just make a mod with the same modID because it says it when you join without an modID I'm pretty sure.. but still you can do alot with verifying that way... -
[1.10.2] Save NBT on a file in the world(Changed Subject Later)
SHsuperCM replied to SHsuperCM's topic in Modder Support
I attempted again and again for the past days and couldnt figure it still.. I think ill just go with my previous plan which is using the achievement system to Do this... I dont know why capabilities are do hard to use really, usally i learn these things really quickly.. -
[1.10.2] Save NBT on a file in the world(Changed Subject Later)
SHsuperCM replied to SHsuperCM's topic in Modder Support
Do I use the Entity provider is what you mean? -
[1.10.2] Save NBT on a file in the world(Changed Subject Later)
SHsuperCM replied to SHsuperCM's topic in Modder Support
But I'm stupid.... I need to see a code's prespective of using the providers to capabilities Sadly I also need to leave the DEV pc for an hour or 2.... I'll try to awnser stuff from my phone I guess... -
[1.10.2] Save NBT on a file in the world(Changed Subject Later)
SHsuperCM replied to SHsuperCM's topic in Modder Support
Do I need ICResearch to extend a custom provider? If so, what's a valid capability provider? -
[1.10.2] Save NBT on a file in the world(Changed Subject Later)
SHsuperCM replied to SHsuperCM's topic in Modder Support
First off, Thank you so very much for taking your time to explain this! It means alot to me that there is someone that is willing to help.. Now, I've read what you said about 4 times, Repeating sections again and again.. But I still struggle to understand.. Do I need to make a custom CapabilityProvider? How? Do I need to attach the Capability some how to the CapabilityProvider? How? Can you explain what you mean by "implementation of an interface"? I probably know this but dont know how its called... Do you know of any open source mods that do this? Let's say, Add an Capability to the Player/manipulating it/checking for it's values? I belive this is a "valid" capability? public interface ICResearch{ boolean getMainResearch(); } -
[1.10.2] Save NBT on a file in the world(Changed Subject Later)
SHsuperCM replied to SHsuperCM's topic in Modder Support
I really cant understand it! Please just give me a video that explains it really! Capabilities seem so complicated for me! -
[1.10.2] Rendering an EnchantmentTable book with diffrent texture
SHsuperCM replied to SHsuperCM's topic in Modder Support
Nvm, im a bit stupid... In class breaks i was coding on my laptop and figured it all.. Exactly what i needed! Apperently it was a text but the renderer type said enum model which is what confused me... I uses the bind TE to renderer and it works! Thanks anyways! Closed Btw im typing from my phone and its really hard -
[1.10.2] Rendering an EnchantmentTable book with diffrent texture
SHsuperCM replied to SHsuperCM's topic in Modder Support
In minecraft it is a tile entity and i copied almost everything except i found there is a renderer class that i dont know how to register... -
When I build my mod, retromapReplacedMain (82%) Doesn't stop.
SHsuperCM replied to Wraithcraft's topic in Modder Support
Maybe some information please? How would anyone help with what you just said? How'd you build? How'd you setup the workspace? Maybe a problem in main class? Show the main class maybe? -
What Issues do you have? Im using idea and it world perfectly... You maybe want me to explain what im doing?
-
[1.10.2] Rendering an EnchantmentTable book with diffrent texture
SHsuperCM replied to SHsuperCM's topic in Modder Support
Im going to school now so i cant code :'( (From phone) But i started to copy stuff from the block and the tile entity... Is that all i need? Do i need something else to register it? -
First off I'd like if someone directed me to a good up to date achievement tutorial, That'd be lovely! Now, In alot of mods they have their custom tab in the achievement book and I want to make sure that my achievements have their own tab.. Secondly, I want an block to view achievements select them and "buy" them with EXP, I'll probably look at how the achievement gui does that but just to note that.. Now lastly I'll want to read if player got X achievement in another block, Should be noted that the second block will "craft" stuff but will agree with the server if the player unlocked the matching achievement for it... TNX for anyone willing to help!