mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2024-11-22 04:27:59 +01:00
Fix held items being off when a filly
Move the forge model compat up
This commit is contained in:
parent
4c6c644f6b
commit
e5559a5854
5 changed files with 20 additions and 4 deletions
|
@ -9,9 +9,16 @@ import java.lang.annotation.Target;
|
|||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target(ElementType.TYPE)
|
||||
public @interface Mod {
|
||||
|
||||
String modid();
|
||||
|
||||
String name() default "";
|
||||
|
||||
String version() default "";
|
||||
|
||||
boolean clientSideOnly() default false;
|
||||
|
||||
public @interface EventHandler {
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,13 +1,19 @@
|
|||
package com.brohoof.minelittlepony.forge;
|
||||
|
||||
import com.brohoof.minelittlepony.forge.MLPCommonProxy;
|
||||
import com.brohoof.minelittlepony.MineLittlePony;
|
||||
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
import net.minecraftforge.fml.common.Mod.EventHandler;
|
||||
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
|
||||
|
||||
@Mod(modid = "minelp_forge", name = "Mine Little Pony Forge Hooks", version = "1.8")
|
||||
@Mod(
|
||||
modid = "minelp_forge",
|
||||
name = "MineLP Forge Hooks",
|
||||
version = MineLittlePony.MOD_VERSION,
|
||||
clientSideOnly = true)
|
||||
public class MLPForge {
|
||||
|
||||
@EventHandler
|
||||
public void init(FMLPostInitializationEvent init) {
|
||||
MLPCommonProxy.getInstance().setPonyArmors(new PonyArmors());
|
||||
}
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
{
|
||||
"required": true,
|
||||
"minVersion": "0.4.10",
|
||||
"package": "com.voxelmodpack.hdskins.mixin",
|
||||
"refmap": "mixin.hdskins.refmap.json",
|
||||
"mixins": [
|
||||
|
|
|
@ -6,6 +6,7 @@ import org.lwjgl.opengl.GL11;
|
|||
import org.lwjgl.opengl.GL14;
|
||||
|
||||
import com.brohoof.minelittlepony.PonySize;
|
||||
import com.brohoof.minelittlepony.model.BodyPart;
|
||||
import com.brohoof.minelittlepony.model.PlayerModel;
|
||||
import com.brohoof.minelittlepony.model.pony.ModelPlayerPony;
|
||||
import com.brohoof.minelittlepony.renderer.IRenderPony;
|
||||
|
@ -47,7 +48,6 @@ public class LayerHeldPonyItem implements LayerRenderer {
|
|||
p_177141_7_, scale);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!pony.getModel().isSleeping) {
|
||||
if (pony.getModel().metadata.getRace().hasHorn() && pony.getModel().metadata.getGlowColor() != 0) {
|
||||
ModelPlayerPony model = (ModelPlayerPony) pony.getModel();
|
||||
|
@ -71,6 +71,7 @@ public class LayerHeldPonyItem implements LayerRenderer {
|
|||
ItemStack drop = entity.getHeldItem();
|
||||
if (drop != null) {
|
||||
pushMatrix();
|
||||
pony.getModel().transform(BodyPart.LEGS);
|
||||
if (pony.getModel().isChild) {
|
||||
translate(0.0F, 0.625F, 0.0F);
|
||||
rotate(-20.0F, -1.0F, 0.0F, 0.0F);
|
||||
|
|
|
@ -63,9 +63,9 @@ public class LayerPonyArmor implements LayerRenderer {
|
|||
boolean isLegs = armorSlot == 2;
|
||||
|
||||
AbstractPonyModel modelbase = isLegs ? pony.getArmor().modelArmor : pony.getArmor().modelArmorChestplate;
|
||||
modelbase = getArmorModel(entitylivingbaseIn, itemstack, armorSlot, modelbase);
|
||||
modelbase.setModelAttributes(this.pony.getModel());
|
||||
modelbase.setLivingAnimations(entitylivingbaseIn, p_177141_2_, p_177141_3_, partialTicks);
|
||||
modelbase = getArmorModel(entitylivingbaseIn, itemstack, armorSlot, modelbase);
|
||||
prepareToRender((ModelPonyArmor) modelbase, armorSlot);
|
||||
|
||||
this.renderer.bindTexture(getArmorTexture(entitylivingbaseIn, itemstack, isLegs ? 2 : 1, null));
|
||||
|
|
Loading…
Reference in a new issue