mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2024-11-22 12:37: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)
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
@Target(ElementType.TYPE)
|
@Target(ElementType.TYPE)
|
||||||
public @interface Mod {
|
public @interface Mod {
|
||||||
|
|
||||||
String modid();
|
String modid();
|
||||||
|
|
||||||
String name() default "";
|
String name() default "";
|
||||||
|
|
||||||
String version() default "";
|
String version() default "";
|
||||||
|
|
||||||
|
boolean clientSideOnly() default false;
|
||||||
|
|
||||||
|
public @interface EventHandler {
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,13 +1,19 @@
|
||||||
package com.brohoof.minelittlepony.forge;
|
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;
|
||||||
|
import net.minecraftforge.fml.common.Mod.EventHandler;
|
||||||
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
|
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 {
|
public class MLPForge {
|
||||||
|
|
||||||
|
@EventHandler
|
||||||
public void init(FMLPostInitializationEvent init) {
|
public void init(FMLPostInitializationEvent init) {
|
||||||
MLPCommonProxy.getInstance().setPonyArmors(new PonyArmors());
|
MLPCommonProxy.getInstance().setPonyArmors(new PonyArmors());
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
{
|
{
|
||||||
|
"required": true,
|
||||||
|
"minVersion": "0.4.10",
|
||||||
"package": "com.voxelmodpack.hdskins.mixin",
|
"package": "com.voxelmodpack.hdskins.mixin",
|
||||||
"refmap": "mixin.hdskins.refmap.json",
|
"refmap": "mixin.hdskins.refmap.json",
|
||||||
"mixins": [
|
"mixins": [
|
||||||
|
|
|
@ -6,6 +6,7 @@ import org.lwjgl.opengl.GL11;
|
||||||
import org.lwjgl.opengl.GL14;
|
import org.lwjgl.opengl.GL14;
|
||||||
|
|
||||||
import com.brohoof.minelittlepony.PonySize;
|
import com.brohoof.minelittlepony.PonySize;
|
||||||
|
import com.brohoof.minelittlepony.model.BodyPart;
|
||||||
import com.brohoof.minelittlepony.model.PlayerModel;
|
import com.brohoof.minelittlepony.model.PlayerModel;
|
||||||
import com.brohoof.minelittlepony.model.pony.ModelPlayerPony;
|
import com.brohoof.minelittlepony.model.pony.ModelPlayerPony;
|
||||||
import com.brohoof.minelittlepony.renderer.IRenderPony;
|
import com.brohoof.minelittlepony.renderer.IRenderPony;
|
||||||
|
@ -47,7 +48,6 @@ public class LayerHeldPonyItem implements LayerRenderer {
|
||||||
p_177141_7_, scale);
|
p_177141_7_, scale);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!pony.getModel().isSleeping) {
|
if (!pony.getModel().isSleeping) {
|
||||||
if (pony.getModel().metadata.getRace().hasHorn() && pony.getModel().metadata.getGlowColor() != 0) {
|
if (pony.getModel().metadata.getRace().hasHorn() && pony.getModel().metadata.getGlowColor() != 0) {
|
||||||
ModelPlayerPony model = (ModelPlayerPony) pony.getModel();
|
ModelPlayerPony model = (ModelPlayerPony) pony.getModel();
|
||||||
|
@ -71,6 +71,7 @@ public class LayerHeldPonyItem implements LayerRenderer {
|
||||||
ItemStack drop = entity.getHeldItem();
|
ItemStack drop = entity.getHeldItem();
|
||||||
if (drop != null) {
|
if (drop != null) {
|
||||||
pushMatrix();
|
pushMatrix();
|
||||||
|
pony.getModel().transform(BodyPart.LEGS);
|
||||||
if (pony.getModel().isChild) {
|
if (pony.getModel().isChild) {
|
||||||
translate(0.0F, 0.625F, 0.0F);
|
translate(0.0F, 0.625F, 0.0F);
|
||||||
rotate(-20.0F, -1.0F, 0.0F, 0.0F);
|
rotate(-20.0F, -1.0F, 0.0F, 0.0F);
|
||||||
|
|
|
@ -63,9 +63,9 @@ public class LayerPonyArmor implements LayerRenderer {
|
||||||
boolean isLegs = armorSlot == 2;
|
boolean isLegs = armorSlot == 2;
|
||||||
|
|
||||||
AbstractPonyModel modelbase = isLegs ? pony.getArmor().modelArmor : pony.getArmor().modelArmorChestplate;
|
AbstractPonyModel modelbase = isLegs ? pony.getArmor().modelArmor : pony.getArmor().modelArmorChestplate;
|
||||||
|
modelbase = getArmorModel(entitylivingbaseIn, itemstack, armorSlot, modelbase);
|
||||||
modelbase.setModelAttributes(this.pony.getModel());
|
modelbase.setModelAttributes(this.pony.getModel());
|
||||||
modelbase.setLivingAnimations(entitylivingbaseIn, p_177141_2_, p_177141_3_, partialTicks);
|
modelbase.setLivingAnimations(entitylivingbaseIn, p_177141_2_, p_177141_3_, partialTicks);
|
||||||
modelbase = getArmorModel(entitylivingbaseIn, itemstack, armorSlot, modelbase);
|
|
||||||
prepareToRender((ModelPonyArmor) modelbase, armorSlot);
|
prepareToRender((ModelPonyArmor) modelbase, armorSlot);
|
||||||
|
|
||||||
this.renderer.bindTexture(getArmorTexture(entitylivingbaseIn, itemstack, isLegs ? 2 : 1, null));
|
this.renderer.bindTexture(getArmorTexture(entitylivingbaseIn, itemstack, isLegs ? 2 : 1, null));
|
||||||
|
|
Loading…
Reference in a new issue