Have items only be available when other mod is installed?

Started by Nelson TheAwesome on Tue, 06/02/2020 - 03:52

Topic category: Help with modding (Java Edition)

Last seen on 15:35, 3. Jun 2020
Joined Feb 2015
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • Comments:
Have items only be available when other mod is installed?
Tue, 06/02/2020 - 03:52

Hi, I was wondering if I could make tools/items in my mod that would only work if another mod is installed, for example a mod that adds emerald tools or such and my mod that adds tool variant with different variants of every tool with different handles based on the type of wood used to craft the sticks. I'd like to make it so I could make emerald tools that have all the different variants, but they only show up in game if you have that other mod installed. If you didn't have it installed you wouldn't be able to craft them (even though the crafting recipe uses vanilla emeralds) and you wouldn't be able to see them in the creative inventory.

Last seen on 13:46, 10. Jul 2020
Joined Sep 2019
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • Comments:
Your mod shouldn't even load…
Tue, 06/02/2020 - 14:02

Your mod shouldn't even load in if you have made it dependent on another mod. I am not sure if you are able to do this in MCreator though.

Last seen on 13:46, 10. Jul 2020
Joined Sep 2019
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • Comments:
Oh my that was the 3000 post…
Tue, 06/02/2020 - 14:09

Oh my that was the 3000 post on this forum...

Last seen on 00:49, 9. Jul 2020
Joined Jun 2019
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • Comments:
as I always tell people on…
Tue, 06/02/2020 - 14:28

as I always tell people on these forums, a lot of things are not possible without programming.

Here goes the nerdy explanation:

You would either need the deobf version or if the mod files are hosted on maven stuff, the maven data for the build.gradle. Usually on their mods' Github readme page.

if you have the deobf version just drop it to your mod workspace's root folder (not the src folder) and add this line to the bottom "dependencies" part of build.gradle (NOT the one in buildscript!): 

compile files("Kiwi-1.15.2-2.7.0-deobf.jar")

replace "Kiwi-1.15.2-2.7.0-deobf.jar" with the full file name of the deobf version of the mod file, including the file extension

so your build.gradle would look something like this:

minecraft{
    [...]
	mappings channel: 'snapshot', version: '20200304-1.15.1'
	runs {
    [...]
	}
}

repositories {
    [...]
}

dependencies {
	minecraft 'net.minecraftforge:forge:1.15.2-31.1.9'
//remember to include the quotation marks
	compile files("my_cool_mod-1.15.2-1.0.0.jar")
}

again, don't attempt this unless you have at least of a basic understanding of Java.

Last seen on 13:46, 10. Jul 2020
Joined Sep 2019
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • Comments:
@CrispyChip I thought you…
Tue, 06/02/2020 - 14:32

@CrispyChip I thought you said to tell them it is not possible with MCreator?

Last seen on 00:49, 9. Jul 2020
Joined Jun 2019
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • Comments:
ahem. it is not possible…
Wed, 06/03/2020 - 01:55

ahem.

it is not possible with MCreator without java.

Last seen on 00:49, 9. Jul 2020
Joined Jun 2019
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • Comments:
I'm not giving code. I said…
Wed, 06/03/2020 - 02:21

I'm not giving code.

I said don't do this unless you understand java and I explained what the code does and how to do it.

please don't argue with people everywhere you go.

Last seen on 00:49, 9. Jul 2020
Joined Jun 2019
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • Comments:
fine this is not respectful…
Wed, 06/03/2020 - 02:23

fine this is not respectful of me, guess I'll just have to ignore you

Last seen on 13:46, 10. Jul 2020
Joined Sep 2019
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • Comments:
I explained what the method…
Wed, 06/03/2020 - 02:25

I explained what the method did.

please don't argue with people everywhere you go.

I don't argue with people, I have formed a lot of positive relations on this forum. I argue with you, only because you got all pissy pants about 3 lines of code, and you would of rather me just done nothing lol.

Code provided was not usable…
Wed, 06/03/2020 - 10:15

Code provided was not usable snippet so it was not really code spooning, at least I think so ;)

as I always tell people on these forums, a lot of things are not possible without programming.

It is normal that if one wants to use APIs, code will be needed. There is no way on earth I could integrate support for all APIs in MCreator XD

Lastly, keep this friendly guys, no need to argue ;)

Last seen on 00:49, 9. Jul 2020
Joined Jun 2019
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • Comments:
yah thanks for coming here…
Wed, 06/03/2020 - 10:48

yah thanks for coming here to keep the peace, the discussion is getting a bit heated lol :D

Last seen on 13:46, 10. Jul 2020
Joined Sep 2019
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • Comments:
Code provided was not usable…
Wed, 06/03/2020 - 15:09

Code provided was not usable snippet so it was not really code spooning,

It was more about showing the absurdity in another post. But yes, I am sorry CrispChip for not keeping the peace.