Improving the scroll list, HD texture patches
This commit is contained in:
parent
00aee5b8e1
commit
d48213b444
12 changed files with 832 additions and 13 deletions
|
@ -44,7 +44,7 @@ public class GuiModList extends GuiScreen
|
|||
StringTranslate translations = StringTranslate.func_20162_a();
|
||||
this.field_949_e.add(new GuiSmallButton(6, this.field_951_c / 2 - 75, this.field_950_d - 38, translations.func_20163_a("gui.done")));
|
||||
this.modList=new GuiSlotModList(this);
|
||||
this.modList.func_22240_a(this.field_949_e, 7, 8);
|
||||
this.modList.registerScrollButtons(this.field_949_e, 7, 8);
|
||||
}
|
||||
|
||||
protected void func_572_a(GuiButton button) {
|
||||
|
@ -62,7 +62,7 @@ public class GuiModList extends GuiScreen
|
|||
|
||||
public void func_571_a(int p_571_1_, int p_571_2_, float p_571_3_)
|
||||
{
|
||||
this.modList.func_22243_a(p_571_1_, p_571_2_, p_571_3_);
|
||||
this.modList.drawScreen(p_571_1_, p_571_2_, p_571_3_);
|
||||
this.func_548_a(this.field_6451_g, "Mod List", this.field_951_c / 2, 16, 16777215);
|
||||
super.func_571_a(p_571_1_, p_571_2_, p_571_3_);
|
||||
}
|
||||
|
|
399
fml/client/cpw/mods/fml/client/GuiScrollingList.java
Normal file
399
fml/client/cpw/mods/fml/client/GuiScrollingList.java
Normal file
|
@ -0,0 +1,399 @@
|
|||
package cpw.mods.fml.client;
|
||||
|
||||
import java.util.List;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.src.GuiButton;
|
||||
import net.minecraft.src.Tessellator;
|
||||
|
||||
import org.lwjgl.input.Mouse;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
public abstract class GuiScrollingList
|
||||
{
|
||||
private final Minecraft client;
|
||||
private final int listWidth;
|
||||
private final int listHeight;
|
||||
protected final int top;
|
||||
protected final int bottom;
|
||||
private final int right;
|
||||
private final int left;
|
||||
protected final int slotHeight;
|
||||
private int scrollUpActionId;
|
||||
private int scrollDownActionId;
|
||||
protected int mouseX;
|
||||
protected int mouseY;
|
||||
private float initialMouseClickY = -2.0F;
|
||||
private float scrollFactor;
|
||||
private float scrollDistance;
|
||||
private int selectedIndex = -1;
|
||||
private long lastClickTime = 0L;
|
||||
private boolean field_25123_p = true;
|
||||
private boolean field_27262_q;
|
||||
private int field_27261_r;
|
||||
|
||||
public GuiScrollingList(Minecraft client, int width, int height, int top, int bottom, int left, int entryHeight)
|
||||
{
|
||||
this.client = client;
|
||||
this.listWidth = width;
|
||||
this.listHeight = height;
|
||||
this.top = top;
|
||||
this.bottom = bottom;
|
||||
this.slotHeight = entryHeight;
|
||||
this.left = left;
|
||||
this.right = width;
|
||||
}
|
||||
|
||||
public void func_27258_a(boolean p_27258_1_)
|
||||
{
|
||||
this.field_25123_p = p_27258_1_;
|
||||
}
|
||||
|
||||
protected void func_27259_a(boolean p_27259_1_, int p_27259_2_)
|
||||
{
|
||||
this.field_27262_q = p_27259_1_;
|
||||
this.field_27261_r = p_27259_2_;
|
||||
|
||||
if (!p_27259_1_)
|
||||
{
|
||||
this.field_27261_r = 0;
|
||||
}
|
||||
}
|
||||
|
||||
protected abstract int getSize();
|
||||
|
||||
protected abstract void elementClicked(int index, boolean doubleClick);
|
||||
|
||||
protected abstract boolean isSelected(int index);
|
||||
|
||||
protected int getContentHeight()
|
||||
{
|
||||
return this.getSize() * this.slotHeight + this.field_27261_r;
|
||||
}
|
||||
|
||||
protected abstract void drawBackground();
|
||||
|
||||
protected abstract void drawSlot(int var1, int var2, int var3, int var4, Tessellator var5);
|
||||
|
||||
protected void func_27260_a(int p_27260_1_, int p_27260_2_, Tessellator p_27260_3_) {}
|
||||
|
||||
protected void func_27255_a(int p_27255_1_, int p_27255_2_) {}
|
||||
|
||||
protected void func_27257_b(int p_27257_1_, int p_27257_2_) {}
|
||||
|
||||
public int func_27256_c(int p_27256_1_, int p_27256_2_)
|
||||
{
|
||||
int var3 = this.listWidth / 2 - 110;
|
||||
int var4 = this.listWidth / 2 + 110;
|
||||
int var5 = p_27256_2_ - this.top - this.field_27261_r + (int)this.scrollDistance - 4;
|
||||
int var6 = var5 / this.slotHeight;
|
||||
return p_27256_1_ >= var3 && p_27256_1_ <= var4 && var6 >= 0 && var5 >= 0 && var6 < this.getSize() ? var6 : -1;
|
||||
}
|
||||
|
||||
public void registerScrollButtons(List p_22240_1_, int p_22240_2_, int p_22240_3_)
|
||||
{
|
||||
this.scrollUpActionId = p_22240_2_;
|
||||
this.scrollDownActionId = p_22240_3_;
|
||||
}
|
||||
|
||||
private void applyScrollLimits()
|
||||
{
|
||||
int var1 = this.getContentHeight() - (this.bottom - this.top - 4);
|
||||
|
||||
if (var1 < 0)
|
||||
{
|
||||
var1 /= 2;
|
||||
}
|
||||
|
||||
if (this.scrollDistance < 0.0F)
|
||||
{
|
||||
this.scrollDistance = 0.0F;
|
||||
}
|
||||
|
||||
if (this.scrollDistance > (float)var1)
|
||||
{
|
||||
this.scrollDistance = (float)var1;
|
||||
}
|
||||
}
|
||||
|
||||
public void actionPerformed(GuiButton button)
|
||||
{
|
||||
if (button.field_937_g)
|
||||
{
|
||||
if (button.field_938_f == this.scrollUpActionId)
|
||||
{
|
||||
this.scrollDistance -= (float)(this.slotHeight * 2 / 3);
|
||||
this.initialMouseClickY = -2.0F;
|
||||
this.applyScrollLimits();
|
||||
}
|
||||
else if (button.field_938_f == this.scrollDownActionId)
|
||||
{
|
||||
this.scrollDistance += (float)(this.slotHeight * 2 / 3);
|
||||
this.initialMouseClickY = -2.0F;
|
||||
this.applyScrollLimits();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void drawScreen(int mouseX, int mouseY, float p_22243_3_)
|
||||
{
|
||||
this.mouseX = mouseX;
|
||||
this.mouseY = mouseY;
|
||||
this.drawBackground();
|
||||
int listLength = this.getSize();
|
||||
int scrollBarXStart = this.listWidth / 2 + 124;
|
||||
int scrollBarXEnd = scrollBarXStart + 6;
|
||||
int var9;
|
||||
int var10;
|
||||
int var11;
|
||||
int var13;
|
||||
int var19;
|
||||
|
||||
if (Mouse.isButtonDown(0))
|
||||
{
|
||||
if (this.initialMouseClickY == -1.0F)
|
||||
{
|
||||
boolean var7 = true;
|
||||
|
||||
if (mouseY >= this.top && mouseY <= this.bottom)
|
||||
{
|
||||
int var8 = this.listWidth / 2 - 110;
|
||||
var9 = this.listWidth / 2 + 110;
|
||||
var10 = mouseY - this.top - this.field_27261_r + (int)this.scrollDistance - 4;
|
||||
var11 = var10 / this.slotHeight;
|
||||
|
||||
if (mouseX >= var8 && mouseX <= var9 && var11 >= 0 && var10 >= 0 && var11 < listLength)
|
||||
{
|
||||
boolean var12 = var11 == this.selectedIndex && System.currentTimeMillis() - this.lastClickTime < 250L;
|
||||
this.elementClicked(var11, var12);
|
||||
this.selectedIndex = var11;
|
||||
this.lastClickTime = System.currentTimeMillis();
|
||||
}
|
||||
else if (mouseX >= var8 && mouseX <= var9 && var10 < 0)
|
||||
{
|
||||
this.func_27255_a(mouseX - var8, mouseY - this.top + (int)this.scrollDistance - 4);
|
||||
var7 = false;
|
||||
}
|
||||
|
||||
if (mouseX >= scrollBarXStart && mouseX <= scrollBarXEnd)
|
||||
{
|
||||
this.scrollFactor = -1.0F;
|
||||
var19 = this.getContentHeight() - (this.bottom - this.top - 4);
|
||||
|
||||
if (var19 < 1)
|
||||
{
|
||||
var19 = 1;
|
||||
}
|
||||
|
||||
var13 = (int)((float)((this.bottom - this.top) * (this.bottom - this.top)) / (float)this.getContentHeight());
|
||||
|
||||
if (var13 < 32)
|
||||
{
|
||||
var13 = 32;
|
||||
}
|
||||
|
||||
if (var13 > this.bottom - this.top - 8)
|
||||
{
|
||||
var13 = this.bottom - this.top - 8;
|
||||
}
|
||||
|
||||
this.scrollFactor /= (float)(this.bottom - this.top - var13) / (float)var19;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.scrollFactor = 1.0F;
|
||||
}
|
||||
|
||||
if (var7)
|
||||
{
|
||||
this.initialMouseClickY = (float)mouseY;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.initialMouseClickY = -2.0F;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this.initialMouseClickY = -2.0F;
|
||||
}
|
||||
}
|
||||
else if (this.initialMouseClickY >= 0.0F)
|
||||
{
|
||||
this.scrollDistance -= ((float)mouseY - this.initialMouseClickY) * this.scrollFactor;
|
||||
this.initialMouseClickY = (float)mouseY;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
while (Mouse.next())
|
||||
{
|
||||
int var16 = Mouse.getEventDWheel();
|
||||
|
||||
if (var16 != 0)
|
||||
{
|
||||
if (var16 > 0)
|
||||
{
|
||||
var16 = -1;
|
||||
}
|
||||
else if (var16 < 0)
|
||||
{
|
||||
var16 = 1;
|
||||
}
|
||||
|
||||
this.scrollDistance += (float)(var16 * this.slotHeight / 2);
|
||||
}
|
||||
}
|
||||
|
||||
this.initialMouseClickY = -1.0F;
|
||||
}
|
||||
|
||||
this.applyScrollLimits();
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glDisable(GL11.GL_FOG);
|
||||
Tessellator var18 = Tessellator.field_1512_a;
|
||||
GL11.glBindTexture(GL11.GL_TEXTURE_2D, this.client.field_6315_n.func_1070_a("/gui/background.png"));
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
float var17 = 32.0F;
|
||||
var18.func_977_b();
|
||||
var18.func_990_b(2105376);
|
||||
var18.func_983_a((double)this.left, (double)this.bottom, 0.0D, (double)((float)this.left / var17), (double)((float)(this.bottom + (int)this.scrollDistance) / var17));
|
||||
var18.func_983_a((double)this.right, (double)this.bottom, 0.0D, (double)((float)this.right / var17), (double)((float)(this.bottom + (int)this.scrollDistance) / var17));
|
||||
var18.func_983_a((double)this.right, (double)this.top, 0.0D, (double)((float)this.right / var17), (double)((float)(this.top + (int)this.scrollDistance) / var17));
|
||||
var18.func_983_a((double)this.left, (double)this.top, 0.0D, (double)((float)this.left / var17), (double)((float)(this.top + (int)this.scrollDistance) / var17));
|
||||
var18.func_982_a();
|
||||
var9 = this.listWidth / 2 - 92 - 16;
|
||||
var10 = this.top + 4 - (int)this.scrollDistance;
|
||||
|
||||
if (this.field_27262_q)
|
||||
{
|
||||
this.func_27260_a(var9, var10, var18);
|
||||
}
|
||||
|
||||
int var14;
|
||||
|
||||
for (var11 = 0; var11 < listLength; ++var11)
|
||||
{
|
||||
var19 = var10 + var11 * this.slotHeight + this.field_27261_r;
|
||||
var13 = this.slotHeight - 4;
|
||||
|
||||
if (var19 <= this.bottom && var19 + var13 >= this.top)
|
||||
{
|
||||
if (this.field_25123_p && this.isSelected(var11))
|
||||
{
|
||||
var14 = this.listWidth / 2 - 110;
|
||||
int var15 = this.listWidth / 2 + 110;
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
GL11.glDisable(GL11.GL_TEXTURE_2D);
|
||||
var18.func_977_b();
|
||||
var18.func_990_b(8421504);
|
||||
var18.func_983_a((double)var14, (double)(var19 + var13 + 2), 0.0D, 0.0D, 1.0D);
|
||||
var18.func_983_a((double)var15, (double)(var19 + var13 + 2), 0.0D, 1.0D, 1.0D);
|
||||
var18.func_983_a((double)var15, (double)(var19 - 2), 0.0D, 1.0D, 0.0D);
|
||||
var18.func_983_a((double)var14, (double)(var19 - 2), 0.0D, 0.0D, 0.0D);
|
||||
var18.func_990_b(0);
|
||||
var18.func_983_a((double)(var14 + 1), (double)(var19 + var13 + 1), 0.0D, 0.0D, 1.0D);
|
||||
var18.func_983_a((double)(var15 - 1), (double)(var19 + var13 + 1), 0.0D, 1.0D, 1.0D);
|
||||
var18.func_983_a((double)(var15 - 1), (double)(var19 - 1), 0.0D, 1.0D, 0.0D);
|
||||
var18.func_983_a((double)(var14 + 1), (double)(var19 - 1), 0.0D, 0.0D, 0.0D);
|
||||
var18.func_982_a();
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
}
|
||||
|
||||
this.drawSlot(var11, var9, var19, var13, var18);
|
||||
}
|
||||
}
|
||||
|
||||
GL11.glDisable(GL11.GL_DEPTH_TEST);
|
||||
byte var20 = 4;
|
||||
this.overlayBackground(0, this.top, 255, 255);
|
||||
this.overlayBackground(this.bottom, this.listHeight, 255, 255);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
GL11.glDisable(GL11.GL_ALPHA_TEST);
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
GL11.glDisable(GL11.GL_TEXTURE_2D);
|
||||
var18.func_977_b();
|
||||
var18.func_6513_a(0, 0);
|
||||
var18.func_983_a((double)this.left, (double)(this.top + var20), 0.0D, 0.0D, 1.0D);
|
||||
var18.func_983_a((double)this.right, (double)(this.top + var20), 0.0D, 1.0D, 1.0D);
|
||||
var18.func_6513_a(0, 255);
|
||||
var18.func_983_a((double)this.right, (double)this.top, 0.0D, 1.0D, 0.0D);
|
||||
var18.func_983_a((double)this.left, (double)this.top, 0.0D, 0.0D, 0.0D);
|
||||
var18.func_982_a();
|
||||
var18.func_977_b();
|
||||
var18.func_6513_a(0, 255);
|
||||
var18.func_983_a((double)this.left, (double)this.bottom, 0.0D, 0.0D, 1.0D);
|
||||
var18.func_983_a((double)this.right, (double)this.bottom, 0.0D, 1.0D, 1.0D);
|
||||
var18.func_6513_a(0, 0);
|
||||
var18.func_983_a((double)this.right, (double)(this.bottom - var20), 0.0D, 1.0D, 0.0D);
|
||||
var18.func_983_a((double)this.left, (double)(this.bottom - var20), 0.0D, 0.0D, 0.0D);
|
||||
var18.func_982_a();
|
||||
var19 = this.getContentHeight() - (this.bottom - this.top - 4);
|
||||
|
||||
if (var19 > 0)
|
||||
{
|
||||
var13 = (this.bottom - this.top) * (this.bottom - this.top) / this.getContentHeight();
|
||||
|
||||
if (var13 < 32)
|
||||
{
|
||||
var13 = 32;
|
||||
}
|
||||
|
||||
if (var13 > this.bottom - this.top - 8)
|
||||
{
|
||||
var13 = this.bottom - this.top - 8;
|
||||
}
|
||||
|
||||
var14 = (int)this.scrollDistance * (this.bottom - this.top - var13) / var19 + this.top;
|
||||
|
||||
if (var14 < this.top)
|
||||
{
|
||||
var14 = this.top;
|
||||
}
|
||||
|
||||
var18.func_977_b();
|
||||
var18.func_6513_a(0, 255);
|
||||
var18.func_983_a((double)scrollBarXStart, (double)this.bottom, 0.0D, 0.0D, 1.0D);
|
||||
var18.func_983_a((double)scrollBarXEnd, (double)this.bottom, 0.0D, 1.0D, 1.0D);
|
||||
var18.func_983_a((double)scrollBarXEnd, (double)this.top, 0.0D, 1.0D, 0.0D);
|
||||
var18.func_983_a((double)scrollBarXStart, (double)this.top, 0.0D, 0.0D, 0.0D);
|
||||
var18.func_982_a();
|
||||
var18.func_977_b();
|
||||
var18.func_6513_a(8421504, 255);
|
||||
var18.func_983_a((double)scrollBarXStart, (double)(var14 + var13), 0.0D, 0.0D, 1.0D);
|
||||
var18.func_983_a((double)scrollBarXEnd, (double)(var14 + var13), 0.0D, 1.0D, 1.0D);
|
||||
var18.func_983_a((double)scrollBarXEnd, (double)var14, 0.0D, 1.0D, 0.0D);
|
||||
var18.func_983_a((double)scrollBarXStart, (double)var14, 0.0D, 0.0D, 0.0D);
|
||||
var18.func_982_a();
|
||||
var18.func_977_b();
|
||||
var18.func_6513_a(12632256, 255);
|
||||
var18.func_983_a((double)scrollBarXStart, (double)(var14 + var13 - 1), 0.0D, 0.0D, 1.0D);
|
||||
var18.func_983_a((double)(scrollBarXEnd - 1), (double)(var14 + var13 - 1), 0.0D, 1.0D, 1.0D);
|
||||
var18.func_983_a((double)(scrollBarXEnd - 1), (double)var14, 0.0D, 1.0D, 0.0D);
|
||||
var18.func_983_a((double)scrollBarXStart, (double)var14, 0.0D, 0.0D, 0.0D);
|
||||
var18.func_982_a();
|
||||
}
|
||||
|
||||
this.func_27257_b(mouseX, mouseY);
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
GL11.glEnable(GL11.GL_ALPHA_TEST);
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
}
|
||||
|
||||
private void overlayBackground(int p_22239_1_, int p_22239_2_, int p_22239_3_, int p_22239_4_)
|
||||
{
|
||||
Tessellator var5 = Tessellator.field_1512_a;
|
||||
GL11.glBindTexture(GL11.GL_TEXTURE_2D, this.client.field_6315_n.func_1070_a("/gui/background.png"));
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
float var6 = 32.0F;
|
||||
var5.func_977_b();
|
||||
var5.func_6513_a(4210752, p_22239_4_);
|
||||
var5.func_983_a(0.0D, (double)p_22239_2_, 0.0D, 0.0D, (double)((float)p_22239_2_ / var6));
|
||||
var5.func_983_a((double)this.listWidth, (double)p_22239_2_, 0.0D, (double)((float)this.listWidth / var6), (double)((float)p_22239_2_ / var6));
|
||||
var5.func_6513_a(4210752, p_22239_3_);
|
||||
var5.func_983_a((double)this.listWidth, (double)p_22239_1_, 0.0D, (double)((float)this.listWidth / var6), (double)((float)p_22239_1_ / var6));
|
||||
var5.func_983_a(0.0D, (double)p_22239_1_, 0.0D, 0.0D, (double)((float)p_22239_1_ / var6));
|
||||
var5.func_982_a();
|
||||
}
|
||||
}
|
|
@ -27,49 +27,49 @@ import net.minecraft.src.Tessellator;
|
|||
* @author cpw
|
||||
*
|
||||
*/
|
||||
public class GuiSlotModList extends GuiSlot
|
||||
public class GuiSlotModList extends GuiScrollingList
|
||||
{
|
||||
private GuiModList parent;
|
||||
|
||||
public GuiSlotModList(GuiModList parent)
|
||||
{
|
||||
super(parent.getMinecraftInstance(), parent.field_951_c, parent.field_950_d, 32, parent.field_950_d - 65 + 4, 18);
|
||||
super(parent.getMinecraftInstance(), parent.field_951_c, parent.field_950_d, 32, parent.field_950_d - 65 + 4, 10, 18);
|
||||
this.parent=parent;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int func_22249_a()
|
||||
protected int getSize()
|
||||
{
|
||||
return Loader.getModList().size();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void func_22247_a(int var1, boolean var2)
|
||||
protected void elementClicked(int var1, boolean var2)
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean func_22246_a(int var1)
|
||||
protected boolean isSelected(int var1)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void func_22248_c()
|
||||
protected void drawBackground()
|
||||
{
|
||||
this.parent.func_578_i();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int func_22245_b()
|
||||
protected int getContentHeight()
|
||||
{
|
||||
return this.func_22249_a() * 3 * (this.parent.getFontRenderer().field_41063_b +1);
|
||||
return this.getSize() * 3 * (this.parent.getFontRenderer().field_41063_b +1);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void func_22242_a(int listIndex, int var2, int var3, int var4, Tessellator var5)
|
||||
protected void drawSlot(int listIndex, int var2, int var3, int var4, Tessellator var5)
|
||||
{
|
||||
ModContainer mc=Loader.getModList().get(listIndex);
|
||||
ModMetadata meta=mc.getMetadata();
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
LexicalSortingAction.isChecked=true
|
||||
content_assist_favorite_static_members=
|
||||
content_assist_lru_history=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><history maxLHS\="100" maxRHS\="10"><lhs name\="net.minecraft.src.IMinecraftRegistry"><rhs name\="net.minecraft.src.ServerRegistry"/></lhs><lhs name\="java.lang.ClassLoader"><rhs name\="java.net.URLClassLoader"/></lhs><lhs name\="java.util.logging.Level"><rhs name\="java.util.logging.Level"/></lhs></history>
|
||||
content_assist_lru_history=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><history maxLHS\="100" maxRHS\="10"><lhs name\="net.minecraft.src.IMinecraftRegistry"><rhs name\="net.minecraft.src.ServerRegistry"/></lhs><lhs name\="java.lang.ClassLoader"><rhs name\="java.net.URLClassLoader"/></lhs><lhs name\="java.util.logging.Level"><rhs name\="java.util.logging.Level"/></lhs><lhs name\="java.util.logging.Formatter"><rhs name\="cpw.mods.fml.common.FMLLogFormatter"/></lhs><lhs name\="java.lang.Enum"><rhs name\="cpw.mods.fml.common.ModContainer$TickType"/><rhs name\="cpw.mods.fml.common.ModContainer$ModState"/><rhs name\="cpw.mods.fml.common.ModContainer$SourceType"/></lhs><lhs name\="cpw.mods.fml.common.ModContainer$TickType"><rhs name\="cpw.mods.fml.common.ModContainer$TickType"/></lhs><lhs name\="cpw.mods.fml.common.ModContainer"><rhs name\="cpw.mods.fml.common.modloader.ModLoaderModContainer"/></lhs><lhs name\="cpw.mods.fml.common.modloader.ModLoaderModContainer"><rhs name\="cpw.mods.fml.common.modloader.ModLoaderModContainer"/></lhs><lhs name\="java.util.List"><rhs name\="java.util.ArrayList"/></lhs><lhs name\="java.util.RandomAccess"><rhs name\="java.util.ArrayList"/></lhs><lhs name\="java.lang.Cloneable"><rhs name\="java.util.ArrayList"/></lhs><lhs name\="java.util.Collection"><rhs name\="java.util.ArrayList"/></lhs><lhs name\="java.lang.Iterable"><rhs name\="java.util.ArrayList"/></lhs><lhs name\="java.util.AbstractList"><rhs name\="java.util.ArrayList"/></lhs><lhs name\="java.util.AbstractCollection"><rhs name\="java.util.ArrayList"/></lhs><lhs name\="java.util.ArrayList"><rhs name\="java.util.ArrayList"/></lhs><lhs name\="cpw.mods.fml.common.ModContainer$ModState"><rhs name\="cpw.mods.fml.common.ModContainer$ModState"/></lhs><lhs name\="cpw.mods.fml.common.ModContainer$SourceType"><rhs name\="cpw.mods.fml.common.ModContainer$SourceType"/></lhs><lhs name\="net.minecraft.src.TextureFX"><rhs name\="net.minecraft.src.ModTextureStatic"/></lhs><lhs name\="net.minecraft.src.ModTextureStatic"><rhs name\="net.minecraft.src.ModTextureStatic"/></lhs></history>
|
||||
content_assist_number_of_computers=13
|
||||
content_assist_proposals_background=255,255,255
|
||||
content_assist_proposals_foreground=0,0,0
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
eclipse.preferences.version=1
|
||||
lineNumberRuler=true
|
||||
overviewRuler_migration=migrated_3.1
|
||||
showWhitespaceCharacters=true
|
||||
spacesForTabs=true
|
||||
|
|
|
@ -1,6 +1,51 @@
|
|||
--- ../src-base/minecraft/net/minecraft/src/RenderEngine.java 0000-00-00 00:00:00.000000000 -0000
|
||||
+++ ../src-work/minecraft/net/minecraft/src/RenderEngine.java 0000-00-00 00:00:00.000000000 -0000
|
||||
@@ -635,4 +635,8 @@
|
||||
@@ -1,5 +1,8 @@
|
||||
package net.minecraft.src;
|
||||
|
||||
+import static org.lwjgl.opengl.GL11.GL_TEXTURE_2D;
|
||||
+import static org.lwjgl.opengl.GL11.GL_TEXTURE_WIDTH;
|
||||
+
|
||||
import java.awt.Color;
|
||||
import java.awt.Graphics;
|
||||
import java.awt.image.BufferedImage;
|
||||
@@ -459,23 +462,29 @@
|
||||
for (int var2 = 0; var2 < this.field_1604_f.size(); ++var2)
|
||||
{
|
||||
TextureFX var3 = (TextureFX)this.field_1604_f.get(var2);
|
||||
+ if (var3.field_1126_b != var1)
|
||||
+ {
|
||||
+ var3.func_782_a(this);
|
||||
+ var1 = var3.field_1126_b;
|
||||
+ }
|
||||
+ int tileSize = GL11.glGetTexLevelParameteri(GL_TEXTURE_2D, 0, GL_TEXTURE_WIDTH ) >>4;
|
||||
+ var3.textureGridSize = tileSize * tileSize;
|
||||
+ var3.textureLength = tileSize;
|
||||
+ if (var3.field_1127_a==null || var3.field_1127_a.length!= var3.textureGridSize << 2) {
|
||||
+ var3.field_1127_a = new byte[var3.textureGridSize << 2];
|
||||
+ }
|
||||
var3.field_1131_c = this.field_1602_h.field_1578_g;
|
||||
var3.func_783_a();
|
||||
this.field_1605_e.clear();
|
||||
this.field_1605_e.put(var3.field_1127_a);
|
||||
this.field_1605_e.position(0).limit(var3.field_1127_a.length);
|
||||
|
||||
- if (var3.field_1126_b != var1)
|
||||
- {
|
||||
- var3.func_782_a(this);
|
||||
- var1 = var3.field_1126_b;
|
||||
- }
|
||||
|
||||
for (int var4 = 0; var4 < var3.field_1129_e; ++var4)
|
||||
{
|
||||
for (int var5 = 0; var5 < var3.field_1129_e; ++var5)
|
||||
{
|
||||
- GL11.glTexSubImage2D(GL11.GL_TEXTURE_2D, 0, var3.field_1126_b % 16 * 16 + var4 * 16, var3.field_1126_b / 16 * 16 + var5 * 16, 16, 16, GL11.GL_RGBA, GL11.GL_UNSIGNED_BYTE, this.field_1605_e);
|
||||
+ GL11.glTexSubImage2D(GL11.GL_TEXTURE_2D, 0, var3.field_1126_b % 16 * tileSize + var4 * tileSize, var3.field_1126_b / 16 * tileSize + var5 * tileSize, tileSize, tileSize, GL11.GL_RGBA, GL11.GL_UNSIGNED_BYTE, this.field_1605_e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -635,4 +644,8 @@
|
||||
GL11.glBindTexture(GL11.GL_TEXTURE_2D, p_1076_1_);
|
||||
}
|
||||
}
|
||||
|
|
11
fml/patches/minecraft/net/minecraft/src/TextureFX.java.patch
Normal file
11
fml/patches/minecraft/net/minecraft/src/TextureFX.java.patch
Normal file
|
@ -0,0 +1,11 @@
|
|||
--- ../src-base/minecraft/net/minecraft/src/TextureFX.java 0000-00-00 00:00:00.000000000 -0000
|
||||
+++ ../src-work/minecraft/net/minecraft/src/TextureFX.java 0000-00-00 00:00:00.000000000 -0000
|
||||
@@ -10,6 +10,8 @@
|
||||
public int field_1130_d = 0;
|
||||
public int field_1129_e = 1;
|
||||
public int field_1128_f = 0;
|
||||
+ public int textureGridSize = 256;
|
||||
+ public int textureLength = 16;
|
||||
|
||||
public TextureFX(int p_i616_1_)
|
||||
{
|
|
@ -0,0 +1,61 @@
|
|||
--- ../src-base/minecraft/net/minecraft/src/TextureFlamesFX.java 0000-00-00 00:00:00.000000000 -0000
|
||||
+++ ../src-work/minecraft/net/minecraft/src/TextureFlamesFX.java 0000-00-00 00:00:00.000000000 -0000
|
||||
@@ -12,35 +12,41 @@
|
||||
|
||||
public void func_783_a()
|
||||
{
|
||||
+ int fireLength = textureLength + textureLength << 2;
|
||||
+ int fireGridSize = fireLength * textureLength;
|
||||
+ if (field_1132_h.length != fireGridSize) {
|
||||
+ field_1133_g = new float[fireGridSize];
|
||||
+ field_1132_h = new float[fireGridSize];
|
||||
+ }
|
||||
int var3;
|
||||
float var4;
|
||||
int var6;
|
||||
|
||||
- for (int var1 = 0; var1 < 16; ++var1)
|
||||
+ for (int var1 = 0; var1 < textureLength; ++var1)
|
||||
{
|
||||
- for (int var2 = 0; var2 < 20; ++var2)
|
||||
+ for (int var2 = 0; var2 < fireLength; ++var2)
|
||||
{
|
||||
var3 = 18;
|
||||
- var4 = this.field_1133_g[var1 + (var2 + 1) % 20 * 16] * (float)var3;
|
||||
+ var4 = this.field_1133_g[var1 + (var2 + 1) % fireLength * textureLength] * (float)var3;
|
||||
|
||||
for (int var5 = var1 - 1; var5 <= var1 + 1; ++var5)
|
||||
{
|
||||
for (var6 = var2; var6 <= var2 + 1; ++var6)
|
||||
{
|
||||
- if (var5 >= 0 && var6 >= 0 && var5 < 16 && var6 < 20)
|
||||
+ if (var5 >= 0 && var6 >= 0 && var5 < textureLength && var6 < fireLength)
|
||||
{
|
||||
- var4 += this.field_1133_g[var5 + var6 * 16];
|
||||
+ var4 += this.field_1133_g[var5 + var6 * textureLength];
|
||||
}
|
||||
|
||||
++var3;
|
||||
}
|
||||
}
|
||||
|
||||
- this.field_1132_h[var1 + var2 * 16] = var4 / ((float)var3 * 1.0600001F);
|
||||
+ this.field_1132_h[var1 + var2 * textureLength] = var4 / ((float)var3 * 1.0600001F);
|
||||
|
||||
- if (var2 >= 19)
|
||||
+ if (var2 >= fireLength - textureLength << 4)
|
||||
{
|
||||
- this.field_1132_h[var1 + var2 * 16] = (float)(Math.random() * Math.random() * Math.random() * 4.0D + Math.random() * 0.10000000149011612D + 0.20000000298023224D);
|
||||
+ this.field_1132_h[var1 + var2 * textureLength] = (float)(Math.random() * Math.random() * Math.random() * 4.0D + Math.random() * 0.10000000149011612D + 0.20000000298023224D);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -49,7 +55,7 @@
|
||||
this.field_1132_h = this.field_1133_g;
|
||||
this.field_1133_g = var13;
|
||||
|
||||
- for (var3 = 0; var3 < 256; ++var3)
|
||||
+ for (var3 = 0; var3 < textureGridSize; ++var3)
|
||||
{
|
||||
var4 = this.field_1133_g[var3] * 1.8F;
|
||||
|
|
@ -0,0 +1,67 @@
|
|||
--- ../src-base/minecraft/net/minecraft/src/TextureLavaFX.java 0000-00-00 00:00:00.000000000 -0000
|
||||
+++ ../src-work/minecraft/net/minecraft/src/TextureLavaFX.java 0000-00-00 00:00:00.000000000 -0000
|
||||
@@ -14,6 +14,12 @@
|
||||
|
||||
public void func_783_a()
|
||||
{
|
||||
+ if (field_1147_g.length != textureGridSize) {
|
||||
+ field_1147_g = new float[textureGridSize];
|
||||
+ field_1146_h = new float[textureGridSize];
|
||||
+ field_1145_i = new float[textureGridSize];
|
||||
+ field_1144_j = new float[textureGridSize];
|
||||
+ }
|
||||
int var2;
|
||||
float var3;
|
||||
int var5;
|
||||
@@ -22,9 +28,9 @@
|
||||
int var8;
|
||||
int var9;
|
||||
|
||||
- for (int var1 = 0; var1 < 16; ++var1)
|
||||
+ for (int var1 = 0; var1 < textureLength; ++var1)
|
||||
{
|
||||
- for (var2 = 0; var2 < 16; ++var2)
|
||||
+ for (var2 = 0; var2 < textureLength; ++var2)
|
||||
{
|
||||
var3 = 0.0F;
|
||||
int var4 = (int)(MathHelper.func_1106_a((float)var2 * (float)Math.PI * 2.0F / 16.0F) * 1.2F);
|
||||
@@ -36,23 +42,23 @@
|
||||
{
|
||||
var8 = var6 + var4 & 15;
|
||||
var9 = var7 + var5 & 15;
|
||||
- var3 += this.field_1147_g[var8 + var9 * 16];
|
||||
+ var3 += this.field_1147_g[var8 + var9 * textureLength];
|
||||
}
|
||||
}
|
||||
|
||||
- this.field_1146_h[var1 + var2 * 16] = var3 / 10.0F + (this.field_1145_i[(var1 + 0 & 15) + (var2 + 0 & 15) * 16] + this.field_1145_i[(var1 + 1 & 15) + (var2 + 0 & 15) * 16] + this.field_1145_i[(var1 + 1 & 15) + (var2 + 1 & 15) * 16] + this.field_1145_i[(var1 + 0 & 15) + (var2 + 1 & 15) * 16]) / 4.0F * 0.8F;
|
||||
- this.field_1145_i[var1 + var2 * 16] += this.field_1144_j[var1 + var2 * 16] * 0.01F;
|
||||
+ this.field_1146_h[var1 + var2 * textureLength] = var3 / 10.0F + (this.field_1145_i[(var1 + 0 & 15) + (var2 + 0 & 15) * textureLength] + this.field_1145_i[(var1 + 1 & 15) + (var2 + 0 & 15) * textureLength] + this.field_1145_i[(var1 + 1 & 15) + (var2 + 1 & 15) * textureLength] + this.field_1145_i[(var1 + 0 & 15) + (var2 + 1 & 15) * textureLength]) / 4.0F * 0.8F;
|
||||
+ this.field_1145_i[var1 + var2 * textureLength] += this.field_1144_j[var1 + var2 * textureLength] * 0.01F;
|
||||
|
||||
- if (this.field_1145_i[var1 + var2 * 16] < 0.0F)
|
||||
+ if (this.field_1145_i[var1 + var2 * textureLength] < 0.0F)
|
||||
{
|
||||
- this.field_1145_i[var1 + var2 * 16] = 0.0F;
|
||||
+ this.field_1145_i[var1 + var2 * textureLength] = 0.0F;
|
||||
}
|
||||
|
||||
- this.field_1144_j[var1 + var2 * 16] -= 0.06F;
|
||||
+ this.field_1144_j[var1 + var2 * textureLength] -= 0.06F;
|
||||
|
||||
if (Math.random() < 0.005D)
|
||||
{
|
||||
- this.field_1144_j[var1 + var2 * 16] = 1.5F;
|
||||
+ this.field_1144_j[var1 + var2 * textureLength] = 1.5F;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -61,7 +67,7 @@
|
||||
this.field_1146_h = this.field_1147_g;
|
||||
this.field_1147_g = var11;
|
||||
|
||||
- for (var2 = 0; var2 < 256; ++var2)
|
||||
+ for (var2 = 0; var2 < textureGridSize; ++var2)
|
||||
{
|
||||
var3 = this.field_1147_g[var2] * 2.0F;
|
||||
|
|
@ -0,0 +1,77 @@
|
|||
--- ../src-base/minecraft/net/minecraft/src/TextureLavaFlowFX.java 0000-00-00 00:00:00.000000000 -0000
|
||||
+++ ../src-work/minecraft/net/minecraft/src/TextureLavaFlowFX.java 0000-00-00 00:00:00.000000000 -0000
|
||||
@@ -16,6 +16,12 @@
|
||||
|
||||
public void func_783_a()
|
||||
{
|
||||
+ if (field_1140_j.length!=textureGridSize) {
|
||||
+ field_1143_g = new float[textureGridSize];
|
||||
+ field_1142_h = new float[textureGridSize];
|
||||
+ field_1141_i = new float[textureGridSize];
|
||||
+ field_1140_j = new float[textureGridSize];
|
||||
+ }
|
||||
++this.field_1139_k;
|
||||
int var2;
|
||||
float var3;
|
||||
@@ -25,9 +31,12 @@
|
||||
int var8;
|
||||
int var9;
|
||||
|
||||
- for (int var1 = 0; var1 < 16; ++var1)
|
||||
+ int textureLengthMask=textureLength-1;
|
||||
+ int textureGridSizeMask=textureGridSize-1;
|
||||
+
|
||||
+ for (int var1 = 0; var1 < textureLength; ++var1)
|
||||
{
|
||||
- for (var2 = 0; var2 < 16; ++var2)
|
||||
+ for (var2 = 0; var2 < textureLength; ++var2)
|
||||
{
|
||||
var3 = 0.0F;
|
||||
int var4 = (int)(MathHelper.func_1106_a((float)var2 * (float)Math.PI * 2.0F / 16.0F) * 1.2F);
|
||||
@@ -37,25 +46,25 @@
|
||||
{
|
||||
for (var7 = var2 - 1; var7 <= var2 + 1; ++var7)
|
||||
{
|
||||
- var8 = var6 + var4 & 15;
|
||||
- var9 = var7 + var5 & 15;
|
||||
- var3 += this.field_1143_g[var8 + var9 * 16];
|
||||
+ var8 = var6 + var4 & textureLengthMask;
|
||||
+ var9 = var7 + var5 & textureLengthMask;
|
||||
+ var3 += this.field_1143_g[var8 + var9 * textureLength];
|
||||
}
|
||||
}
|
||||
|
||||
- this.field_1142_h[var1 + var2 * 16] = var3 / 10.0F + (this.field_1141_i[(var1 + 0 & 15) + (var2 + 0 & 15) * 16] + this.field_1141_i[(var1 + 1 & 15) + (var2 + 0 & 15) * 16] + this.field_1141_i[(var1 + 1 & 15) + (var2 + 1 & 15) * 16] + this.field_1141_i[(var1 + 0 & 15) + (var2 + 1 & 15) * 16]) / 4.0F * 0.8F;
|
||||
- this.field_1141_i[var1 + var2 * 16] += this.field_1140_j[var1 + var2 * 16] * 0.01F;
|
||||
+ this.field_1142_h[var1 + var2 * textureLength] = var3 / 10.0F + (this.field_1141_i[(var1 + 0 & textureLengthMask) + (var2 + 0 & textureLengthMask) * textureLength] + this.field_1141_i[(var1 + 1 & textureLengthMask) + (var2 + 0 & textureLengthMask) * textureLength] + this.field_1141_i[(var1 + 1 & textureLengthMask) + (var2 + 1 & textureLengthMask) * textureLength] + this.field_1141_i[(var1 + 0 & textureLengthMask) + (var2 + 1 & textureLengthMask) * textureLength]) / 4.0F * 0.8F;
|
||||
+ this.field_1141_i[var1 + var2 * textureLength] += this.field_1140_j[var1 + var2 * textureLength] * 0.01F;
|
||||
|
||||
- if (this.field_1141_i[var1 + var2 * 16] < 0.0F)
|
||||
+ if (this.field_1141_i[var1 + var2 * textureLength] < 0.0F)
|
||||
{
|
||||
- this.field_1141_i[var1 + var2 * 16] = 0.0F;
|
||||
+ this.field_1141_i[var1 + var2 * textureLength] = 0.0F;
|
||||
}
|
||||
|
||||
- this.field_1140_j[var1 + var2 * 16] -= 0.06F;
|
||||
+ this.field_1140_j[var1 + var2 * textureLength] -= 0.06F;
|
||||
|
||||
if (Math.random() < 0.005D)
|
||||
{
|
||||
- this.field_1140_j[var1 + var2 * 16] = 1.5F;
|
||||
+ this.field_1140_j[var1 + var2 * textureLength] = 1.5F;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -64,9 +73,9 @@
|
||||
this.field_1142_h = this.field_1143_g;
|
||||
this.field_1143_g = var11;
|
||||
|
||||
- for (var2 = 0; var2 < 256; ++var2)
|
||||
+ for (var2 = 0; var2 < textureGridSize; ++var2)
|
||||
{
|
||||
- var3 = this.field_1143_g[var2 - this.field_1139_k / 3 * 16 & 255] * 2.0F;
|
||||
+ var3 = this.field_1143_g[var2 - this.field_1139_k / 3 * textureLength & textureGridSizeMask] * 2.0F;
|
||||
|
||||
if (var3 > 1.0F)
|
||||
{
|
|
@ -0,0 +1,74 @@
|
|||
--- ../src-base/minecraft/net/minecraft/src/TextureWaterFX.java 0000-00-00 00:00:00.000000000 -0000
|
||||
+++ ../src-work/minecraft/net/minecraft/src/TextureWaterFX.java 0000-00-00 00:00:00.000000000 -0000
|
||||
@@ -16,15 +16,21 @@
|
||||
public void func_783_a()
|
||||
{
|
||||
++this.field_1154_k;
|
||||
+ if (field_1158_g.length!=textureGridSize) {
|
||||
+ field_1158_g = new float[textureGridSize];
|
||||
+ field_1157_h = new float[textureGridSize];
|
||||
+ field_1156_i = new float[textureGridSize];
|
||||
+ field_1155_j = new float[textureGridSize];
|
||||
+ }
|
||||
int var1;
|
||||
int var2;
|
||||
float var3;
|
||||
int var5;
|
||||
int var6;
|
||||
|
||||
- for (var1 = 0; var1 < 16; ++var1)
|
||||
+ for (var1 = 0; var1 < textureLength; ++var1)
|
||||
{
|
||||
- for (var2 = 0; var2 < 16; ++var2)
|
||||
+ for (var2 = 0; var2 < textureLength; ++var2)
|
||||
{
|
||||
var3 = 0.0F;
|
||||
|
||||
@@ -32,29 +38,29 @@
|
||||
{
|
||||
var5 = var4 & 15;
|
||||
var6 = var2 & 15;
|
||||
- var3 += this.field_1158_g[var5 + var6 * 16];
|
||||
+ var3 += this.field_1158_g[var5 + var6 * textureLength];
|
||||
}
|
||||
|
||||
- this.field_1157_h[var1 + var2 * 16] = var3 / 3.3F + this.field_1156_i[var1 + var2 * 16] * 0.8F;
|
||||
+ this.field_1157_h[var1 + var2 * textureLength] = var3 / 3.3F + this.field_1156_i[var1 + var2 * textureLength] * 0.8F;
|
||||
}
|
||||
}
|
||||
|
||||
- for (var1 = 0; var1 < 16; ++var1)
|
||||
+ for (var1 = 0; var1 < textureLength; ++var1)
|
||||
{
|
||||
- for (var2 = 0; var2 < 16; ++var2)
|
||||
+ for (var2 = 0; var2 < textureLength; ++var2)
|
||||
{
|
||||
- this.field_1156_i[var1 + var2 * 16] += this.field_1155_j[var1 + var2 * 16] * 0.05F;
|
||||
+ this.field_1156_i[var1 + var2 * textureLength] += this.field_1155_j[var1 + var2 * textureLength] * 0.05F;
|
||||
|
||||
- if (this.field_1156_i[var1 + var2 * 16] < 0.0F)
|
||||
+ if (this.field_1156_i[var1 + var2 * textureLength] < 0.0F)
|
||||
{
|
||||
- this.field_1156_i[var1 + var2 * 16] = 0.0F;
|
||||
+ this.field_1156_i[var1 + var2 * textureLength] = 0.0F;
|
||||
}
|
||||
|
||||
- this.field_1155_j[var1 + var2 * 16] -= 0.1F;
|
||||
+ this.field_1155_j[var1 + var2 * textureLength] -= 0.1F;
|
||||
|
||||
if (Math.random() < 0.05D)
|
||||
{
|
||||
- this.field_1155_j[var1 + var2 * 16] = 0.5F;
|
||||
+ this.field_1155_j[var1 + var2 * textureLength] = 0.5F;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -63,7 +69,7 @@
|
||||
this.field_1157_h = this.field_1158_g;
|
||||
this.field_1158_g = var12;
|
||||
|
||||
- for (var2 = 0; var2 < 256; ++var2)
|
||||
+ for (var2 = 0; var2 < textureGridSize; ++var2)
|
||||
{
|
||||
var3 = this.field_1158_g[var2];
|
||||
|
|
@ -0,0 +1,83 @@
|
|||
--- ../src-base/minecraft/net/minecraft/src/TextureWaterFlowFX.java 0000-00-00 00:00:00.000000000 -0000
|
||||
+++ ../src-work/minecraft/net/minecraft/src/TextureWaterFlowFX.java 0000-00-00 00:00:00.000000000 -0000
|
||||
@@ -16,46 +16,55 @@
|
||||
|
||||
public void func_783_a()
|
||||
{
|
||||
+ if (field_1138_g.length!=textureGridSize) {
|
||||
+ field_1138_g = new float[textureGridSize];
|
||||
+ field_1137_h = new float[textureGridSize];
|
||||
+ field_1136_i = new float[textureGridSize];
|
||||
+ field_1135_j = new float[textureGridSize];
|
||||
+ }
|
||||
++this.field_1134_k;
|
||||
int var1;
|
||||
int var2;
|
||||
float var3;
|
||||
int var5;
|
||||
int var6;
|
||||
+
|
||||
+ int textureLengthMask=textureLength-1;
|
||||
+ int textureGridSizeMask=textureGridSize-1;
|
||||
|
||||
- for (var1 = 0; var1 < 16; ++var1)
|
||||
+ for (var1 = 0; var1 < textureLength; ++var1)
|
||||
{
|
||||
- for (var2 = 0; var2 < 16; ++var2)
|
||||
+ for (var2 = 0; var2 < textureLength; ++var2)
|
||||
{
|
||||
var3 = 0.0F;
|
||||
|
||||
for (int var4 = var2 - 2; var4 <= var2; ++var4)
|
||||
{
|
||||
- var5 = var1 & 15;
|
||||
- var6 = var4 & 15;
|
||||
- var3 += this.field_1138_g[var5 + var6 * 16];
|
||||
+ var5 = var1 & textureLengthMask;
|
||||
+ var6 = var4 & textureLengthMask;
|
||||
+ var3 += this.field_1138_g[var5 + var6 * textureLength];
|
||||
}
|
||||
|
||||
- this.field_1137_h[var1 + var2 * 16] = var3 / 3.2F + this.field_1136_i[var1 + var2 * 16] * 0.8F;
|
||||
+ this.field_1137_h[var1 + var2 * textureLength] = var3 / 3.2F + this.field_1136_i[var1 + var2 * textureLength] * 0.8F;
|
||||
}
|
||||
}
|
||||
|
||||
- for (var1 = 0; var1 < 16; ++var1)
|
||||
+ for (var1 = 0; var1 < textureLength; ++var1)
|
||||
{
|
||||
- for (var2 = 0; var2 < 16; ++var2)
|
||||
+ for (var2 = 0; var2 < textureLength; ++var2)
|
||||
{
|
||||
- this.field_1136_i[var1 + var2 * 16] += this.field_1135_j[var1 + var2 * 16] * 0.05F;
|
||||
+ this.field_1136_i[var1 + var2 * textureLength] += this.field_1135_j[var1 + var2 * textureLength] * 0.05F;
|
||||
|
||||
- if (this.field_1136_i[var1 + var2 * 16] < 0.0F)
|
||||
+ if (this.field_1136_i[var1 + var2 * textureLength] < 0.0F)
|
||||
{
|
||||
- this.field_1136_i[var1 + var2 * 16] = 0.0F;
|
||||
+ this.field_1136_i[var1 + var2 * textureLength] = 0.0F;
|
||||
}
|
||||
|
||||
- this.field_1135_j[var1 + var2 * 16] -= 0.3F;
|
||||
+ this.field_1135_j[var1 + var2 * textureLength] -= 0.3F;
|
||||
|
||||
if (Math.random() < 0.2D)
|
||||
{
|
||||
- this.field_1135_j[var1 + var2 * 16] = 0.5F;
|
||||
+ this.field_1135_j[var1 + var2 * textureLength] = 0.5F;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -64,9 +73,9 @@
|
||||
this.field_1137_h = this.field_1138_g;
|
||||
this.field_1138_g = var12;
|
||||
|
||||
- for (var2 = 0; var2 < 256; ++var2)
|
||||
+ for (var2 = 0; var2 < textureGridSize; ++var2)
|
||||
{
|
||||
- var3 = this.field_1138_g[var2 - this.field_1134_k * 16 & 255];
|
||||
+ var3 = this.field_1138_g[var2 - this.field_1134_k * textureLength & textureGridSizeMask];
|
||||
|
||||
if (var3 > 1.0F)
|
||||
{
|
Loading…
Reference in a new issue