Mystic Gemstones

Mystic Gemstones

9 Downloads

Raw starstone texture doesn't load

Domza64 opened this issue ยท 2 comments

commented

When game first loads if Raw Starstone item is not in player inventory texture doesn't load
(item is invisible in chests, creative inventory tab...).
Texture only loads after item is in player inventory.

Method setItemModel(); should be called when game starts so I am not sure what exactly is problem here.

`public class RawStarstone extends Item {

public RawStarstone(Settings settings) {
    super(settings);
    setItemModel(1.0F);
}

public void inventoryTick(ItemStack stack, World world, Entity entity, int slot, boolean selected) {

    if (world.getTimeOfDay() > 22350 || world.getTimeOfDay() < 21980) {
        setItemModel(0.0F);
        stack.setCount(stack.getCount() - 1);
        BlockPos pos = entity.getBlockPos();
        Block.dropStack(world, pos, new ItemStack(MysticGemstonesItem.STARSTONE_DUST));
    }
    else {
        setItemModel(1.0F);
    }
}

public void setItemModel(float number) {
    FabricModelPredicateProviderRegistry.register(MysticGemstonesItem.RAW_STARSTONE,
            new Identifier("shining"), (itemStack, clientWorld, livingEntity, hmmmm) -> number);
}

}`

commented

Fixed for Raw Starstone in 4103789
Same problem still applies to Starstone Ore, Dust and Condensed Dust.

commented

fixed in 19dfc38