Jump to content

N1xx1

Members
  • Posts

    41
  • Joined

  • Last visited

Everything posted by N1xx1

  1. Basically I just can't load a texture. This won't work: bindTextureByName("/n1xx1/stuff/landpaint.png"); This will: bindTextureByName("/terrain.png"); The file dimension are 96x96 and it's a png with alpha value. Also, it's not saying "missing texture" it just don't show up just like it's an empty texture. But, if I put my texture in the / directory it just work fine. Oh, and I'm using a zipped mod.
  2. Hello. I'm encountering some problems with GUI and Containers. Basically, my problem is that when I want to get some items from my inventory and put them wherever I want in the TileEntity or I want to move it inside my inventory strange things happen. A simple example: I have an item on ther fourth slot of my player inventory, I press that slot to move the item, and the as I do that the item return to the slot. I can't pick it in any way. But, if I have an item in the sixteenth slot, as I press the slot I get another item of 8 slots before, and when I place it down it behaves strangely. I think it's caused by some wrong communication between the local server and the client, but I don't know what is wrong. Some code: Well, I have no idea of what I'm missing... Thank you.
  3. You can use more than one bindTextureByName. Something like this: this.bindTextureByName("/myMod/Textures/blockPlate.png"); pM.renderAll(); this.bindTextureByName("/terrain.png"); pMM.renderAll();
  4. Ok, I've fixed it, thank you a lot. Basically you always have to add ".name" to the string when registering it. You don't have to put it when building the string in getItemNameIS.
  5. Hello everyone. I'm having some problems with addStringLocalizations with multiname blocks. When I'm adding localizations I use something like this: public void build(){ for(int i = 0; i < names.length; i++){ String buildedname = new StringBuilder() .append(MyMod.id) .append(".") .append(prefix) .append(".") .append(names[i].replace(' ', '_').toLowerCase()) .append(".name") .toString(); LanguageRegistry.instance().addStringLocalization(buildedname, "en_US", names[i]); } } Where prefix e MyMod.id are Strings and names is an array of Strings containing block names. In the ItemBlock I'm using something like this: @Override public String getItemNameIS(ItemStack is){ String buildedname = new StringBuilder() .append(MyMod.id) .append(".ore.") .append(MyMod.instance.oreItemNames[is.getItemDamage()].replace(' ', '_').toLowerCase()) .append(".name") .toString(); return buildedname; } The problem is that minecraft won't display names. I've already checked if the builded localizations are equals and if the ItemBlock is actually used. Also my game is running in English. Thank you all.
  6. Lex is talking about reflection. http://java.sun.com/developer/technicalArticles/ALT/Reflection/
  7. In renderWorldBlock you get metadata too, so you can add different bounds. About TileEntity Renders you should get at last the block posotion so you can get metadata. Good luck.
  8. Well, forge checks if the texture was already loaded, so there shouldn't be any lag problems.
  9. You can preload several times the same texture without problems. If you really want to check all the textures being loaded you can add a ITextureLoadHandler to your mod class.
  10. Ehm.... Where did you put the texture file?
  11. Fire in minecraft has a custom renderer, and also, the texture is generated during the game load. Go check TextureFlamesFX.java. Quite complex code, and I don't know what to edit to change the color D:
×
×
  • Create New...

Important Information

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