@@ -37,28 +37,31 @@ public class GuiOreMappingSatellite extends GuiContainer {
3737 private int mouseValue ;
3838 private int scanSize = 2 ;
3939 private int radius = 1 ;
40+ private int zoomScale ;
4041 private int xSelected , zSelected , xCenter , zCenter , playerPosX , playerPosZ ;
4142 private static final ResourceLocation backdrop = new ResourceLocation ("advancedrocketry" , "textures/gui/VideoSatallite.png" );
4243 int [][] oreMap ;
4344 World world ;
44- SatelliteOreMapping tile ;
45+ SatelliteOreMapping satellite ;
4546
46- public GuiOreMappingSatellite (SatelliteOreMapping tile ,EntityPlayer inventoryPlayer ) {
47- super ( new ContainerOreMappingSatallite (tile ,inventoryPlayer .inventory ));
47+ public GuiOreMappingSatellite (SatelliteOreMapping satellite ,EntityPlayer inventoryPlayer ) {
48+ super ( new ContainerOreMappingSatallite (satellite ,inventoryPlayer .inventory ));
4849 world = inventoryPlayer .world ;
4950
5051 prevSlot = -1 ;
51- this .tile = tile ;
52- //masterConsole = tile ;
52+ this .satellite = satellite ;
53+ //masterConsole = satellite ;
5354 playerPosX = xCenter = (int ) inventoryPlayer .posX ;
5455 playerPosZ = zCenter = (int ) inventoryPlayer .posZ ;
5556
5657 //Max zoom is 128
57- if (tile != null )
58- maxZoom = (int ) Math .pow (2 , tile .getZoomRadius ());
58+ if (satellite != null ) {
59+ maxZoom = (int ) Math .pow (2 , satellite .getZoomRadius ());
60+ zoomScale = satellite .getZoomRadius ();
61+ }
5962
6063 if (maxZoom == 1 )
61- this .tile = null ;
64+ this .satellite = null ;
6265 scanSize = maxZoom ;
6366
6467 prevWorldTickTime = world .getTotalWorldTime ();
@@ -70,7 +73,7 @@ public GuiOreMappingSatellite(SatelliteOreMapping tile,EntityPlayer inventoryPla
7073 Runnable mapper = new Runnable () {
7174 @ Override
7275 public void run () {
73- oreMap = SatelliteOreMapping .scanChunk (world , xCenter , zCenter , scanSize /2 , radius );
76+ oreMap = satellite .scanChunk (world , xCenter , zCenter , scanSize /2 , radius , zoomScale );
7477 if (oreMap != null && !Thread .interrupted ())
7578 merged = true ;
7679 else merged = false ;
@@ -88,7 +91,7 @@ class ItemMapper implements Runnable {
8891
8992 @ Override
9093 public void run () {
91- oreMap = SatelliteOreMapping .scanChunk (world , xCenter , zCenter , scanSize /2 , radius , myBlock );
94+ oreMap = satellite .scanChunk (world , xCenter , zCenter , scanSize /2 , radius , myBlock , zoomScale );
9295 if (oreMap != null && !Thread .interrupted ())
9396 merged = true ;
9497 else merged = false ;
@@ -99,7 +102,7 @@ public void run() {
99102 public boolean doesGuiPauseGame (){ return false ; }
100103
101104 private void runMapperWithSelection () {
102- if (tile == null )
105+ if (satellite == null )
103106 return ;
104107
105108 currentMapping .interrupt ();
@@ -125,8 +128,8 @@ protected void mouseClicked(int x, int y,
125128 int xOffset = 47 + (width - 240 ) / 2 , yOffset = 20 + (height - 192 ) / 2 ;
126129
127130 //Get selected slot and begin scan!
128- if (button == 0 && tile .getSelectedSlot () != prevSlot ) {
129- prevSlot = tile .getSelectedSlot ();
131+ if (button == 0 && satellite .getSelectedSlot () != prevSlot ) {
132+ prevSlot = satellite .getSelectedSlot ();
130133 runMapperWithSelection ();
131134 }
132135
@@ -209,7 +212,7 @@ public void initGui() {
209212
210213 ItemStack stack = inventorySlots .getSlot (0 ).getStack ();
211214
212- if (tile != null ) {
215+ if (satellite != null ) {
213216 currentMapping = new Thread (mapper );
214217 currentMapping .setName ("Ore Scan" );
215218 currentMapping .start ();
@@ -279,7 +282,7 @@ protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_)
279282
280283 //If a slot is selected draw an indicator
281284 int slot ;
282- if (tile != null && (slot = tile .getSelectedSlot ()) != -1 ) {
285+ if (satellite != null && (slot = satellite .getSelectedSlot ()) != -1 ) {
283286
284287 GlStateManager .disableTexture2D ();
285288 GlStateManager .color (0f , 0.8f , 0f , 1f );
0 commit comments