mirror of
https://github.com/GTNewHorizons/MouseTweaks.git
synced 2026-11-26 23:03:05 +00:00
Update to Minecraft 1.6.1.
This commit is contained in:
1 parent
cf7e5a2872
commit
4e6cbcc59f
8 files changed
+32
-20
No files matched your search
@@ -6,6 +6,12 @@ public class Constants {
|
||||
public static final String NAME = "Mouse Tweaks";
|
||||
|
||||
// Mod version
|
||||
public static final String VERSION = "2.0 (for Minecraft 1.5.2)";
|
||||
public static final String VERSION = "2.1 (for Minecraft 1.6.1)";
|
||||
|
||||
// Obfuscated names
|
||||
public static final String ISMOUSEOVERSLOT_NAME = "a";
|
||||
public static final String FIELDE_NAME = "G";
|
||||
public static final String FIELDq_NAME = "s";
|
||||
public static final String MCPROFILER_NAME = "B";
|
||||
|
||||
}
|
||||
@@ -2,7 +2,7 @@ package MouseTweaks;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.src.Minecraft;
|
||||
import net.minecraft.src.Container;
|
||||
import net.minecraft.src.EntityClientPlayerMP;
|
||||
import net.minecraft.src.GameSettings;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package MouseTweaks;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.src.Minecraft;
|
||||
import net.minecraft.src.GuiScreen;
|
||||
|
||||
import com.mumfrey.liteloader.RenderListener;
|
||||
|
||||
@@ -2,7 +2,7 @@ package MouseTweaks;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.src.Minecraft;
|
||||
import net.minecraft.src.GuiContainer;
|
||||
import net.minecraft.src.GuiScreen;
|
||||
import net.minecraft.src.ItemStack;
|
||||
@@ -49,7 +49,7 @@ public class Main extends DeobfuscationLayer {
|
||||
|
||||
mc = Minecraft.getMinecraft();
|
||||
|
||||
mainConfig = new Config(Minecraft.getMinecraftDir() + File.separator + "config"
|
||||
mainConfig = new Config(mc.mcDataDir + File.separator + "config"
|
||||
+ File.separator + "MouseTweaks.cfg");
|
||||
readConfigFile();
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ package MouseTweaks;
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.LinkedList;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.src.Minecraft;
|
||||
import net.minecraft.src.GameSettings;
|
||||
import net.minecraft.src.Profiler;
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Method;
|
||||
import java.lang.reflect.Modifier;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.src.Minecraft;
|
||||
import net.minecraft.src.GameSettings;
|
||||
import net.minecraft.src.GuiContainer;
|
||||
import net.minecraft.src.Slot;
|
||||
@@ -22,7 +22,7 @@ public class Reflection {
|
||||
guiContainerClass.storeClass(GuiContainer.class);
|
||||
|
||||
Method isMouseOverSlot = getMethod(GuiContainer.class,
|
||||
getObfuscatedName("isMouseOverSlot", "func_74186_a", "a"), Slot.class, int.class,
|
||||
getObfuscatedName("isMouseOverSlot", "func_74186_a", Constants.ISMOUSEOVERSLOT_NAME), Slot.class, int.class,
|
||||
int.class);
|
||||
|
||||
if (isMouseOverSlot == null) {
|
||||
@@ -34,7 +34,7 @@ public class Reflection {
|
||||
|
||||
Field field;
|
||||
field = getField(GuiContainer.class,
|
||||
getObfuscatedName("field_94068_E", "field_94068_E", "E"));
|
||||
getObfuscatedName("field_94068_E", "field_94068_E", Constants.FIELDE_NAME));
|
||||
|
||||
if (field == null) {
|
||||
Logger.Log("Failed to retrieve field_94068_E, disabling RMBTweak");
|
||||
@@ -43,7 +43,7 @@ public class Reflection {
|
||||
guiContainerClass.storeField("field_94068_E", field);
|
||||
|
||||
field = getField(GuiContainer.class,
|
||||
getObfuscatedName("field_94076_q", "field_94076_q", "q"));
|
||||
getObfuscatedName("field_94076_q", "field_94076_q", Constants.FIELDq_NAME));
|
||||
|
||||
if (field == null) {
|
||||
Logger.Log("Failed to retreive field_94076_q, disabling RMBTweak");
|
||||
@@ -135,7 +135,7 @@ public class Reflection {
|
||||
minecraft = new ReflectedClass();
|
||||
minecraft.storeClass(Minecraft.class);
|
||||
|
||||
Field profilerField = getFinalField(Minecraft.class, getObfuscatedName("mcProfiler", "field_71424_I", "J"));
|
||||
Field profilerField = getFinalField(Minecraft.class, getObfuscatedName("mcProfiler", "field_71424_I", Constants.MCPROFILER_NAME));
|
||||
if (profilerField != null) {
|
||||
minecraft.storeField("mcProfiler", profilerField);
|
||||
return true;
|
||||
|
||||
@@ -1,24 +1,21 @@
|
||||
package net.minecraft.src;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import MouseTweaks.Main;
|
||||
|
||||
import com.mumfrey.liteloader.core.LiteLoader;
|
||||
|
||||
public class RenderLightningBolt extends Render
|
||||
{
|
||||
static
|
||||
{
|
||||
static {
|
||||
Main.initialise();
|
||||
}
|
||||
|
||||
/**
|
||||
* Actually renders the lightning bolt. This method is called through the doRender method.
|
||||
*/
|
||||
@SuppressWarnings("cast")
|
||||
public void doRenderLightningBolt(EntityLightningBolt par1EntityLightningBolt, double par2, double par4, double par6, float par8, float par9)
|
||||
public void doRenderLightningBolt(EntityLightningBolt par1EntityLightningBolt, double par2, double par4, double par6, float par8, float par9)
|
||||
{
|
||||
Tessellator var10 = Tessellator.instance;
|
||||
GL11.glDisable(GL11.GL_TEXTURE_2D);
|
||||
@@ -136,14 +133,23 @@ public class RenderLightningBolt extends Render
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
}
|
||||
|
||||
protected ResourceLocation func_110805_a(EntityLightningBolt par1EntityLightningBolt)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
protected ResourceLocation func_110775_a(Entity par1Entity)
|
||||
{
|
||||
return this.func_110805_a((EntityLightningBolt)par1Entity);
|
||||
}
|
||||
|
||||
/**
|
||||
* Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then
|
||||
* handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic
|
||||
* (Render<T extends Entity) and this method has signature public void doRender(T entity, double d, double d1,
|
||||
* double d2, float f, float f1). But JAD is pre 1.5 so doesn't do that.
|
||||
*/
|
||||
@Override
|
||||
public void doRender(Entity par1Entity, double par2, double par4, double par6, float par8, float par9)
|
||||
public void doRender(Entity par1Entity, double par2, double par4, double par6, float par8, float par9)
|
||||
{
|
||||
this.doRenderLightningBolt((EntityLightningBolt)par1Entity, par2, par4, par6, par8, par9);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package net.minecraft.src;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.src.Minecraft;
|
||||
import MouseTweaks.Constants;
|
||||
import MouseTweaks.Logger;
|
||||
import MouseTweaks.Main;
|
||||
|
||||
Reference in new issue
Block a user