mirror of
https://github.com/GTNewHorizons/BloodMagic.git
synced 2026-11-27 07:13:14 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9b7b10e5c3 | ||
|
|
fc58f5346c |
No files matched your search
@@ -479,7 +479,7 @@ public class AlchemicalWizardry {
|
||||
public static int ritualWeakCostThunderstorm;
|
||||
public static int ritualWeakCostZombie;
|
||||
|
||||
public static boolean isGregTechLoaded;
|
||||
public static boolean isGregTech5UnofficialNewHorizonsLoaded;
|
||||
public static boolean isThaumcraftLoaded;
|
||||
public static boolean isForestryLoaded;
|
||||
public static boolean isBotaniaLoaded;
|
||||
@@ -3246,7 +3246,7 @@ public class AlchemicalWizardry {
|
||||
@EventHandler
|
||||
public void postInit(FMLPostInitializationEvent event) {
|
||||
proxy.registerPostSideObjects();
|
||||
isGregTechLoaded = Loader.isModLoaded("gregtech");
|
||||
isGregTech5UnofficialNewHorizonsLoaded = Loader.isModLoaded("gregtech_nh");
|
||||
isEndlessIdsLoaded = Loader.isModLoaded("endlessids");
|
||||
// TODO Thaumcraft Integration
|
||||
if (Loader.isModLoaded("Thaumcraft")) {
|
||||
|
||||
@@ -125,7 +125,8 @@ public class BoundPickaxe extends ItemPickaxe implements IBindable {
|
||||
dropMultiset.add(new ItemType(block, meta));
|
||||
} else {
|
||||
ArrayList<ItemStack> itemDropList;
|
||||
if (AlchemicalWizardry.isGregTechLoaded && block instanceof GTBlockOre ore) {
|
||||
if (AlchemicalWizardry.isGregTech5UnofficialNewHorizonsLoaded
|
||||
&& block instanceof GTBlockOre ore) {
|
||||
itemDropList = ore.getDropsForPlayer(world, x, y, z, meta, fortuneLvl, player);
|
||||
} else {
|
||||
itemDropList = block.getDrops(world, x, y, z, meta, fortuneLvl);
|
||||
|
||||
@@ -205,6 +205,8 @@ public class ItemIncense extends Item implements IIncense {
|
||||
GREEN(1500, 2400, 4.0f, 2000, 0, 1.0f, 0),
|
||||
PURPLE(2400, 3500, 5.0f, 2000, 1.0f, 0, 1.0f);
|
||||
|
||||
public static final EnumIncense[] VALUES = values();
|
||||
|
||||
public final int minValue;
|
||||
public final int maxValue;
|
||||
public final float tickRate;
|
||||
@@ -226,10 +228,10 @@ public class ItemIncense extends Item implements IIncense {
|
||||
}
|
||||
|
||||
public static EnumIncense getEnumForIndex(int index) {
|
||||
if (index > EnumIncense.values().length || index < 0) {
|
||||
if (index > EnumIncense.VALUES.length || index < 0) {
|
||||
return WOODASH;
|
||||
} else {
|
||||
return EnumIncense.values()[index];
|
||||
return EnumIncense.VALUES[index];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ public class RitualEffectMagnetic extends RitualEffect {
|
||||
public static boolean isBlockOre(Block block, int meta) {
|
||||
// Special case for lit redstone ore
|
||||
if (block instanceof BlockOre || block instanceof BlockRedstoneOre
|
||||
|| (AlchemicalWizardry.isGregTechLoaded && block instanceof GTBlockOre)) {
|
||||
|| (AlchemicalWizardry.isGregTech5UnofficialNewHorizonsLoaded && block instanceof GTBlockOre)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -160,7 +160,8 @@ public class Meteor {
|
||||
if (blockStack != null && blockStack.getItem() instanceof ItemBlock) {
|
||||
((ItemBlock) blockStack.getItem())
|
||||
.placeBlockAt(blockStack, null, world, x, y, z, 0, 0, 0, 0, blockStack.getItemDamage());
|
||||
if (AlchemicalWizardry.isGregTechLoaded) setGTOresNaturalIfNeeded(world, x, y, z);
|
||||
if (AlchemicalWizardry.isGregTech5UnofficialNewHorizonsLoaded)
|
||||
setGTOresNaturalIfNeeded(world, x, y, z);
|
||||
world.markBlockForUpdate(x, y, z);
|
||||
break;
|
||||
}
|
||||
@@ -230,7 +231,7 @@ public class Meteor {
|
||||
this.fillerChance = Math.max(0f, Math.min(100f * (1 - ((float) getTotalListWeight(ores) / maxWeight)), 100.0f));
|
||||
}
|
||||
|
||||
@Optional.Method(modid = "gregtech")
|
||||
@Optional.Method(modid = "gregtech_nh")
|
||||
private static void setGTOresNaturalIfNeeded(World world, int x, int y, int z) {
|
||||
try (OreInfo<?> info = OreManager.getOreInfo(world, x, y, z)) {
|
||||
if (info == null) return;
|
||||
|
||||
Reference in new issue
Block a user