Hardcore Ender Expansion

Hardcore Ender Expansion

2M Downloads

[FIXED] Biome compass texture issues

sfPlayer1 opened this issue ยท 1 comments

commented

The current implementation doesn't register the sprite properly. It's actually using mc's missing texture sprite due to the way it's implemented. The animated texture is being drawn onto the missing texture. It'd break even more with a higher resolution resource pack replacing your compass sprites.

The issues in detail are:

  • You are passing "compass" to the TextureBiomeCompass constructor. The icon names have to be unique, otherwise the registration fails. They should be prefixed properly anyway.
  • For TextureMap.setTextureEntry the name parameter specified must match entry.getIconName(), otherwise the sprite will be set to the missing texture sprite. This is also a Forge issue (bad API).
  • The itemIcon is never set, ItemBiomeCompass always uses the missing texture sprite, which "works" only because it writes over that sprite.

To fix it replace the registration/setTextureEntry call in ItemBiomeCompass.registerIcons as follows:

TextureAtlasSprite sprite = new TextureBiomeCompass("hardcoreenderexpansion:biome_compass");
itemIcon = sprite;
((TextureMap)iconRegister).setTextureEntry("hardcoreenderexpansion:biome_compass", sprite);

The setTextureName call for ItemBiomeCompass in ItemList.loadItems is redundant since you don't use the vanilla registerIcons implementation there.

You should also strip the instanceof TextureMap check in registerIcons, if it wasn't the case you'd override the missing texture sprite from your TextureBiomeCompass again.

commented

Interesting, I was wondering what was causing the issue. I assume this is also why the compass doesn't render in hand. Thanks a lot for the details, I'll go ahead and fix it in a couple minutes.