Rearrange rendering packages to make them distinct from entity renderers

This commit is contained in:
Sollace 2018-09-05 10:12:38 +02:00
parent d8913ed245
commit d94e0953a7
48 changed files with 123 additions and 118 deletions

View file

@ -4,7 +4,7 @@ import com.minelittlepony.gui.GuiPonySettings;
import com.minelittlepony.hdskins.gui.GuiSkinsMineLP; import com.minelittlepony.hdskins.gui.GuiSkinsMineLP;
import com.minelittlepony.pony.data.IPonyData; import com.minelittlepony.pony.data.IPonyData;
import com.minelittlepony.pony.data.PonyDataSerialiser; import com.minelittlepony.pony.data.PonyDataSerialiser;
import com.minelittlepony.render.PonySkullRenderer; import com.minelittlepony.render.skull.PonySkullRenderer;
import com.mumfrey.liteloader.core.LiteLoader; import com.mumfrey.liteloader.core.LiteLoader;
import com.voxelmodpack.hdskins.HDSkinManager; import com.voxelmodpack.hdskins.HDSkinManager;
import com.voxelmodpack.hdskins.skins.LegacySkinServer; import com.voxelmodpack.hdskins.skins.LegacySkinServer;

View file

@ -6,7 +6,7 @@ import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import com.minelittlepony.render.LevitatingItemRenderer; import com.minelittlepony.render.LevitatingItemRenderer;
import com.minelittlepony.render.PonySkullRenderer; import com.minelittlepony.render.skull.PonySkullRenderer;
import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.GlStateManager;

View file

@ -10,9 +10,9 @@ import com.minelittlepony.pony.data.IPony;
import com.minelittlepony.pony.data.IPonyData; import com.minelittlepony.pony.data.IPonyData;
import com.minelittlepony.pony.data.PonyData; import com.minelittlepony.pony.data.PonyData;
import com.minelittlepony.pony.data.PonySize; import com.minelittlepony.pony.data.PonySize;
import com.minelittlepony.render.AbstractPonyRenderer; import com.minelittlepony.render.model.PlaneRenderer;
import com.minelittlepony.render.PonyRenderer; import com.minelittlepony.render.model.PonyRenderer;
import com.minelittlepony.render.plane.PlaneRenderer; import com.minelittlepony.util.render.AbstractBoxRenderer;
import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelPlayer; import net.minecraft.client.model.ModelPlayer;
@ -512,10 +512,10 @@ public abstract class AbstractPonyModel extends ModelPlayer implements IModel, P
setHead(1, 2, isSneak ? -1 : 1); setHead(1, 2, isSneak ? -1 : 1);
AbstractPonyRenderer.shiftRotationPoint(bipedRightArm, 0, 2, 6); AbstractBoxRenderer.shiftRotationPoint(bipedRightArm, 0, 2, 6);
AbstractPonyRenderer.shiftRotationPoint(bipedLeftArm, 0, 2, 6); AbstractBoxRenderer.shiftRotationPoint(bipedLeftArm, 0, 2, 6);
AbstractPonyRenderer.shiftRotationPoint(bipedRightLeg, 0, 2, -8); AbstractBoxRenderer.shiftRotationPoint(bipedRightLeg, 0, 2, -8);
AbstractPonyRenderer.shiftRotationPoint(bipedLeftLeg, 0, 2, -8); AbstractBoxRenderer.shiftRotationPoint(bipedLeftLeg, 0, 2, -8);
} }
public void init(float yOffset, float stretch) { public void init(float yOffset, float stretch) {

View file

@ -6,7 +6,7 @@ import net.minecraft.entity.Entity;
import com.minelittlepony.model.AbstractPonyModel; import com.minelittlepony.model.AbstractPonyModel;
import com.minelittlepony.model.capabilities.IModel; import com.minelittlepony.model.capabilities.IModel;
import com.minelittlepony.model.capabilities.IModelArmor; import com.minelittlepony.model.capabilities.IModelArmor;
import com.minelittlepony.render.PonyRenderer; import com.minelittlepony.render.model.PonyRenderer;
public class ModelPonyArmor extends AbstractPonyModel implements IModelArmor { public class ModelPonyArmor extends AbstractPonyModel implements IModelArmor {

View file

@ -1,9 +1,9 @@
package com.minelittlepony.model.capabilities; package com.minelittlepony.model.capabilities;
import com.minelittlepony.render.PonyRenderer;
import net.minecraft.util.EnumHandSide; import net.minecraft.util.EnumHandSide;
import com.minelittlepony.render.model.PonyRenderer;
public interface IModelUnicorn extends IModel { public interface IModelUnicorn extends IModel {
PonyRenderer getUnicornArmForSide(EnumHandSide side); PonyRenderer getUnicornArmForSide(EnumHandSide side);

View file

@ -2,7 +2,7 @@ package com.minelittlepony.model.components;
import com.minelittlepony.model.AbstractPonyModel; import com.minelittlepony.model.AbstractPonyModel;
import com.minelittlepony.model.capabilities.IModelPegasus; import com.minelittlepony.model.capabilities.IModelPegasus;
import com.minelittlepony.render.plane.PlaneRenderer; import com.minelittlepony.render.model.PlaneRenderer;
import static com.minelittlepony.model.PonyModelConstants.EXT_WING_RP_X; import static com.minelittlepony.model.PonyModelConstants.EXT_WING_RP_X;
import static com.minelittlepony.model.PonyModelConstants.EXT_WING_RP_Y; import static com.minelittlepony.model.PonyModelConstants.EXT_WING_RP_Y;

View file

@ -3,7 +3,7 @@ package com.minelittlepony.model.components;
import com.minelittlepony.model.capabilities.ICapitated; import com.minelittlepony.model.capabilities.ICapitated;
import com.minelittlepony.pony.data.IPonyData; import com.minelittlepony.pony.data.IPonyData;
import com.minelittlepony.pony.data.PonyData; import com.minelittlepony.pony.data.PonyData;
import com.minelittlepony.render.PonyRenderer; import com.minelittlepony.render.model.PonyRenderer;
import net.minecraft.client.model.ModelHumanoidHead; import net.minecraft.client.model.ModelHumanoidHead;
import net.minecraft.client.model.ModelRenderer; import net.minecraft.client.model.ModelRenderer;

View file

@ -5,7 +5,8 @@ import static com.minelittlepony.model.PonyModelConstants.*;
import com.minelittlepony.model.AbstractPonyModel; import com.minelittlepony.model.AbstractPonyModel;
import com.minelittlepony.model.capabilities.IModelPegasus; import com.minelittlepony.model.capabilities.IModelPegasus;
import com.minelittlepony.pony.data.PonyWearable; import com.minelittlepony.pony.data.PonyWearable;
import com.minelittlepony.render.PonyRenderer; import com.minelittlepony.render.model.PonyRenderer;
import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.GlStateManager;
public class ModelWing<T extends AbstractPonyModel & IModelPegasus> { public class ModelWing<T extends AbstractPonyModel & IModelPegasus> {

View file

@ -9,7 +9,7 @@ import org.lwjgl.opengl.GL11;
import com.minelittlepony.model.AbstractPonyModel; import com.minelittlepony.model.AbstractPonyModel;
import com.minelittlepony.model.capabilities.IModelPart; import com.minelittlepony.model.capabilities.IModelPart;
import com.minelittlepony.render.PonyRenderer; import com.minelittlepony.render.model.PonyRenderer;
public class Muffin implements IModelPart { public class Muffin implements IModelPart {

View file

@ -1,7 +1,5 @@
package com.minelittlepony.model.components; package com.minelittlepony.model.components;
import com.minelittlepony.render.PonyRenderer;
import net.minecraft.client.entity.AbstractClientPlayer; import net.minecraft.client.entity.AbstractClientPlayer;
import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelBase;
import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.GlStateManager;
@ -9,6 +7,8 @@ import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.EntityLivingBase;
import net.minecraft.util.math.Vec3d; import net.minecraft.util.math.Vec3d;
import com.minelittlepony.render.model.PonyRenderer;
import static com.minelittlepony.model.PonyModelConstants.*; import static com.minelittlepony.model.PonyModelConstants.*;
/** /**

View file

@ -1,7 +1,7 @@
package com.minelittlepony.model.components; package com.minelittlepony.model.components;
import com.minelittlepony.pony.data.PonyGender; import com.minelittlepony.pony.data.PonyGender;
import com.minelittlepony.render.plane.PlaneRenderer; import com.minelittlepony.render.model.PlaneRenderer;
import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelBase;

View file

@ -7,7 +7,7 @@ import static com.minelittlepony.model.PonyModelConstants.*;
import com.minelittlepony.model.AbstractPonyModel; import com.minelittlepony.model.AbstractPonyModel;
import com.minelittlepony.model.capabilities.IModelPart; import com.minelittlepony.model.capabilities.IModelPart;
import com.minelittlepony.render.plane.PlaneRenderer; import com.minelittlepony.render.model.PlaneRenderer;
public class PonyTail extends PlaneRenderer implements IModelPart { public class PonyTail extends PlaneRenderer implements IModelPart {
@ -106,7 +106,7 @@ public class PonyTail extends PlaneRenderer implements IModelPart {
.addWestPlane(-2, 0, 2, 4, 4, stretch); .addWestPlane(-2, 0, 2, 4, 4, stretch);
tex(32, texX).addBackPlane(-2, 0, 2, 4, 4, stretch) tex(32, texX).addBackPlane(-2, 0, 2, 4, 4, stretch)
.addFrontPlane(-2, 0, 6, 4, 4, stretch); .addFrontPlane(-2, 0, 6, 4, 4, stretch);
tex(32, 0).addBottomPlane(-2, 4, 2, 4, 4, stretch); tex(32, 0) .addBottomPlane(-2, 4, 2, 4, 4, stretch);
} }
@Override @Override

View file

@ -5,7 +5,7 @@ import static com.minelittlepony.model.PonyModelConstants.*;
import com.minelittlepony.model.AbstractPonyModel; import com.minelittlepony.model.AbstractPonyModel;
import com.minelittlepony.model.capabilities.IModelPart; import com.minelittlepony.model.capabilities.IModelPart;
import com.minelittlepony.model.capabilities.IModelPegasus; import com.minelittlepony.model.capabilities.IModelPegasus;
import com.minelittlepony.render.plane.PlaneRenderer; import com.minelittlepony.render.model.PlaneRenderer;
import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.util.math.MathHelper; import net.minecraft.util.math.MathHelper;
@ -43,8 +43,8 @@ public class SaddleBags implements IModelPart {
.addBackPlane(0, 0, 2, 8, 1, stretch) .addBackPlane(0, 0, 2, 8, 1, stretch)
.addFrontPlane(0, 0, 0, 8, 1, stretch) .addFrontPlane(0, 0, 0, 8, 1, stretch)
.child(0).offset(0, -3, -0.305F).tex(56, 31) .child(0).offset(0, -3, -0.305F).tex(56, 31)
.addWestPlane(4.0002F, 0, 0, 1, 3, stretch) // 0.0001 is there .addWestPlane( 4.0002F, 0, 0, 1, 3, stretch) // 0.0001 is there
.addWestPlane(4.0002F, -1, 0, 1, 3, stretch) // otherwise straps .addWestPlane( 4.0002F, -1, 0, 1, 3, stretch) // otherwise straps
.addWestPlane(-4.0002F, 0, 0, 1, 3, stretch) // clip into the body .addWestPlane(-4.0002F, 0, 0, 1, 3, stretch) // clip into the body
.addWestPlane(-4.0002F, -1, 0, 1, 3, stretch) .addWestPlane(-4.0002F, -1, 0, 1, 3, stretch)
.rotateAngleX = ROTATE_270; .rotateAngleX = ROTATE_270;

View file

@ -2,8 +2,8 @@ package com.minelittlepony.model.components;
import com.minelittlepony.model.AbstractPonyModel; import com.minelittlepony.model.AbstractPonyModel;
import com.minelittlepony.model.capabilities.IModelPart; import com.minelittlepony.model.capabilities.IModelPart;
import com.minelittlepony.render.PonyRenderer; import com.minelittlepony.render.model.PlaneRenderer;
import com.minelittlepony.render.plane.PlaneRenderer; import com.minelittlepony.render.model.PonyRenderer;
import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.util.math.MathHelper; import net.minecraft.util.math.MathHelper;

View file

@ -2,8 +2,8 @@ package com.minelittlepony.model.components;
import com.minelittlepony.model.capabilities.ICapitated; import com.minelittlepony.model.capabilities.ICapitated;
import com.minelittlepony.model.capabilities.IModelPart; import com.minelittlepony.model.capabilities.IModelPart;
import com.minelittlepony.render.HornGlowRenderer; import com.minelittlepony.render.model.GlowRenderer;
import com.minelittlepony.render.PonyRenderer; import com.minelittlepony.render.model.PonyRenderer;
import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelBase;
@ -14,7 +14,7 @@ import static com.minelittlepony.model.PonyModelConstants.*;
public class UnicornHorn implements IModelPart { public class UnicornHorn implements IModelPart {
protected PonyRenderer horn; protected PonyRenderer horn;
protected HornGlowRenderer glow; protected GlowRenderer glow;
protected boolean isVisible = true; protected boolean isVisible = true;
@ -24,7 +24,7 @@ public class UnicornHorn implements IModelPart {
public <T extends ModelBase & ICapitated> UnicornHorn(T pony, float yOffset, float stretch, int x, int y, int z) { public <T extends ModelBase & ICapitated> UnicornHorn(T pony, float yOffset, float stretch, int x, int y, int z) {
horn = new PonyRenderer(pony, 0, 3); horn = new PonyRenderer(pony, 0, 3);
glow = new HornGlowRenderer(pony, 0, 3); glow = new GlowRenderer(pony, 0, 3);
horn.offset(HORN_X + x, HORN_Y + y, HORN_Z + z) horn.offset(HORN_X + x, HORN_Y + y, HORN_Z + z)
.around(HEAD_RP_X, HEAD_RP_Y + yOffset, HEAD_RP_Z) .around(HEAD_RP_X, HEAD_RP_Y + yOffset, HEAD_RP_Z)

View file

@ -3,7 +3,7 @@ package com.minelittlepony.model.player;
import com.minelittlepony.model.components.BatWings; import com.minelittlepony.model.components.BatWings;
import com.minelittlepony.model.components.PegasusWings; import com.minelittlepony.model.components.PegasusWings;
import com.minelittlepony.pony.data.PonyWearable; import com.minelittlepony.pony.data.PonyWearable;
import com.minelittlepony.render.PonyRenderer; import com.minelittlepony.render.model.PonyRenderer;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;

View file

@ -3,7 +3,8 @@ package com.minelittlepony.model.player;
import com.minelittlepony.model.AbstractPonyModel; import com.minelittlepony.model.AbstractPonyModel;
import com.minelittlepony.model.components.SaddleBags; import com.minelittlepony.model.components.SaddleBags;
import com.minelittlepony.pony.data.PonyWearable; import com.minelittlepony.pony.data.PonyWearable;
import com.minelittlepony.render.PonyRenderer; import com.minelittlepony.render.model.PonyRenderer;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
public class ModelEarthPony extends AbstractPonyModel { public class ModelEarthPony extends AbstractPonyModel {

View file

@ -1,7 +1,7 @@
package com.minelittlepony.model.player; package com.minelittlepony.model.player;
import com.minelittlepony.model.components.UnicornHorn; import com.minelittlepony.model.components.UnicornHorn;
import com.minelittlepony.render.PonyRenderer; import com.minelittlepony.render.model.PonyRenderer;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
import net.minecraft.util.EnumHandSide; import net.minecraft.util.EnumHandSide;

View file

@ -1,10 +1,10 @@
package com.minelittlepony.model.player; package com.minelittlepony.model.player;
import com.minelittlepony.render.PonyRenderer;
import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
import com.minelittlepony.render.model.PonyRenderer;
public class ModelZebra extends ModelEarthPony { public class ModelZebra extends ModelEarthPony {
public PonyRenderer bristles; public PonyRenderer bristles;

View file

@ -6,9 +6,9 @@ import net.minecraft.entity.Entity;
import net.minecraft.util.EnumHandSide; import net.minecraft.util.EnumHandSide;
import net.minecraft.util.math.MathHelper; import net.minecraft.util.math.MathHelper;
import static com.minelittlepony.model.PonyModelConstants.PI; import com.minelittlepony.render.model.PonyRenderer;
import com.minelittlepony.render.PonyRenderer; import static com.minelittlepony.model.PonyModelConstants.PI;
public class ModelBreezie extends ModelBiped { public class ModelBreezie extends ModelBiped {

View file

@ -7,7 +7,7 @@ import net.minecraft.entity.EntityLivingBase;
import net.minecraft.util.math.MathHelper; import net.minecraft.util.math.MathHelper;
import com.minelittlepony.model.components.PonySnout; import com.minelittlepony.model.components.PonySnout;
import com.minelittlepony.render.PonyRenderer; import com.minelittlepony.render.model.PonyRenderer;
public class ModelEnderStallion extends ModelSkeletonPony { public class ModelEnderStallion extends ModelSkeletonPony {

View file

@ -3,8 +3,8 @@ package com.minelittlepony.model.ponies;
import com.minelittlepony.model.components.SeaponyTail; import com.minelittlepony.model.components.SeaponyTail;
import com.minelittlepony.model.player.ModelUnicorn; import com.minelittlepony.model.player.ModelUnicorn;
import com.minelittlepony.pony.data.IPony; import com.minelittlepony.pony.data.IPony;
import com.minelittlepony.render.PonyRenderer; import com.minelittlepony.render.model.PlaneRenderer;
import com.minelittlepony.render.plane.PlaneRenderer; import com.minelittlepony.render.model.PonyRenderer;
import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;

View file

@ -9,7 +9,7 @@ import com.minelittlepony.model.capabilities.IModelPart;
import com.minelittlepony.model.components.Muffin; import com.minelittlepony.model.components.Muffin;
import com.minelittlepony.model.player.ModelAlicorn; import com.minelittlepony.model.player.ModelAlicorn;
import com.minelittlepony.pony.data.PonyWearable; import com.minelittlepony.pony.data.PonyWearable;
import com.minelittlepony.render.plane.PlaneRenderer; import com.minelittlepony.render.model.PlaneRenderer;
public class ModelVillagerPony extends ModelAlicorn { public class ModelVillagerPony extends ModelAlicorn {

View file

@ -13,7 +13,7 @@ import org.lwjgl.opengl.GL11;
import com.minelittlepony.model.player.ModelZebra; import com.minelittlepony.model.player.ModelZebra;
import com.minelittlepony.pony.data.IPony; import com.minelittlepony.pony.data.IPony;
import com.minelittlepony.render.PonyRenderer; import com.minelittlepony.render.model.PonyRenderer;
public class ModelWitchPony extends ModelZebra { public class ModelWitchPony extends ModelZebra {

View file

@ -1,7 +1,7 @@
package com.minelittlepony.model.ponies; package com.minelittlepony.model.ponies;
import com.minelittlepony.model.ModelMobPony; import com.minelittlepony.model.ModelMobPony;
import com.minelittlepony.render.AbstractPonyRenderer; import com.minelittlepony.util.render.AbstractBoxRenderer;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.EntityLivingBase;
@ -24,10 +24,10 @@ public class ModelZombiePony extends ModelMobPony {
if (islookAngleRight(move)) { if (islookAngleRight(move)) {
rotateArmHolding(bipedRightArm, 1, swingProgress, ticks); rotateArmHolding(bipedRightArm, 1, swingProgress, ticks);
AbstractPonyRenderer.shiftRotationPoint(bipedRightArm, 0.5F, 1.5F, 3); AbstractBoxRenderer.shiftRotationPoint(bipedRightArm, 0.5F, 1.5F, 3);
} else { } else {
rotateArmHolding(bipedLeftArm, -1, swingProgress, ticks); rotateArmHolding(bipedLeftArm, -1, swingProgress, ticks);
AbstractPonyRenderer.shiftRotationPoint(bipedLeftArm, -0.5F, 1.5F, 3); AbstractBoxRenderer.shiftRotationPoint(bipedLeftArm, -0.5F, 1.5F, 3);
} }
} }

View file

@ -5,7 +5,8 @@ import org.lwjgl.opengl.GL14;
import com.minelittlepony.MineLittlePony; import com.minelittlepony.MineLittlePony;
import com.minelittlepony.ducks.IRenderItem; import com.minelittlepony.ducks.IRenderItem;
import com.minelittlepony.pony.data.IPony; import com.minelittlepony.pony.data.IPony;
import com.minelittlepony.util.coordinates.Color; import com.minelittlepony.render.skull.PonySkullRenderer;
import com.minelittlepony.util.render.Color;
import com.mumfrey.liteloader.client.overlays.IMinecraft; import com.mumfrey.liteloader.client.overlays.IMinecraft;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;

View file

@ -8,7 +8,7 @@ import com.minelittlepony.model.armour.IArmorTextureResolver;
import com.minelittlepony.model.armour.ModelPonyArmor; import com.minelittlepony.model.armour.ModelPonyArmor;
import com.minelittlepony.model.armour.DefaultPonyArmorTextureResolver; import com.minelittlepony.model.armour.DefaultPonyArmorTextureResolver;
import com.minelittlepony.model.capabilities.IModelArmor; import com.minelittlepony.model.capabilities.IModelArmor;
import com.minelittlepony.util.coordinates.Color; import com.minelittlepony.util.render.Color;
import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelBiped; import net.minecraft.client.model.ModelBiped;

View file

@ -11,7 +11,7 @@ import com.minelittlepony.ducks.IRenderPony;
import com.minelittlepony.model.AbstractPonyModel; import com.minelittlepony.model.AbstractPonyModel;
import com.minelittlepony.model.BodyPart; import com.minelittlepony.model.BodyPart;
import com.minelittlepony.model.ModelWrapper; import com.minelittlepony.model.ModelWrapper;
import com.minelittlepony.render.PonySkullRenderer; import com.minelittlepony.render.skull.PonySkullRenderer;
import com.mojang.authlib.GameProfile; import com.mojang.authlib.GameProfile;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.block.model.ItemCameraTransforms.TransformType; import net.minecraft.client.renderer.block.model.ItemCameraTransforms.TransformType;

View file

@ -1,28 +1,29 @@
package com.minelittlepony.render; package com.minelittlepony.render.model;
import com.minelittlepony.util.coordinates.Color;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelBase;
import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL11;
public class HornGlowRenderer extends AbstractPonyRenderer<HornGlowRenderer> { import com.minelittlepony.util.render.AbstractBoxRenderer;
import com.minelittlepony.util.render.Color;
public class GlowRenderer extends AbstractBoxRenderer<GlowRenderer> {
int tint; int tint;
float alpha = 1; float alpha = 1;
public HornGlowRenderer(ModelBase model, int x, int y) { public GlowRenderer(ModelBase model, int x, int y) {
super(model, x, y); super(model, x, y);
} }
public HornGlowRenderer setAlpha(float alpha) { public GlowRenderer setAlpha(float alpha) {
this.alpha = alpha; this.alpha = alpha;
return this; return this;
} }
public HornGlowRenderer setTint(int tint) { public GlowRenderer setTint(int tint) {
this.tint = tint; this.tint = tint;
return this; return this;
@ -34,7 +35,7 @@ public class HornGlowRenderer extends AbstractPonyRenderer<HornGlowRenderer> {
@Override @Override
public void createBox(float offX, float offY, float offZ, int width, int height, int depth, float scaleFactor, boolean mirrored) { public void createBox(float offX, float offY, float offZ, int width, int height, int depth, float scaleFactor, boolean mirrored) {
cubeList.add(new HornGlow(this, textureOffsetX, textureOffsetY, offX, offY, offZ, width, height, depth, scaleFactor, alpha)); cubeList.add(new ModelGlow(this, textureOffsetX, textureOffsetY, offX, offY, offZ, width, height, depth, scaleFactor, alpha));
} }
@Override @Override
@ -46,7 +47,7 @@ public class HornGlowRenderer extends AbstractPonyRenderer<HornGlowRenderer> {
} }
@Override @Override
protected HornGlowRenderer copySelf() { protected GlowRenderer copySelf() {
return new HornGlowRenderer(baseModel, textureOffsetX, textureOffsetY); return new GlowRenderer(baseModel, textureOffsetX, textureOffsetY);
} }
} }

View file

@ -1,19 +1,21 @@
package com.minelittlepony.render; package com.minelittlepony.render.model;
import net.minecraft.client.renderer.BufferBuilder; import net.minecraft.client.renderer.BufferBuilder;
import com.minelittlepony.util.coordinates.*; import com.minelittlepony.util.render.Box;
import com.minelittlepony.util.render.Quad;
import com.minelittlepony.util.render.Vertex;
/** /**
* Like a normal box, but with the top narrowed a bit. * Like a normal box, but with the top narrowed a bit.
*/ */
public class HornGlow extends Box<HornGlowRenderer> { public class ModelGlow extends Box<GlowRenderer> {
private final float alpha; private final float alpha;
private Quad[] quadList; private Quad[] quadList;
public HornGlow(HornGlowRenderer renderer, int texX, int texY, float xMin, float yMin, float zMin, int w, int h, int d, float scale, float alpha) { public ModelGlow(GlowRenderer renderer, int texX, int texY, float xMin, float yMin, float zMin, int w, int h, int d, float scale, float alpha) {
super(renderer, texX, texY, xMin, yMin, zMin, w, h, d, scale); super(renderer, texX, texY, xMin, yMin, zMin, w, h, d, scale);
this.alpha = alpha; this.alpha = alpha;

View file

@ -1,10 +1,12 @@
package com.minelittlepony.render.plane; package com.minelittlepony.render.model;
import net.minecraft.client.renderer.BufferBuilder; import net.minecraft.client.renderer.BufferBuilder;
import javax.annotation.Nonnull; import com.minelittlepony.util.render.Box;
import com.minelittlepony.util.render.Quad;
import com.minelittlepony.util.render.Vertex;
import com.minelittlepony.util.coordinates.*; import javax.annotation.Nonnull;
public class ModelPlane extends Box<PlaneRenderer> { public class ModelPlane extends Box<PlaneRenderer> {
@ -12,7 +14,7 @@ public class ModelPlane extends Box<PlaneRenderer> {
public boolean hidden = false; public boolean hidden = false;
public ModelPlane(PlaneRenderer renderer, int textureX, int textureY, float xMin, float yMin, float zMin, int w, int h, int d, float scale, Face face) { public ModelPlane(PlaneRenderer renderer, int textureX, int textureY, float xMin, float yMin, float zMin, int w, int h, int d, float scale, Plane face) {
super(renderer, textureX, textureY, xMin, yMin, zMin, w, h, d, scale, false); super(renderer, textureX, textureY, xMin, yMin, zMin, w, h, d, scale, false);
float xMax = xMin + w + scale; float xMax = xMin + w + scale;
@ -51,22 +53,22 @@ public class ModelPlane extends Box<PlaneRenderer> {
Vertex eun = vert(xMax, yMax, zMax, 8, 8); Vertex eun = vert(xMax, yMax, zMax, 8, 8);
Vertex wun = vert(xMin, yMax, zMax, 8, 0); Vertex wun = vert(xMin, yMax, zMax, 8, 0);
if (face == Face.EAST) { if (face == Plane.EAST) {
quad = quad(textureX, d, textureY, h, edn, eds, eus, eun); quad = quad(textureX, d, textureY, h, edn, eds, eus, eun);
} }
if (face == Face.WEST) { if (face == Plane.WEST) {
quad = quad(textureX, d, textureY, h, wds, wdn, wun, wus); quad = quad(textureX, d, textureY, h, wds, wdn, wun, wus);
} }
if (face == Face.UP) { if (face == Plane.UP) {
quad = quad(textureX, w, textureY, d, edn, wdn, wds, eds); quad = quad(textureX, w, textureY, d, edn, wdn, wds, eds);
} }
if (face == Face.DOWN) { if (face == Plane.DOWN) {
quad = quad(textureX, w, textureY, d, eus, wus, wun, eun); quad = quad(textureX, w, textureY, d, eus, wus, wun, eun);
} }
if (face == Face.SOUTH) { if (face == Plane.SOUTH) {
quad = quad(textureX, w, textureY, h, eds, wds, wus, eus); quad = quad(textureX, w, textureY, h, eds, wds, wus, eus);
} }
if (face == Face.NORTH) { if (face == Plane.NORTH) {
quad = quad(textureX, w, textureY, h, wdn, edn, eun, wun); quad = quad(textureX, w, textureY, h, wdn, edn, eun, wun);
} }

View file

@ -0,0 +1,10 @@
package com.minelittlepony.render.model;
enum Plane {
NORTH,
SOUTH,
UP,
DOWN,
EAST,
WEST
}

View file

@ -1,10 +1,10 @@
package com.minelittlepony.render.plane; package com.minelittlepony.render.model;
import com.minelittlepony.render.AbstractPonyRenderer;
import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelBase;
public class PlaneRenderer extends AbstractPonyRenderer<PlaneRenderer> { import com.minelittlepony.util.render.AbstractBoxRenderer;
public class PlaneRenderer extends AbstractBoxRenderer<PlaneRenderer> {
public boolean mirrory, mirrorz; public boolean mirrory, mirrorz;
@ -38,32 +38,32 @@ public class PlaneRenderer extends AbstractPonyRenderer<PlaneRenderer> {
return new PlaneRenderer(baseModel, textureOffsetX, textureOffsetY); return new PlaneRenderer(baseModel, textureOffsetX, textureOffsetY);
} }
private PlaneRenderer addPlane(float offX, float offY, float offZ, int width, int height, int depth, float scale, Face face) { private PlaneRenderer addPlane(float offX, float offY, float offZ, int width, int height, int depth, float scale, Plane face) {
cubeList.add(new ModelPlane(this, textureOffsetX, textureOffsetY, modelOffsetX + offX, modelOffsetY + offY, modelOffsetZ + offZ, width, height, depth, scale, face)); cubeList.add(new ModelPlane(this, textureOffsetX, textureOffsetY, modelOffsetX + offX, modelOffsetY + offY, modelOffsetZ + offZ, width, height, depth, scale, face));
return this; return this;
} }
public PlaneRenderer addTopPlane(float offX, float offY, float offZ, int width, int depth, float scale) { public PlaneRenderer addTopPlane(float offX, float offY, float offZ, int width, int depth, float scale) {
return addPlane(offX, offY, offZ, width, 0, depth, scale, Face.UP); return addPlane(offX, offY, offZ, width, 0, depth, scale, Plane.UP);
} }
public PlaneRenderer addBottomPlane(float offX, float offY, float offZ, int width, int depth, float scale) { public PlaneRenderer addBottomPlane(float offX, float offY, float offZ, int width, int depth, float scale) {
return addPlane(offX, offY, offZ, width, 0, depth, scale, Face.DOWN); return addPlane(offX, offY, offZ, width, 0, depth, scale, Plane.DOWN);
} }
public PlaneRenderer addWestPlane(float offX, float offY, float offZ, int height, int depth, float scale) { public PlaneRenderer addWestPlane(float offX, float offY, float offZ, int height, int depth, float scale) {
return addPlane(offX, offY, offZ, 0, height, depth, scale, Face.WEST); return addPlane(offX, offY, offZ, 0, height, depth, scale, Plane.WEST);
} }
public PlaneRenderer addEastPlane(float offX, float offY, float offZ, int height, int depth, float scale) { public PlaneRenderer addEastPlane(float offX, float offY, float offZ, int height, int depth, float scale) {
return addPlane(offX, offY, offZ, 0, height, depth, scale, Face.EAST); return addPlane(offX, offY, offZ, 0, height, depth, scale, Plane.EAST);
} }
public PlaneRenderer addFrontPlane(float offX, float offY, float offZ, int width, int height, float scale) { public PlaneRenderer addFrontPlane(float offX, float offY, float offZ, int width, int height, float scale) {
return addPlane(offX, offY, offZ - scale * 2, width, height, 0, scale, Face.NORTH); return addPlane(offX, offY, offZ - scale * 2, width, height, 0, scale, Plane.NORTH);
} }
public PlaneRenderer addBackPlane(float offX, float offY, float offZ, int width, int height, float scale) { public PlaneRenderer addBackPlane(float offX, float offY, float offZ, int width, int height, float scale) {
return addPlane(offX, offY, offZ + scale * 2, width, height, 0, scale, Face.SOUTH); return addPlane(offX, offY, offZ + scale * 2, width, height, 0, scale, Plane.SOUTH);
} }
} }

View file

@ -1,8 +1,10 @@
package com.minelittlepony.render; package com.minelittlepony.render.model;
import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelBase;
public class PonyRenderer extends AbstractPonyRenderer<PonyRenderer> { import com.minelittlepony.util.render.AbstractBoxRenderer;
public class PonyRenderer extends AbstractBoxRenderer<PonyRenderer> {
public PonyRenderer(ModelBase model) { public PonyRenderer(ModelBase model) {
super(model); super(model);

View file

@ -1,6 +1,6 @@
@MethodsReturnNonnullByDefault @MethodsReturnNonnullByDefault
@ParametersAreNonnullByDefault @ParametersAreNonnullByDefault
package com.minelittlepony.render.plane; package com.minelittlepony.render.model;
import mcp.MethodsReturnNonnullByDefault; import mcp.MethodsReturnNonnullByDefault;

View file

@ -1,7 +0,0 @@
package com.minelittlepony.render.plane;
enum Face {
NORTH, SOUTH,
UP, DOWN,
EAST, WEST;
}

View file

@ -4,7 +4,6 @@ import com.minelittlepony.PonyConfig;
import com.minelittlepony.model.components.ModelDeadMau5Ears; import com.minelittlepony.model.components.ModelDeadMau5Ears;
import com.minelittlepony.pony.data.Pony; import com.minelittlepony.pony.data.Pony;
import com.minelittlepony.pony.data.PonyLevel; import com.minelittlepony.pony.data.PonyLevel;
import com.minelittlepony.render.PonySkull;
import com.minelittlepony.render.RenderPony; import com.minelittlepony.render.RenderPony;
import com.mojang.authlib.GameProfile; import com.mojang.authlib.GameProfile;
import com.mojang.authlib.minecraft.MinecraftProfileTexture; import com.mojang.authlib.minecraft.MinecraftProfileTexture;

View file

@ -1,8 +1,8 @@
package com.minelittlepony.render; package com.minelittlepony.render.skull;
import com.minelittlepony.model.components.ModelPonyHead; import com.minelittlepony.model.components.ModelPonyHead;
import com.minelittlepony.pony.data.IPony; import com.minelittlepony.pony.data.IPony;
import com.minelittlepony.render.PonySkullRenderer.ISkull; import com.minelittlepony.render.skull.PonySkullRenderer.ISkull;
public abstract class PonySkull implements ISkull { public abstract class PonySkull implements ISkull {

View file

@ -1,13 +1,9 @@
package com.minelittlepony.render; package com.minelittlepony.render.skull;
import com.minelittlepony.MineLittlePony; import com.minelittlepony.MineLittlePony;
import com.minelittlepony.PonyConfig; import com.minelittlepony.PonyConfig;
import com.minelittlepony.ducks.IRenderItem; import com.minelittlepony.ducks.IRenderItem;
import com.minelittlepony.pony.data.IPony; import com.minelittlepony.pony.data.IPony;
import com.minelittlepony.render.skull.PlayerSkullRenderer;
import com.minelittlepony.render.skull.SkeletonSkullRenderer;
import com.minelittlepony.render.skull.WitherSkullRenderer;
import com.minelittlepony.render.skull.ZombieSkullRenderer;
import com.mojang.authlib.GameProfile; import com.mojang.authlib.GameProfile;
import com.mumfrey.liteloader.util.ModUtilities; import com.mumfrey.liteloader.util.ModUtilities;
import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.GlStateManager;

View file

@ -1,7 +1,6 @@
package com.minelittlepony.render.skull; package com.minelittlepony.render.skull;
import com.minelittlepony.PonyConfig; import com.minelittlepony.PonyConfig;
import com.minelittlepony.render.PonySkull;
import com.minelittlepony.render.ponies.RenderPonySkeleton; import com.minelittlepony.render.ponies.RenderPonySkeleton;
import com.mojang.authlib.GameProfile; import com.mojang.authlib.GameProfile;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;

View file

@ -1,7 +1,6 @@
package com.minelittlepony.render.skull; package com.minelittlepony.render.skull;
import com.minelittlepony.PonyConfig; import com.minelittlepony.PonyConfig;
import com.minelittlepony.render.PonySkull;
import com.minelittlepony.render.ponies.RenderPonySkeleton; import com.minelittlepony.render.ponies.RenderPonySkeleton;
import com.mojang.authlib.GameProfile; import com.mojang.authlib.GameProfile;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;

View file

@ -1,7 +1,6 @@
package com.minelittlepony.render.skull; package com.minelittlepony.render.skull;
import com.minelittlepony.PonyConfig; import com.minelittlepony.PonyConfig;
import com.minelittlepony.render.PonySkull;
import com.minelittlepony.render.ponies.RenderPonyZombie; import com.minelittlepony.render.ponies.RenderPonyZombie;
import com.mojang.authlib.GameProfile; import com.mojang.authlib.GameProfile;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;

View file

@ -1,4 +1,4 @@
package com.minelittlepony.render; package com.minelittlepony.util.render;
import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelBox; import net.minecraft.client.model.ModelBox;
@ -6,7 +6,7 @@ import net.minecraft.client.model.ModelRenderer;
import net.minecraft.client.model.TextureOffset; import net.minecraft.client.model.TextureOffset;
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
public abstract class AbstractPonyRenderer<T extends AbstractPonyRenderer<T>> extends ModelRenderer { public abstract class AbstractBoxRenderer<T extends AbstractBoxRenderer<T>> extends ModelRenderer {
protected final ModelBase baseModel; protected final ModelBase baseModel;
@ -17,12 +17,12 @@ public abstract class AbstractPonyRenderer<T extends AbstractPonyRenderer<T>> ex
protected float modelOffsetY; protected float modelOffsetY;
protected float modelOffsetZ; protected float modelOffsetZ;
public AbstractPonyRenderer(ModelBase model) { public AbstractBoxRenderer(ModelBase model) {
super(model); super(model);
baseModel = model; baseModel = model;
} }
public AbstractPonyRenderer(ModelBase model, int texX, int texY) { public AbstractBoxRenderer(ModelBase model, int texX, int texY) {
super(model, texX, texY); super(model, texX, texY);
baseModel = model; baseModel = model;
} }

View file

@ -1,4 +1,4 @@
package com.minelittlepony.util.coordinates; package com.minelittlepony.util.render;
import net.minecraft.client.model.ModelBox; import net.minecraft.client.model.ModelBox;
import net.minecraft.client.model.ModelRenderer; import net.minecraft.client.model.ModelRenderer;

View file

@ -1,4 +1,4 @@
package com.minelittlepony.util.coordinates; package com.minelittlepony.util.render;
import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.GlStateManager;

View file

@ -1,4 +1,4 @@
package com.minelittlepony.util.coordinates; package com.minelittlepony.util.render;
import net.minecraft.client.model.TexturedQuad; import net.minecraft.client.model.TexturedQuad;

View file

@ -1,4 +1,4 @@
package com.minelittlepony.util.coordinates; package com.minelittlepony.util.render;
import net.minecraft.client.model.PositionTextureVertex; import net.minecraft.client.model.PositionTextureVertex;

View file

@ -1,6 +1,6 @@
@MethodsReturnNonnullByDefault @MethodsReturnNonnullByDefault
@ParametersAreNonnullByDefault @ParametersAreNonnullByDefault
package com.minelittlepony.util.coordinates; package com.minelittlepony.util.render;
import mcp.MethodsReturnNonnullByDefault; import mcp.MethodsReturnNonnullByDefault;