mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-30 16:28:00 +01:00
Fixed red butterfly item texture
This commit is contained in:
parent
2723fbf7b3
commit
2ce52b3a0f
2 changed files with 9 additions and 3 deletions
|
@ -133,8 +133,14 @@ public interface URenderers {
|
||||||
ModelPredicateProviderRegistry.register(UItems.GEMSTONE, Identifier.ofVanilla("affinity"), (stack, world, entity, seed) -> EnchantableItem.getSpellKey(stack).getAffinity().getAlignment());
|
ModelPredicateProviderRegistry.register(UItems.GEMSTONE, Identifier.ofVanilla("affinity"), (stack, world, entity, seed) -> EnchantableItem.getSpellKey(stack).getAffinity().getAlignment());
|
||||||
ModelPredicateProviderRegistry.register(UItems.GEMSTONE, Identifier.ofVanilla("shape"), (stack, world, entity, seed) -> EnchantableItem.getSpellKey(stack).getGemShape().getId());
|
ModelPredicateProviderRegistry.register(UItems.GEMSTONE, Identifier.ofVanilla("shape"), (stack, world, entity, seed) -> EnchantableItem.getSpellKey(stack).getGemShape().getId());
|
||||||
ModelPredicateProviderRegistry.register(UItems.ROCK_CANDY, Identifier.ofVanilla("count"), (stack, world, entity, seed) -> stack.getCount() / (float)stack.getMaxCount());
|
ModelPredicateProviderRegistry.register(UItems.ROCK_CANDY, Identifier.ofVanilla("count"), (stack, world, entity, seed) -> stack.getCount() / (float)stack.getMaxCount());
|
||||||
ModelPredicateProviderRegistry.register(UItems.BUTTERFLY, Identifier.ofVanilla("variant"), (stack, world, entity, seed) -> (float)BufferflyVariantComponent.get(stack).variant().ordinal() / ButterflyEntity.Variant.VALUES.length);
|
ModelPredicateProviderRegistry.register(UItems.BUTTERFLY, Identifier.ofVanilla("variant"), (stack, world, entity, seed) -> {
|
||||||
ModelPredicateProviderRegistry.register(UItems.GIANT_BALLOON, Identifier.ofVanilla("design"), (stack, world, entity, seed) -> (float)BalloonDesignComponent.get(stack).design().ordinal() / AirBalloonEntity.BalloonDesign.VALUES.length);
|
// float operations do be weird like
|
||||||
|
return BufferflyVariantComponent.get(stack).variant().ordinal() * (1F / ButterflyEntity.Variant.VALUES.length);
|
||||||
|
});
|
||||||
|
ModelPredicateProviderRegistry.register(UItems.GIANT_BALLOON, Identifier.ofVanilla("design"), (stack, world, entity, seed) -> {
|
||||||
|
// float operations do be weird like
|
||||||
|
return BalloonDesignComponent.get(stack).design().ordinal() * (1F / AirBalloonEntity.BalloonDesign.VALUES.length);
|
||||||
|
});
|
||||||
ModelPredicateProviderRegistry.register(Unicopia.id("zap_cycle"), new ClampedModelPredicateProvider() {
|
ModelPredicateProviderRegistry.register(Unicopia.id("zap_cycle"), new ClampedModelPredicateProvider() {
|
||||||
private double targetAngle;
|
private double targetAngle;
|
||||||
private double lastAngle;
|
private double lastAngle;
|
||||||
|
|
|
@ -387,7 +387,7 @@ public class ButterflyEntity extends AmbientEntity {
|
||||||
WHITE_MONARCH,
|
WHITE_MONARCH,
|
||||||
BRIMSTONE;
|
BRIMSTONE;
|
||||||
|
|
||||||
public static final Variant[] VALUES = Variant.values();
|
public static final Variant[] VALUES = values();
|
||||||
|
|
||||||
@SuppressWarnings("deprecation")
|
@SuppressWarnings("deprecation")
|
||||||
public static final EnumCodec<Variant> CODEC = StringIdentifiable.createCodec(Variant::values);
|
public static final EnumCodec<Variant> CODEC = StringIdentifiable.createCodec(Variant::values);
|
||||||
|
|
Loading…
Reference in a new issue