#can someone help me with my first item?

76 messages · Page 1 of 1 (latest)

pure kiln
#

I really try to do what the documentation ask me but i can't figure it out

arctic egret
#

oh hey

#

let me help out

#

so you arent supposed to create youe item in the main file

#

so copy that whole suspicous substance thing and paste it in moditems

#

big reccomendation, follow the fabric wiki

#

have u setup your moditems area yet?

#

@pure kiln

pure kiln
#

hum

#

now it do that

arctic egret
#

first remove that itemconvertible on taht top

#

remove that whole thing

#

also remove the whole public initialize method

pure kiln
arctic egret
#

the line

#

i mean that singular line

pure kiln
arctic egret
#

and also remove row 23?

pure kiln
#

no

#

but now yea

#

yes

arctic egret
#

youve basically flipped the thing up, here give me a second let me show you my code

#
    public static final RegistryKey<Item> SUSPICIOUS_SUBSTANCE_KEY = RegistryKey.of(RegistryKeys.ITEM, Identifier.of(Main.MOD_ID , "suspicious_substance"));
    public static final Item SUSPICIOUS_SUBSTANCE = register(
            new Item(new Item.Settings().registryKey(SUSPICIOUS_SUBSTANCE_KEY)),
            SUSPICIOUS_SUBSTANCE_KEY
    );
public static Item register(Item item, RegistryKey<Item> registryKey) {
        return Registry.register(Registries.ITEM, registryKey.getValue(), item);
    }

    public static void initialize() {
        ItemGroupEvents.modifyEntriesEvent(ItemGroups.INGREDIENTS)
                .register((itemGroup) -> itemGroup.add(ModItems.SUSPICIOUS_SUBSTANCE));```
#

@pure kiln for the area where i write Main, replace it with ur thing

#

i think urs is main

#

too

pure kiln
#

wow, thanks you

#

let me try

#

(actully trying the mod

arctic egret
#

nah dw, trust me when i say this, i was in the same boat as yours 6 days ago legit

#

and thats why i came here

pure kiln
#

I think is gona be my story too lol

arctic egret
#

i am not even kidding its all about taking help from others and just keep on moving and moving and spend time

pure kiln
#

it don't wanna lauch

arctic egret
#

youll eventually figure smth out

pure kiln
#

look at that : Caused by: java.lang.ClassNotFoundException: The specified mixin 'com.example.mixin.ExampleMixin' was not found

arctic egret
#

wait a second

pure kiln
arctic egret
#

restart ur app

pure kiln
#

daco dac

arctic egret
#

and click on this drop down icon and click on minecraft client

#

then start it

pure kiln
#

I restart intelliji 🤣

arctic egret
#

yes do that

pure kiln
#

it do the same thing
but with that:
Uncaught exception in thread "main"
java.lang.RuntimeException: Mixin transformation of net.minecraft.client.main.Main failed
at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.getPostMixinClassByteArray(KnotClassDelegate.java:427)
at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.tryLoadClass(KnotClassDelegate.java:323)
at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.loadClass(KnotClassDelegate.java:218)
at net.fabricmc.loader.impl.launch.knot.KnotClassLoader.loadClass(KnotClassLoader.java:119)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:528)
at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:473)
at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74)
at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23)
at net.fabricmc.devlaunchinjector.Main.main(Main.java:86)
Caused by: org.spongepowered.asm.mixin.throwables.MixinApplyError: Mixin [template-mod.mixins.json:ExampleMixin from mod template-mod] from phase [DEFAULT] in config [template-mod.mixins.json] FAILED during PREPARE
at org.spongepowered.asm.mixin.transformer.MixinProcessor.handleMixinError(MixinProcessor.java:638)
at org.spongepowered.asm.mixin.transformer.MixinProcessor.handleMixinPrepareError(MixinProcessor.java:585)
at org.spongepowered.asm.mixin.transformer.MixinProcessor.prepare

arctic egret
#

ok so one sec

#

go to resources

#

OH SHOOT I FIGURED OUT

#

so in ur main

#

theres gonna be this onintialize method

#

or you have to create it

#

public void onInitialize()

#

and then in these {} brackets just put in

#

ModItems.initalize();

pure kiln
#

i'm sorry I was in an other room

arctic egret
#

nah dw take ur time

pure kiln
#

I'm trying

#

it doesn't work

#

wait, I'm gonna delete everything and retry

arctic egret
#

ye

pure kiln
#

I just delete something I shouldn't

arctic egret
#

What

pure kiln
#

forget it steal don't work

#

just deleting and retrying again

#

ITS FUCKING WORKING !!!!!!!!!!!

#

oh my god

#

thanks you so much

arctic egret
#

WOOH

#

Ok so now here's the next part

#

Go to resources, example, and then create a lang folder/package/directory, a textures one, a models one and items one

#

And then fabric wiki should help

pure kiln