mirror of
https://github.com/GTNewHorizons/Draconic-Evolution.git
synced 2026-10-26 14:24:14 +00:00
Compare commits
7
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
32b17f567e | ||
|
|
16d7c14895 | ||
|
|
fcf6c7e405 | ||
|
|
a149797a65 | ||
|
|
8f8d95c84f | ||
|
|
717e124321 | ||
|
|
16dca59879 |
No files matched your search
+1
-1
@@ -10,7 +10,7 @@ dependencies {
|
||||
compileOnly("com.github.GTNewHorizons:CodeChickenCore:1.4.7:dev") {transitive = false}
|
||||
compileOnly("com.github.GTNewHorizons:inventory-tweaks:1.7.1:dev") {transitive = false}
|
||||
compileOnly('com.github.GTNewHorizons:Baubles-Expanded:2.1.15-GTNH:dev') {transitive = false}
|
||||
compileOnly("com.github.GTNewHorizons:GT5-Unofficial:5.09.52.02:dev") {transitive = false}
|
||||
compileOnly("com.github.GTNewHorizons:GT5-Unofficial:5.09.52.03-pre:dev") {transitive = false}
|
||||
compileOnly("com.github.GTNewHorizons:GTNHLib:0.7.0:dev") {transitive = false}
|
||||
|
||||
compileOnly("thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev") {transitive = false}
|
||||
|
||||
+5
-4
@@ -38,7 +38,6 @@ import com.brandon3055.draconicevolution.common.lib.References;
|
||||
import com.brandon3055.draconicevolution.common.utills.IConfigurableItem;
|
||||
import com.brandon3055.draconicevolution.common.utills.IUpgradableItem;
|
||||
import com.brandon3055.draconicevolution.common.utills.ItemConfigField;
|
||||
import com.brandon3055.draconicevolution.integration.ModHelper;
|
||||
|
||||
/**
|
||||
* Created by Brandon on 2/01/2015. Modified by bartimaeusnek on 23/05/2018
|
||||
@@ -177,11 +176,13 @@ public abstract class MiningTool extends ToolBase implements IUpgradableItem {
|
||||
for (int yPos = y + yOffset - yMin; yPos <= y + yOffset + yMax; yPos++) {
|
||||
for (int zPos = z - zMin; zPos <= z + zMax; zPos++) {
|
||||
TileEntity te = player.worldObj.getTileEntity(xPos, yPos, zPos);
|
||||
if (te != null && !ModHelper.isGregTechTileEntityOre(te)) {
|
||||
if (te != null) {
|
||||
if (player.worldObj.isRemote) {
|
||||
player.addChatComponentMessage(new ChatComponentTranslation("msg.de.baseSafeAOW.txt"));
|
||||
} else((EntityPlayerMP) player).playerNetServerHandler
|
||||
.sendPacket(new S23PacketBlockChange(x, y, z, ((EntityPlayerMP) player).worldObj));
|
||||
} else {
|
||||
((EntityPlayerMP) player).playerNetServerHandler
|
||||
.sendPacket(new S23PacketBlockChange(x, y, z, player.worldObj));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,6 @@ import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.event.entity.living.LivingAttackEvent;
|
||||
|
||||
import com.brandon3055.draconicevolution.common.items.armor.CustomArmorHandler.ArmorSummery;
|
||||
@@ -24,7 +23,6 @@ public class ModHelper {
|
||||
private static final boolean isTConInstalled;
|
||||
private static final boolean isAvaritiaInstalled;
|
||||
private static final boolean isGregTechInstalled;
|
||||
private static final boolean isBartworkdsInstalled;
|
||||
private static final boolean isAE2Installed;
|
||||
|
||||
public static boolean isGTNHLibLoaded;
|
||||
@@ -33,32 +31,18 @@ public class ModHelper {
|
||||
private static Item cleaver;
|
||||
private static Item avaritiaSword;
|
||||
|
||||
private static Class<?> bwores;
|
||||
private static Class<?> GTores;
|
||||
private static Class<?> AE2FItem;
|
||||
|
||||
static {
|
||||
isTConInstalled = Loader.isModLoaded("TConstruct");
|
||||
isAvaritiaInstalled = Loader.isModLoaded("Avaritia");
|
||||
isGregTechInstalled = Loader.isModLoaded("gregtech") && !Loader.isModLoaded("gregapi");
|
||||
isBartworkdsInstalled = Loader.isModLoaded("bartworks");
|
||||
isGregTechInstalled = Loader.isModLoaded("gregtech_nh");
|
||||
isAE2Installed = Loader.isModLoaded("appliedenergistics2");
|
||||
isGTNHLibLoaded = Loader.isModLoaded("gtnhlib");
|
||||
isHodgepodgeLoaded = Loader.isModLoaded("hodgepodge");
|
||||
|
||||
final String GT_ORE_CLASS = "gregtech.common.blocks.TileEntityOres";
|
||||
final String BW_ORE_CLASS = "bartworks.system.material.BWMetaGeneratedOres";
|
||||
final String AE2_FITEM_CLASS = "appeng.entity.EntityFloatingItem";
|
||||
if (isGregTechInstalled) try {
|
||||
GTores = Class.forName(GT_ORE_CLASS);
|
||||
} catch (ClassNotFoundException e) {
|
||||
LogHelper.error("Couldn't reflect class " + GT_ORE_CLASS);
|
||||
}
|
||||
if (isBartworkdsInstalled) try {
|
||||
bwores = Class.forName(BW_ORE_CLASS);
|
||||
} catch (ClassNotFoundException e) {
|
||||
LogHelper.error("Couldn't reflect class " + BW_ORE_CLASS);
|
||||
}
|
||||
|
||||
if (isAE2Installed) try {
|
||||
AE2FItem = Class.forName(AE2_FITEM_CLASS);
|
||||
} catch (ClassNotFoundException e) {
|
||||
@@ -107,10 +91,6 @@ public class ModHelper {
|
||||
return event.ammount;
|
||||
}
|
||||
|
||||
public static boolean isGregTechTileEntityOre(TileEntity te) {
|
||||
return isGregTechInstalled && GTores.isInstance(te) || isBartworkdsInstalled && bwores.isInstance(te);
|
||||
}
|
||||
|
||||
public static boolean isGregTechEnchantmentItem(ItemStack stack) {
|
||||
if (stack == null) return false;
|
||||
if (stack.getItem() == null) return false;
|
||||
|
||||
Reference in new issue
Block a user