Compatibility with Other Mods

Started by luvm1n3craft on Sun, 04/30/2017 - 21:10

Topic category: Advanced modding

Last seen on 21:57, 7. May 2018
Joined Jul 2014
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
Compatibility with Other Mods
Sun, 04/30/2017 - 21:10 (edited)

So, for my Colored Flints Mod, I'm thinking about making flint ingot alloys. However, I want to make it so that if my mod is with another mod with ingots, you can mix colored flints with the other mod's ingots to get a flint ingot alloy. How would I do this?

Edited by luvm1n3craft on Sun, 04/30/2017 - 21:10
Last seen on 14:29, 24. Jul 2018
Joined Aug 2015
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
mmmmh I think you have to
Mon, 05/01/2017 - 12:19

mmmmh I think you have to make a function, I'll try to make it for you so you have an idea...

it should kinda look like that :

public Color getMixedColor(MixedColor Color )

{

/* I don't think there is a way for the mod to identify a special item such as an ingot, in order to make it work you will have to specify each items you wanna get the color of */

Color IngotColor = mod.items.ingot.getColor;

 manager.addRecipe(new ItemStack(Items.COLORED_FLINT), new Object[] {" #C ", "   ", "   ", 'C', Items.COLORED_INGOT, '#', Items.FLINT });

MixedColor = minecraft.Items.Flint.getColor + IngotColor;

return MixedColor;

}

 

public void SetColor()

{

Color ItemColor = mod.getMixedColor

Items.Colored_Flint.Tint = ItemColor

}

 

what I showed you isn't the real code, it just gives you an idea of how can it works and by the way I am far to lazy to try to make it myself and it will be more rewarding for you to do it yourself, but if you have any problems or difficulties don't hesitate to reply

Last seen on 21:57, 7. May 2018
Joined Jul 2014
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
RE:mmmmh I think you have to
Tue, 05/02/2017 - 00:53

@#1 I don't know how any of this relates to flint ingot alloys that are made with another mod's ingots. I like the mixed color part, though!

Last seen on 21:57, 7. May 2018
Joined Jul 2014
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
RE:mmmmh I think you have to
Tue, 05/02/2017 - 00:55

@#1.1 Also, what line do I put this function on, and what class do I put it on?