mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2025-02-13 08:14:23 +01:00
Snouts were fixed to no longer bust through the hat layer a long while ago. We don't even need this any more.
This commit is contained in:
parent
47f63f1825
commit
2eb19e5451
8 changed files with 2 additions and 52 deletions
|
@ -90,7 +90,7 @@ public class GuiPonySettings extends GameGui {
|
||||||
content.addButton(new Label(LEFT, row += 30)).getStyle().setText("minelp.debug.scale");
|
content.addButton(new Label(LEFT, row += 30)).getStyle().setText("minelp.debug.scale");
|
||||||
content.addButton(new Slider(LEFT, row += 15, 0.1F, 3, config.getGlobalScaleFactor())
|
content.addButton(new Slider(LEFT, row += 15, 0.1F, 3, config.getGlobalScaleFactor())
|
||||||
.onChange(config::setGlobalScaleFactor)
|
.onChange(config::setGlobalScaleFactor)
|
||||||
.setFormatter(value -> describeCurrentScale(value)));
|
.setFormatter(this::describeCurrentScale));
|
||||||
content.addButton(new Label(LEFT, row += 30)).getStyle().setText("minelp.debug.size");
|
content.addButton(new Label(LEFT, row += 30)).getStyle().setText("minelp.debug.size");
|
||||||
content.addButton(new EnumSlider<>(LEFT, row += 15, config.sizeOverride.get())
|
content.addButton(new EnumSlider<>(LEFT, row += 15, config.sizeOverride.get())
|
||||||
.onChange(config.sizeOverride::set));
|
.onChange(config.sizeOverride::set));
|
||||||
|
|
|
@ -17,9 +17,4 @@ public interface IPonyModel<T extends LivingEntity> extends PonyModelConstants,
|
||||||
void copyAttributes(BipedEntityModel<T> other);
|
void copyAttributes(BipedEntityModel<T> other);
|
||||||
|
|
||||||
void updateLivingState(T entity, IPony pony, EquineRenderManager.Mode mode);
|
void updateLivingState(T entity, IPony pony, EquineRenderManager.Mode mode);
|
||||||
|
|
||||||
@Override
|
|
||||||
default boolean hasHeadGear() {
|
|
||||||
return getAttributes().hasHeadGear;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,11 +39,6 @@ public class PonySkullModel extends SkullOverlayEntityModel implements MsonModel
|
||||||
return skull;
|
return skull;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean hasHeadGear() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void render(float poweredTicks, float yaw, float pitch) {
|
public void render(float poweredTicks, float yaw, float pitch) {
|
||||||
super.render(poweredTicks, yaw, pitch);
|
super.render(poweredTicks, yaw, pitch);
|
||||||
|
|
|
@ -5,7 +5,6 @@ import net.minecraft.client.render.VertexConsumer;
|
||||||
import net.minecraft.client.util.math.MatrixStack;
|
import net.minecraft.client.util.math.MatrixStack;
|
||||||
|
|
||||||
import com.minelittlepony.client.MineLittlePony;
|
import com.minelittlepony.client.MineLittlePony;
|
||||||
import com.minelittlepony.model.ICapitated;
|
|
||||||
import com.minelittlepony.model.IPart;
|
import com.minelittlepony.model.IPart;
|
||||||
import com.minelittlepony.mson.api.ModelContext;
|
import com.minelittlepony.mson.api.ModelContext;
|
||||||
import com.minelittlepony.mson.api.MsonModel;
|
import com.minelittlepony.mson.api.MsonModel;
|
||||||
|
@ -22,11 +21,8 @@ public class PonySnout implements IPart, MsonModel {
|
||||||
private ModelPart mare;
|
private ModelPart mare;
|
||||||
private ModelPart stallion;
|
private ModelPart stallion;
|
||||||
|
|
||||||
private ICapitated<ModelPart> head;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void init(ModelContext context) {
|
public void init(ModelContext context) {
|
||||||
head = context.getModel();
|
|
||||||
mare = context.findByName("mare");
|
mare = context.findByName("mare");
|
||||||
stallion = context.findByName("stallion");
|
stallion = context.findByName("stallion");
|
||||||
|
|
||||||
|
@ -50,7 +46,7 @@ public class PonySnout implements IPart, MsonModel {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setGender(Gender gender) {
|
public void setGender(Gender gender) {
|
||||||
boolean show = visible && !head.hasHeadGear() && MineLittlePony.getInstance().getConfig().snuzzles.get();
|
boolean show = visible && MineLittlePony.getInstance().getConfig().snuzzles.get();
|
||||||
|
|
||||||
mare.visible = (show && gender.isMare());
|
mare.visible = (show && gender.isMare());
|
||||||
stallion.visible = (show && gender.isStallion());
|
stallion.visible = (show && gender.isStallion());
|
||||||
|
|
|
@ -14,12 +14,8 @@ import net.minecraft.block.Material;
|
||||||
import net.minecraft.block.StairsBlock;
|
import net.minecraft.block.StairsBlock;
|
||||||
import net.minecraft.client.MinecraftClient;
|
import net.minecraft.client.MinecraftClient;
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.entity.EquipmentSlot;
|
|
||||||
import net.minecraft.entity.LivingEntity;
|
import net.minecraft.entity.LivingEntity;
|
||||||
import net.minecraft.entity.player.PlayerEntity;
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
import net.minecraft.item.ArmorItem;
|
|
||||||
import net.minecraft.item.Item;
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraft.util.Identifier;
|
import net.minecraft.util.Identifier;
|
||||||
import net.minecraft.util.math.Box;
|
import net.minecraft.util.math.Box;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
@ -127,19 +123,6 @@ public class Pony implements IPony {
|
||||||
return new Vec3d(entity.getX(), entity.getY() + (double) entity.getEyeHeight(entity.getPose()) * size.getScaleFactor(), entity.getZ());
|
return new Vec3d(entity.getX(), entity.getY() + (double) entity.getEyeHeight(entity.getPose()) * size.getScaleFactor(), entity.getZ());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isWearingHeadgear(LivingEntity entity) {
|
|
||||||
ItemStack stack = entity.getEquippedStack(EquipmentSlot.HEAD);
|
|
||||||
|
|
||||||
if (stack.isEmpty()) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
Item item = stack.getItem();
|
|
||||||
|
|
||||||
return !(item instanceof ArmorItem) || ((ArmorItem) item).getSlotType() != EquipmentSlot.HEAD;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Race getRace(boolean ignorePony) {
|
public Race getRace(boolean ignorePony) {
|
||||||
return metadata.getRace().getEffectiveRace(ignorePony);
|
return metadata.getRace().getEffectiveRace(ignorePony);
|
||||||
|
|
|
@ -5,10 +5,4 @@ public interface ICapitated<ModelRenderer> {
|
||||||
* Gets the head of this capitated object.
|
* Gets the head of this capitated object.
|
||||||
*/
|
*/
|
||||||
ModelRenderer getHead();
|
ModelRenderer getHead();
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns true if we're wearing any unconventional headgear (ie. a Pumpkin)
|
|
||||||
*/
|
|
||||||
boolean hasHeadGear();
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,10 +57,6 @@ public class ModelAttributes<T extends LivingEntity> {
|
||||||
* Flag indicating that this model is performing a rainboom (flight).
|
* Flag indicating that this model is performing a rainboom (flight).
|
||||||
*/
|
*/
|
||||||
public boolean isGoingFast;
|
public boolean isGoingFast;
|
||||||
/**
|
|
||||||
* True if the model is wearing any unconventional headgear (ie. a Pumpkin)
|
|
||||||
*/
|
|
||||||
public boolean hasHeadGear;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Vertical pitch whilst flying.
|
* Vertical pitch whilst flying.
|
||||||
|
@ -105,7 +101,6 @@ public class ModelAttributes<T extends LivingEntity> {
|
||||||
isSwimming = mode == Mode.THIRD_PERSON && pony.isSwimming(entity);
|
isSwimming = mode == Mode.THIRD_PERSON && pony.isSwimming(entity);
|
||||||
isSwimmingRotated = mode == Mode.THIRD_PERSON && isSwimming && (entity instanceof PlayerEntity || entity instanceof IRotatedSwimmer);
|
isSwimmingRotated = mode == Mode.THIRD_PERSON && isSwimming && (entity instanceof PlayerEntity || entity instanceof IRotatedSwimmer);
|
||||||
isRidingInteractive = pony.isRidingInteractive(entity);
|
isRidingInteractive = pony.isRidingInteractive(entity);
|
||||||
hasHeadGear = pony.isWearingHeadgear(entity);
|
|
||||||
interpolatorId = entity.getUuid();
|
interpolatorId = entity.getUuid();
|
||||||
isLeftHanded = entity.getMainArm() == Arm.LEFT;
|
isLeftHanded = entity.getMainArm() == Arm.LEFT;
|
||||||
}
|
}
|
||||||
|
|
|
@ -70,14 +70,6 @@ public interface IPony {
|
||||||
*/
|
*/
|
||||||
boolean isPartiallySubmerged(LivingEntity entity);
|
boolean isPartiallySubmerged(LivingEntity entity);
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns true if an entity is wearing any headgear. This is used to hide things like the snout when wearing items
|
|
||||||
* such as the pumpkin, a player's head, or any other types of blocks.
|
|
||||||
*
|
|
||||||
* In this case the helmet does <i>not</i> count as headgear because those generally don't interfere with snuzzle rendering.
|
|
||||||
*/
|
|
||||||
boolean isWearingHeadgear(LivingEntity entity);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the race associated with this pony.
|
* Gets the race associated with this pony.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in a new issue