mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2025-02-13 08:14:23 +01:00
Use the built-in default textures
This commit is contained in:
parent
8cd5e71c45
commit
2cbdc7477c
5 changed files with 13 additions and 16 deletions
|
@ -7,13 +7,15 @@ import net.minecraft.util.Identifier;
|
|||
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import com.minelittlepony.api.pony.IPonyData;
|
||||
import com.minelittlepony.api.pony.TriggerPixelType;
|
||||
import com.minelittlepony.api.pony.*;
|
||||
import com.minelittlepony.api.pony.meta.TriggerPixel;
|
||||
import com.minelittlepony.client.MineLittlePony;
|
||||
import com.minelittlepony.client.render.entity.SeaponyRenderer;
|
||||
import com.minelittlepony.common.client.gui.dimension.Bounds;
|
||||
import com.minelittlepony.hdskins.client.dummy.*;
|
||||
import com.minelittlepony.hdskins.client.resources.DefaultSkinGenerator;
|
||||
import com.minelittlepony.hdskins.client.resources.TextureLoader;
|
||||
import com.minelittlepony.hdskins.profile.SkinType;
|
||||
import com.minelittlepony.settings.PonyLevel;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
@ -21,10 +23,6 @@ import java.util.function.Consumer;
|
|||
import java.util.stream.Collectors;
|
||||
|
||||
class PonyPreview extends PlayerPreview {
|
||||
public static final Identifier NO_SKIN_STEVE_PONY = new Identifier("minelittlepony", "textures/mob/noskin.png");
|
||||
public static final Identifier NO_SKIN_ALEX_PONY = new Identifier("minelittlepony", "textures/mob/noskin_alex.png");
|
||||
public static final Identifier NO_SKIN_SEAPONY = new Identifier("minelittlepony", "textures/mob/noskin_seapony.png");
|
||||
|
||||
@Override
|
||||
protected DummyPlayer createEntity(ClientWorld world, PlayerSkins<?> textures) {
|
||||
return new DummyPony(world, textures);
|
||||
|
@ -32,18 +30,18 @@ class PonyPreview extends PlayerPreview {
|
|||
|
||||
@Override
|
||||
public Identifier getDefaultSkin(SkinType type, boolean slim) {
|
||||
if (MineLittlePony.getInstance().getConfig().ponyLevel.get() == PonyLevel.PONIES) {
|
||||
if (type == SkinType.SKIN) {
|
||||
return slim ? NO_SKIN_ALEX_PONY : NO_SKIN_STEVE_PONY;
|
||||
}
|
||||
}
|
||||
if (type == MineLPHDSkins.seaponySkinType) {
|
||||
return NO_SKIN_SEAPONY;
|
||||
return DefaultSkinGenerator.generateGreyScale(SeaponyRenderer.TEXTURE, SeaponyRenderer.TEXTURE, getExclusion());
|
||||
}
|
||||
|
||||
return super.getDefaultSkin(type, slim);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected TextureLoader.Exclusion getExclusion() {
|
||||
return TriggerPixel::isTriggerPixelCoord;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderWorldAndPlayer(Optional<DummyPlayer> thePlayer,
|
||||
Bounds frame,
|
||||
|
|
|
@ -19,8 +19,7 @@ import net.minecraft.entity.mob.GuardianEntity;
|
|||
import net.minecraft.util.Identifier;
|
||||
|
||||
public class SeaponyRenderer extends GuardianEntityRenderer {
|
||||
|
||||
public static final Identifier SEAPONY = new Identifier("minelittlepony", "textures/entity/seapony.png");
|
||||
public static final Identifier TEXTURE = new Identifier("minelittlepony", "textures/entity/seapony.png");
|
||||
|
||||
private final Proxy<GuardianEntity, GuardianPonyModel> ponyRenderer;
|
||||
|
||||
|
@ -31,7 +30,7 @@ public class SeaponyRenderer extends GuardianEntityRenderer {
|
|||
ponyRenderer = new Proxy<GuardianEntity, GuardianPonyModel>(features, context, ModelType.GUARDIAN) {
|
||||
@Override
|
||||
public Identifier getTexture(GuardianEntity entity) {
|
||||
return SEAPONY;
|
||||
return TEXTURE;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 1.9 KiB |
Binary file not shown.
Before Width: | Height: | Size: 1.2 KiB |
Binary file not shown.
Before Width: | Height: | Size: 2.3 KiB |
Loading…
Reference in a new issue