Tiered

Tiered

18.2k Downloads

Vanilla support

stashymane opened this issue ยท 3 comments

commented

Is it possible to add support for Vanilla clients on a modded server? The attributes definitely work, however they are just not displayed.

commented

An update on this; This mod breaks in combination with Composing, as that mod uses the vanilla system, causing all Tiered attributes to be lost due to the tag.contains("AttributeModifiers") check in ItemStack.getAttributeModifiers.

commented

Mm, the fact that you can't see any attributes makes me think/realize attributes on items aren't synced S2C; rather, the client also determines attributes in ItemStack#getAttributeModifiers. This means I would have to add attributes through the AttributeModifiers NBT tag instead. A few other issues also arise:

  • No control over client means no translations, can't think of a way to support anything besides English
  • Custom attributes could not be colored (eg. red +1 Attack Damage)
  • No control over the ordering of tooltip attributes, you would have the standard/default values halfway down the attribute list

I'm sure there are ways to get around these issues, but it would be a fair amount of work and would remove a lot of the existing control I have over tooltips. If I did end up doing this, I would probably create a separate server version of the mod (wouldn't want to mix the hacks/workarounds with the existing implementation).

commented

The easiest option I see currently is to have the main mod send a packet to the server to indicate the mod is installed, and if that packet is not present a compat mod can kick in and override display of the modifiers, instead displaying them as part of the description. Considering I need neither multi-lang support nor other mod compatibility, I might as well try making a vanilla compat mod myself. Not that acquainted with mc modding though :)