#I want to konw how to add new new granularity levels for GT's Impure Dust

135 messages · Page 1 of 1 (latest)

boreal sky
#

I want to konw how to add new new granularity levels for GT's Impure Dust

raw bridge
#

oh, sorry, was doing other stuff

#

so

#

you want to add two new tag prefixes.

boreal sky
#

yus

#

yes

boreal sky
#

like this?

raw bridge
#

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);
raw bridge
#

though

#

you should make a custom material icon type

#

so that they don't look exactly alike

#

and add the purification tooltip

boreal sky
#

Unable to parse symbol 'GTMaterialItems'

#

I am version 1.21.1 ,neoforge

boreal sky
boreal sky
raw bridge
raw bridge
#

went to put some clothes in the washing machine

boreal sky
# raw bridge wdym?

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'

raw bridge
#

oh, wait, is this 1.21?

boreal sky
raw bridge
#

use version 1.7.0-SNAPSHOT

#

from the maven

boreal sky
raw bridge
#

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

boreal sky
boreal sky
#

or simply 1.7.0

raw bridge
#

1.7.0-SNAPSHOT

boreal sky
raw bridge
#

because you're on 1.21

#

where that feature doesn't exist

#

as neoforge always deobfuscates MC when you run it

raw bridge
# boreal sky why?

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

boreal sky
#

I know that.i'm stupid,the one in the middle is Neoforge'sICANT

#

but i seem to have encountered other problems😩

boreal sky
#

Is it a network issue? If so, it could be a serious problem

raw bridge
#

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/

boreal sky
#

Isn't this the correct way to do it?

boreal sky
raw bridge
#

separate maven {} blocks

boreal sky
#

isn't this?

raw bridge
#

oh, oops, missed one

#

https://api.repsy.io/mvn/toma/public/

boreal sky
raw bridge
#

omfg why is it requiring you to have every single one of our deps

boreal sky
#

Build passed!

raw bridge
#

do the items exist?

boreal sky
raw bridge
#

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?

boreal sky
raw bridge
#

well, you can't initialize them whenever

#

and a public static void init() {} to your tagprefix class

#

then, in YourGTAddon#registerTagPrefixes, do MyPrefixes.init()

boreal sky
raw bridge
#

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

boreal sky
boreal sky
raw bridge
#

yes

boreal sky
boreal sky
raw bridge
#

just run it

#

the items should Just Existâ„¢

boreal sky
boreal sky
raw bridge
#

well, update it

boreal sky
raw bridge
#

you can just change the version variable in gradle.properties

boreal sky
raw bridge
#

check if the creative inventory and recipe viewer have them

#

they should Just Existâ„¢

boreal sky
#

This way? Is it that simple?

#

Do i need to change the texture and add lang?

boreal sky
raw bridge
raw bridge
#

nothing says you're required to but it would be smart

boreal sky
raw bridge
#

looks about right

boreal sky
frank knot
#

well yeah, "dust" isn't the same as "dusts"

boreal sky
boreal sky
raw bridge
#

look at the other icon set models for reference

boreal sky
raw bridge
#

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

boreal sky
boreal sky
#

no nedd.

boreal sky
raw bridge
#

add the recipes

#

your addon class has a method for it

boreal sky
boreal sky
raw bridge
#

??

#

oh

#

first one

#

sorry

boreal sky
raw bridge
#

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

boreal sky
boreal sky
boreal sky
raw bridge
#

so what's the error?