mirror of
https://github.com/GTNewHorizons/BloodMagic.git
synced 2026-11-17 10:55:10 +00:00
Add suport of using the GT miners to mine the ores from the BloodMagic ritual "Mark of the Falling Tower" (#23)
* Add suport of using the GT miners to mine the ores from the BloodMagic ritual "Mark of the Falling Tower" * Optional GT
This commit is contained in:
1 parent
adb6977425
commit
209fed5f81
3 files changed
+21
-1
No files matched your search
@@ -278,6 +278,7 @@ public class AlchemicalWizardry
|
||||
public static int ritualWeakCostThunderstorm;
|
||||
public static int ritualWeakCostZombie;
|
||||
|
||||
public static boolean isGregTechLoaded;
|
||||
public static boolean isThaumcraftLoaded;
|
||||
public static boolean isForestryLoaded;
|
||||
public static boolean isBotaniaLoaded;
|
||||
@@ -1061,6 +1062,7 @@ public class AlchemicalWizardry
|
||||
public void postInit(FMLPostInitializationEvent event)
|
||||
{
|
||||
proxy.registerPostSideObjects();
|
||||
isGregTechLoaded = Loader.isModLoaded("gregtech");
|
||||
//TODO Thaumcraft Integration
|
||||
if (Loader.isModLoaded("Thaumcraft"))
|
||||
{
|
||||
|
||||
+14
-1
@@ -4,9 +4,12 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import cpw.mods.fml.common.Optional;
|
||||
import gregtech.common.blocks.GT_TileEntity_Ores;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
|
||||
@@ -123,7 +126,9 @@ public class MeteorParadigm
|
||||
ItemStack blockStack = mpc.getValidBlockParadigm();
|
||||
if(blockStack != null && blockStack.getItem() instanceof ItemBlock)
|
||||
{
|
||||
((ItemBlock)blockStack.getItem()).placeBlockAt(blockStack, null, world, x + i, y + j, z + k, 0, 0, 0, 0, blockStack.getItemDamage());
|
||||
((ItemBlock)blockStack.getItem()).placeBlockAt(blockStack, null, world, x + i, y + j, z + k, 0, 0, 0, 0, blockStack.getItemDamage());
|
||||
if (AlchemicalWizardry.isGregTechLoaded)
|
||||
setGTOresNaturalIfNeeded(world, x + i, y + j, z + k);
|
||||
world.markBlockForUpdate(x + i, y + j, z + k);
|
||||
hasPlacedBlock = true;
|
||||
break;
|
||||
@@ -179,4 +184,12 @@ public class MeteorParadigm
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Optional.Method(modid = "gregtech")
|
||||
private static void setGTOresNaturalIfNeeded(World world, int x, int y, int z) {
|
||||
final TileEntity tileEntity = world.getTileEntity(x, y, z);
|
||||
if (tileEntity instanceof GT_TileEntity_Ores) {
|
||||
((GT_TileEntity_Ores) tileEntity).mNatural = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user