Delete old patches not needed anymore

This commit is contained in:
Christian 2013-01-11 23:53:14 -05:00
parent 431372dc5f
commit cad228093d
8 changed files with 0 additions and 748 deletions

View file

@ -1,102 +0,0 @@
--- ../src-base/minecraft/net/minecraft/client/renderer/texturefx/TextureCompassFX.java
+++ ../src-work/minecraft/net/minecraft/client/renderer/texturefx/TextureCompassFX.java
@@ -1,5 +1,6 @@
package net.minecraft.client.renderer.texturefx;
+import cpw.mods.fml.client.FMLTextureFX;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import java.awt.image.BufferedImage;
@@ -10,13 +11,17 @@
import net.minecraft.util.ChunkCoordinates;
@SideOnly(Side.CLIENT)
-public class TextureCompassFX extends TextureFX
+public class TextureCompassFX extends FMLTextureFX
{
private Minecraft field_76865_g;
private int[] field_76867_h = new int[256];
public double field_76868_i;
public double field_76866_j;
public static TextureCompassFX field_82391_c;
+ public static int stileSizeBase = 16;
+ public static int stileSizeSquare = 256;
+ public static int stileSizeMask = 15;
+ public static int stileSizeSquareMask = 255;
public TextureCompassFX(Minecraft p_i3212_1_)
{
@@ -24,12 +29,25 @@
this.field_76865_g = p_i3212_1_;
this.field_76847_f = 1;
+ setup();
+ }
+
+ @Override
+ public void setup()
+ {
+ super.setup();
+ stileSizeBase = tileSizeBase;
+ stileSizeSquare = tileSizeSquare;
+ stileSizeMask = tileSizeMask;
+ stileSizeSquareMask = tileSizeSquareMask;
+ field_76867_h = new int[tileSizeSquare];
+
try
{
- BufferedImage bufferedimage = ImageIO.read(Minecraft.class.getResource("/gui/items.png"));
- int i = this.field_76850_b % 16 * 16;
- int j = this.field_76850_b / 16 * 16;
- bufferedimage.getRGB(i, j, 16, 16, this.field_76867_h, 0, 16);
+ BufferedImage bufferedimage = ImageIO.read(field_76865_g.field_71418_C.func_77292_e().func_77532_a("/gui/items.png"));
+ int i = this.field_76850_b % 16 * tileSizeBase;
+ int j = this.field_76850_b / 16 * tileSizeBase;
+ bufferedimage.getRGB(i, j, tileSizeBase, tileSizeBase, this.field_76867_h, 0, tileSizeBase);
}
catch (IOException ioexception)
{
@@ -58,7 +76,7 @@
int i;
int j;
- for (int k = 0; k < 256; ++k)
+ for (int k = 0; k < stileSizeSquare; ++k)
{
int l = aint[k] >> 24 & 255;
int i1 = aint[k] >> 16 & 255;
@@ -141,11 +159,11 @@
int k3;
int l3;
- for (j = -4; j <= 4; ++j)
- {
- i = (int)(8.5D + d7 * (double)j * 0.3D);
- j2 = (int)(7.5D - d6 * (double)j * 0.3D * 0.5D);
- i2 = j2 * 16 + i;
+ for (j = -(stileSizeBase >> 2); j <= (stileSizeBase >> 2); ++j)
+ {
+ i = (int)((stileSizeBase >> 1) + 0.5D + d7 * (double)j * 0.3D);
+ j2 = (int)((stileSizeBase >> 1) - 0.5D - d6 * (double)j * 0.3D * 0.5D);
+ i2 = j2 * stileSizeBase + i;
l2 = 100;
k2 = 100;
i3 = 100;
@@ -167,11 +185,12 @@
abyte[i2 * 4 + 3] = (byte)short1;
}
- for (j = -8; j <= 16; ++j)
- {
- i = (int)(8.5D + d6 * (double)j * 0.3D);
- j2 = (int)(7.5D + d7 * (double)j * 0.3D * 0.5D);
- i2 = j2 * 16 + i;
+
+ for (j = -(stileSizeBase>>2); j <= stileSizeBase; ++j)
+ {
+ i = (int)((stileSizeBase >> 1) + 0.5D + d6 * (double)j * 0.3D);
+ j2 = (int)((stileSizeBase >> 1) - 0.5D + d7 * (double)j * 0.3D * 0.5D);
+ i2 = j2 * stileSizeBase + i;
l2 = j >= 0 ? 255 : 100;
k2 = j >= 0 ? 20 : 100;
i3 = j >= 0 ? 20 : 100;

View file

@ -1,89 +0,0 @@
--- ../src-base/minecraft/net/minecraft/client/renderer/texturefx/TextureFlamesFX.java
+++ ../src-work/minecraft/net/minecraft/client/renderer/texturefx/TextureFlamesFX.java
@@ -1,18 +1,32 @@
package net.minecraft.client.renderer.texturefx;
+import cpw.mods.fml.client.FMLTextureFX;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block;
@SideOnly(Side.CLIENT)
-public class TextureFlamesFX extends TextureFX
+public class TextureFlamesFX extends FMLTextureFX
{
protected float[] field_76869_g = new float[320];
protected float[] field_76870_h = new float[320];
+ private int fireTileSize = 20;
+ private int fireGridSize = 320;
public TextureFlamesFX(int p_i3215_1_)
{
super(Block.field_72067_ar.field_72059_bZ + p_i3215_1_ * 16);
+ setup();
+ }
+
+ @Override
+ public void setup()
+ {
+ super.setup();
+ fireTileSize = tileSizeBase + (tileSizeBase >> 2);
+ fireGridSize = fireTileSize * tileSizeBase;
+ field_76869_g = new float[fireGridSize];
+ field_76870_h = new float[fireGridSize];
}
public void func_76846_a()
@@ -20,32 +34,34 @@
int i;
float f;
int j;
+ float fireFactor1 = 3.0F + (float)(tileSizeBase >> 4);
+ float fireFactor2 = 1.01F + (0.8F / tileSizeBase);
- for (int k = 0; k < 16; ++k)
+ for (int k = 0; k < tileSizeBase; ++k)
{
- for (int l = 0; l < 20; ++l)
+ for (int l = 0; l < fireTileSize; ++l)
{
- i = 18;
- f = this.field_76869_g[k + (l + 1) % 20 * 16] * (float)i;
+ i = fireTileSize - (tileSizeBase >> 3);
+ f = this.field_76869_g[k + (l + 1) % fireTileSize * tileSizeBase] * (float)i;
for (int i1 = k - 1; i1 <= k + 1; ++i1)
{
for (j = l; j <= l + 1; ++j)
{
- if (i1 >= 0 && j >= 0 && i1 < 16 && j < 20)
+ if (i1 >= 0 && j >= 0 && i1 < tileSizeBase && j < fireTileSize)
{
- f += this.field_76869_g[i1 + j * 16];
+ f += this.field_76869_g[i1 + j * tileSizeBase];
}
++i;
}
}
- this.field_76870_h[k + l * 16] = f / ((float)i * 1.0600001F);
+ this.field_76870_h[k + l * tileSizeBase] = f / ((float)i * fireFactor2);
- if (l >= 19)
+ if (l >= fireTileSize - (tileSizeBase >> 4))
{
- this.field_76870_h[k + l * 16] = (float)(Math.random() * Math.random() * Math.random() * 4.0D + Math.random() * 0.10000000149011612D + 0.20000000298023224D);
+ this.field_76870_h[k + l * tileSizeBase] = (float)(Math.random() * Math.random() * Math.random() * fireFactor1 + Math.random() * 0.1F + 0.2F);
}
}
}
@@ -54,7 +70,7 @@
this.field_76870_h = this.field_76869_g;
this.field_76869_g = afloat;
- for (i = 0; i < 256; ++i)
+ for (i = 0; i < tileSizeSquare; ++i)
{
f = this.field_76869_g[i] * 1.8F;

View file

@ -1,91 +0,0 @@
--- ../src-base/minecraft/net/minecraft/client/renderer/texturefx/TextureLavaFX.java
+++ ../src-work/minecraft/net/minecraft/client/renderer/texturefx/TextureLavaFX.java
@@ -1,12 +1,13 @@
package net.minecraft.client.renderer.texturefx;
+import cpw.mods.fml.client.FMLTextureFX;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block;
import net.minecraft.util.MathHelper;
@SideOnly(Side.CLIENT)
-public class TextureLavaFX extends TextureFX
+public class TextureLavaFX extends FMLTextureFX
{
protected float[] field_76876_g = new float[256];
protected float[] field_76878_h = new float[256];
@@ -16,6 +17,17 @@
public TextureLavaFX()
{
super(Block.field_71944_C.field_72059_bZ);
+ setup();
+ }
+
+ @Override
+ public void setup()
+ {
+ super.setup();
+ field_76876_g = new float[tileSizeSquare];
+ field_76878_h = new float[tileSizeSquare];
+ field_76879_i = new float[tileSizeSquare];
+ field_76877_j = new float[tileSizeSquare];
}
public void func_76846_a()
@@ -28,9 +40,9 @@
int i1;
int j1;
- for (int k1 = 0; k1 < 16; ++k1)
+ for (int k1 = 0; k1 < tileSizeBase; ++k1)
{
- for (i = 0; i < 16; ++i)
+ for (i = 0; i < tileSizeBase; ++i)
{
f = 0.0F;
int l1 = (int)(MathHelper.func_76126_a((float)i * (float)Math.PI * 2.0F / 16.0F) * 1.2F);
@@ -40,25 +52,25 @@
{
for (l = i - 1; l <= i + 1; ++l)
{
- i1 = k + l1 & 15;
- j1 = l + j & 15;
- f += this.field_76876_g[i1 + j1 * 16];
+ i1 = k + l1 & tileSizeMask;
+ j1 = l + j & tileSizeMask;
+ f += this.field_76876_g[i1 + j1 * tileSizeBase];
}
}
- this.field_76878_h[k1 + i * 16] = f / 10.0F + (this.field_76879_i[(k1 + 0 & 15) + (i + 0 & 15) * 16] + this.field_76879_i[(k1 + 1 & 15) + (i + 0 & 15) * 16] + this.field_76879_i[(k1 + 1 & 15) + (i + 1 & 15) * 16] + this.field_76879_i[(k1 + 0 & 15) + (i + 1 & 15) * 16]) / 4.0F * 0.8F;
- this.field_76879_i[k1 + i * 16] += this.field_76877_j[k1 + i * 16] * 0.01F;
+ this.field_76878_h[k1 + i * tileSizeBase] = f / 10.0F + (this.field_76879_i[(k1 + 0 & tileSizeMask) + (i + 0 & tileSizeMask) * tileSizeBase] + this.field_76879_i[(k1 + 1 & tileSizeMask) + (i + 0 & tileSizeMask) * tileSizeBase] + this.field_76879_i[(k1 + 1 & tileSizeMask) + (i + 1 & tileSizeMask) * tileSizeBase] + this.field_76879_i[(k1 + 0 & tileSizeMask) + (i + 1 & tileSizeMask) * tileSizeBase]) / 4.0F * 0.8F;
+ this.field_76879_i[k1 + i * tileSizeBase] += this.field_76877_j[k1 + i * tileSizeBase] * 0.01F;
- if (this.field_76879_i[k1 + i * 16] < 0.0F)
+ if (this.field_76879_i[k1 + i * tileSizeBase] < 0.0F)
{
- this.field_76879_i[k1 + i * 16] = 0.0F;
+ this.field_76879_i[k1 + i * tileSizeBase] = 0.0F;
}
- this.field_76877_j[k1 + i * 16] -= 0.06F;
+ this.field_76877_j[k1 + i * tileSizeBase] -= 0.06F;
if (Math.random() < 0.005D)
{
- this.field_76877_j[k1 + i * 16] = 1.5F;
+ this.field_76877_j[k1 + i * tileSizeBase] = 1.5F;
}
}
}
@@ -67,7 +79,7 @@
this.field_76878_h = this.field_76876_g;
this.field_76876_g = afloat;
- for (i = 0; i < 256; ++i)
+ for (i = 0; i < tileSizeSquare; ++i)
{
f = this.field_76876_g[i] * 2.0F;

View file

@ -1,95 +0,0 @@
--- ../src-base/minecraft/net/minecraft/client/renderer/texturefx/TextureLavaFlowFX.java
+++ ../src-work/minecraft/net/minecraft/client/renderer/texturefx/TextureLavaFlowFX.java
@@ -1,12 +1,13 @@
package net.minecraft.client.renderer.texturefx;
+import cpw.mods.fml.client.FMLTextureFX;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block;
import net.minecraft.util.MathHelper;
@SideOnly(Side.CLIENT)
-public class TextureLavaFlowFX extends TextureFX
+public class TextureLavaFlowFX extends FMLTextureFX
{
protected float[] field_76871_g = new float[256];
protected float[] field_76874_h = new float[256];
@@ -18,6 +19,18 @@
{
super(Block.field_71944_C.field_72059_bZ + 1);
this.field_76849_e = 2;
+ setup();
+ }
+
+ @Override
+ public void setup()
+ {
+ super.setup();
+ field_76871_g = new float[tileSizeSquare];
+ field_76874_h = new float[tileSizeSquare];
+ field_76875_i = new float[tileSizeSquare];
+ field_76872_j = new float[tileSizeSquare];
+ field_76873_k = 0;
}
public void func_76846_a()
@@ -31,9 +44,9 @@
int i1;
int j1;
- for (int k1 = 0; k1 < 16; ++k1)
+ for (int k1 = 0; k1 < tileSizeBase; ++k1)
{
- for (i = 0; i < 16; ++i)
+ for (i = 0; i < tileSizeBase; ++i)
{
f = 0.0F;
int l1 = (int)(MathHelper.func_76126_a((float)i * (float)Math.PI * 2.0F / 16.0F) * 1.2F);
@@ -43,25 +56,25 @@
{
for (l = i - 1; l <= i + 1; ++l)
{
- i1 = k + l1 & 15;
- j1 = l + j & 15;
- f += this.field_76871_g[i1 + j1 * 16];
+ i1 = k + l1 & tileSizeMask;
+ j1 = l + j & tileSizeMask;
+ f += this.field_76871_g[i1 + j1 * tileSizeBase];
}
}
- this.field_76874_h[k1 + i * 16] = f / 10.0F + (this.field_76875_i[(k1 + 0 & 15) + (i + 0 & 15) * 16] + this.field_76875_i[(k1 + 1 & 15) + (i + 0 & 15) * 16] + this.field_76875_i[(k1 + 1 & 15) + (i + 1 & 15) * 16] + this.field_76875_i[(k1 + 0 & 15) + (i + 1 & 15) * 16]) / 4.0F * 0.8F;
- this.field_76875_i[k1 + i * 16] += this.field_76872_j[k1 + i * 16] * 0.01F;
+ this.field_76874_h[k1 + i * tileSizeBase] = f / 10.0F + (this.field_76875_i[(k1 + 0 & tileSizeMask) + (i + 0 & tileSizeMask) * tileSizeBase] + this.field_76875_i[(k1 + 1 & tileSizeMask) + (i + 0 & tileSizeMask) * tileSizeBase] + this.field_76875_i[(k1 + 1 & tileSizeMask) + (i + 1 & tileSizeMask) * tileSizeBase] + this.field_76875_i[(k1 + 0 & tileSizeMask) + (i + 1 & tileSizeMask) * tileSizeBase]) / 4.0F * 0.8F;
+ this.field_76875_i[k1 + i * tileSizeBase] += this.field_76872_j[k1 + i * tileSizeBase] * 0.01F;
- if (this.field_76875_i[k1 + i * 16] < 0.0F)
+ if (this.field_76875_i[k1 + i * tileSizeBase] < 0.0F)
{
- this.field_76875_i[k1 + i * 16] = 0.0F;
+ this.field_76875_i[k1 + i * tileSizeBase] = 0.0F;
}
- this.field_76872_j[k1 + i * 16] -= 0.06F;
+ this.field_76872_j[k1 + i * tileSizeBase] -= 0.06F;
if (Math.random() < 0.005D)
{
- this.field_76872_j[k1 + i * 16] = 1.5F;
+ this.field_76872_j[k1 + i * tileSizeBase] = 1.5F;
}
}
}
@@ -70,9 +83,9 @@
this.field_76874_h = this.field_76871_g;
this.field_76871_g = afloat;
- for (i = 0; i < 256; ++i)
+ for (i = 0; i < tileSizeSquare; ++i)
{
- f = this.field_76871_g[i - this.field_76873_k / 3 * 16 & 255] * 2.0F;
+ f = this.field_76871_g[(i - this.field_76873_k / 3 * tileSizeBase) & tileSizeSquareMask] * 2.0F;
if (f > 1.0F)
{

View file

@ -1,75 +0,0 @@
--- ../src-base/minecraft/net/minecraft/client/renderer/texturefx/TexturePortalFX.java
+++ ../src-work/minecraft/net/minecraft/client/renderer/texturefx/TexturePortalFX.java
@@ -1,5 +1,6 @@
package net.minecraft.client.renderer.texturefx;
+import cpw.mods.fml.client.FMLTextureFX;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import java.util.Random;
@@ -7,31 +8,39 @@
import net.minecraft.util.MathHelper;
@SideOnly(Side.CLIENT)
-public class TexturePortalFX extends TextureFX
+public class TexturePortalFX extends FMLTextureFX
{
private int field_76853_g = 0;
- private byte[][] field_76854_h = new byte[32][1024];
+ private byte[][] field_76854_h;
public TexturePortalFX()
{
super(Block.field_72015_be.field_72059_bZ);
+ setup();
+ }
+
+ @Override
+ public void setup()
+ {
+ super.setup();
+ field_76854_h = new byte[32][tileSizeSquare << 4];
Random random = new Random(100L);
for (int i = 0; i < 32; ++i)
{
- for (int j = 0; j < 16; ++j)
+ for (int j = 0; j < tileSizeBase; ++j)
{
- for (int k = 0; k < 16; ++k)
+ for (int k = 0; k < tileSizeBase; ++k)
{
float f = 0.0F;
int l;
for (l = 0; l < 2; ++l)
{
- float f1 = (float)(l * 16) * 0.5F;
- float f2 = (float)(l * 16) * 0.5F;
- float f3 = ((float)j - f1) / 16.0F * 2.0F;
- float f4 = ((float)k - f2) / 16.0F * 2.0F;
+ float f1 = (float)(l * tileSizeBase) * 0.5F;
+ float f2 = (float)(l * tileSizeBase) * 0.5F;
+ float f3 = ((float)j - f1) / (float)tileSizeBase * 2.0F;
+ float f4 = ((float)k - f2) / (float)tileSizeBase * 2.0F;
if (f3 < -1.0F)
{
@@ -65,7 +74,7 @@
int i1 = (int)(f * f * 200.0F + 55.0F);
int j1 = (int)(f * f * f * f * 255.0F);
int k1 = (int)(f * 100.0F + 155.0F);
- int l1 = k * 16 + j;
+ int l1 = k * tileSizeBase + j;
this.field_76854_h[i][l1 * 4 + 0] = (byte)i1;
this.field_76854_h[i][l1 * 4 + 1] = (byte)j1;
this.field_76854_h[i][l1 * 4 + 2] = (byte)l;
@@ -80,7 +89,7 @@
++this.field_76853_g;
byte[] abyte = this.field_76854_h[this.field_76853_g & 31];
- for (int i = 0; i < 256; ++i)
+ for (int i = 0; i < tileSizeSquare; ++i)
{
int j = abyte[i * 4 + 0] & 255;
int k = abyte[i * 4 + 1] & 255;

View file

@ -1,99 +0,0 @@
--- ../src-base/minecraft/net/minecraft/client/renderer/texturefx/TextureWatchFX.java
+++ ../src-work/minecraft/net/minecraft/client/renderer/texturefx/TextureWatchFX.java
@@ -1,15 +1,21 @@
package net.minecraft.client.renderer.texturefx;
+import cpw.mods.fml.client.FMLTextureFX;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
+
+import java.awt.Graphics2D;
import java.awt.image.BufferedImage;
+import java.awt.image.ImageObserver;
import java.io.IOException;
+import java.util.logging.Level;
+
import javax.imageio.ImageIO;
import net.minecraft.client.Minecraft;
import net.minecraft.item.Item;
@SideOnly(Side.CLIENT)
-public class TextureWatchFX extends TextureFX
+public class TextureWatchFX extends FMLTextureFX
{
private Minecraft field_76860_g;
private int[] field_76863_h = new int[256];
@@ -22,19 +28,39 @@
super(Item.field_77752_aS.func_77617_a(0));
this.field_76860_g = p_i3214_1_;
this.field_76847_f = 1;
+ setup();
+ }
+
+ @Override
+ public void setup()
+ {
+ super.setup();
+ field_76863_h = new int[tileSizeSquare];
+ field_76864_i = new int[tileSizeSquare];
try
{
- BufferedImage bufferedimage = ImageIO.read(Minecraft.class.getResource("/gui/items.png"));
- int i = this.field_76850_b % 16 * 16;
- int j = this.field_76850_b / 16 * 16;
- bufferedimage.getRGB(i, j, 16, 16, this.field_76863_h, 0, 16);
- bufferedimage = ImageIO.read(Minecraft.class.getResource("/misc/dial.png"));
- bufferedimage.getRGB(0, 0, 16, 16, this.field_76864_i, 0, 16);
+ BufferedImage bufferedimage = ImageIO.read(field_76860_g.field_71418_C.func_77292_e().func_77532_a("/gui/items.png"));
+ int i = this.field_76850_b % 16 * tileSizeBase;
+ int j = this.field_76850_b / 16 * tileSizeBase;
+ bufferedimage.getRGB(i, j, tileSizeBase, tileSizeBase, this.field_76863_h, 0, tileSizeBase);
+ bufferedimage = ImageIO.read(field_76860_g.field_71418_C.func_77292_e().func_77532_a("/misc/dial.png"));
+ if (bufferedimage.getWidth() != tileSizeBase)
+ {
+ BufferedImage tmp = new BufferedImage(tileSizeBase, tileSizeBase, 6);
+ Graphics2D gfx = tmp.createGraphics();
+ gfx.drawImage(bufferedimage, 0, 0, tileSizeBase, tileSizeBase, 0, 0, bufferedimage.getWidth(), bufferedimage.getHeight(), (ImageObserver)null);
+ gfx.dispose();
+ bufferedimage = tmp;
+ }
+
+ bufferedimage.getRGB(0, 0, tileSizeBase, tileSizeBase, this.field_76864_i, 0, tileSizeBase);
}
- catch (IOException ioexception)
+ catch (Exception ioexception)
{
ioexception.printStackTrace();
+ log.log(Level.WARNING, String.format("A problem occurred with the watch texture: animation will be disabled"), ioexception);
+ setErrored(true);
}
}
@@ -81,7 +107,7 @@
double d2 = Math.sin(this.field_76861_j);
double d3 = Math.cos(this.field_76861_j);
- for (int i = 0; i < 256; ++i)
+ for (int i = 0; i < tileSizeSquare; ++i)
{
int j = this.field_76863_h[i] >> 24 & 255;
int k = this.field_76863_h[i] >> 16 & 255;
@@ -90,12 +116,12 @@
if (k == i1 && l == 0 && i1 > 0)
{
- double d4 = -((double)(i % 16) / 15.0D - 0.5D);
- double d5 = (double)(i / 16) / 15.0D - 0.5D;
+ double d4 = -((double)(i % tileSizeBase) / tileSizeMask - 0.5D);
+ double d5 = (double)(i / tileSizeBase) / tileSizeMask - 0.5D;
int j1 = k;
- int k1 = (int)((d4 * d3 + d5 * d2 + 0.5D) * 16.0D);
- int l1 = (int)((d5 * d3 - d4 * d2 + 0.5D) * 16.0D);
- int i2 = (k1 & 15) + (l1 & 15) * 16;
+ int k1 = (int)((d4 * d3 + d5 * d2 + 0.5D) * tileSizeBase);
+ int l1 = (int)((d5 * d3 - d4 * d2 + 0.5D) * tileSizeBase);
+ int i2 = (k1 & tileSizeMask) + (l1 & tileSizeMask) * tileSizeBase;
j = this.field_76864_i[i2] >> 24 & 255;
k = (this.field_76864_i[i2] >> 16 & 255) * k / 255;
l = (this.field_76864_i[i2] >> 8 & 255) * j1 / 255;

View file

@ -1,97 +0,0 @@
--- ../src-base/minecraft/net/minecraft/client/renderer/texturefx/TextureWaterFX.java
+++ ../src-work/minecraft/net/minecraft/client/renderer/texturefx/TextureWaterFX.java
@@ -1,11 +1,12 @@
package net.minecraft.client.renderer.texturefx;
+import cpw.mods.fml.client.FMLTextureFX;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block;
@SideOnly(Side.CLIENT)
-public class TextureWaterFX extends TextureFX
+public class TextureWaterFX extends FMLTextureFX
{
protected float[] field_76855_g = new float[256];
protected float[] field_76858_h = new float[256];
@@ -16,6 +17,18 @@
public TextureWaterFX()
{
super(Block.field_71942_A.field_72059_bZ);
+ setup();
+ }
+
+ @Override
+ public void setup()
+ {
+ super.setup();
+ field_76855_g = new float[tileSizeSquare];
+ field_76858_h = new float[tileSizeSquare];
+ field_76859_i = new float[tileSizeSquare];
+ field_76856_j = new float[tileSizeSquare];
+ field_76857_k = 0;
}
public void func_76846_a()
@@ -27,39 +40,39 @@
int k;
int l;
- for (i = 0; i < 16; ++i)
+ for (i = 0; i < tileSizeBase; ++i)
{
- for (j = 0; j < 16; ++j)
+ for (j = 0; j < tileSizeBase; ++j)
{
f = 0.0F;
for (int i1 = i - 1; i1 <= i + 1; ++i1)
{
- k = i1 & 15;
- l = j & 15;
- f += this.field_76855_g[k + l * 16];
+ k = i1 & tileSizeMask;
+ l = j & tileSizeMask;
+ f += this.field_76855_g[k + l * tileSizeBase];
}
- this.field_76858_h[i + j * 16] = f / 3.3F + this.field_76859_i[i + j * 16] * 0.8F;
+ this.field_76858_h[i + j * tileSizeBase] = f / 3.3F + this.field_76859_i[i + j * tileSizeBase] * 0.8F;
}
}
- for (i = 0; i < 16; ++i)
+ for (i = 0; i < tileSizeBase; ++i)
{
- for (j = 0; j < 16; ++j)
+ for (j = 0; j < tileSizeBase; ++j)
{
- this.field_76859_i[i + j * 16] += this.field_76856_j[i + j * 16] * 0.05F;
+ this.field_76859_i[i + j * tileSizeBase] += this.field_76856_j[i + j * tileSizeBase] * 0.05F;
- if (this.field_76859_i[i + j * 16] < 0.0F)
+ if (this.field_76859_i[i + j * tileSizeBase] < 0.0F)
{
- this.field_76859_i[i + j * 16] = 0.0F;
+ this.field_76859_i[i + j * tileSizeBase] = 0.0F;
}
- this.field_76856_j[i + j * 16] -= 0.1F;
+ this.field_76856_j[i + j * tileSizeBase] -= 0.1F;
if (Math.random() < 0.05D)
{
- this.field_76856_j[i + j * 16] = 0.5F;
+ this.field_76856_j[i + j * tileSizeBase] = 0.5F;
}
}
}
@@ -68,7 +81,7 @@
this.field_76858_h = this.field_76855_g;
this.field_76855_g = afloat;
- for (j = 0; j < 256; ++j)
+ for (j = 0; j < tileSizeSquare; ++j)
{
f = this.field_76855_g[j];

View file

@ -1,100 +0,0 @@
--- ../src-base/minecraft/net/minecraft/client/renderer/texturefx/TextureWaterFlowFX.java
+++ ../src-work/minecraft/net/minecraft/client/renderer/texturefx/TextureWaterFlowFX.java
@@ -1,11 +1,12 @@
package net.minecraft.client.renderer.texturefx;
+import cpw.mods.fml.client.FMLTextureFX;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block;
@SideOnly(Side.CLIENT)
-public class TextureWaterFlowFX extends TextureFX
+public class TextureWaterFlowFX extends FMLTextureFX
{
protected float[] field_76880_g = new float[256];
protected float[] field_76883_h = new float[256];
@@ -17,6 +18,18 @@
{
super(Block.field_71942_A.field_72059_bZ + 1);
this.field_76849_e = 2;
+ setup();
+ }
+
+ @Override
+ public void setup()
+ {
+ super.setup();
+ field_76880_g = new float[tileSizeSquare];
+ field_76883_h = new float[tileSizeSquare];
+ field_76884_i = new float[tileSizeSquare];
+ field_76881_j = new float[tileSizeSquare];
+ field_76882_k = 0;
}
public void func_76846_a()
@@ -28,39 +41,39 @@
int k;
int l;
- for (i = 0; i < 16; ++i)
+ for (i = 0; i < tileSizeBase; ++i)
{
- for (j = 0; j < 16; ++j)
+ for (j = 0; j < tileSizeBase; ++j)
{
f = 0.0F;
for (int i1 = j - 2; i1 <= j; ++i1)
{
- k = i & 15;
- l = i1 & 15;
- f += this.field_76880_g[k + l * 16];
+ k = i & tileSizeMask;
+ l = i1 & tileSizeMask;
+ f += this.field_76880_g[k + l * tileSizeBase];
}
- this.field_76883_h[i + j * 16] = f / 3.2F + this.field_76884_i[i + j * 16] * 0.8F;
+ this.field_76883_h[i + j * tileSizeBase] = f / 3.2F + this.field_76884_i[i + j * tileSizeBase] * 0.8F;
}
}
- for (i = 0; i < 16; ++i)
+ for (i = 0; i < tileSizeBase; ++i)
{
- for (j = 0; j < 16; ++j)
+ for (j = 0; j < tileSizeBase; ++j)
{
- this.field_76884_i[i + j * 16] += this.field_76881_j[i + j * 16] * 0.05F;
+ this.field_76884_i[i + j * tileSizeBase] += this.field_76881_j[i + j * tileSizeBase] * 0.05F;
- if (this.field_76884_i[i + j * 16] < 0.0F)
+ if (this.field_76884_i[i + j * tileSizeBase] < 0.0F)
{
- this.field_76884_i[i + j * 16] = 0.0F;
+ this.field_76884_i[i + j * tileSizeBase] = 0.0F;
}
- this.field_76881_j[i + j * 16] -= 0.3F;
+ this.field_76881_j[i + j * tileSizeBase] -= 0.3F;
if (Math.random() < 0.2D)
{
- this.field_76881_j[i + j * 16] = 0.5F;
+ this.field_76881_j[i + j * tileSizeBase] = 0.5F;
}
}
}
@@ -69,9 +82,9 @@
this.field_76883_h = this.field_76880_g;
this.field_76880_g = afloat;
- for (j = 0; j < 256; ++j)
+ for (j = 0; j < tileSizeSquare; ++j)
{
- f = this.field_76880_g[j - this.field_76882_k * 16 & 255];
+ f = this.field_76880_g[j - this.field_76882_k * tileSizeBase & tileSizeSquareMask];
if (f > 1.0F)
{