Jump to content
  • Home
  • Files
  • Docs
  • Merch
Topics
  • All Content

  • This Topic
  • This Forum

  • Advanced Search
  • Existing user? Sign In  

    Sign In



    • Not recommended on shared computers


    • Forgot your password?

  • Sign Up
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • Adding and Implementing a new method?
1.13 Update Notes for Mod Creators
Sign in to follow this  
Followers 0
HydroBane

Adding and Implementing a new method?

By HydroBane, June 22, 2013 in Modder Support

  • Reply to this topic
  • Start new topic

Recommended Posts

HydroBane    0

HydroBane

HydroBane    0

  • Stone Miner
  • HydroBane
  • Members
  • 0
  • 69 posts
Posted June 22, 2013

Hi

 

So I'm creating a test mod to try a few things out to make my real mod easier to add things to.

Basically, I use the method below to get my textures.

 

@Override
public  void registerIcons(IconRegister reg) {
this.blockIcon = reg.registerIcon(TestMod.modID +":" + this.getUnlocalizedName2());
}

 

What I want, is to organize my textures into folders within the textures/blocks folder.

Correct me if I'm wrong, or if there's a better method, but to do this I could use this:

 

@Override
public  void registerIcons(IconRegister reg) {
this.blockIcon = reg.registerIcon(TestMod.modID +":" + this.texureFolder + "/" + this.getUnlocalizedName2());
}

 

This is my dilemma.

Is there a method I could create to assign a different textureFolder to each individual block/item?

 

Thanks in advance

~ Hydro

  • Quote

Share this post


Link to post
Share on other sites

larsgerrits    510

larsgerrits

larsgerrits    510

  • Reality Controller
  • larsgerrits
  • Members
  • 510
  • 3455 posts
Posted June 22, 2013

The best way to figure that out is to just do it.

  • Quote

Share this post


Link to post
Share on other sites

HydroBane    0

HydroBane

HydroBane    0

  • Stone Miner
  • HydroBane
  • Members
  • 0
  • 69 posts
Posted June 22, 2013

That's my point, I don't know how to create a method that can do that.

  • Quote

Share this post


Link to post
Share on other sites

larsgerrits    510

larsgerrits

larsgerrits    510

  • Reality Controller
  • larsgerrits
  • Members
  • 510
  • 3455 posts
Posted June 22, 2013

I mean, just put the textures in the folder you want them to be in. And if they work, you can just use that more if you want to.

  • Quote

Share this post


Link to post
Share on other sites

HydroBane    0

HydroBane

HydroBane    0

  • Stone Miner
  • HydroBane
  • Members
  • 0
  • 69 posts
Posted June 22, 2013

It won't though. The mod is looking for them in the blocks/items texture folder. I'd need to specify the folder in my class for it to recognise them

  • Quote

Share this post


Link to post
Share on other sites

HydroBane    0

HydroBane

HydroBane    0

  • Stone Miner
  • HydroBane
  • Members
  • 0
  • 69 posts
Posted June 22, 2013

Okay, so I've found a solution to the problem.

 

By changing this:

this.blockIcon = reg.registerIcon(TestMod.modID + ":" + this.textureType + "/" + this.getUnlocalizedName2());

 

To this:

this.blockIcon = reg.registerIcon(TestMod.modID + ":" + "TestFolder1" + "/" + this.getUnlocalizedName2());

 

I can change it, but I'd still prefer to use the top, as I would like to use the textureType method  in more than one scenario.

 

For now though, unless anyone can help me, I'm okay

  • Quote

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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.

  • Insert image from URL
×
  • Desktop
  • Tablet
  • Phone
Sign in to follow this  
Followers 0
Go To Topic Listing



  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • AdieCraft
      Japanese Style Temple Base

      By AdieCraft · Posted 12 minutes ago

      Hello there!   Check out my latest tutorial in my Japanese Builds series, building a Japanese Temple base.   Make sure to Subscribe, so you don't miss any future videos.   Thanks   Adie   Japanese Style Temple Base    
    • DaemonUmbra
      Forge crashes on start

      By DaemonUmbra · Posted 52 minutes ago

      Forge for 1.13+ requires Java 8-10 Forge for 1.12.2- requires Java 8
    • GttiqwT
      [1.12.2] Multiple Structure Generation

      By GttiqwT · Posted 1 hour ago

      Yeah I get where you're coming from. I also watched harry talk's tutorial and at first it worked but then I got the problem that it wont spawn more than one structure otherwise it'll overlap and only spawn the latest one added. I tried to follow this tutorial again and it just didnt seem to work at all now. When I get more time ill have to do it again and then afterwards try and fix the issues with spawning more than one structure. I'm currently trying to fix the issue where it causes cascading gen lag but I dont know how to fix that quite yet either.
    • Draco18s
      Distinguish singleplayer vs. multiplayer

      By Draco18s · Posted 1 hour ago

      No. Your client code is sending information to make the server do things. Your server code is telling the server to do those same things (again).
    • solitone
      Distinguish singleplayer vs. multiplayer

      By solitone · Posted 1 hour ago

      This isn’t an issue but normal behaviour, is it?
  • Topics

    • AdieCraft
      0
      Japanese Style Temple Base

      By AdieCraft
      Started 12 minutes ago

    • bitman
      1
      Forge crashes on start

      By bitman
      Started 1 hour ago

    • Merthew
      7
      [1.12.2] Multiple Structure Generation

      By Merthew
      Started November 7, 2018

    • solitone
      24
      Distinguish singleplayer vs. multiplayer

      By solitone
      Started December 5

    • TheGreenSquarez
      5
      Forge 28.1.10 won't show on launcher + 28.1.0 fails to work

      By TheGreenSquarez
      Started Wednesday at 11:21 AM

  • Who's Online (See full list)

    • thinkverse
    • AdieCraft
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • Adding and Implementing a new method?
  • Theme
  • Contact Us
  • Discord

Copyright © 2019 ForgeDevelopment LLC · Ads by Curse Powered by Invision Community