Jump to content

GnRSlashSP

Members
  • Posts

    33
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by GnRSlashSP

  1. Ok, I got it working!!! This is what I did: I put a file named entitytest.png inside textures/entities/ of my jar User will put a new texture in this folder .minecraft\ When he clicks the button, I execute this piece of magic code: String textureName = "entitytest.png"; File textureFile = null; try { textureFile = new File(Minecraft.getMinecraft().mcDataDir.getCanonicalPath(), textureName); } catch (Exception ex) {} if (textureFile != null && textureFile.exists()) { ResourceLocation MODEL_TEXTURE = Resources.OTHER_TESTMODEL_CUSTOM; TextureManager texturemanager = Minecraft.getMinecraft().getTextureManager(); texturemanager.deleteTexture(MODEL_TEXTURE); Object object = new ThreadDownloadImageData(textureFile, null, MODEL_TEXTURE, new ImageBufferDownload()); texturemanager.loadTexture(MODEL_TEXTURE, (ITextureObject)object); return true; } else { return false; } Where Resources.OTHER_TESTMODEL_CUSTOM is new ResourceLocation(lostworld.lib.References.MODID,"textures/entities/entitytest.png"); ;) ;)
  2. Look, I am creating a Techne like program but inside Minecraft, using Minecraft features. It is working well but I need to refresh texture of the model that I am creating without reloading all minecraft textures.... I am thinking in this possibility: keep a custom.png file inside my mod. When a user clicks my button, I will read the custom.png file from .minecraft\custom.png and replace the ResourceLocation without changing the custom.png file inside my jar file. I am trying to figure out a more basic method to acomplish this, I really don't want to build a lot of code or refresh an entire resource pack just for one texture. I will keep searching and trying methods like these: texturemanager.deleteTexture(MODEL_TEXTURE); Object object = new ThreadDownloadImageData(textureFile, null, MODEL_TEXTURE, new ImageBufferDownload()); texturemanager.loadTexture(MODEL_TEXTURE, (ITextureObject)object); If someone has a new idea, please tell me. I'll appreciate. Thanks †GnR† Slash
  3. I made a GUI where the player can click a button to reload texture. What I want is that the button will load a texture called testmodel.png inside .minecrat folder Every time the user change the texture using Paint.NET, put the texture at this folder and click this button, the texture must be loaded and my mob need to refresh the texture to the new edited one. Any ideas to guid me on this? I think it doesn't matter if the texture will be on a single png file or inside resourcepack, what I really need is to load this new edited texture every time player clicks the button, without the need of restarting minecraft. just read and refresh it on-line Thanks
  4. Hey guys, I am wondering if it is possible to teleport a mob to a custom dimension installed by another mod. I already have mobs teleportation working but only for my dimension... And, another question that I have....... Why portals only teleport players entities and no other creatures? I created a portal that teleports any entities that collided with it and works perfectly... that is a strange face of minecraft behavior lol.
  5. This could be simple, but it will be complex. I think that i should not use sockets or even delay the action inside onItemPickup. I already create a method to segregate things, but it is far away from CreativeTabs groups. Example: how to determine if an item is a weapon? This can't be done without creativeTab information. Look this: isTool = item instanceof ItemTool; isArmor = item instanceof ItemArmor; isPotion = item instanceof ItemPotion; isBlock = item instanceof ItemBlock; isFood = item instanceof ItemFood; There is no "instance of ItemWeapon", and I can't segregate by its material (there is no sense). I still believe that using creativeTabs is the best way to segregate items using built-in Minecraft methods. Please, consider my request. Thanks ps: the mod I am working on is the Simplifier. I created a new item named Auto Bag. Every item that user picks is automatically saved inside these bags, and now, i want to create a way to organize them. This is the link of working version with of Auto Bag (not categorized yet): http://www.minecraftforum.net/topic/1803170-151sspsmpforge-simplifier-made-to-be-easier/
  6. I have just one chance inside onItemPickup, can't delay the action. But if you can set creativeTab, i think would be logic if you can read too. Well. I'll think how to segregate itens another way...will not be not easy because there is no other propertie like creativetab that's already a native way to segregate them.
  7. It is because i am using this: @ForgeSubscribe public void onItemPickup(EntityItemPickupEvent event) { And this forge subscribe is server side. I am organizing item when player picks them up, but there is no creativetabs server side
  8. Hi! I noticed that getCreativeTab in Item class is Client Sided: @SideOnly(Side.CLIENT) /** * gets the CreativeTab this item is displayed on */ public CreativeTabs getCreativeTab() { return this.tabToDisplayOn; } And the getTabIconItemIndex too: @SideOnly(Side.CLIENT) /** * the itemID for the item to be displayed on the tab */ public int getTabIconItemIndex() { return 1; } I made a mod that need to segregate Items based on which creativeTab it belongs to, this way: itemCategoryIconIndex = itemstack.getItem().getCreativeTab().getTabIconItemIndex(); This is the only way i found to segregate items and maintain Minecraft behavior. Could you help with this making these functions not sided? Thanks Slash
×
×
  • Create New...

Important Information

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