Jump to content

Add textures without modifying minecraft.jar - Modding Questions


Recommended Posts

Posted

Hello everybody, omnee here. So my main question is, how do I add textures to my forge mod without having to modify the minecraft.jar? I want to do this because I know modifying the jar can get quite frustrating and annoying, so hopefully, somebody can tell me how to do this, like all those awesome mods where you just drag the zip and boom, done...

The code I am currently using is:

	 @Override
 public void registerRenderThings(){
	 MinecraftForgeClient.preloadTexture("/omnee/MineScape");
 }

Or we can say, that's the only important part.

 

Now my second question... So I started this mod in a mod_MineScape class in common.net.minecraft.src.mod_Minescape, now, will this work just like the awesome mods where you just drag a zip file in the mods folder and your done? Pheraps you have to make your own package? I did make 2 packages but only for the Proxy, one in client and one in common... If it does work, can somebody explain me how to get the zip file, is it just compressing all the class files into a zip file and putting it in the mods folder?

Posted
  On 10/9/2012 at 8:46 PM, omnee said:

how do I add textures to my forge mod without having to modify the minecraft.jar?

You just add the textures to the final zip after you have recompiled it for release.

Another option if you REALLY want to if to add a texture pack including the textures in the correct folders

 

 

  Quote

So I started this mod in a mod_MineScape class in common.net.minecraft.src.mod_Minescape, now, will this work just like the awesome mods where you just drag a zip file in the mods folder and your done? Pheraps you have to make your own package? I did make 2 packages but only for the Proxy, one in client and one in common... If it does work, can somebody explain me how to get the zip file, is it just compressing all the class files into a zip file and putting it in the mods folder?

 

It should work just having it in its own package but if you REALLY want to (not recommended), you can have it in "net.minecraft.src" package. just make sure that the line at the top of the class says the correct package that its in.

 

Getting the zip file?? Yup, recompile all the class files in the "reobj" folder making sure the file structure is correct (ie. common SHOULDNT be at the top of the zip folder structure, it should start one below that)

Posted

to add textures to new blocks, you need to do a

 

public String getTexturefile(){
     return "/ExampleFolder/TextureFile.png";                          //starts with MCP/eclipse/Minecraft/bin
}

 

this will be inside the class with your item/block

NOTE: you must put .png

          if you have multiple blocks/items in a single class, you could do

 

public String getTexturefile(){
if(this.blockID == mod_Examplemod.ExampleBlock.blockID){

     //blockID could be this.shiftedIndex if its an item
     return "/ExampleFolder/TextureFile.png";                          //starts with MCP/eclipse/Minecraft/bin
}else
if(this.blockID == mod_Examplemod.ExampleBlock2.blockID){
     return "/ExampleFolder/TextureFile2.png"
}
}

 

So, if you wanted an 257 blocks in 1 class, you could have that do

if(this.blockID <= mod_Examplemod.ExampleBlock256.blockID && this.blockID >= mod_Examplemod.ExampleBlock.blockID){
     return "/Hi.png";
} else
if(this.blockID >= mod_Examplemod.ExampleBlock257.blockID && this.blockID <= mod_Examplemod.ExampleBlock512.blockID){
     return"/Hi2.png";
}

Hope this helps!

The Korecraft Mod

Posted
  On 10/10/2012 at 12:36 AM, zjohn4 said:

  Quote

So I started this mod in a mod_MineScape class in common.net.minecraft.src.mod_Minescape, now, will this work just like the awesome mods where you just drag a zip file in the mods folder and your done? Pheraps you have to make your own package? I did make 2 packages but only for the Proxy, one in client and one in common... If it does work, can somebody explain me how to get the zip file, is it just compressing all the class files into a zip file and putting it in the mods folder?

 

It should work just having it in its own package but if you REALLY want to (not recommended), you can have it in "net.minecraft.src" package. just make sure that the line at the top of the class says the correct package that its in.

 

Getting the zip file?? Yup, recompile all the class files in the "reobj" folder making sure the file structure is correct (ie. common SHOULDNT be at the top of the zip folder structure, it should start one below that)

 

Do you even know what you are talking about? It IS recommended to make your own package, and when you do, you should put it into the .zip/.jar like this: For instance, take the package ebilkill.mods.minecraft.crosstheline; Then it's be like this:*root of archive*/ebilkill/mods/minecraft/crosstheline/*all files in this package*

Hope this helps you.

 

The textures should be added to the path you specified (/omnee/MineScape I think there should be a .png after that though) inside the root of the .zip/.jar, like this: *root of archive*/omnee/MineScape(.png?). I hope your texture is a .png, because it won't work if it isn't.

Posted
  On 10/10/2012 at 5:56 AM, Ebilkill said:

  Quote

  Quote

So I started this mod in a mod_MineScape class in common.net.minecraft.src.mod_Minescape, now, will this work just like the awesome mods where you just drag a zip file in the mods folder and your done? Pheraps you have to make your own package? I did make 2 packages but only for the Proxy, one in client and one in common... If it does work, can somebody explain me how to get the zip file, is it just compressing all the class files into a zip file and putting it in the mods folder?

 

It should work just having it in its own package but if you REALLY want to (not recommended), you can have it in "net.minecraft.src" package. just make sure that the line at the top of the class says the correct package that its in.

 

Getting the zip file?? Yup, recompile all the class files in the "reobj" folder making sure the file structure is correct (ie. common SHOULDNT be at the top of the zip folder structure, it should start one below that)

 

Do you even know what you are talking about? It IS recommended to make your own package, and when you do, you should put it into the .zip/.jar like this: For instance, take the package ebilkill.mods.minecraft.crosstheline; Then it's be like this:*root of archive*/ebilkill/mods/minecraft/crosstheline/*all files in this package*

Hope this helps you.

 

The textures should be added to the path you specified (/omnee/MineScape I think there should be a .png after that though) inside the root of the .zip/.jar, like this: *root of archive*/omnee/MineScape(.png?). I hope your texture is a .png, because it won't work if it isn't.

 

I think he meant like: It is recomended to make your own package, But if you don't want you can do it on net.minecraft.src (wich isn't recomended)

 

I only coded ModLoader and noLoader before, this is my very first time codding with Forge, and all this "@" thingies are quite getting me confused, but I will get how this works better someday, anyway, thanks SO MUCH guys... I will try to do it now, thanks SO much :)

Posted

Sorry for double post!

 

So I did everything, except, when I add the "omnee" folder to "jars/bin/minecraft.jar" it get's an error when I try to run minecraft with eclipse, btw, all my pictures are inside that omnee folder...

 

So... I tried to compile it, reobfuscate it, and zipped it like this: Created zip file, added minecraft folder from reobfuscate, some other class files and omnee folder too... And I get a zip with minecraft, class files and omnee in it, but when I try to add it to "mods" inside a client with Forge installed I get an error... Can somebody help me with this?...

Posted
  On 10/11/2012 at 1:25 PM, omnee said:

Sorry for double post!

 

So I did everything, except, when I add the "omnee" folder to "jars/bin/minecraft.jar" it get's an error when I try to run minecraft with eclipse, btw, all my pictures are inside that omnee folder...

 

So... I tried to compile it, reobfuscate it, and zipped it like this: Created zip file, added minecraft folder from reobfuscate, some other class files and omnee folder too... And I get a zip with minecraft, class files and omnee in it, but when I try to add it to "mods" inside a client with Forge installed I get an error... Can somebody help me with this?...

 

You should add the contents of that minecraft folder, not the minecraft folder itself...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Add the crash-report or latest.log (logs-folder) with sites like https://mclo.gs/ and paste the link to it here  
    • I removed yetanotherchance booster and now it says Invalid player identity
    • Cracked Launchers are not supported
    • After some time minecraft crashes with an error. Here is the log https://drive.google.com/file/d/1o-2R6KZaC8sxjtLaw5qj0A-GkG_SuoB5/view?usp=sharing
    • The specific issue is that items in my inventory wont stack properly. For instance, if I punch a tree down to collect wood, the first block I collected goes to my hand. So when I punch the second block of wood to collect it, it drops, but instead of stacking with the piece of wood already in my hand, it goes to the second slot in my hotbar instead. Another example is that I'll get some dirt, and then when I'm placing it down later I'll accidentally place a block where I don't want it. When I harvest it again, it doesn't go back to the stack that it came from on my hotbar, where it should have gone, but rather into my inventory. That means that if my inventory is full, then the dirt wont be picked up even though there should be space available in the stack I'm holding. The forge version I'm using is 40.3.0, for java 1.18.2. I'll leave the mods I'm using here, and I'd appreciate it if anybody can point me in the right direction in regards to figuring out how to fix this. I forgot to mention that I think it only happens on my server but I&#39;m not entirely sure. PLEASE HELP ME! LIST OF THE MODS. aaa_particles Adorn AdvancementPlaques AI-Improvements AkashicTome alexsdelight alexsmobs AmbientSounds amwplushies Animalistic another_furniture AppleSkin Aquaculture aquamirae architectury artifacts Atlas-Lib AutoLeveling AutoRegLib auudio balm betterfpsdist biggerstacks biomancy BiomesOPlenty blockui blueprint Bookshelf born_in_chaos Botania braincell BrassAmberBattleTowers brutalbosses camera CasinoCraft cfm (MrCrayfish’s Furniture Mod) chat_heads citadel cloth-config Clumps CMDCam CNB cobweb collective comforts convenientcurioscontainer cookingforblockheads coroutil CosmeticArmorReworked CozyHome CrabbersDelight crashexploitfixer crashutilities Create CreativeCore creeperoverhaul cristellib crittersandcompanions Croptopia CroptopiaAdditions CullLessLeaves curios curiouslanterns curiouslights Curses' Naturals CustomNPCs CyclopsCore dannys_expansion decocraft Decoration Mod DecorationDelightRefurbished Decorative Blocks Disenchanting DistantHorizons doubledoors DramaticDoors drippyloadingscreen durabilitytooltip dynamic-fps dynamiclights DynamicTrees DynamicTreesBOP DynamicTreesPlus Easy Dungeons EasyAnvils EasyMagic easy_npc eatinganimation ecologics effective_fg elevatorid embeddium emotecraft enchantlimiter EnchantmentDescriptions EnderMail engineersdecor entityculling entity_model_features entity_texture_features epicfight EvilCraft exlinefurniture expandability explosiveenhancement factory-blocks fairylights fancymenu FancyVideo FarmersDelight fast-ip-ping FastSuite ferritecore finsandtails FixMySpawnR Forge Middle Ages fossil FpsReducer2 furnish GamingDeco geckolib goblintraders goldenfood goodall H.e.b habitat harvest-with-ease hexerei hole_filler huge-structure-blocks HunterIllager iammusicplayer Iceberg illuminations immersive_paintings incubation infinitybuttons inventoryhud InventoryProfilesNext invocore ItemBorders itemzoom Jade jei (Just Enough Items) JetAndEliasArmors journeymap JRFTL justzoom kiwiboi Kobolds konkrete kotlinforforge lazydfu LegendaryTooltips libIPN lightspeed lmft lodestone LongNbtKiller LuckPerms Lucky77 MagmaMonsters malum ManyIdeasCore ManyIdeasDoors marbledsarsenal marg mcw-furniture mcw-lights mcw-paths mcw-stairs mcw-trapdoors mcw-windows meetyourfight melody memoryleakfix Mimic minecraft-comes-alive MineTraps minibosses MmmMmmMmmMmm MOAdecor (ART, BATH, COOKERY, GARDEN, HOLIDAYS, LIGHTS, SCIENCE) MobCatcher modonomicon mods_optimizer morehitboxes mowziesmobs MutantMonsters mysticalworld naturalist NaturesAura neapolitan NekosEnchantedBooks neoncraft2 nerb nifty NightConfigFixes nightlights nocube's_villagers_sell_animals NoSeeNoTick notenoughanimations obscure_api oculus oresabovediamonds otyacraftengine Paraglider Patchouli physics-mod Pillagers Gun PizzaCraft placeableitems Placebo player-animation-lib pneumaticcraft-repressurized polymorph PrettyPipes Prism projectbrazier Psychadelic-Chemistry PuzzlesLib realmrpg_imps_and_demons RecipesLibrary reeves-furniture RegionsUnexplored restrictedportals revive-me Scary_Mobs_And_Bosses selene shetiphiancore ShoulderSurfing smoothboot
  • Topics

×
×
  • Create New...

Important Information

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