Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,18 @@

public class SnowyCowRenderer extends CowRenderer {

private static final Identifier TEXTURE = Identifier.fromNamespaceAndPath(MOD_ID, "textures/entity/cow/snowy_cow.png");
private static final Identifier ADULT_TEXTURE = Identifier.fromNamespaceAndPath(MOD_ID, "textures/entity/cow/snowy_cow.png");
private static final Identifier BABY_TEXTURE = Identifier.fromNamespaceAndPath(MOD_ID, "textures/entity/cow/snowy_cow_baby.png");

public SnowyCowRenderer(EntityRendererProvider.Context context) {
super(context);
}

@Override
public @NonNull Identifier getTextureLocation(@NonNull CowRenderState cowRenderState) {
return TEXTURE;
// If it's a baby, return the baby texture location
if (cowRenderState.isBaby) {return BABY_TEXTURE;}

return ADULT_TEXTURE;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,18 @@

public class SnowyPigRenderer extends PigRenderer {

private static final Identifier TEXTURE = Identifier.fromNamespaceAndPath(MOD_ID, "textures/entity/pig/snowy_pig.png");
private static final Identifier ADULT_TEXTURE = Identifier.fromNamespaceAndPath(MOD_ID, "textures/entity/pig/snowy_pig.png");
private static final Identifier BABY_TEXTURE = Identifier.fromNamespaceAndPath(MOD_ID, "textures/entity/pig/snowy_pig_baby.png");

public SnowyPigRenderer(EntityRendererProvider.Context context) {
super(context);
}

@Override
public @NonNull Identifier getTextureLocation(@NonNull PigRenderState pigRenderState) {
return TEXTURE;
// If it's a baby, return the baby texture location
if (pigRenderState.isBaby) {return BABY_TEXTURE;}

return ADULT_TEXTURE;
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.