generated from tilera/1710mod
chore: remove ICBM API
This commit is contained in:
parent
36d5c62196
commit
4a63af0d6d
|
@ -1,10 +0,0 @@
|
|||
package icbm.api;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public interface IAmmunition {
|
||||
|
||||
boolean hasAmmunition(ItemStack var1);
|
||||
|
||||
boolean useAmmunition(ItemStack var1);
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
package icbm.api;
|
||||
|
||||
|
||||
public interface IBlockFrequency {
|
||||
|
||||
int getFrequency();
|
||||
|
||||
void setFrequency(int var1);
|
||||
}
|
|
@ -1,41 +0,0 @@
|
|||
package icbm.api;
|
||||
|
||||
import icbm.api.explosion.IExplosive;
|
||||
import java.lang.reflect.Method;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class ICBM {
|
||||
|
||||
public static final String NAME = "ICBM";
|
||||
public static final String VERSION = "1.1.1";
|
||||
public static final int BLOCK_ID_PREFIX = 3880;
|
||||
public static final int ITEM_ID_PREFIX = 3900;
|
||||
public static Class explosionManager;
|
||||
|
||||
|
||||
public static void createExplosion(World worldObj, double x, double y, double z, Entity entity, int explosiveID) {
|
||||
try {
|
||||
Method e = explosionManager.getMethod("createExplosion", new Class[]{World.class, Double.class, Double.class, Double.class, Entity.class, Integer.class});
|
||||
e.invoke((Object)null, new Object[]{worldObj, Double.valueOf(x), Double.valueOf(y), Double.valueOf(z), entity, Integer.valueOf(explosiveID)});
|
||||
} catch (Exception var10) {
|
||||
System.out.println("ICBM: Failed to create an ICBM explosion with the ID: " + explosiveID);
|
||||
var10.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static IExplosive getExplosive(String name) {
|
||||
if(name != null) {
|
||||
try {
|
||||
Method e = explosionManager.getMethod("getExplosiveByName", new Class[]{String.class});
|
||||
return (IExplosive)e.invoke((Object)null, new Object[]{name});
|
||||
} catch (Exception var2) {
|
||||
System.out.println("ICBM: Failed to get explosive with the name: " + name);
|
||||
var2.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
|
@ -1,11 +0,0 @@
|
|||
package icbm.api;
|
||||
|
||||
import universalelectricity.prefab.flag.FlagRegistry;
|
||||
|
||||
public class ICBMFlags {
|
||||
public static final String FLAG_BAN_GLOBAL = FlagRegistry.registerFlag("ban_icbm");
|
||||
public static final String FLAG_BAN_EXPLOSIVE = FlagRegistry.registerFlag("ban_explosive");
|
||||
public static final String FLAG_BAN_GRENADE = FlagRegistry.registerFlag("ban_grenade");
|
||||
public static final String FLAG_BAN_MISSILE = FlagRegistry.registerFlag("ban_missile");
|
||||
public static final String FLAG_BAN_MINECART = FlagRegistry.registerFlag("ban_minecart");
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
package icbm.api;
|
||||
|
||||
|
||||
public interface ICamouflageMaterial {
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
package icbm.api;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
||||
public interface IHackable {
|
||||
|
||||
void generateNewKey();
|
||||
|
||||
boolean tryForAccess(EntityPlayer var1, String var2);
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
package icbm.api;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public interface IItemFrequency {
|
||||
|
||||
int getFrequency(ItemStack var1);
|
||||
|
||||
void setFrequency(int var1, ItemStack var2);
|
||||
}
|
|
@ -1,13 +0,0 @@
|
|||
package icbm.api;
|
||||
|
||||
import icbm.api.ILauncherController;
|
||||
import icbm.api.IMissile;
|
||||
|
||||
public interface ILauncherContainer {
|
||||
|
||||
IMissile getContainingMissile();
|
||||
|
||||
void setContainingMissile(IMissile var1);
|
||||
|
||||
ILauncherController getController();
|
||||
}
|
|
@ -1,28 +0,0 @@
|
|||
package icbm.api;
|
||||
|
||||
import icbm.api.IBlockFrequency;
|
||||
import icbm.api.IMissile;
|
||||
import icbm.api.LauncherType;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import universalelectricity.core.block.IElectricityStorage;
|
||||
import universalelectricity.core.vector.Vector3;
|
||||
import universalelectricity.prefab.implement.IRedstoneReceptor;
|
||||
|
||||
public interface ILauncherController extends IElectricityStorage, IRedstoneReceptor, IBlockFrequency {
|
||||
|
||||
LauncherType getLauncherType();
|
||||
|
||||
void launch();
|
||||
|
||||
boolean canLaunch();
|
||||
|
||||
String getStatus();
|
||||
|
||||
Vector3 getTarget();
|
||||
|
||||
void setTarget(Vector3 var1);
|
||||
|
||||
void placeMissile(ItemStack var1);
|
||||
|
||||
IMissile getMissile();
|
||||
}
|
|
@ -1,26 +0,0 @@
|
|||
package icbm.api;
|
||||
|
||||
import icbm.api.ILauncherContainer;
|
||||
import icbm.api.explosion.IExplosiveContainer;
|
||||
import universalelectricity.core.vector.Vector3;
|
||||
|
||||
public interface IMissile extends IExplosiveContainer {
|
||||
|
||||
void explode();
|
||||
|
||||
void setExplode();
|
||||
|
||||
void normalExplode();
|
||||
|
||||
void setNormalExplode();
|
||||
|
||||
void dropMissileAsItem();
|
||||
|
||||
int getTicksInAir();
|
||||
|
||||
ILauncherContainer getLauncher();
|
||||
|
||||
void launch(Vector3 var1);
|
||||
|
||||
void launch(Vector3 var1, int var2);
|
||||
}
|
|
@ -1,11 +0,0 @@
|
|||
package icbm.api;
|
||||
|
||||
import icbm.api.IMissile;
|
||||
import universalelectricity.core.vector.Vector3;
|
||||
|
||||
public interface IMissileLockable {
|
||||
|
||||
boolean canLock(IMissile var1);
|
||||
|
||||
Vector3 getPredictedPosition(int var1);
|
||||
}
|
|
@ -1,14 +0,0 @@
|
|||
package icbm.api;
|
||||
|
||||
|
||||
public enum LauncherType {
|
||||
|
||||
TRADITIONAL("TRADITIONAL", 0),
|
||||
CRUISE("CRUISE", 1);
|
||||
// $FF: synthetic field
|
||||
private static final LauncherType[] $VALUES = new LauncherType[]{TRADITIONAL, CRUISE};
|
||||
|
||||
|
||||
private LauncherType(String var1, int var2) {}
|
||||
|
||||
}
|
|
@ -1,110 +0,0 @@
|
|||
package icbm.api;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import universalelectricity.core.vector.Vector2;
|
||||
import universalelectricity.core.vector.Vector3;
|
||||
import universalelectricity.prefab.vector.Region2;
|
||||
|
||||
public class RadarRegistry {
|
||||
private static Set<TileEntity> detectableTileEntities = new HashSet<>();
|
||||
private static Set<Entity> detectableEntities = new HashSet<>();
|
||||
|
||||
public static void register(TileEntity tileEntity) {
|
||||
if (!detectableTileEntities.contains(tileEntity)) {
|
||||
detectableTileEntities.add(tileEntity);
|
||||
}
|
||||
}
|
||||
|
||||
public static void unregister(TileEntity tileEntity) {
|
||||
if (detectableTileEntities.contains(tileEntity)) {
|
||||
detectableTileEntities.remove(tileEntity);
|
||||
}
|
||||
}
|
||||
|
||||
public static void register(Entity entity) {
|
||||
if (!detectableEntities.contains(entity)) {
|
||||
detectableEntities.add(entity);
|
||||
}
|
||||
}
|
||||
|
||||
public static void unregister(Entity entity) {
|
||||
if (detectableEntities.contains(entity)) {
|
||||
detectableEntities.remove(entity);
|
||||
}
|
||||
}
|
||||
|
||||
public static List<TileEntity> getTileEntitiesInArea(Vector2 minVector,
|
||||
Vector2 maxVector) {
|
||||
ArrayList<TileEntity> returnArray = new ArrayList<>();
|
||||
cleanUpArray();
|
||||
for (TileEntity tileEntity : detectableTileEntities) {
|
||||
if ((new Region2(minVector, maxVector))
|
||||
.isIn((new Vector3(tileEntity)).toVector2())) {
|
||||
returnArray.add(tileEntity);
|
||||
}
|
||||
}
|
||||
|
||||
return returnArray;
|
||||
}
|
||||
|
||||
public static List<Entity> getEntitiesWithinRadius(Vector2 vector,
|
||||
int radius) {
|
||||
cleanUpArray();
|
||||
ArrayList<Entity> returnArray = new ArrayList<>();
|
||||
for (Entity entity : detectableEntities) {
|
||||
if (Vector2.distance(vector, (new Vector3(entity)).toVector2()) <=
|
||||
(double)radius) {
|
||||
returnArray.add(entity);
|
||||
}
|
||||
}
|
||||
|
||||
return returnArray;
|
||||
}
|
||||
|
||||
public static Set<TileEntity> getTileEntities() {
|
||||
cleanUpArray();
|
||||
return detectableTileEntities;
|
||||
}
|
||||
|
||||
public static Set<Entity> getEntities() {
|
||||
cleanUpArray();
|
||||
return detectableEntities;
|
||||
}
|
||||
|
||||
public static void cleanUpArray() {
|
||||
try {
|
||||
Iterator<TileEntity> e = detectableTileEntities.iterator();
|
||||
|
||||
while (e.hasNext()) {
|
||||
TileEntity it2 = e.next();
|
||||
if (it2 == null) {
|
||||
e.remove();
|
||||
} else if (it2.isInvalid()) {
|
||||
e.remove();
|
||||
} else if (it2.getWorldObj().getTileEntity(it2.xCoord, it2.yCoord,
|
||||
it2.zCoord) != it2) {
|
||||
e.remove();
|
||||
}
|
||||
}
|
||||
|
||||
Iterator<Entity> it21 = detectableEntities.iterator();
|
||||
while (it21.hasNext()) {
|
||||
Entity entity = (Entity)it21.next();
|
||||
if (entity == null) {
|
||||
it21.remove();
|
||||
} else if (entity.isDead) {
|
||||
it21.remove();
|
||||
}
|
||||
}
|
||||
} catch (Exception var3) {
|
||||
System.out.println("Failed to clean up radar list properly.");
|
||||
var3.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,36 +0,0 @@
|
|||
package icbm.api.explosion;
|
||||
|
||||
import cpw.mods.fml.common.eventhandler.Event;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class ExplosionEvent extends Event {
|
||||
|
||||
public final World world;
|
||||
public final double x;
|
||||
public final double y;
|
||||
public final double z;
|
||||
public IExplosive explosive;
|
||||
|
||||
|
||||
public ExplosionEvent(World world, double x, double y, double z, IExplosive explosive) {
|
||||
this.world = world;
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.z = z;
|
||||
this.explosive = explosive;
|
||||
}
|
||||
|
||||
public static class PostExplosionEvent extends ExplosionEvent {
|
||||
|
||||
public PostExplosionEvent(World world, double x, double y, double z, IExplosive explosive) {
|
||||
super(world, x, y, z, explosive);
|
||||
}
|
||||
}
|
||||
|
||||
public static class PreExplosionEvent extends ExplosionEvent {
|
||||
|
||||
public PreExplosionEvent(World world, double x, double y, double z, IExplosive explosive) {
|
||||
super(world, x, y, z, explosive);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
package icbm.api.explosion;
|
||||
|
||||
import icbm.api.explosion.IExplosive;
|
||||
import net.minecraft.world.World;
|
||||
import universalelectricity.core.vector.Vector3;
|
||||
|
||||
public interface IEMPBlock {
|
||||
|
||||
void onEMP(World var1, Vector3 var2, IExplosive var3);
|
||||
}
|
|
@ -1,11 +0,0 @@
|
|||
package icbm.api.explosion;
|
||||
|
||||
import icbm.api.explosion.IExplosive;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import universalelectricity.core.item.IItemElectric;
|
||||
|
||||
public interface IEMPItem extends IItemElectric {
|
||||
|
||||
void onEMP(ItemStack var1, Entity var2, IExplosive var3);
|
||||
}
|
|
@ -1,23 +0,0 @@
|
|||
package icbm.api.explosion;
|
||||
|
||||
|
||||
public interface IExplosive {
|
||||
|
||||
int getID();
|
||||
|
||||
String getUnlocalizedName();
|
||||
|
||||
String getExplosiveName();
|
||||
|
||||
String getGrenadeName();
|
||||
|
||||
String getMissileName();
|
||||
|
||||
String getMinecartName();
|
||||
|
||||
float getRadius();
|
||||
|
||||
int getTier();
|
||||
|
||||
double getEnergy();
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
package icbm.api.explosion;
|
||||
|
||||
import icbm.api.explosion.IExplosive;
|
||||
|
||||
public interface IExplosiveContainer {
|
||||
|
||||
IExplosive getExplosiveType();
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
package icbm.api.explosion;
|
||||
|
||||
import icbm.api.explosion.ExplosionEvent;
|
||||
|
||||
public interface IExplosiveIgnore {
|
||||
|
||||
boolean canIgnore(ExplosionEvent var1);
|
||||
}
|
Loading…
Reference in a new issue