mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2025-02-13 16:24:23 +01:00
Rearrange rendering packages to make them distinct from entity renderers
This commit is contained in:
parent
d8913ed245
commit
d94e0953a7
48 changed files with 123 additions and 118 deletions
|
@ -4,7 +4,7 @@ import com.minelittlepony.gui.GuiPonySettings;
|
|||
import com.minelittlepony.hdskins.gui.GuiSkinsMineLP;
|
||||
import com.minelittlepony.pony.data.IPonyData;
|
||||
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.voxelmodpack.hdskins.HDSkinManager;
|
||||
import com.voxelmodpack.hdskins.skins.LegacySkinServer;
|
||||
|
|
|
@ -6,7 +6,7 @@ import org.spongepowered.asm.mixin.injection.Inject;
|
|||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
|
||||
import com.minelittlepony.render.LevitatingItemRenderer;
|
||||
import com.minelittlepony.render.PonySkullRenderer;
|
||||
import com.minelittlepony.render.skull.PonySkullRenderer;
|
||||
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
|
||||
|
|
|
@ -10,9 +10,9 @@ import com.minelittlepony.pony.data.IPony;
|
|||
import com.minelittlepony.pony.data.IPonyData;
|
||||
import com.minelittlepony.pony.data.PonyData;
|
||||
import com.minelittlepony.pony.data.PonySize;
|
||||
import com.minelittlepony.render.AbstractPonyRenderer;
|
||||
import com.minelittlepony.render.PonyRenderer;
|
||||
import com.minelittlepony.render.plane.PlaneRenderer;
|
||||
import com.minelittlepony.render.model.PlaneRenderer;
|
||||
import com.minelittlepony.render.model.PonyRenderer;
|
||||
import com.minelittlepony.util.render.AbstractBoxRenderer;
|
||||
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
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);
|
||||
|
||||
AbstractPonyRenderer.shiftRotationPoint(bipedRightArm, 0, 2, 6);
|
||||
AbstractPonyRenderer.shiftRotationPoint(bipedLeftArm, 0, 2, 6);
|
||||
AbstractPonyRenderer.shiftRotationPoint(bipedRightLeg, 0, 2, -8);
|
||||
AbstractPonyRenderer.shiftRotationPoint(bipedLeftLeg, 0, 2, -8);
|
||||
AbstractBoxRenderer.shiftRotationPoint(bipedRightArm, 0, 2, 6);
|
||||
AbstractBoxRenderer.shiftRotationPoint(bipedLeftArm, 0, 2, 6);
|
||||
AbstractBoxRenderer.shiftRotationPoint(bipedRightLeg, 0, 2, -8);
|
||||
AbstractBoxRenderer.shiftRotationPoint(bipedLeftLeg, 0, 2, -8);
|
||||
}
|
||||
|
||||
public void init(float yOffset, float stretch) {
|
||||
|
|
|
@ -6,7 +6,7 @@ import net.minecraft.entity.Entity;
|
|||
import com.minelittlepony.model.AbstractPonyModel;
|
||||
import com.minelittlepony.model.capabilities.IModel;
|
||||
import com.minelittlepony.model.capabilities.IModelArmor;
|
||||
import com.minelittlepony.render.PonyRenderer;
|
||||
import com.minelittlepony.render.model.PonyRenderer;
|
||||
|
||||
public class ModelPonyArmor extends AbstractPonyModel implements IModelArmor {
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package com.minelittlepony.model.capabilities;
|
||||
|
||||
import com.minelittlepony.render.PonyRenderer;
|
||||
|
||||
import net.minecraft.util.EnumHandSide;
|
||||
|
||||
import com.minelittlepony.render.model.PonyRenderer;
|
||||
|
||||
public interface IModelUnicorn extends IModel {
|
||||
PonyRenderer getUnicornArmForSide(EnumHandSide side);
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ package com.minelittlepony.model.components;
|
|||
|
||||
import com.minelittlepony.model.AbstractPonyModel;
|
||||
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_Y;
|
||||
|
|
|
@ -3,7 +3,7 @@ package com.minelittlepony.model.components;
|
|||
import com.minelittlepony.model.capabilities.ICapitated;
|
||||
import com.minelittlepony.pony.data.IPonyData;
|
||||
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.ModelRenderer;
|
||||
|
|
|
@ -5,7 +5,8 @@ import static com.minelittlepony.model.PonyModelConstants.*;
|
|||
import com.minelittlepony.model.AbstractPonyModel;
|
||||
import com.minelittlepony.model.capabilities.IModelPegasus;
|
||||
import com.minelittlepony.pony.data.PonyWearable;
|
||||
import com.minelittlepony.render.PonyRenderer;
|
||||
import com.minelittlepony.render.model.PonyRenderer;
|
||||
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
|
||||
public class ModelWing<T extends AbstractPonyModel & IModelPegasus> {
|
||||
|
|
|
@ -9,7 +9,7 @@ import org.lwjgl.opengl.GL11;
|
|||
|
||||
import com.minelittlepony.model.AbstractPonyModel;
|
||||
import com.minelittlepony.model.capabilities.IModelPart;
|
||||
import com.minelittlepony.render.PonyRenderer;
|
||||
import com.minelittlepony.render.model.PonyRenderer;
|
||||
|
||||
public class Muffin implements IModelPart {
|
||||
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
package com.minelittlepony.model.components;
|
||||
|
||||
import com.minelittlepony.render.PonyRenderer;
|
||||
|
||||
import net.minecraft.client.entity.AbstractClientPlayer;
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
|
@ -9,6 +7,8 @@ import net.minecraft.entity.Entity;
|
|||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
|
||||
import com.minelittlepony.render.model.PonyRenderer;
|
||||
|
||||
import static com.minelittlepony.model.PonyModelConstants.*;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package com.minelittlepony.model.components;
|
||||
|
||||
import com.minelittlepony.pony.data.PonyGender;
|
||||
import com.minelittlepony.render.plane.PlaneRenderer;
|
||||
import com.minelittlepony.render.model.PlaneRenderer;
|
||||
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ import static com.minelittlepony.model.PonyModelConstants.*;
|
|||
|
||||
import com.minelittlepony.model.AbstractPonyModel;
|
||||
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 {
|
||||
|
||||
|
@ -106,7 +106,7 @@ public class PonyTail extends PlaneRenderer implements IModelPart {
|
|||
.addWestPlane(-2, 0, 2, 4, 4, stretch);
|
||||
tex(32, texX).addBackPlane(-2, 0, 2, 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
|
||||
|
|
|
@ -5,7 +5,7 @@ import static com.minelittlepony.model.PonyModelConstants.*;
|
|||
import com.minelittlepony.model.AbstractPonyModel;
|
||||
import com.minelittlepony.model.capabilities.IModelPart;
|
||||
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.util.math.MathHelper;
|
||||
|
@ -43,8 +43,8 @@ public class SaddleBags implements IModelPart {
|
|||
.addBackPlane(0, 0, 2, 8, 1, stretch)
|
||||
.addFrontPlane(0, 0, 0, 8, 1, stretch)
|
||||
.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, -1, 0, 1, 3, stretch) // otherwise straps
|
||||
.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, 0, 0, 1, 3, stretch) // clip into the body
|
||||
.addWestPlane(-4.0002F, -1, 0, 1, 3, stretch)
|
||||
.rotateAngleX = ROTATE_270;
|
||||
|
|
|
@ -2,8 +2,8 @@ package com.minelittlepony.model.components;
|
|||
|
||||
import com.minelittlepony.model.AbstractPonyModel;
|
||||
import com.minelittlepony.model.capabilities.IModelPart;
|
||||
import com.minelittlepony.render.PonyRenderer;
|
||||
import com.minelittlepony.render.plane.PlaneRenderer;
|
||||
import com.minelittlepony.render.model.PlaneRenderer;
|
||||
import com.minelittlepony.render.model.PonyRenderer;
|
||||
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
|
|
|
@ -2,8 +2,8 @@ package com.minelittlepony.model.components;
|
|||
|
||||
import com.minelittlepony.model.capabilities.ICapitated;
|
||||
import com.minelittlepony.model.capabilities.IModelPart;
|
||||
import com.minelittlepony.render.HornGlowRenderer;
|
||||
import com.minelittlepony.render.PonyRenderer;
|
||||
import com.minelittlepony.render.model.GlowRenderer;
|
||||
import com.minelittlepony.render.model.PonyRenderer;
|
||||
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
|
||||
|
@ -14,7 +14,7 @@ import static com.minelittlepony.model.PonyModelConstants.*;
|
|||
public class UnicornHorn implements IModelPart {
|
||||
|
||||
protected PonyRenderer horn;
|
||||
protected HornGlowRenderer glow;
|
||||
protected GlowRenderer glow;
|
||||
|
||||
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) {
|
||||
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)
|
||||
.around(HEAD_RP_X, HEAD_RP_Y + yOffset, HEAD_RP_Z)
|
||||
|
|
|
@ -3,7 +3,7 @@ package com.minelittlepony.model.player;
|
|||
import com.minelittlepony.model.components.BatWings;
|
||||
import com.minelittlepony.model.components.PegasusWings;
|
||||
import com.minelittlepony.pony.data.PonyWearable;
|
||||
import com.minelittlepony.render.PonyRenderer;
|
||||
import com.minelittlepony.render.model.PonyRenderer;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
|
|
|
@ -3,7 +3,8 @@ package com.minelittlepony.model.player;
|
|||
import com.minelittlepony.model.AbstractPonyModel;
|
||||
import com.minelittlepony.model.components.SaddleBags;
|
||||
import com.minelittlepony.pony.data.PonyWearable;
|
||||
import com.minelittlepony.render.PonyRenderer;
|
||||
import com.minelittlepony.render.model.PonyRenderer;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
public class ModelEarthPony extends AbstractPonyModel {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package com.minelittlepony.model.player;
|
||||
|
||||
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.util.EnumHandSide;
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
package com.minelittlepony.model.player;
|
||||
|
||||
import com.minelittlepony.render.PonyRenderer;
|
||||
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
import com.minelittlepony.render.model.PonyRenderer;
|
||||
|
||||
public class ModelZebra extends ModelEarthPony {
|
||||
|
||||
public PonyRenderer bristles;
|
||||
|
|
|
@ -6,9 +6,9 @@ import net.minecraft.entity.Entity;
|
|||
import net.minecraft.util.EnumHandSide;
|
||||
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 {
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ import net.minecraft.entity.EntityLivingBase;
|
|||
import net.minecraft.util.math.MathHelper;
|
||||
|
||||
import com.minelittlepony.model.components.PonySnout;
|
||||
import com.minelittlepony.render.PonyRenderer;
|
||||
import com.minelittlepony.render.model.PonyRenderer;
|
||||
|
||||
public class ModelEnderStallion extends ModelSkeletonPony {
|
||||
|
||||
|
|
|
@ -3,8 +3,8 @@ package com.minelittlepony.model.ponies;
|
|||
import com.minelittlepony.model.components.SeaponyTail;
|
||||
import com.minelittlepony.model.player.ModelUnicorn;
|
||||
import com.minelittlepony.pony.data.IPony;
|
||||
import com.minelittlepony.render.PonyRenderer;
|
||||
import com.minelittlepony.render.plane.PlaneRenderer;
|
||||
import com.minelittlepony.render.model.PlaneRenderer;
|
||||
import com.minelittlepony.render.model.PonyRenderer;
|
||||
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
|
|
@ -9,7 +9,7 @@ import com.minelittlepony.model.capabilities.IModelPart;
|
|||
import com.minelittlepony.model.components.Muffin;
|
||||
import com.minelittlepony.model.player.ModelAlicorn;
|
||||
import com.minelittlepony.pony.data.PonyWearable;
|
||||
import com.minelittlepony.render.plane.PlaneRenderer;
|
||||
import com.minelittlepony.render.model.PlaneRenderer;
|
||||
|
||||
public class ModelVillagerPony extends ModelAlicorn {
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ import org.lwjgl.opengl.GL11;
|
|||
|
||||
import com.minelittlepony.model.player.ModelZebra;
|
||||
import com.minelittlepony.pony.data.IPony;
|
||||
import com.minelittlepony.render.PonyRenderer;
|
||||
import com.minelittlepony.render.model.PonyRenderer;
|
||||
|
||||
public class ModelWitchPony extends ModelZebra {
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package com.minelittlepony.model.ponies;
|
||||
|
||||
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.EntityLivingBase;
|
||||
|
@ -24,10 +24,10 @@ public class ModelZombiePony extends ModelMobPony {
|
|||
|
||||
if (islookAngleRight(move)) {
|
||||
rotateArmHolding(bipedRightArm, 1, swingProgress, ticks);
|
||||
AbstractPonyRenderer.shiftRotationPoint(bipedRightArm, 0.5F, 1.5F, 3);
|
||||
AbstractBoxRenderer.shiftRotationPoint(bipedRightArm, 0.5F, 1.5F, 3);
|
||||
} else {
|
||||
rotateArmHolding(bipedLeftArm, -1, swingProgress, ticks);
|
||||
AbstractPonyRenderer.shiftRotationPoint(bipedLeftArm, -0.5F, 1.5F, 3);
|
||||
AbstractBoxRenderer.shiftRotationPoint(bipedLeftArm, -0.5F, 1.5F, 3);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -5,7 +5,8 @@ import org.lwjgl.opengl.GL14;
|
|||
import com.minelittlepony.MineLittlePony;
|
||||
import com.minelittlepony.ducks.IRenderItem;
|
||||
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 net.minecraft.client.Minecraft;
|
||||
|
|
|
@ -8,7 +8,7 @@ import com.minelittlepony.model.armour.IArmorTextureResolver;
|
|||
import com.minelittlepony.model.armour.ModelPonyArmor;
|
||||
import com.minelittlepony.model.armour.DefaultPonyArmorTextureResolver;
|
||||
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.ModelBiped;
|
||||
|
|
|
@ -11,7 +11,7 @@ import com.minelittlepony.ducks.IRenderPony;
|
|||
import com.minelittlepony.model.AbstractPonyModel;
|
||||
import com.minelittlepony.model.BodyPart;
|
||||
import com.minelittlepony.model.ModelWrapper;
|
||||
import com.minelittlepony.render.PonySkullRenderer;
|
||||
import com.minelittlepony.render.skull.PonySkullRenderer;
|
||||
import com.mojang.authlib.GameProfile;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.block.model.ItemCameraTransforms.TransformType;
|
||||
|
|
|
@ -1,28 +1,29 @@
|
|||
package com.minelittlepony.render;
|
||||
|
||||
import com.minelittlepony.util.coordinates.Color;
|
||||
package com.minelittlepony.render.model;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
|
||||
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;
|
||||
float alpha = 1;
|
||||
|
||||
public HornGlowRenderer(ModelBase model, int x, int y) {
|
||||
public GlowRenderer(ModelBase model, int x, int y) {
|
||||
super(model, x, y);
|
||||
}
|
||||
|
||||
public HornGlowRenderer setAlpha(float alpha) {
|
||||
public GlowRenderer setAlpha(float alpha) {
|
||||
this.alpha = alpha;
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
public HornGlowRenderer setTint(int tint) {
|
||||
public GlowRenderer setTint(int tint) {
|
||||
this.tint = tint;
|
||||
|
||||
return this;
|
||||
|
@ -34,7 +35,7 @@ public class HornGlowRenderer extends AbstractPonyRenderer<HornGlowRenderer> {
|
|||
|
||||
@Override
|
||||
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
|
||||
|
@ -46,7 +47,7 @@ public class HornGlowRenderer extends AbstractPonyRenderer<HornGlowRenderer> {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected HornGlowRenderer copySelf() {
|
||||
return new HornGlowRenderer(baseModel, textureOffsetX, textureOffsetY);
|
||||
protected GlowRenderer copySelf() {
|
||||
return new GlowRenderer(baseModel, textureOffsetX, textureOffsetY);
|
||||
}
|
||||
}
|
|
@ -1,19 +1,21 @@
|
|||
package com.minelittlepony.render;
|
||||
package com.minelittlepony.render.model;
|
||||
|
||||
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.
|
||||
*/
|
||||
public class HornGlow extends Box<HornGlowRenderer> {
|
||||
public class ModelGlow extends Box<GlowRenderer> {
|
||||
|
||||
private final float alpha;
|
||||
|
||||
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);
|
||||
|
||||
this.alpha = alpha;
|
|
@ -1,10 +1,12 @@
|
|||
package com.minelittlepony.render.plane;
|
||||
package com.minelittlepony.render.model;
|
||||
|
||||
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> {
|
||||
|
||||
|
@ -12,7 +14,7 @@ public class ModelPlane extends Box<PlaneRenderer> {
|
|||
|
||||
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);
|
||||
|
||||
float xMax = xMin + w + scale;
|
||||
|
@ -51,22 +53,22 @@ public class ModelPlane extends Box<PlaneRenderer> {
|
|||
Vertex eun = vert(xMax, yMax, zMax, 8, 8);
|
||||
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);
|
||||
}
|
||||
if (face == Face.WEST) {
|
||||
if (face == Plane.WEST) {
|
||||
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);
|
||||
}
|
||||
if (face == Face.DOWN) {
|
||||
if (face == Plane.DOWN) {
|
||||
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);
|
||||
}
|
||||
if (face == Face.NORTH) {
|
||||
if (face == Plane.NORTH) {
|
||||
quad = quad(textureX, w, textureY, h, wdn, edn, eun, wun);
|
||||
}
|
||||
|
10
src/main/java/com/minelittlepony/render/model/Plane.java
Normal file
10
src/main/java/com/minelittlepony/render/model/Plane.java
Normal file
|
@ -0,0 +1,10 @@
|
|||
package com.minelittlepony.render.model;
|
||||
|
||||
enum Plane {
|
||||
NORTH,
|
||||
SOUTH,
|
||||
UP,
|
||||
DOWN,
|
||||
EAST,
|
||||
WEST
|
||||
}
|
|
@ -1,10 +1,10 @@
|
|||
package com.minelittlepony.render.plane;
|
||||
|
||||
import com.minelittlepony.render.AbstractPonyRenderer;
|
||||
package com.minelittlepony.render.model;
|
||||
|
||||
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;
|
||||
|
||||
|
@ -38,32 +38,32 @@ public class PlaneRenderer extends AbstractPonyRenderer<PlaneRenderer> {
|
|||
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));
|
||||
return this;
|
||||
}
|
||||
|
||||
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) {
|
||||
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) {
|
||||
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) {
|
||||
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) {
|
||||
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) {
|
||||
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);
|
||||
}
|
||||
}
|
|
@ -1,8 +1,10 @@
|
|||
package com.minelittlepony.render;
|
||||
package com.minelittlepony.render.model;
|
||||
|
||||
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) {
|
||||
super(model);
|
|
@ -1,6 +1,6 @@
|
|||
@MethodsReturnNonnullByDefault
|
||||
@ParametersAreNonnullByDefault
|
||||
package com.minelittlepony.render.plane;
|
||||
package com.minelittlepony.render.model;
|
||||
|
||||
import mcp.MethodsReturnNonnullByDefault;
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
package com.minelittlepony.render.plane;
|
||||
|
||||
enum Face {
|
||||
NORTH, SOUTH,
|
||||
UP, DOWN,
|
||||
EAST, WEST;
|
||||
}
|
|
@ -4,7 +4,6 @@ import com.minelittlepony.PonyConfig;
|
|||
import com.minelittlepony.model.components.ModelDeadMau5Ears;
|
||||
import com.minelittlepony.pony.data.Pony;
|
||||
import com.minelittlepony.pony.data.PonyLevel;
|
||||
import com.minelittlepony.render.PonySkull;
|
||||
import com.minelittlepony.render.RenderPony;
|
||||
import com.mojang.authlib.GameProfile;
|
||||
import com.mojang.authlib.minecraft.MinecraftProfileTexture;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package com.minelittlepony.render;
|
||||
package com.minelittlepony.render.skull;
|
||||
|
||||
import com.minelittlepony.model.components.ModelPonyHead;
|
||||
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 {
|
||||
|
|
@ -1,13 +1,9 @@
|
|||
package com.minelittlepony.render;
|
||||
package com.minelittlepony.render.skull;
|
||||
|
||||
import com.minelittlepony.MineLittlePony;
|
||||
import com.minelittlepony.PonyConfig;
|
||||
import com.minelittlepony.ducks.IRenderItem;
|
||||
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.mumfrey.liteloader.util.ModUtilities;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
|
@ -1,7 +1,6 @@
|
|||
package com.minelittlepony.render.skull;
|
||||
|
||||
import com.minelittlepony.PonyConfig;
|
||||
import com.minelittlepony.render.PonySkull;
|
||||
import com.minelittlepony.render.ponies.RenderPonySkeleton;
|
||||
import com.mojang.authlib.GameProfile;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package com.minelittlepony.render.skull;
|
||||
|
||||
import com.minelittlepony.PonyConfig;
|
||||
import com.minelittlepony.render.PonySkull;
|
||||
import com.minelittlepony.render.ponies.RenderPonySkeleton;
|
||||
import com.mojang.authlib.GameProfile;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package com.minelittlepony.render.skull;
|
||||
|
||||
import com.minelittlepony.PonyConfig;
|
||||
import com.minelittlepony.render.PonySkull;
|
||||
import com.minelittlepony.render.ponies.RenderPonyZombie;
|
||||
import com.mojang.authlib.GameProfile;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package com.minelittlepony.render;
|
||||
package com.minelittlepony.util.render;
|
||||
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelBox;
|
||||
|
@ -6,7 +6,7 @@ import net.minecraft.client.model.ModelRenderer;
|
|||
import net.minecraft.client.model.TextureOffset;
|
||||
|
||||
@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;
|
||||
|
||||
|
@ -17,12 +17,12 @@ public abstract class AbstractPonyRenderer<T extends AbstractPonyRenderer<T>> ex
|
|||
protected float modelOffsetY;
|
||||
protected float modelOffsetZ;
|
||||
|
||||
public AbstractPonyRenderer(ModelBase model) {
|
||||
public AbstractBoxRenderer(ModelBase model) {
|
||||
super(model);
|
||||
baseModel = model;
|
||||
}
|
||||
|
||||
public AbstractPonyRenderer(ModelBase model, int texX, int texY) {
|
||||
public AbstractBoxRenderer(ModelBase model, int texX, int texY) {
|
||||
super(model, texX, texY);
|
||||
baseModel = model;
|
||||
}
|
|
@ -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.ModelRenderer;
|
|
@ -1,4 +1,4 @@
|
|||
package com.minelittlepony.util.coordinates;
|
||||
package com.minelittlepony.util.render;
|
||||
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.minelittlepony.util.coordinates;
|
||||
package com.minelittlepony.util.render;
|
||||
|
||||
import net.minecraft.client.model.TexturedQuad;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.minelittlepony.util.coordinates;
|
||||
package com.minelittlepony.util.render;
|
||||
|
||||
import net.minecraft.client.model.PositionTextureVertex;
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
@MethodsReturnNonnullByDefault
|
||||
@ParametersAreNonnullByDefault
|
||||
package com.minelittlepony.util.coordinates;
|
||||
package com.minelittlepony.util.render;
|
||||
|
||||
import mcp.MethodsReturnNonnullByDefault;
|
||||
|
Loading…
Reference in a new issue