BradBot1 / LifeSteal

A fabric mod that implements a customisable version of the LifeSteal SMP
Apache License 2.0
2 stars 8 forks source link

Regards to PixelDev's Ask #5

Closed Connorado07 closed 2 years ago

Connorado07 commented 2 years ago

I am helping develop a modified version of this plugin with PixelDev990. I was wondering how you got around the required net.minecraft.util.Identifier with giving it public Config() { super(new Identifier(Constants.ID, "lifesteal")); }. How are you doing that? It keeps throwing an error where its asking for new.minecraft.util.Identifier and how Constants.ID does not satisfy those requirements.

BradBot1 commented 2 years ago

public Config() { super(new Identifier(Constants.ID, "lifesteal")); }

If you look at the code you provided you will see its wrapped in an identifier constructor call, this is because Constants.ID only returns a string

This all means that new Identifier(Constants.ID, "lifesteal") will result in an identifier of bfapi:lifesteal

I must ask you to refrain from using Constants (click me for source) as it is not a class provided by LifeSteal itself but BFAPI. The reason for this is that the first part of the identifier is used as the sub directory to save the config under, so i ask that you please use your own to avoid conflicting with the base LifeSteal

BradBot1 commented 2 years ago

Oh also try to use a differing mod id and set lifesteal to be in the conflicts section of your fabric.mod.json this will prevent people from using your version alongside the base <3