Merge pull request #250 from hilburn/master
Blacklist Tile Accelerators
This commit is contained in:
commit
18fdcdac1c
|
@ -9,10 +9,7 @@ import java.io.IOException;
|
|||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.PrintWriter;
|
||||
import java.lang.reflect.Constructor;
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Method;
|
||||
import java.lang.reflect.Modifier;
|
||||
import java.lang.reflect.*;
|
||||
import java.util.List;
|
||||
import java.util.zip.ZipEntry;
|
||||
import java.util.zip.ZipInputStream;
|
||||
|
@ -771,6 +768,8 @@ public class AlchemicalWizardry
|
|||
|
||||
this.blacklistDemons();
|
||||
|
||||
this.blacklistAccelerators();
|
||||
|
||||
MinecraftForge.EVENT_BUS.register(new ModLivingDropsEvent());
|
||||
proxy.InitRendering();
|
||||
NetworkRegistry.INSTANCE.registerGuiHandler(this, new GuiHandler());
|
||||
|
@ -1150,6 +1149,31 @@ public class AlchemicalWizardry
|
|||
// this.createItemTextureFiles();
|
||||
}
|
||||
|
||||
public static void blacklistAccelerators()
|
||||
{
|
||||
if (Loader.isModLoaded("Torcherino"))
|
||||
{
|
||||
FMLInterModComms.sendMessage("Torcherino", "blacklist-tile", TEAltar.class.getName());
|
||||
FMLInterModComms.sendMessage("Torcherino", "blacklist-tile", TEMasterStone.class.getName());
|
||||
}
|
||||
if (Loader.isModLoaded("ChromatiCraft"))
|
||||
{
|
||||
try
|
||||
{
|
||||
Class api = Class.forName("Reika.ChromatiCraft.API.AcceleratorBlacklist");
|
||||
Class reason = Class.forName("Reika.ChromatiCraft.API.AcceleratorBlacklist$BlacklistReason");
|
||||
Object exploit = Enum.valueOf(reason,"EXPLOIT");
|
||||
Method add = api.getMethod("addBlacklist", Class.class, String.class, reason);
|
||||
add.invoke(null, TEAltar.class, TEAltar.class.getSimpleName(),exploit);
|
||||
add.invoke(null, TEMasterStone.class, TEMasterStone.class.getSimpleName(),exploit);
|
||||
} catch (Exception e)
|
||||
{
|
||||
logger.log(Level.ERROR, "ChromatiCraft Accelerator Blacklist Failure");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public static void blacklistDemons()
|
||||
{
|
||||
String[] mobs = new String[]{"FallenAngel","LowerGuardian","BileDemon","WingedFireDemon","SmallEarthGolem","IceDemon","BoulderFist","Shade","AirElemental",
|
||||
|
|
Loading…
Reference in a new issue