Skip to content
This repository has been archived by the owner on Jan 18, 2024. It is now read-only.

Commit

Permalink
Merge branch '1.8.9' into 1.8.8
Browse files Browse the repository at this point in the history
Conflicts:
	gradle.properties
  • Loading branch information
sjcl committed Feb 8, 2017
2 parents fb7d803 + da41629 commit 34789a5
Show file tree
Hide file tree
Showing 19 changed files with 55 additions and 49 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,5 @@
!/install.bat
!/build.bat
!/.gitignore
!/.gitmodules
!/.gitattributes
4 changes: 4 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ ext.modversion = "${project.version_major}.${project.version_minor}.${project.ve
group = project.group
version = "${project.version_minecraft}-${modversion}"
compileJava.options.encoding = 'UTF-8'
compileApiJava.options.encoding = 'UTF-8'

idea {
module {
Expand Down Expand Up @@ -104,12 +105,15 @@ def commonManifest = {
}

jar {
from sourceSets.main.output
from sourceSets.api.output
classifier = project.hasProperty('extra_classifier') ? project.extra_classifier : 'universal'
manifest commonManifest
}

shadowJar {
from sourceSets.main.output
from sourceSets.api.output
relocate 'org.apache.http.entity.mime', 'com.kamesuta.mc.signpic.lib.org.apache.http.entity.mime'
relocate 'org.apache.http.entity.mime.content', 'com.kamesuta.mc.signpic.lib.org.apache.http.entity.mime.content'
classifier = project.hasProperty('extra_classifier') ? project.extra_classifier : 'universal'
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
forgegradle=net.minecraftforge.gradle:ForgeGradle:2.2-SNAPSHOT
forgegradle=net.minecraftforge.gradle:ForgeGradle:2.1-SNAPSHOT
group=com.kamesuta.mc
modid=signpic
modname=SignPicture
extra_fmlcore=com.kamesuta.mc.signpic.asm.SignPictureCorePlugin
extra_fmlmod=com.kamesuta.mc.signpic.SignPicture
version_major=2
version_minor=7
version_micro=0
version_micro=1
version_minecraft=1.8.8
version_forge=11.15.0.1655
version_minforge=11.15.0.1655
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import org.apache.commons.lang3.math.NumberUtils;

import com.kamesuta.mc.bnnwidget.ShortestFloatFormatter;
import com.kamesuta.mc.bnnwidget.WRenderer.BlendType;
import com.kamesuta.mc.bnnwidget.render.WRenderer.BlendType;
import com.kamesuta.mc.signpic.attr.IPropBuilder;
import com.kamesuta.mc.signpic.attr.IPropInterpolatable;

Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/kamesuta/mc/signpic/gui/GuiImage.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import com.kamesuta.mc.bnnwidget.WEvent;
import com.kamesuta.mc.bnnwidget.WFrame;
import com.kamesuta.mc.bnnwidget.WPanel;
import com.kamesuta.mc.bnnwidget.WRenderer;
import com.kamesuta.mc.bnnwidget.component.MScaledLabel;
import com.kamesuta.mc.bnnwidget.motion.Easings;
import com.kamesuta.mc.bnnwidget.motion.Motion;
Expand All @@ -18,6 +17,7 @@
import com.kamesuta.mc.bnnwidget.position.Point;
import com.kamesuta.mc.bnnwidget.position.R;
import com.kamesuta.mc.bnnwidget.render.OpenGL;
import com.kamesuta.mc.bnnwidget.render.WRenderer;
import com.kamesuta.mc.bnnwidget.var.V;
import com.kamesuta.mc.bnnwidget.var.VCommon;
import com.kamesuta.mc.bnnwidget.var.VMotion;
Expand Down Expand Up @@ -82,7 +82,7 @@ public void draw(final @Nonnull WEvent ev, final @Nonnull Area pgp, final @Nonnu
WRenderer.startShape();
OpenGL.glLineWidth(1f);
OpenGL.glColor4f(1.0F, 0.0F, 0.0F, opacity*1.0F);
draw(0, 0, 1, 1, GL_LINE_LOOP);
drawAbs(0, 0, 1, 1, GL_LINE_LOOP);
}
OpenGL.glPopMatrix();

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/kamesuta/mc/signpic/gui/GuiMain.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
import com.kamesuta.mc.bnnwidget.WEvent;
import com.kamesuta.mc.bnnwidget.WFrame;
import com.kamesuta.mc.bnnwidget.WPanel;
import com.kamesuta.mc.bnnwidget.WRenderer;
import com.kamesuta.mc.bnnwidget.component.FunnyButton;
import com.kamesuta.mc.bnnwidget.component.MButton;
import com.kamesuta.mc.bnnwidget.component.MChatTextField;
Expand All @@ -26,6 +25,7 @@
import com.kamesuta.mc.bnnwidget.position.Point;
import com.kamesuta.mc.bnnwidget.position.R;
import com.kamesuta.mc.bnnwidget.render.OpenGL;
import com.kamesuta.mc.bnnwidget.render.WRenderer;
import com.kamesuta.mc.bnnwidget.var.V;
import com.kamesuta.mc.bnnwidget.var.VMotion;
import com.kamesuta.mc.signpic.Apis;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/kamesuta/mc/signpic/gui/GuiPAAS.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@
import com.kamesuta.mc.bnnwidget.WEvent;
import com.kamesuta.mc.bnnwidget.WFrame;
import com.kamesuta.mc.bnnwidget.WPanel;
import com.kamesuta.mc.bnnwidget.WRenderer;
import com.kamesuta.mc.bnnwidget.component.MLabel;
import com.kamesuta.mc.bnnwidget.motion.Easings;
import com.kamesuta.mc.bnnwidget.position.Area;
import com.kamesuta.mc.bnnwidget.position.Coord;
import com.kamesuta.mc.bnnwidget.position.Point;
import com.kamesuta.mc.bnnwidget.position.R;
import com.kamesuta.mc.bnnwidget.render.OpenGL;
import com.kamesuta.mc.bnnwidget.render.WRenderer;
import com.kamesuta.mc.bnnwidget.var.V;
import com.kamesuta.mc.bnnwidget.var.VMotion;
import com.kamesuta.mc.signpic.Client;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/kamesuta/mc/signpic/gui/GuiSettings.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
import com.kamesuta.mc.bnnwidget.WBox;
import com.kamesuta.mc.bnnwidget.WEvent;
import com.kamesuta.mc.bnnwidget.WPanel;
import com.kamesuta.mc.bnnwidget.WRenderer;
import com.kamesuta.mc.bnnwidget.component.MButton;
import com.kamesuta.mc.bnnwidget.component.MCheckBox;
import com.kamesuta.mc.bnnwidget.component.MLabel;
Expand All @@ -29,6 +28,7 @@
import com.kamesuta.mc.bnnwidget.position.Point;
import com.kamesuta.mc.bnnwidget.position.R;
import com.kamesuta.mc.bnnwidget.render.OpenGL;
import com.kamesuta.mc.bnnwidget.render.WRenderer;
import com.kamesuta.mc.bnnwidget.var.V;
import com.kamesuta.mc.bnnwidget.var.VCommon;
import com.kamesuta.mc.bnnwidget.var.VMotion;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import com.kamesuta.mc.bnnwidget.WEvent;
import com.kamesuta.mc.bnnwidget.WFrame;
import com.kamesuta.mc.bnnwidget.WPanel;
import com.kamesuta.mc.bnnwidget.WRenderer;
import com.kamesuta.mc.bnnwidget.component.MButton;
import com.kamesuta.mc.bnnwidget.component.MLabel;
import com.kamesuta.mc.bnnwidget.component.MSelectButton;
Expand All @@ -19,6 +18,7 @@
import com.kamesuta.mc.bnnwidget.position.Point;
import com.kamesuta.mc.bnnwidget.position.R;
import com.kamesuta.mc.bnnwidget.render.OpenGL;
import com.kamesuta.mc.bnnwidget.render.WRenderer;
import com.kamesuta.mc.bnnwidget.var.V;
import com.kamesuta.mc.bnnwidget.var.VCommon;
import com.kamesuta.mc.bnnwidget.var.VMotion;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/kamesuta/mc/signpic/gui/GuiTask.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
import com.kamesuta.mc.bnnwidget.WEvent;
import com.kamesuta.mc.bnnwidget.WList;
import com.kamesuta.mc.bnnwidget.WPanel;
import com.kamesuta.mc.bnnwidget.WRenderer;
import com.kamesuta.mc.bnnwidget.motion.Easings;
import com.kamesuta.mc.bnnwidget.motion.Motion;
import com.kamesuta.mc.bnnwidget.position.Area;
import com.kamesuta.mc.bnnwidget.position.Coord;
import com.kamesuta.mc.bnnwidget.position.Point;
import com.kamesuta.mc.bnnwidget.position.R;
import com.kamesuta.mc.bnnwidget.render.OpenGL;
import com.kamesuta.mc.bnnwidget.render.WRenderer;
import com.kamesuta.mc.bnnwidget.var.V;
import com.kamesuta.mc.bnnwidget.var.VCommon;
import com.kamesuta.mc.bnnwidget.var.VMotion;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import com.kamesuta.mc.bnnwidget.WEvent;
import com.kamesuta.mc.bnnwidget.WFrame;
import com.kamesuta.mc.bnnwidget.WPanel;
import com.kamesuta.mc.bnnwidget.WRenderer;
import com.kamesuta.mc.bnnwidget.component.MLabel;
import com.kamesuta.mc.bnnwidget.component.MScaledLabel;
import com.kamesuta.mc.bnnwidget.motion.Easings;
Expand All @@ -17,6 +16,7 @@
import com.kamesuta.mc.bnnwidget.position.Point;
import com.kamesuta.mc.bnnwidget.position.R;
import com.kamesuta.mc.bnnwidget.render.OpenGL;
import com.kamesuta.mc.bnnwidget.render.WRenderer;
import com.kamesuta.mc.bnnwidget.var.V;
import com.kamesuta.mc.bnnwidget.var.VCommon;
import com.kamesuta.mc.bnnwidget.var.VMotion;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@

import com.kamesuta.mc.bnnwidget.WBase;
import com.kamesuta.mc.bnnwidget.WEvent;
import com.kamesuta.mc.bnnwidget.WRenderer;
import com.kamesuta.mc.bnnwidget.position.Area;
import com.kamesuta.mc.bnnwidget.position.Point;
import com.kamesuta.mc.bnnwidget.position.R;
import com.kamesuta.mc.bnnwidget.render.OpenGL;
import com.kamesuta.mc.bnnwidget.render.WRenderer;
import com.kamesuta.mc.signpic.attr.CompoundAttr;
import com.kamesuta.mc.signpic.attr.prop.SizeData;
import com.kamesuta.mc.signpic.attr.prop.SizeData.ImageSizes;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@

import org.apache.commons.lang3.StringUtils;

import com.kamesuta.mc.bnnwidget.WGui;
import com.kamesuta.mc.bnnwidget.WRenderer;
import com.kamesuta.mc.bnnwidget.component.MPanel;
import com.kamesuta.mc.bnnwidget.motion.Easings;
import com.kamesuta.mc.bnnwidget.position.Area;
import com.kamesuta.mc.bnnwidget.render.OpenGL;
import com.kamesuta.mc.bnnwidget.render.WGui;
import com.kamesuta.mc.bnnwidget.render.WRenderer;
import com.kamesuta.mc.bnnwidget.var.V;
import com.kamesuta.mc.bnnwidget.var.VMotion;
import com.kamesuta.mc.signpic.Log;
Expand Down
14 changes: 7 additions & 7 deletions src/main/java/com/kamesuta/mc/signpic/image/Image.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
import javax.annotation.Nonnull;
import javax.annotation.Nullable;

import com.kamesuta.mc.bnnwidget.WRenderer;
import com.kamesuta.mc.bnnwidget.WRenderer.BlendType;
import com.kamesuta.mc.bnnwidget.render.OpenGL;
import com.kamesuta.mc.bnnwidget.render.WRenderer;
import com.kamesuta.mc.bnnwidget.render.WRenderer.BlendType;
import com.kamesuta.mc.signpic.Config;
import com.kamesuta.mc.signpic.ILoadCancelable;
import com.kamesuta.mc.signpic.attr.prop.SizeData;
Expand Down Expand Up @@ -63,11 +63,11 @@ public void draw(final float u, final float v, final float w, final float h, fin
OpenGL.glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
OpenGL.glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
}
WRenderer.w.begin(GL_QUADS, DefaultVertexFormats.POSITION_TEX);
WRenderer.w.pos(0, 0, 0).tex(u, v).endVertex();
WRenderer.w.pos(0, 1, 0).tex(u, v+h/s).endVertex();
WRenderer.w.pos(1, 1, 0).tex(u+w/c, v+h/s).endVertex();
WRenderer.w.pos(1, 0, 0).tex(u+w/c, v).endVertex();
WRenderer.w.func_181668_a(GL_QUADS, DefaultVertexFormats.field_181707_g);
WRenderer.w.func_181662_b(0, 0, 0).func_181673_a(u, v).func_181675_d();
WRenderer.w.func_181662_b(0, 1, 0).func_181673_a(u, v+h/s).func_181675_d();
WRenderer.w.func_181662_b(1, 1, 0).func_181673_a(u+w/c, v+h/s).func_181675_d();
WRenderer.w.func_181662_b(1, 0, 0).func_181673_a(u+w/c, v).func_181675_d();
WRenderer.t.draw();
OpenGL.glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, wraps);
OpenGL.glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, wrapt);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,8 @@ public boolean isBuiltInRenderer() {
}

@Override
public @Nullable TextureAtlasSprite getParticleTexture() {
return this.baseModel.getParticleTexture();
public @Nullable TextureAtlasSprite getTexture() {
return this.baseModel.getTexture();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
import javax.annotation.Nonnull;
import javax.annotation.Nullable;

import com.kamesuta.mc.bnnwidget.WRenderer;
import com.kamesuta.mc.bnnwidget.render.OpenGL;
import com.kamesuta.mc.bnnwidget.render.WRenderer;
import com.kamesuta.mc.signpic.Client;
import com.kamesuta.mc.signpic.Config;
import com.kamesuta.mc.signpic.attr.CompoundAttr;
Expand Down Expand Up @@ -58,11 +58,11 @@ public void renderSignPicture(final @Nonnull Entry entry, final int destroy, fin
WRenderer.startTexture();
bindTexture(DESTROY_STAGES[destroy]);
OpenGL.glTranslatef(0f, 0f, .01f);
WRenderer.w.begin(GL_QUADS, DefaultVertexFormats.POSITION_TEX);
WRenderer.w.func_181668_a(GL_QUADS, DefaultVertexFormats.field_181707_g);
RenderHelper.addRectVertex(0, 0, 1, 1);
WRenderer.t.draw();
OpenGL.glTranslatef(0f, 0f, -.02f);
WRenderer.w.begin(GL_QUADS, DefaultVertexFormats.POSITION_TEX);
WRenderer.w.func_181668_a(GL_QUADS, DefaultVertexFormats.field_181707_g);
RenderHelper.addRectVertex(0, 0, 1, 1);
WRenderer.t.draw();
OpenGL.glPopMatrix();
Expand Down
40 changes: 20 additions & 20 deletions src/main/java/com/kamesuta/mc/signpic/render/RenderHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,40 +2,40 @@

import static org.lwjgl.opengl.GL11.*;

import com.kamesuta.mc.bnnwidget.WRenderer;
import com.kamesuta.mc.bnnwidget.render.WRenderer;

import net.minecraft.client.renderer.vertex.DefaultVertexFormats;

public class RenderHelper {
public static void drawLoadingCircle(final int msPerRoundInner, final int msPerRoundOuter) {
final long time = System.currentTimeMillis();
final float time1 = time%Math.abs(msPerRoundOuter)/(float) msPerRoundOuter;
WRenderer.w.begin(GL_LINE_LOOP, DefaultVertexFormats.POSITION);
WRenderer.w.func_181668_a(GL_LINE_LOOP, DefaultVertexFormats.field_181705_e);
addCircleVertex(time1, time1+0.2f, 1.07f);
addCircleVertex(time1+0.2f, time1, 1.09f);
WRenderer.t.draw();
final float time2 = time%Math.abs(msPerRoundInner)/(float) msPerRoundInner;
WRenderer.w.begin(GL_LINE_LOOP, DefaultVertexFormats.POSITION);
WRenderer.w.func_181668_a(GL_LINE_LOOP, DefaultVertexFormats.field_181705_e);
addCircleVertex(time2, time2+0.1f, 1.03f);
addCircleVertex(time2+0.1f, time2, 1.05f);
WRenderer.t.draw();
}

public static void drawDesignCircle() {
WRenderer.w.begin(GL_LINE_LOOP, DefaultVertexFormats.POSITION);
WRenderer.w.func_181668_a(GL_LINE_LOOP, DefaultVertexFormats.field_181705_e);
addCircleVertex(0f, 1f, 1f);
WRenderer.t.draw();
}

public static void drawProgressCircle(final float progress) {
WRenderer.w.begin(GL_POLYGON, DefaultVertexFormats.POSITION);
WRenderer.w.pos(0f, 0f, 0f).endVertex();
WRenderer.w.func_181668_a(GL_POLYGON, DefaultVertexFormats.field_181705_e);
WRenderer.w.func_181662_b(0f, 0f, 0f).func_181675_d();
addCircleVertex(progress, 0f, 1f);
WRenderer.t.draw();
}

public static void drawProgressCircle(final int mode, final float r) {
WRenderer.w.begin(mode, DefaultVertexFormats.POSITION);
WRenderer.w.func_181668_a(mode, DefaultVertexFormats.field_181705_e);
addCircleVertex(0f, 1f, r);
WRenderer.t.draw();
}
Expand All @@ -48,14 +48,14 @@ public static void addCircleVertex(final float start, final float end, final flo
final double ex = Math.cos(eangle);
final double ey = Math.sin(eangle);

WRenderer.w.pos(sx*r, sy*r, 0).endVertex();
WRenderer.w.func_181662_b(sx*r, sy*r, 0).func_181675_d();
for (int i = (int) (end<start ? Math.floor(start*acc) : Math.ceil(start*acc)); end<start ? i>end*acc : i<end*acc; i += end<start ? -1 : 1) {
final double angle = Math.PI*(2d*i/acc-.5);
final double ix = Math.cos(angle);
final double iy = Math.sin(angle);
WRenderer.w.pos(ix*r, iy*r, 0).endVertex();
WRenderer.w.func_181662_b(ix*r, iy*r, 0).func_181675_d();
}
WRenderer.w.pos(ex*r, ey*r, 0).endVertex();
WRenderer.w.func_181662_b(ex*r, ey*r, 0).func_181675_d();
}

public static void addCircleVertex(final float start, final float end, final float r) {
Expand All @@ -67,32 +67,32 @@ public static void drawRect(final int mode) {
}

public static void drawRect(final int mode, final float x1, final float y1, final float x2, final float y2) {
WRenderer.w.begin(mode, DefaultVertexFormats.POSITION_TEX);
WRenderer.w.func_181668_a(mode, DefaultVertexFormats.field_181707_g);
addRectVertex(x1, y1, x2, y2);
WRenderer.t.draw();
}

public static void addRectVertex(final float x1, final float y1, final float x2, final float y2) {
WRenderer.w.pos(x1, y2, 0).tex(0, 0).endVertex();
WRenderer.w.pos(x2, y2, 0).tex(0, 1).endVertex();
WRenderer.w.pos(x2, y1, 0).tex(1, 1).endVertex();
WRenderer.w.pos(x1, y1, 0).tex(1, 0).endVertex();
WRenderer.w.func_181662_b(x1, y2, 0).func_181673_a(0, 0).func_181675_d();
WRenderer.w.func_181662_b(x2, y2, 0).func_181673_a(0, 1).func_181675_d();
WRenderer.w.func_181662_b(x2, y1, 0).func_181673_a(1, 1).func_181675_d();
WRenderer.w.func_181662_b(x1, y1, 0).func_181673_a(1, 0).func_181675_d();
}

public static void drawRectTexture(final int mode) {
drawRectTexture(mode, 0, 0, 1, 1, 0, 0, 1, 1);
}

public static void drawRectTexture(final int mode, final float x1, final float y1, final float x2, final float y2, final float u1, final float v1, final float u2, final float v2) {
WRenderer.w.begin(mode, DefaultVertexFormats.POSITION_TEX);
WRenderer.w.func_181668_a(mode, DefaultVertexFormats.field_181707_g);
addRectVertexTexture(x1, y1, x2, y2, u1, v1, u2, v2);
WRenderer.t.draw();
}

public static void addRectVertexTexture(final float x1, final float y1, final float x2, final float y2, final float u1, final float v1, final float u2, final float v2) {
WRenderer.w.pos(x1, y2, 0).tex(u1, v2).endVertex();
WRenderer.w.pos(x2, y2, 0).tex(u2, v2).endVertex();
WRenderer.w.pos(x2, y1, 0).tex(u2, v1).endVertex();
WRenderer.w.pos(x1, y1, 0).tex(u1, v1).endVertex();
WRenderer.w.func_181662_b(x1, y2, 0).func_181673_a(u1, v2).func_181675_d();
WRenderer.w.func_181662_b(x2, y2, 0).func_181673_a(u2, v2).func_181675_d();
WRenderer.w.func_181662_b(x2, y1, 0).func_181673_a(u2, v1).func_181675_d();
WRenderer.w.func_181662_b(x1, y1, 0).func_181673_a(u1, v1).func_181675_d();
}
}
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package com.kamesuta.mc.signpic.render;

import static com.kamesuta.mc.bnnwidget.WGui.*;
import static com.kamesuta.mc.bnnwidget.render.WGui.*;
import static org.lwjgl.opengl.GL11.*;

import javax.annotation.Nonnull;

import com.kamesuta.mc.bnnwidget.WRenderer;
import com.kamesuta.mc.bnnwidget.render.OpenGL;
import com.kamesuta.mc.bnnwidget.render.WRenderer;
import com.kamesuta.mc.signpic.Client;
import com.kamesuta.mc.signpic.Config;
import com.kamesuta.mc.signpic.CoreEvent;
Expand Down
Loading

0 comments on commit 34789a5

Please sign in to comment.