Skip to content

Commit c9ff55d

Browse files
author
Michael Hillcox
committed
Update all the things.
1 parent 33462c0 commit c9ff55d

16 files changed

Lines changed: 364 additions & 314 deletions

README.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,16 @@ Minecraft Forge XRay mod
99

1010
Working on: Minecraft 1.7.10 and Forge 10.13.2.1291
1111

12-
##### Tested with:
13-
Minecraft Forge 1.7.10
14-
FTB: Direwolf20 modpack
12+
Tested with:
1513

14+
- Minecraft Forge 1.7.10
15+
- FTB: Direwolf20 modpack
1616

17-
##### Contributors:
18-
[mcd1992](https://github.com/mcd1992) | [gitlab](http://gitlab.com/u/mcd1992)
17+
The rendering is copied off of CJB's MoreInfo mod. Thanks CJB.
18+
19+
Contributors:
20+
21+
[mcd1992](https://github.com/mcd1992)
1922

2023
[AoKMiKeY](https://github.com/aokmikey)
2124

java/com/fgtXray/FgtXRay.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,22 @@
1212

1313
import net.minecraftforge.common.config.Configuration;
1414

15-
import cpw.mods.fml.common.Mod;
16-
import cpw.mods.fml.common.Mod.EventHandler;
17-
import cpw.mods.fml.common.Mod.Instance;
18-
import cpw.mods.fml.common.SidedProxy;
19-
import cpw.mods.fml.common.event.FMLInitializationEvent;
20-
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
21-
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
15+
import net.minecraftforge.fml.common.Mod;
16+
import net.minecraftforge.fml.common.Mod.EventHandler;
17+
import net.minecraftforge.fml.common.Mod.Instance;
18+
import net.minecraftforge.fml.common.SidedProxy;
19+
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
20+
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
21+
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
2222

2323
import com.fgtXray.reference.OreInfo;
2424
import com.fgtXray.config.DefaultConfig;
2525
import com.fgtXray.config.ConfigHandler;
2626

27-
@Mod(modid="fgtXray", name="Fgt X-Ray", version="1.0.8")
27+
@Mod(modid="fgtxray", name="Fgt X-Ray", version="1.0.9")
2828
public class FgtXRay
2929
{
30-
public static int localPlyX, localPlyY, localPlyZ; // For internal use in the ClientTick thread.
30+
public static int localPlyX, localPlyY, localPlyZ, localPlyXPrev, localPlyZPrev; // For internal use in the ClientTick thread.
3131
public static boolean drawOres = false; // Off by default
3232

3333
public static final String[] distStrings = new String[] // Strings for use in the GUI Render Distance button

java/com/fgtXray/client/ClientTick.java

Lines changed: 25 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,14 @@
33
import java.util.ArrayList;
44
import java.util.List;
55

6-
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
7-
import cpw.mods.fml.common.gameevent.TickEvent;
6+
import net.minecraft.block.state.IBlockState;
7+
import net.minecraft.util.math.BlockPos;
8+
import net.minecraft.util.math.MathHelper;
9+
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
10+
import net.minecraftforge.fml.common.gameevent.TickEvent;
811

912
import net.minecraft.block.Block;
1013
import net.minecraft.client.Minecraft;
11-
import net.minecraft.util.MathHelper;
1214
import com.fgtXray.reference.BlockInfo;
1315
import com.fgtXray.FgtXRay;
1416
import com.fgtXray.reference.OreInfo;
@@ -28,6 +30,8 @@ public void tickEnd( TickEvent.ClientTickEvent event )
2830
FgtXRay.localPlyX = MathHelper.floor_double( mc.thePlayer.posX );
2931
FgtXRay.localPlyY = MathHelper.floor_double( mc.thePlayer.posY );
3032
FgtXRay.localPlyZ = MathHelper.floor_double( mc.thePlayer.posZ );
33+
FgtXRay.localPlyXPrev = MathHelper.floor_double( mc.thePlayer.prevPosX );
34+
FgtXRay.localPlyZPrev = MathHelper.floor_double( mc.thePlayer.prevPosZ );
3135

3236
if( FgtXRay.drawOres && ((this.thread == null) || !this.thread.isAlive()) &&
3337
( (mc.theWorld != null) && (mc.thePlayer != null) ) ) // If we're in a world and want to start drawing create the thread.
@@ -51,29 +55,32 @@ public void run() // Our thread code for finding ores near the player.
5155
if ( FgtXRay.drawOres && !OresSearch.searchList.isEmpty() && (mc != null) && (mc.theWorld != null) && (mc.thePlayer != null) )
5256
{
5357
if ( nextTimeMs > System.currentTimeMillis() ) // Delay to avoid spamming ore updates.
54-
{
55-
continue;
56-
}
57-
58-
List temp = new ArrayList();
58+
continue;
59+
60+
int px = FgtXRay.localPlyX;
61+
int py = FgtXRay.localPlyY;
62+
int pz = FgtXRay.localPlyZ;
63+
if( ( px == FgtXRay.localPlyXPrev && pz == FgtXRay.localPlyZPrev ) && RenderTick.ores.size() > 0 )
64+
continue; // Skip the check if the player hasn't moved
65+
66+
List<BlockInfo> temp = new ArrayList<BlockInfo>();
5967
int radius = FgtXRay.distNumbers[ FgtXRay.distIndex ]; // Get the radius around the player to search.
60-
int px = FgtXRay.localPlyX;
61-
int py = FgtXRay.localPlyY;
62-
int pz = FgtXRay.localPlyZ;
68+
6369
for (int y = Math.max( 0, py - 96 ); y < py + 32; y++) // Check the y axis. from 0 or the players y-96 to the players y + 32
6470
{
6571
for (int x = px - radius; x < px + radius; x++) // Iterate the x axis around the player in radius.
6672
{
6773
for (int z = pz - radius; z < pz + radius; z++) // z axis.
6874
{
69-
int id = Block.getIdFromBlock( mc.theWorld.getBlock( x, y, z ) );
70-
int meta = mc.theWorld.getBlockMetadata(x, y, z);
71-
72-
if( mc.theWorld.getBlock( x, y, z ).hasTileEntity() )
73-
{
75+
BlockPos xyz = new BlockPos(x, y, z);
76+
IBlockState state = mc.theWorld.getBlockState( xyz );
77+
78+
int id = Block.getIdFromBlock( state.getBlock() );
79+
int meta = state.getBlock().getMetaFromState(state);
80+
81+
if( state.getBlock().hasTileEntity( state ) )
7482
meta = 0;
75-
}
76-
83+
7784
for( OreInfo ore : OresSearch.searchList ) // Now we're actually checking if the current x,y,z block is in our searchList.
7885
{
7986
if ( (ore.draw) && (id == ore.id) && (meta == ore.meta) ) // Dont check meta if its -1 (custom)
@@ -90,9 +97,7 @@ public void run() // Our thread code for finding ores near the player.
9097
nextTimeMs = System.currentTimeMillis() + delayMs; // Update the delay.
9198
}
9299
else
93-
{
94100
this.thread.interrupt(); // Kill the thread if we turn off xray or the player/world object becomes null.
95-
}
96101
}
97102
//System.out.println(" --- Thread Exited Cleanly! ");
98103
this.thread = null;

java/com/fgtXray/client/KeyBindingHandler.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package com.fgtXray.client;
22

3-
import cpw.mods.fml.client.FMLClientHandler;
4-
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
5-
import cpw.mods.fml.common.gameevent.InputEvent.KeyInputEvent;
3+
import net.minecraftforge.fml.client.FMLClientHandler;
4+
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
5+
import net.minecraftforge.fml.common.gameevent.InputEvent.KeyInputEvent;
66

77
import net.minecraft.client.Minecraft;
88
import net.minecraft.client.gui.GuiChat;

java/com/fgtXray/client/OresSearch.java

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
import net.minecraft.client.Minecraft;
1010
import net.minecraft.item.Item;
1111
import net.minecraft.item.ItemStack;
12-
import net.minecraft.util.ChatComponentText;
12+
13+
import net.minecraft.util.text.TextComponentString;
1314
import net.minecraftforge.oredict.OreDictionary;
1415

1516
import com.fgtXray.FgtXRay;
@@ -32,7 +33,7 @@ private static boolean checkList( List<OreInfo> temp, OreInfo value, ItemStack s
3233
return false;
3334
}
3435

35-
public static void add( String oreIdent, String name, int color ) // Takes a string of id:meta or oreName to add to our search list.
36+
public static void add( String oreIdent, String name, int[] color ) // Takes a string of id:meta or oreName to add to our search list.
3637
{
3738
oreIdent = oreIdent.replaceAll( "\\p{C}", "?" );
3839
int id = 0;
@@ -46,8 +47,7 @@ public static void add( String oreIdent, String name, int color ) // Takes a str
4647
{
4748
//System.out.println( String.format( "Can't add %s to searchList. Invalid format.", oreIdent ) );
4849
String notify = String.format( "[�aFgt XRay�r] %s is not a valid identifier. Try id:meta (example 1:0 for stone) or oreName (example oreDiamond or mossyStone)", oreIdent );
49-
ChatComponentText chat = new ChatComponentText( notify );
50-
mc.ingameGUI.getChatGUI().printChatMessage( chat );
50+
mc.ingameGUI.getChatGUI().printChatMessage( new TextComponentString(notify));
5151
return;
5252
}
5353

@@ -60,8 +60,7 @@ public static void add( String oreIdent, String name, int color ) // Takes a str
6060
{ // TODO: Some oredict ores are mod:block for some reason...
6161
//System.out.println( String.format( "%s is not a valid id:meta format.", oreIdent ) );
6262
String notify = String.format( "[�aFgt XRay�r] %s contains data other than numbers and the colon. Failed to add.", oreIdent );
63-
ChatComponentText chat = new ChatComponentText( notify );
64-
mc.ingameGUI.getChatGUI().printChatMessage( chat );
63+
mc.ingameGUI.getChatGUI().printChatMessage( new TextComponentString(notify) );
6564
return;
6665
}
6766

@@ -76,17 +75,15 @@ public static void add( String oreIdent, String name, int color ) // Takes a str
7675
catch( NumberFormatException e )
7776
{
7877
String notify = String.format( "[�aFgt XRay�r] Doesn't support in-game additions to the ore dictionary yet.. Failed to add." );
79-
ChatComponentText chat = new ChatComponentText( notify );
80-
mc.ingameGUI.getChatGUI().printChatMessage( chat );
78+
mc.ingameGUI.getChatGUI().printChatMessage( new TextComponentString(notify) );
8179
return;
8280
}
8381

8482
}
8583
//System.out.println( String.format( "Adding ore: %s", oreIdent ) );
8684
OresSearch.searchList.add( new OreInfo( name, id, meta, color, true ) );
8785
String notify = String.format( "[�aFgt XRay�r] successfully added %s.", oreIdent );
88-
ChatComponentText chat = new ChatComponentText( notify );
89-
mc.ingameGUI.getChatGUI().printChatMessage(chat);
86+
mc.ingameGUI.getChatGUI().printChatMessage(new TextComponentString(notify));
9087

9188
ConfigHandler.add(name, oreIdent, color);
9289
}
@@ -128,7 +125,7 @@ public static List<OreInfo> get() // Return the searchList, create it if needed.
128125
String key = entry.getKey(); // oreName string
129126
OreInfo value = entry.getValue(); // OreInfo class
130127

131-
ArrayList<ItemStack> oreDictOres = OreDictionary.getOres( key ); // Get an itemstack array of all the oredict ores for 'key'
128+
List<ItemStack> oreDictOres = OreDictionary.getOres( key ); // Get an itemstack array of all the oredict ores for 'key'
132129
if( oreDictOres.size() < 1 )
133130
{
134131
System.out.println( String.format( "[Fgt XRay] Ore %s doesn't exist! Skipping. (We shouldn't have this issue here! Please tell me about this!)", key ) );
@@ -143,15 +140,15 @@ public static List<OreInfo> get() // Return the searchList, create it if needed.
143140
continue;
144141
}
145142
temp.add( new OreInfo( value.oreName, Item.getIdFromItem( oreItem.getItem() ), oreItem.getItemDamage(), value.color, value.draw ) );
146-
System.out.println( String.format("[Fgt XRay] Adding OreInfo( %s, %d, %d, 0x%x, %b ) ", value.oreName, Item.getIdFromItem( oreItem.getItem() ), oreItem.getItemDamage(), value.color, value.draw ) );
143+
//System.out.println( String.format("[Fgt XRay] Adding OreInfo( %s, %d, %d, %s, %b ) ", value.oreName, Item.getIdFromItem( oreItem.getItem() ), oreItem.getItemDamage(), value.color[0], value.draw ) );
147144
}
148145
}
149146
System.out.println( "[Fgt XRay] --- Done populating searchList! --- ");
150147
System.out.println( "[Fgt XRay] --- Adding custom blocks --- ");
151148

152149
for( OreInfo ore : FgtXRay.customOres ) //TODO: Check if custom already exists
153150
{
154-
System.out.println( String.format( "[Fgt XRay] Adding OreInfo( %s, %d, %d, 0x%x, %b ) ", ore.oreName, ore.id, ore.meta, ore.color, ore.draw ) );
151+
System.out.println( String.format( "[Fgt XRay] Adding OreInfo( %s, %d, %d, %b ) ", ore.oreName, ore.id, ore.meta, ore.draw ) );
155152
temp.add( ore );
156153
}
157154
System.out.println( "[Fgt XRay] --- Done adding custom blocks --- ");

java/com/fgtXray/client/RenderTick.java

Lines changed: 42 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,13 @@
99
import java.util.List;
1010

1111
import net.minecraft.client.Minecraft;
12+
import net.minecraft.client.renderer.BlockRendererDispatcher;
1213
import net.minecraft.client.renderer.Tessellator;
14+
import net.minecraft.client.renderer.VertexBuffer;
15+
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
1316
import net.minecraft.world.World;
1417
import net.minecraftforge.client.event.RenderWorldLastEvent;
15-
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
18+
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
1619
import com.fgtXray.reference.BlockInfo;
1720
import com.fgtXray.FgtXRay;
1821

@@ -22,14 +25,13 @@ public class RenderTick
2225
{
2326
private final Minecraft mc = Minecraft.getMinecraft();
2427
public static List<BlockInfo> ores = new ArrayList();
25-
World world = mc.theWorld;
2628

2729
@SubscribeEvent
28-
public void onRenderEvent( RenderWorldLastEvent event ) // Called when drawing the world.
30+
public void onWorldRenderLast( RenderWorldLastEvent event ) // Called when drawing the world.
2931
{
3032
if ( mc.theWorld != null && FgtXRay.drawOres )
3133
{
32-
float f = event.partialTicks; // I still dont know what this is for.
34+
float f = event.getPartialTicks();
3335
float px = (float)mc.thePlayer.posX;
3436
float py = (float)mc.thePlayer.posY;
3537
float pz = (float)mc.thePlayer.posZ;
@@ -54,8 +56,10 @@ private void drawOres( float px, float py, float pz )
5456
GL11.glEnable( GL11.GL_BLEND );
5557
GL11.glBlendFunc( GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA );
5658
GL11.glLineWidth( 1f );
57-
Tessellator tes = Tessellator.instance;
58-
59+
60+
Tessellator tessellator = Tessellator.getInstance();
61+
VertexBuffer vertexBuffer = tessellator.getBuffer();
62+
5963
List<BlockInfo> temp = new ArrayList();
6064
temp.addAll(this.ores); // If we dont make a copy then the thread in ClientTick will ConcurrentModificationException.
6165

@@ -66,30 +70,38 @@ private void drawOres( float px, float py, float pz )
6670
bz = b.z;
6771
float f = 0.0f;
6872
float f1 = 1.0f;
69-
70-
tes.startDrawing( GL11.GL_LINES );
71-
tes.setColorRGBA_I(b.color, 255);
72-
tes.setBrightness( 200 );
73-
74-
// Bottom
75-
tes.addVertex( bx-px + f, by-py + f1, bz-pz + f); tes.addVertex( bx-px + f1, by-py + f1, bz-pz + f);
76-
tes.addVertex( bx-px + f1, by-py + f1, bz-pz + f); tes.addVertex( bx-px + f1, by-py + f1, bz-pz + f1);
77-
tes.addVertex( bx-px + f1, by-py + f1, bz-pz + f1); tes.addVertex( bx-px + f, by-py + f1, bz-pz + f1);
78-
tes.addVertex( bx-px + f, by-py + f1, bz-pz + f1); tes.addVertex( bx-px + f, by-py + f1, bz-pz + f);
79-
80-
// Top
81-
tes.addVertex( bx-px + f1, by-py + f, bz-pz + f); tes.addVertex( bx-px + f1, by-py + f, bz-pz + f1);
82-
tes.addVertex( bx-px + f1, by-py + f, bz-pz + f1); tes.addVertex( bx-px + f, by-py + f, bz-pz + f1);
83-
tes.addVertex( bx-px + f, by-py + f, bz-pz + f1); tes.addVertex( bx-px + f, by-py + f, bz-pz + f);
84-
tes.addVertex( bx-px + f, by-py + f, bz-pz + f); tes.addVertex( bx-px + f1, by-py + f, bz-pz + f);
85-
86-
// Corners
87-
tes.addVertex( bx-px + f1, by-py + f, bz-pz + f1); tes.addVertex( bx-px + f1, by-py + f1, bz-pz + f1); // Top Left
88-
tes.addVertex( bx-px + f1, by-py + f, bz-pz + f); tes.addVertex( bx-px + f1, by-py + f1, bz-pz + f); // Bottom Left
89-
tes.addVertex( bx-px + f, by-py + f, bz-pz + f1); tes.addVertex( bx-px + f, by-py + f1, bz-pz + f1); // Top Right
90-
tes.addVertex( bx-px + f, by-py + f, bz-pz + f); tes.addVertex( bx-px + f, by-py + f1, bz-pz + f); // Bottom Right
91-
92-
tes.draw();
73+
int red = b.color[0], green = b.color[1], blue = b.color[2];
74+
75+
vertexBuffer.begin(GL11.GL_LINES, DefaultVertexFormats.POSITION_COLOR);
76+
77+
vertexBuffer.pos(bx-px + f, by-py + f1, bz-pz + f).color(red, green, blue, 255).endVertex();
78+
vertexBuffer.pos(bx-px + f1, by-py + f1, bz-pz + f).color(red, green, blue, 255).endVertex();
79+
vertexBuffer.pos(bx-px + f1, by-py + f1, bz-pz + f).color(red, green, blue, 255).endVertex();
80+
vertexBuffer.pos(bx-px + f1, by-py + f1, bz-pz + f1).color(red, green, blue, 255).endVertex();
81+
vertexBuffer.pos(bx-px + f1, by-py + f1, bz-pz + f1).color(red, green, blue, 255).endVertex();
82+
vertexBuffer.pos(bx-px + f, by-py + f1, bz-pz + f1).color(red, green, blue, 255).endVertex();
83+
vertexBuffer.pos(bx-px + f, by-py + f1, bz-pz + f1).color(red, green, blue, 255).endVertex();
84+
vertexBuffer.pos(bx-px + f, by-py + f1, bz-pz + f).color(red, green, blue, 255).endVertex();
85+
86+
vertexBuffer.pos(bx-px + f1, by-py + f, bz-pz + f).color(red, green, blue, 255).endVertex();
87+
vertexBuffer.pos(bx-px + f1, by-py + f, bz-pz + f1).color(red, green, blue, 255).endVertex();
88+
vertexBuffer.pos(bx-px + f1, by-py + f, bz-pz + f1).color(red, green, blue, 255).endVertex();
89+
vertexBuffer.pos(bx-px + f, by-py + f, bz-pz + f1).color(red, green, blue, 255).endVertex();
90+
vertexBuffer.pos(bx-px + f, by-py + f, bz-pz + f1).color(red, green, blue, 255).endVertex();
91+
vertexBuffer.pos(bx-px + f, by-py + f, bz-pz + f).color(red, green, blue, 255).endVertex();
92+
vertexBuffer.pos(bx-px + f, by-py + f, bz-pz + f).color(red, green, blue, 255).endVertex();
93+
vertexBuffer.pos(bx-px + f1, by-py + f, bz-pz + f).color(red, green, blue, 255).endVertex();
94+
95+
vertexBuffer.pos(bx-px + f1, by-py + f, bz-pz + f1).color(red, green, blue, 255).endVertex();
96+
vertexBuffer.pos(bx-px + f1, by-py + f1, bz-pz + f1).color(red, green, blue, 255).endVertex();
97+
vertexBuffer.pos(bx-px + f1, by-py + f, bz-pz + f).color(red, green, blue, 255).endVertex();
98+
vertexBuffer.pos(bx-px + f1, by-py + f1, bz-pz + f).color(red, green, blue, 255).endVertex();
99+
vertexBuffer.pos(bx-px + f, by-py + f, bz-pz + f1).color(red, green, blue, 255).endVertex();
100+
vertexBuffer.pos(bx-px + f, by-py + f1, bz-pz + f1).color(red, green, blue, 255).endVertex();
101+
vertexBuffer.pos(bx-px + f, by-py + f, bz-pz + f).color(red, green, blue, 255).endVertex();
102+
vertexBuffer.pos(bx-px + f, by-py + f1, bz-pz + f).color(red, green, blue, 255).endVertex();
103+
104+
tessellator.draw();
93105
}
94106

95107
GL11.glDepthMask(true);

java/com/fgtXray/client/gui/GuiEditOre.java

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
import net.minecraft.client.gui.GuiScreen;
55
import net.minecraft.client.gui.GuiTextField;
66

7+
import java.io.IOException;
8+
79
public class GuiEditOre extends GuiScreen
810
{
911
GuiTextField oreName; // Human readable name
@@ -15,7 +17,7 @@ public void initGui() // Called when the gui should be (re)created.
1517
this.buttonList.add( new GuiButton( 97, 2, 2, 100, 20, "Delete" ) ); // Delete button
1618
this.buttonList.add( new GuiButton( 98, this.width-102, this.height-22, 100, 20, "Save" ) ); // Save button
1719
this.buttonList.add( new GuiButton( 99, 2, this.height-22, 100, 20, "Cancel" ) ); // Cancel button
18-
oreName = new GuiTextField( this.fontRendererObj, 104, this.height-22, 200, 20 );
20+
oreName = new GuiTextField( 1, this.fontRendererObj, 104, this.height-22, 200, 20 );
1921
}
2022

2123
@Override
@@ -38,7 +40,11 @@ public void actionPerformed( GuiButton button ) // Called on left click of GuiBu
3840
@Override
3941
protected void keyTyped( char par1, int par2 )
4042
{
41-
super.keyTyped( par1, par2 );
43+
try {
44+
super.keyTyped( par1, par2 );
45+
} catch (IOException e) {
46+
e.printStackTrace();
47+
}
4248
if( oreName.isFocused() )
4349
{
4450
oreName.textboxKeyTyped( par1, par2 );
@@ -73,14 +79,18 @@ public void drawScreen( int x, int y, float f )
7379
@Override
7480
public void mouseClicked( int x, int y, int mouse )
7581
{
76-
super.mouseClicked( x, y, mouse );
82+
try {
83+
super.mouseClicked( x, y, mouse );
84+
} catch (IOException e) {
85+
e.printStackTrace();
86+
}
7787
oreName.mouseClicked( x, y, mouse );
7888
if( mouse == 1 ) // Right clicked
7989
{
8090
for( int i = 0; i < this.buttonList.size(); i++ )
8191
{
8292
GuiButton button = (GuiButton)this.buttonList.get( i );
83-
if( button.func_146115_a() ) //func_146115_a() returns true if the button is being hovered
93+
if( button.isMouseOver() ) //func_146115_a() returns true if the button is being hovered
8494
{
8595
/* TODO: Allow editing of ores
8696
* if( button.id == 99 ){ */

0 commit comments

Comments
 (0)