mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2024-11-26 14:27:59 +01:00
Move HornGlow to the correct package
This commit is contained in:
parent
441fc61508
commit
785784b694
2 changed files with 24 additions and 25 deletions
|
@ -1,4 +1,4 @@
|
|||
package com.minelittlepony.model.components;
|
||||
package com.minelittlepony.render;
|
||||
|
||||
import net.minecraft.client.model.ModelBox;
|
||||
import net.minecraft.client.model.PositionTextureVertex;
|
||||
|
@ -7,8 +7,6 @@ import net.minecraft.client.renderer.BufferBuilder;
|
|||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import com.minelittlepony.render.HornGlowRenderer;
|
||||
|
||||
public class HornGlow extends ModelBox {
|
||||
|
||||
private final float alpha;
|
||||
|
@ -34,9 +32,9 @@ public class HornGlow extends ModelBox {
|
|||
z -= scale;
|
||||
|
||||
if (parent.mirror) {
|
||||
float f3 = x2;
|
||||
float tmp = x2;
|
||||
x2 = x;
|
||||
x = f3;
|
||||
x = tmp;
|
||||
}
|
||||
|
||||
float halfpar4 = x + w * 0.05F;
|
|
@ -2,39 +2,40 @@ package com.minelittlepony.render;
|
|||
|
||||
import static net.minecraft.client.renderer.GlStateManager.color;
|
||||
|
||||
import com.minelittlepony.model.components.HornGlow;
|
||||
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
|
||||
public class HornGlowRenderer extends BasePonyRenderer<HornGlowRenderer> {
|
||||
|
||||
float r, g, b, a = 1;
|
||||
float red;
|
||||
float green;
|
||||
float blue;
|
||||
float alpha = 1;
|
||||
|
||||
public HornGlowRenderer(ModelBase model, int x, int y) {
|
||||
super(model, x, y);
|
||||
}
|
||||
|
||||
public HornGlowRenderer setAlpha(float a) {
|
||||
this.a = a;
|
||||
public HornGlowRenderer setAlpha(float alpha) {
|
||||
this.alpha = alpha;
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
public HornGlowRenderer setTint(int tint) {
|
||||
r = (tint >> 16 & 255) / 255.0F;
|
||||
g = (tint >> 8 & 255) / 255.0F;
|
||||
b = (tint & 255) / 255.0F;
|
||||
red = (tint >> 16 & 255) / 255.0F;
|
||||
green = (tint >> 8 & 255) / 255.0F;
|
||||
blue = (tint & 255) / 255.0F;
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
public void applyTint(float alpha) {
|
||||
color(r, g, b, alpha);
|
||||
color(red, green, blue, alpha);
|
||||
}
|
||||
|
||||
@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, a));
|
||||
cubeList.add(new HornGlow(this, textureOffsetX, textureOffsetY, offX, offY, offZ, width, height, depth, scaleFactor, alpha));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue