aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/gregtech/common')
-rw-r--r--src/main/java/gregtech/common/GT_Client.java11
-rw-r--r--src/main/java/gregtech/common/GT_Pollution.java7
-rw-r--r--src/main/java/gregtech/common/GT_Proxy.java41
-rw-r--r--src/main/java/gregtech/common/GT_RecipeAdder.java25
-rw-r--r--src/main/java/gregtech/common/GT_UndergroundOil.java4
-rw-r--r--src/main/java/gregtech/common/GT_Worldgenerator.java69
-rw-r--r--src/main/java/gregtech/common/blocks/GT_Block_Machines.java4
-rw-r--r--src/main/java/gregtech/common/blocks/GT_Block_Ores_Abstract.java11
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_Arm.java5
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_ControlsWork.java6
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_Conveyor.java24
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_DoesWork.java8
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_Drain.java12
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_EUMeter.java24
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_EnergyOnly.java6
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_FluidRegulator.java4
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_Fluidfilter.java12
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_ItemMeter.java6
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_LiquidMeter.java4
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_NeedMaintainance.java24
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_PlayerDetector.java6
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_Pump.java24
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_RedstoneConductor.java14
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_RedstoneSignalizer.java6
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_RedstoneWirelessBase.java6
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_Shutter.java8
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_Vent.java2
-rw-r--r--src/main/java/gregtech/common/gui/GT_Container_ChestBuffer.java12
-rw-r--r--src/main/java/gregtech/common/gui/GT_Container_Filter.java20
-rw-r--r--src/main/java/gregtech/common/gui/GT_Container_Regulator.java5
-rw-r--r--src/main/java/gregtech/common/gui/GT_Container_SuperBuffer.java12
-rw-r--r--src/main/java/gregtech/common/gui/GT_Container_TypeFilter.java20
-rw-r--r--src/main/java/gregtech/common/items/GT_MetaGenerated_Item_01.java6
-rw-r--r--src/main/java/gregtech/common/items/GT_MetaGenerated_Item_03.java31
-rw-r--r--src/main/java/gregtech/common/items/behaviors/Behaviour_None.java5
-rw-r--r--src/main/java/gregtech/common/items/behaviors/Behaviour_Prospecting.java114
-rw-r--r--src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Steel.java3
-rw-r--r--src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_LightningRod.java2
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_AdvSeismicProspector.java12
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_MicrowaveEnergyTransmitter.java33
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Teleporter.java65
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Charcoal_Pit.java1
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Cleanroom.java10
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler.java18
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_Bronze.java4
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_Steel.java4
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_Titanium.java4
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_TungstenSteel.java4
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrill.java2
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ProcessingArray.java32
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Compressor_Bronze.java7
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Compressor_Steel.java7
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Extractor_Bronze.java7
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Extractor_Steel.java7
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Macerator_Steel.java4
-rw-r--r--src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_QuantumChest.java41
-rw-r--r--src/main/java/gregtech/common/tools/GT_Tool.java6
-rw-r--r--src/main/java/gregtech/common/tools/GT_Tool_Axe.java16
-rw-r--r--src/main/java/gregtech/common/tools/GT_Tool_Chainsaw_LV.java21
59 files changed, 509 insertions, 399 deletions
diff --git a/src/main/java/gregtech/common/GT_Client.java b/src/main/java/gregtech/common/GT_Client.java
index d26e899264..839dcd2367 100644
--- a/src/main/java/gregtech/common/GT_Client.java
+++ b/src/main/java/gregtech/common/GT_Client.java
@@ -81,7 +81,7 @@ public class GT_Client extends GT_Proxy
private boolean isFirstClientPlayerTick;
private String mMessage;
public GT_Client() {
- mCapeRenderer = new GT_CapeRenderer(mCapeList);
+ mCapeRenderer = new GT_CapeRenderer(mCapeList);
mAnimationTick = 0L;
mAnimationDirection = false;
isFirstClientPlayerTick = true;
@@ -231,7 +231,6 @@ public class GT_Client extends GT_Proxy
String tName = arr$[i$];
mCapeList.add(tName.toLowerCase());
}
-
(new Thread(this)).start();
}
@@ -256,9 +255,7 @@ public class GT_Client extends GT_Proxy
GregTech_API.METATILEENTITIES[i].getStackForm(1L).getTooltip(null, true);
i++;
} while (true);
- } catch (Throwable e) {
- e.printStackTrace(GT_Log.err);
- }
+ } catch (Throwable e) {e.printStackTrace(GT_Log.err);}
// super.onPostLoad();
@@ -305,7 +302,7 @@ public class GT_Client extends GT_Proxy
}
} catch (Throwable e) {
}
- try {
+ /**try {
GT_Log.out.println("GT_Mod: Downloading News.");
@SuppressWarnings("resource")
Scanner tScanner = new Scanner(new URL("http://files.minecraftforge.net/maven/com/gregoriust/gregtech/message.txt").openStream());
@@ -313,7 +310,7 @@ public class GT_Client extends GT_Proxy
this.mMessage = (this.mMessage + tScanner.nextLine() + " ");
}
} catch (Throwable e) {
- }
+ }**/
}
@SubscribeEvent
diff --git a/src/main/java/gregtech/common/GT_Pollution.java b/src/main/java/gregtech/common/GT_Pollution.java
index 20ffd10acd..6669bf861a 100644
--- a/src/main/java/gregtech/common/GT_Pollution.java
+++ b/src/main/java/gregtech/common/GT_Pollution.java
@@ -16,10 +16,9 @@ import net.minecraft.world.ChunkCoordIntPair;
import net.minecraft.world.ChunkPosition;
import net.minecraft.world.World;
import net.minecraft.world.chunk.Chunk;
+import net.minecraftforge.event.world.WorldEvent;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
+import java.util.*;
import static gregtech.common.GT_Proxy.*;
@@ -274,7 +273,7 @@ public class GT_Pollution {
@Deprecated /*Don't use it... too weird way of passing position*/
public static void addPollution(World aWorld, ChunkPosition aPos, int aPollution){
//The abuse of ChunkPosition to store block position and dim...
- //is just bad especially when that is both used to store ChunkPos and BlockPos depending on context
+ //is just bad expacially when that is both used to store ChunkPos and BlockPos depeending on context
addPollution(aWorld.getChunkFromBlockCoords(aPos.chunkPosX,aPos.chunkPosZ),aPollution);
}
}
diff --git a/src/main/java/gregtech/common/GT_Proxy.java b/src/main/java/gregtech/common/GT_Proxy.java
index 08afbbaf26..82cbfc375e 100644
--- a/src/main/java/gregtech/common/GT_Proxy.java
+++ b/src/main/java/gregtech/common/GT_Proxy.java
@@ -1,7 +1,13 @@
package gregtech.common;
-import cpw.mods.fml.common.*;
+import cpw.mods.fml.common.FMLCommonHandler;
+import cpw.mods.fml.common.IFuelHandler;
+import cpw.mods.fml.common.Loader;
+import cpw.mods.fml.common.ModContainer;
+import cpw.mods.fml.common.ProgressManager;
import cpw.mods.fml.common.eventhandler.Event.Result;
+import cpw.mods.fml.common.eventhandler.EventBus;
+import cpw.mods.fml.common.eventhandler.EventPriority;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.common.gameevent.TickEvent;
import cpw.mods.fml.common.network.FMLNetworkEvent;
@@ -27,8 +33,13 @@ import gregtech.api.objects.MaterialStack;
import gregtech.api.util.*;
import gregtech.common.entities.GT_Entity_Arrow;
import gregtech.common.items.GT_MetaGenerated_Tool_01;
-import gregtech.common.items.armor.ModularArmor_Item;
-import gregtech.common.items.armor.gui.*;
+import gregtech.common.items.armor.*;
+import gregtech.common.items.armor.gui.ContainerBasicArmor;
+import gregtech.common.items.armor.gui.ContainerElectricArmor1;
+import gregtech.common.items.armor.gui.GuiElectricArmor1;
+import gregtech.common.items.armor.gui.GuiModularArmor;
+import gregtech.common.items.armor.gui.InventoryArmor;
+import gregtech.common.tools.GT_Tool;
import net.minecraft.enchantment.Enchantment;
import net.minecraft.enchantment.EnchantmentHelper;
import net.minecraft.entity.Entity;
@@ -50,19 +61,23 @@ import net.minecraft.potion.Potion;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.DamageSource;
import net.minecraft.world.ChunkCoordIntPair;
+import net.minecraft.world.ChunkPosition;
import net.minecraft.world.World;
import net.minecraft.world.WorldSettings.GameType;
import net.minecraft.world.gen.feature.WorldGenMinable;
+import net.minecraftforge.common.DimensionManager;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.ForgeEventFactory;
import net.minecraftforge.event.entity.EntityJoinWorldEvent;
import net.minecraftforge.event.entity.living.EnderTeleportEvent;
import net.minecraftforge.event.entity.player.ArrowLooseEvent;
import net.minecraftforge.event.entity.player.ArrowNockEvent;
+import net.minecraftforge.event.entity.player.PlayerEvent;
import net.minecraftforge.event.entity.player.PlayerInteractEvent;
import net.minecraftforge.event.terraingen.OreGenEvent;
import net.minecraftforge.event.world.BlockEvent;
import net.minecraftforge.event.world.ChunkDataEvent;
+import net.minecraftforge.event.world.WorldEvent;
import net.minecraftforge.fluids.Fluid;
import net.minecraftforge.fluids.FluidContainerRegistry;
import net.minecraftforge.fluids.FluidRegistry;
@@ -193,7 +208,9 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler {
public boolean mCropNeedBlock = true;
public boolean mReenableSimplifiedChemicalRecipes = false;
public boolean mAMHInteraction = true;
+ public boolean mForceFreeFace = false;
+
public GT_Proxy() {
GameRegistry.registerFuelHandler(this);
MinecraftForge.EVENT_BUS.register(this);
@@ -493,6 +510,7 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler {
break;
}
}
+ GT_LanguageManager.writePlaceholderStrings();
}
public static long tBits = GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.ONLY_ADD_IF_RESULT_IS_NOT_NULL | GT_ModHandler.RecipeBits.NOT_REMOVABLE;
@@ -802,7 +820,7 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler {
aEvent.Ore.stackSize = 1;
if (this.mIgnoreTcon || aEvent.Ore.getUnlocalizedName().startsWith("item.oreberry")) {
if ((aOriginalMod.toLowerCase(Locale.ENGLISH).contains("xycraft")) || (aOriginalMod.toLowerCase(Locale.ENGLISH).contains("tconstruct"))
- && (!aOriginalMod.toLowerCase(Locale.ENGLISH).contains("natural"))) {
+ || ((aOriginalMod.toLowerCase(Locale.ENGLISH).contains("natura")) && (!aOriginalMod.toLowerCase(Locale.ENGLISH).contains("natural")))) {
if (GT_Values.D1) {
GT_Log.ore.println(aMod + " -> " + aEvent.Name + " is getting ignored, because of racism. :P");
}
@@ -1862,6 +1880,21 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler {
////DO NOTHING - this chunk data was already loaded and stored in hash map
//}
}
+
+ @SubscribeEvent
+ public void onBlockBreakSpeedEvent(PlayerEvent.BreakSpeed aEvent)
+ {
+ if (aEvent.newSpeed > 0.0F)
+ {
+ if (aEvent.entityPlayer != null)
+ {
+ ItemStack aStack = aEvent.entityPlayer.getCurrentEquippedItem();
+ if ((aStack != null) && ((aStack.getItem() instanceof GT_MetaGenerated_Tool))) {
+ aEvent.newSpeed = ((GT_MetaGenerated_Tool)aStack.getItem()).onBlockBreakSpeedEvent(aEvent.newSpeed, aStack, aEvent.entityPlayer, aEvent.block, aEvent.x, aEvent.y, aEvent.z, (byte)aEvent.metadata, aEvent);
+ }
+ }
+ }
+ }
public static class OreDictEventContainer {
public final OreDictionary.OreRegisterEvent mEvent;
diff --git a/src/main/java/gregtech/common/GT_RecipeAdder.java b/src/main/java/gregtech/common/GT_RecipeAdder.java
index 69c04e83f4..05eb72dcf5 100644
--- a/src/main/java/gregtech/common/GT_RecipeAdder.java
+++ b/src/main/java/gregtech/common/GT_RecipeAdder.java
@@ -128,15 +128,16 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
}
public boolean addMultiblockChemicalRecipe(ItemStack[] aInputs, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, ItemStack[] aOutputs, int aDuration, int aEUtick){
- if (areItemsAndFluidsBothNull(aInputs, aFluidInputs) || areItemsAndFluidsBothNull(aOutputs, aFluidOutputs)) {
- return false;
- }
- if (aEUtick <= 0) {
- return false;
- }
- GT_Recipe.GT_Recipe_Map.sMultiblockChemicalRecipes.addRecipe(false, aInputs, aOutputs, null, null, aFluidInputs, aFluidOutputs, aDuration, aEUtick, 0);
- return true;
- }
+ if (areItemsAndFluidsBothNull(aInputs, aFluidInputs) || areItemsAndFluidsBothNull(aOutputs, aFluidOutputs)) {
+ return false;
+ }
+ if (aEUtick <= 0) {
+ return false;
+ }
+ GT_Recipe.GT_Recipe_Map.sMultiblockChemicalRecipes.addRecipe(false, aInputs, aOutputs, null, null, aFluidInputs, aFluidOutputs, aDuration, aEUtick, 0);
+ return true;
+ }
+
@Override
public void addDefaultPolymerizationRecipes(Fluid aBasicMaterial, Fluid aPolymer){
//Oxygen/Rutile -> +50% Output each
@@ -176,7 +177,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
new GT_Recipe(aInput1, aEUt, aInput2, aDuration, aOutput1, aOutput2);
return true;
}
-
+
@Override
public boolean addAlloySmelterRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput1, int aDuration, int aEUt) {
return addAlloySmelterRecipe(aInput1, aInput2, aOutput1, aDuration, aEUt, false);
@@ -295,8 +296,6 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
return true;
}
-
-
public boolean addAssemblerRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, ItemStack aOutput1, int aDuration, int aEUt, boolean aCleanroom) {
if ((aInput1 == null) || (aOutput1 == null)) {
return false;
@@ -383,7 +382,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
}
int tExplosives = aInput2 > 0 ? aInput2 < 64 ? aInput2 : 64 : 1;
int tGunpowder = tExplosives * 2;
- int tDynamite = tExplosives /2;
+ int tDynamite = tExplosives;//TODO check this values for mutliplication (if want to do divide use that Math.min()
int tTNT = Math.max(1, tExplosives/2);
int tITNT = Math.max(1, tExplosives/4);
//new GT_Recipe(aInput1, aInput2, aOutput1, aOutput2);
diff --git a/src/main/java/gregtech/common/GT_UndergroundOil.java b/src/main/java/gregtech/common/GT_UndergroundOil.java
index 83262716ae..a3e0962100 100644
--- a/src/main/java/gregtech/common/GT_UndergroundOil.java
+++ b/src/main/java/gregtech/common/GT_UndergroundOil.java
@@ -4,14 +4,18 @@ import gregtech.GT_Mod;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.objects.GT_UO_Fluid;
import gregtech.api.objects.XSTR;
+import gregtech.common.GT_Proxy;
import net.minecraft.world.ChunkCoordIntPair;
+import net.minecraft.world.ChunkPosition;
import net.minecraft.world.World;
import net.minecraft.world.chunk.Chunk;
+import net.minecraftforge.fluids.Fluid;
import net.minecraftforge.fluids.FluidRegistry;
import net.minecraftforge.fluids.FluidStack;
import java.util.HashMap;
+import static gregtech.api.util.GT_Utility.getScaleCoordinates;
import static gregtech.common.GT_Proxy.*;
/**
diff --git a/src/main/java/gregtech/common/GT_Worldgenerator.java b/src/main/java/gregtech/common/GT_Worldgenerator.java
index 334097c729..792cec6e5e 100644
--- a/src/main/java/gregtech/common/GT_Worldgenerator.java
+++ b/src/main/java/gregtech/common/GT_Worldgenerator.java
@@ -3,12 +3,14 @@ package gregtech.common;
import cpw.mods.fml.common.IWorldGenerator;
import cpw.mods.fml.common.registry.GameRegistry;
import gregtech.api.GregTech_API;
+import gregtech.api.enums.GT_Values;
import gregtech.api.objects.XSTR;
import gregtech.api.util.GT_Log;
import gregtech.api.world.GT_Worldgen;
import gregtech.common.blocks.GT_TileEntity_Ores;
import net.minecraft.init.Blocks;
import net.minecraft.util.MathHelper;
+import net.minecraft.world.ChunkCoordIntPair;
import net.minecraft.world.World;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.chunk.Chunk;
@@ -16,13 +18,12 @@ import net.minecraft.world.chunk.IChunkProvider;
import net.minecraft.world.gen.ChunkProviderEnd;
import net.minecraft.world.gen.ChunkProviderHell;
+import java.util.HashSet;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
-public class GT_Worldgenerator
- implements IWorldGenerator {
- //public static boolean sAsteroids = true;
+public class GT_Worldgenerator implements IWorldGenerator {
private static int mEndAsteroidProbability = 300;
//private static int mGCAsteroidProbability = 50;
private static int mSize = 100;
@@ -60,14 +61,15 @@ public class GT_Worldgenerator
this.mIsGenerating = false;
}
}
-
- //public synchronized void generate(Random aRandom, int aX, int aZ, World aWorld, IChunkProvider aChunkGenerator, IChunkProvider aChunkProvider) {//TODO CHECK???
- // int tempDimensionId = aWorld.provider.dimensionId;
- // if (tempDimensionId != -1 && tempDimensionId != 1 && !aChunkGenerator.getClass().getName().contains("galacticraft")) {
- // tempDimensionId = 0;
- // }
- // new WorldGenContainer(new XSTR(aRandom.nextInt()), aX * 16, aZ * 16, tempDimensionId, aWorld, aChunkGenerator, aChunkProvider, aWorld.getBiomeGenForCoords(aX * 16 + 8, aZ * 16 + 8).biomeName).run();
- //}
+ /*//TODO CHECK
+ public synchronized void generate(Random aRandom, int aX, int aZ, World aWorld, IChunkProvider aChunkGenerator, IChunkProvider aChunkProvider) {//TODO CHECK???
+ int tempDimensionId = aWorld.provider.dimensionId;
+ if (tempDimensionId != -1 && tempDimensionId != 1 && !aChunkGenerator.getClass().getName().contains("galacticraft")) {
+ tempDimensionId = 0;
+ }
+ new WorldGenContainer(new XSTR(aRandom.nextInt()), aX * 16, aZ * 16, tempDimensionId, aWorld, aChunkGenerator, aChunkProvider, aWorld.getBiomeGenForCoords(aX * 16 + 8, aZ * 16 + 8).biomeName).run();
+ }
+ */
public static class WorldGenContainer
implements Runnable {
@@ -79,6 +81,7 @@ public class GT_Worldgenerator
public final IChunkProvider mChunkGenerator;
public final IChunkProvider mChunkProvider;
public final String mBiome;
+ public static HashSet<ChunkCoordIntPair> mGenerated = new HashSet<>(2000);
public WorldGenContainer(Random aRandom, int aX, int aZ, int aDimensionType, World aWorld, IChunkProvider aChunkGenerator, IChunkProvider aChunkProvider, String aBiome) {
this.mRandom = aRandom;
@@ -91,8 +94,22 @@ public class GT_Worldgenerator
this.mBiome = aBiome;
}
+ //returns a coordinate of a center chunk of 3x3 square; the argument belongs to this square
+ public int getVeinCenterCoordinate(int c) {
+ c += c < 0 ? 1 : 3;
+ return c - c % 3 - 2;
+ }
+
+ public boolean surroundingChunksLoaded(int xCenter, int zCenter) {
+ return mWorld.checkChunksExist(xCenter - 16, 0, zCenter - 16, xCenter + 16, 0, zCenter + 16);
+ }
+
public void run() {
- if (((this.mX / 16 - 1) % 3 == 0) && ((this.mZ / 16 - 1) % 3 == 0)) {
+ int xCenter = getVeinCenterCoordinate(mX >> 4) << 4;
+ int zCenter = getVeinCenterCoordinate(mZ >> 4) << 4;
+ ChunkCoordIntPair centerChunk = new ChunkCoordIntPair(xCenter, zCenter);
+