#I want to konw how to add new new granularity levels for GT's Impure Dust
135 messages · Page 1 of 1 (latest)
you can see the small & tiny prefixes here:
https://github.com/GregTechCEu/GregTech-Modern/blob/1.20.1/src/main/java/com/gregtechceu/gtceu/api/data/tag/TagPrefix.java#L344-L366
like this?
the new prefixes would be like this in java:
class MyTagPrefixes
// 1/4th of an Impure Dust.
public static final TagPrefix dustSmallImpure = new TagPrefix("smallImpureDust")
.idPattern("small_impure_%s_dust")
.defaultTagPath("small_impure_dusts/%s")
.unformattedTagPath("small_impure_dusts")
.langValue("Small Pile of Impure %s Dust")
.materialAmount(GTValues.M / 4)
.materialIconType(MaterialIconType.dustSmall)
.unificationEnabled(true)
.generateItem(true)
.generationCondition(hasOreProperty)
.tooltip((mat, tooltips) -> tooltips.add(Component.translatable("metaitem.dust.tooltip.purify")));
// 1/9th of a Dust.
public static final TagPrefix dustTinyImpure = new TagPrefix("tinyImpureDust")
.idPattern("tiny_impure_%s_dust")
.defaultTagPath("tiny_impure_dusts/%s")
.unformattedTagPath("tiny_impure_dusts")
.langValue("Tiny Pile of Impure %s Dust")
.materialAmount(GTValues.M / 9)
.materialIconType(MaterialIconType.dustTiny)
.unificationEnabled(true)
.generateItem(true)
.generationCondition(hasOreProperty)
.tooltip((mat, tooltips) -> tooltips.add(Component.translatable("metaitem.dust.tooltip.purify")));
and to make them purifiable with a cauldron:
class MyItems
GTMaterialItems.purifyMap.put(MyTagPrefixes.dustSmallImpure, TagPrefix.dustSmall);
GTMaterialItems.purifyMap.put(MyTagPrefixes.dustTinyImpure, TagPrefix.dustTiny);
yes, actually
though
you should make a custom material icon type
so that they don't look exactly alike
and add the purification tooltip
How should I do next
Are you still there?
wdym?
yes I am now
went to put some clothes in the washing machine
I couldn't use "GTMaterialItems.purifyMap.put(MyTagPrefixes.dustSmallImpure, TagPrefix.dustSmall);" and "GTMaterialItems.purifyMap.put(MyTagPrefixes.dustTinyImpure, TagPrefix.dustTiny);",It say "Unable to parse symbol 'GTMaterialItems'
well did you try importing it?
oh, wait, is this 1.21?
yes
Can't I use this version?
no.
that's not even the latest 1.21 version, and the latest is almost a year old
you should use the maven anyway.
CurseMaven should only ever be used as a backup if the mod isn't published anywhere
ok,wait me, It might take a while to rebuild
1.7.0-SNAPSHOT
why?
because you're on 1.21
where that feature doesn't exist
as neoforge always deobfuscates MC when you run it
if you look at the line with the "neoforge" comment, you'll see what you want to do
and what you've done for all the other dependencies
I know that.i'm stupid,the one in the middle is Neoforge's
but i seem to have encountered other problems😩
How should I solve it
Is it a network issue? If so, it could be a serious problem
also add the ldlib maven
you need both
you need at least https://maven.gtceu.com/, https://maven.firstdarkdev.xyz/snapshots/, https://mvn.devos.one/snapshots/, and https://api.repsy.io/mvn/toma/public/
Isn't this the correct way to do it?
Adding repositories is always a pain point for me😩
isn't this?
oh,no
omfg why is it requiring you to have every single one of our deps
just copy this file
https://github.com/GregTechCEu/GregTech-Modern/blob/1.21/gradle/scripts/repositories.gradle
Build passed!
what should I do next
do the items exist?
which?
the dusts you just added
do they exist
oh, actually, do you ever initialize your tag prefixes?
..and do you have a class that implements IGTAddon?
i only do this
well, you can't initialize them whenever
and a public static void init() {} to your tagprefix class
then, in YourGTAddon#registerTagPrefixes, do MyPrefixes.init()
It seems not #registerTagPrefixes
oh, I changed that in 1.21
hold oonnn
import net.neoforged.neoforge.registries.RegisterEvent;
...
@SubscribeEvent
public static void registerTagPrefixes(RegisterEvent event) {
event.register(GTRegistries.TAG_PREFIX_REGISTRY, helper -> MyPrefixes.init());
}
put that in your mod class or something
like this?
like this?
yes
Should I create tiny dust and small dust in myitem.class first
What should I do?
Do you mean this is enough?
The version of Neoforge seems too low.I doweload neoforge from https://docs.neoforged.net/docs/1.21.1/gettingstarted/
This section includes information about how to set up a NeoForge workspace, and how to run and test your mod.
well, update it
How should i do ?Do i need to download again or update directly?
you can just change the version variable in gradle.properties
I have already started running it. How can I check the created small and tiny impure dust
check if the creative inventory and recipe viewer have them
they should Just Existâ„¢
What should i do next
yes
well, you should
nothing says you're required to but it would be smart
Isn't this?add lang.
looks about right
but,it don,t work
well yeah, "dust" isn't the same as "dusts"
I understand
I have already designed tiny impure dust, how should I replace my material?
create a new MaterialIconType named (for example) dustImpureTiny and place your model file at gtceu:models/item/material_sets/dull/dust_impure_tiny.json
look at the other icon set models for reference
i still don't quite understand how to do it
in MyPrefixes:
public static final MaterialIconType dustImpureTiny = new MaterialIconType("dustImpureTiny");
... // at MyPrefixes.tinyImpureDust
.materialIconType(dustImpureTiny)
...
then place the model in the appropriate path
and it just works
There's a problem, is it missing 'parent': 'item/generated', but I couldn't find it in the gt source code
I have one final question, how do I add tiny and small impure dust to synthesize impure dust
which
which
how to use
look at how it's used in GT
also fill out those methods, you're required to return something in getRegistrate
it will crash if you don't
I tried, but couldn't make it.Should I imitate this writing
I understand, thank you
oh,shit.I don't know what I did, I can't load the recipe in the game

so what's the error?