mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-22 05:02:18 +00:00
103 lines
3.6 KiB
Diff
103 lines
3.6 KiB
Diff
--- ../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;
|