Move HornGlow to the correct package

This commit is contained in:
Sollace 2018-04-26 23:46:32 +02:00
parent 441fc61508
commit 785784b694
2 changed files with 24 additions and 25 deletions

View file

@ -1,4 +1,4 @@
package com.minelittlepony.model.components; package com.minelittlepony.render;
import net.minecraft.client.model.ModelBox; import net.minecraft.client.model.ModelBox;
import net.minecraft.client.model.PositionTextureVertex; import net.minecraft.client.model.PositionTextureVertex;
@ -7,8 +7,6 @@ import net.minecraft.client.renderer.BufferBuilder;
import javax.annotation.Nonnull; import javax.annotation.Nonnull;
import com.minelittlepony.render.HornGlowRenderer;
public class HornGlow extends ModelBox { public class HornGlow extends ModelBox {
private final float alpha; private final float alpha;
@ -34,9 +32,9 @@ public class HornGlow extends ModelBox {
z -= scale; z -= scale;
if (parent.mirror) { if (parent.mirror) {
float f3 = x2; float tmp = x2;
x2 = x; x2 = x;
x = f3; x = tmp;
} }
float halfpar4 = x + w * 0.05F; float halfpar4 = x + w * 0.05F;

View file

@ -2,39 +2,40 @@ package com.minelittlepony.render;
import static net.minecraft.client.renderer.GlStateManager.color; import static net.minecraft.client.renderer.GlStateManager.color;
import com.minelittlepony.model.components.HornGlow;
import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelBase;
public class HornGlowRenderer extends BasePonyRenderer<HornGlowRenderer> { 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) { public HornGlowRenderer(ModelBase model, int x, int y) {
super(model, x, y); super(model, x, y);
} }
public HornGlowRenderer setAlpha(float a) { public HornGlowRenderer setAlpha(float alpha) {
this.a = a; this.alpha = alpha;
return this; return this;
} }
public HornGlowRenderer setTint(int tint) { public HornGlowRenderer setTint(int tint) {
r = (tint >> 16 & 255) / 255.0F; red = (tint >> 16 & 255) / 255.0F;
g = (tint >> 8 & 255) / 255.0F; green = (tint >> 8 & 255) / 255.0F;
b = (tint & 255) / 255.0F; blue = (tint & 255) / 255.0F;
return this; return this;
} }
public void applyTint(float alpha) { public void applyTint(float alpha) {
color(r, g, b, alpha); color(red, green, blue, alpha);
} }
@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, a)); cubeList.add(new HornGlow(this, textureOffsetX, textureOffsetY, offX, offY, offZ, width, height, depth, scaleFactor, alpha));
} }
@Override @Override