generated from tilera/1710mod
fix: a bunch of bugfixes
This commit is contained in:
parent
02b2c82cb6
commit
57853b60c1
|
@ -1,9 +1,6 @@
|
|||
- glass button doesn't render in inventory
|
||||
- tons of missing packets (mostly gui stuff)
|
||||
- can't apply camouflage texture
|
||||
- turret UI textures completely fürn oasch
|
||||
- sounds completely fürn oasch
|
||||
- unable to mount turret afte dismounting
|
||||
- unable to mount turret after dismounting
|
||||
- turret gui kekt
|
||||
- no electricity in guis
|
||||
- EMP tower drops nonsense
|
||||
|
@ -14,3 +11,5 @@
|
|||
- black hole doesn't suck in blocks
|
||||
- no missiles??
|
||||
- remote detonator doesnt work
|
||||
- radar is completely borked
|
||||
- emp tower only deletes missiles on client
|
||||
|
|
|
@ -1,11 +1,6 @@
|
|||
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) {}
|
||||
TRADITIONAL,
|
||||
CRUISE;
|
||||
}
|
||||
|
|
|
@ -1,14 +1,10 @@
|
|||
//
|
||||
// Decompiled by Procyon v0.6.0
|
||||
//
|
||||
|
||||
package icbm.gangshao;
|
||||
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
import cpw.mods.fml.client.registry.ClientRegistry;
|
||||
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
|
||||
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||
import icbm.gangshao.platform.TPlatform;
|
||||
import icbm.gangshao.platform.TTurretPlatform;
|
||||
import icbm.gangshao.render.BlockRenderingHandler;
|
||||
import icbm.gangshao.render.FXBeam;
|
||||
import icbm.gangshao.render.RAATurret;
|
||||
|
@ -74,15 +70,15 @@ public class ClientProxy extends CommonProxy {
|
|||
if (tileEntity != null) {
|
||||
switch (ID) {
|
||||
case 0: {
|
||||
return new GuiPlatformSlots(player.inventory, (TPlatform) tileEntity);
|
||||
return new GuiPlatformSlots(player.inventory, (TTurretPlatform) tileEntity);
|
||||
}
|
||||
|
||||
case 1: {
|
||||
return new GuiPlatformTerminal(player, (TPlatform) tileEntity);
|
||||
return new GuiPlatformTerminal(player, (TTurretPlatform) tileEntity);
|
||||
}
|
||||
|
||||
case 2: {
|
||||
return new GuiPlatformAccess(player, (TPlatform) tileEntity);
|
||||
return new GuiPlatformAccess(player, (TTurretPlatform) tileEntity);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@ package icbm.gangshao;
|
|||
import cpw.mods.fml.common.network.IGuiHandler;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import icbm.gangshao.container.ContainerTurretPlatform;
|
||||
import icbm.gangshao.platform.TPlatform;
|
||||
import icbm.gangshao.platform.TTurretPlatform;
|
||||
import icbm.gangshao.turret.mount.TRailgunTurret;
|
||||
import icbm.gangshao.turret.sentries.TAATurret;
|
||||
import icbm.gangshao.turret.sentries.TLaserTurret;
|
||||
|
@ -24,7 +24,7 @@ public class CommonProxy implements IGuiHandler {
|
|||
GameRegistry.registerTileEntity(TAATurret.class, "ICBMAATurret");
|
||||
GameRegistry.registerTileEntity(TRailgunTurret.class, "ICBMRailgun");
|
||||
GameRegistry.registerTileEntity(TLaserTurret.class, "ICBMLeiSheF");
|
||||
GameRegistry.registerTileEntity(TPlatform.class, "ICBMPlatform");
|
||||
GameRegistry.registerTileEntity(TTurretPlatform.class, "ICBMPlatform");
|
||||
GameRegistry.registerTileEntity(TileEntityMulti.class, "ICBMMultiblock");
|
||||
}
|
||||
|
||||
|
@ -44,7 +44,7 @@ public class CommonProxy implements IGuiHandler {
|
|||
switch (ID) {
|
||||
case 0: {
|
||||
return new ContainerTurretPlatform(
|
||||
player.inventory, (TPlatform) tileEntity
|
||||
player.inventory, (TTurretPlatform) tileEntity
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@ import icbm.gangshao.IAmmunition;
|
|||
import icbm.gangshao.ITurretUpgrade;
|
||||
import icbm.gangshao.SlotTurret;
|
||||
import icbm.gangshao.access.AccessLevel;
|
||||
import icbm.gangshao.platform.TPlatform;
|
||||
import icbm.gangshao.platform.TTurretPlatform;
|
||||
import icbm.gangshao.turret.ItemAmmo;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
|
@ -14,10 +14,10 @@ import net.minecraft.item.ItemStack;
|
|||
import universalelectricity.core.item.IItemElectric;
|
||||
|
||||
public class ContainerTurretPlatform extends ContainerTerminal {
|
||||
private TPlatform tileEntity;
|
||||
private TTurretPlatform tileEntity;
|
||||
|
||||
public ContainerTurretPlatform(
|
||||
final InventoryPlayer inventoryPlayer, final TPlatform tileEntity
|
||||
final InventoryPlayer inventoryPlayer, final TTurretPlatform tileEntity
|
||||
) {
|
||||
super(inventoryPlayer, tileEntity);
|
||||
this.tileEntity = tileEntity;
|
||||
|
|
|
@ -73,18 +73,18 @@ public class BlockTurretPlatform extends BICBM {
|
|||
) {
|
||||
final TileEntity tileEntity = world.getTileEntity(x, y, z);
|
||||
|
||||
if (!(tileEntity instanceof TPlatform)) {
|
||||
if (!(tileEntity instanceof TTurretPlatform)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (player.getCurrentEquippedItem() != null
|
||||
&& side == ((TPlatform) tileEntity).deployDirection.ordinal()
|
||||
&& side == ((TTurretPlatform) tileEntity).deployDirection.ordinal()
|
||||
&& player.getCurrentEquippedItem().getItem()
|
||||
== Item.getItemFromBlock(ICBMSentry.blockTurret)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (((TPlatform) tileEntity).getTurret(false) != null && !world.isRemote) {
|
||||
if (((TTurretPlatform) tileEntity).getTurret(false) != null && !world.isRemote) {
|
||||
player.openGui((Object) ICBMSentry.instance, 0, world, x, y, z);
|
||||
}
|
||||
|
||||
|
@ -93,7 +93,7 @@ public class BlockTurretPlatform extends BICBM {
|
|||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(final World var1, int meta) {
|
||||
return new TPlatform();
|
||||
return new TTurretPlatform();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -16,8 +16,10 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraft.nbt.NBTBase;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.network.NetworkManager;
|
||||
import net.minecraft.network.Packet;
|
||||
import net.minecraft.network.play.server.S35PacketUpdateTileEntity;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import universalelectricity.core.UniversalElectricity;
|
||||
|
@ -26,14 +28,13 @@ import universalelectricity.core.item.ElectricItemHelper;
|
|||
import universalelectricity.core.vector.Vector3;
|
||||
import universalelectricity.prefab.CustomDamageSource;
|
||||
|
||||
public class TPlatform extends TileEntityTerminal implements IInventory {
|
||||
public class TTurretPlatform extends TileEntityTerminal implements IInventory {
|
||||
private TTurretBase turret;
|
||||
public ForgeDirection deployDirection;
|
||||
public static final int UPGRADE_START_INDEX = 12;
|
||||
private static final int TURRET_UPGADE_SLOTS = 3;
|
||||
public ItemStack[] containingItems;
|
||||
|
||||
public TPlatform() {
|
||||
public TTurretPlatform() {
|
||||
this.turret = null;
|
||||
this.deployDirection = ForgeDirection.UP;
|
||||
this.containingItems = new ItemStack[16];
|
||||
|
@ -402,4 +403,21 @@ public class TPlatform extends TileEntityTerminal implements IInventory {
|
|||
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Packet getDescriptionPacket() {
|
||||
NBTTagCompound nbt = new NBTTagCompound();
|
||||
|
||||
nbt.setDouble("wattsReceived", super.wattsReceived);
|
||||
|
||||
return new S35PacketUpdateTileEntity(this.xCoord, this.yCoord, this.zCoord,
|
||||
this.getBlockMetadata(), nbt);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt) {
|
||||
NBTTagCompound nbt = pkt.func_148857_g();
|
||||
|
||||
super.wattsReceived = nbt.getDouble("wattsReceived");
|
||||
}
|
||||
}
|
|
@ -19,9 +19,10 @@ public class GuiButtonImage extends GuiButton {
|
|||
this.type = type;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void
|
||||
func_73737_a(final Minecraft par1Minecraft, final int width, final int hight) {
|
||||
// TODO: WTf
|
||||
drawButton(final Minecraft par1Minecraft, final int width, final int hight) {
|
||||
// TODO: WTF
|
||||
// if (this.drawButton) {
|
||||
par1Minecraft.renderEngine.bindTexture(
|
||||
new ResourceLocation("icbm", "textures/gui/gui@.png")
|
||||
|
|
|
@ -7,7 +7,7 @@ import cpw.mods.fml.relauncher.Side;
|
|||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import icbm.gangshao.access.AccessLevel;
|
||||
import icbm.gangshao.access.UserAccess;
|
||||
import icbm.gangshao.platform.TPlatform;
|
||||
import icbm.gangshao.platform.TTurretPlatform;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.gui.GuiTextField;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
@ -25,7 +25,7 @@ public class GuiPlatformAccess extends GuiPlatformBase implements IScroll {
|
|||
private final HashMap<UserAccess, Vector2> outputMap;
|
||||
|
||||
public GuiPlatformAccess(
|
||||
final EntityPlayer entityPlayer, final TPlatform tileEntity
|
||||
final EntityPlayer entityPlayer, final TTurretPlatform tileEntity
|
||||
) {
|
||||
super(entityPlayer, tileEntity);
|
||||
this.scroll = 0;
|
||||
|
|
|
@ -3,7 +3,7 @@ package icbm.gangshao.shimian;
|
|||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import icbm.gangshao.ICBMSentry;
|
||||
import icbm.gangshao.platform.TPlatform;
|
||||
import icbm.gangshao.platform.TTurretPlatform;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.renderer.RenderHelper;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
@ -14,10 +14,10 @@ import universalelectricity.prefab.GuiBase;
|
|||
@SideOnly(Side.CLIENT)
|
||||
public abstract class GuiPlatformBase extends GuiBase {
|
||||
protected static final int MAX_BUTTON_ID = 3;
|
||||
protected TPlatform tileEntity;
|
||||
protected TTurretPlatform tileEntity;
|
||||
protected EntityPlayer entityPlayer;
|
||||
|
||||
public GuiPlatformBase(final EntityPlayer player, final TPlatform tileEntity) {
|
||||
public GuiPlatformBase(final EntityPlayer player, final TTurretPlatform tileEntity) {
|
||||
this.tileEntity = tileEntity;
|
||||
this.entityPlayer = player;
|
||||
super.ySize = 190;
|
||||
|
|
|
@ -4,7 +4,7 @@ import cpw.mods.fml.relauncher.Side;
|
|||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import icbm.gangshao.ICBMSentry;
|
||||
import icbm.gangshao.container.ContainerTurretPlatform;
|
||||
import icbm.gangshao.platform.TPlatform;
|
||||
import icbm.gangshao.platform.TTurretPlatform;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
import net.minecraft.client.renderer.RenderHelper;
|
||||
|
@ -17,11 +17,11 @@ import org.lwjgl.opengl.GL11;
|
|||
@SideOnly(Side.CLIENT)
|
||||
public abstract class GuiPlatformContainer extends GuiContainer {
|
||||
protected static final int MAX_BUTTON_ID = 3;
|
||||
protected TPlatform tileEntity;
|
||||
protected TTurretPlatform tileEntity;
|
||||
protected EntityPlayer entityPlayer;
|
||||
|
||||
public GuiPlatformContainer(
|
||||
final InventoryPlayer inventoryPlayer, final TPlatform tileEntity
|
||||
final InventoryPlayer inventoryPlayer, final TTurretPlatform tileEntity
|
||||
) {
|
||||
super((Container) new ContainerTurretPlatform(inventoryPlayer, tileEntity));
|
||||
this.tileEntity = tileEntity;
|
||||
|
@ -29,6 +29,7 @@ public abstract class GuiPlatformContainer extends GuiContainer {
|
|||
this.ySize = 190;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initGui() {
|
||||
super.initGui();
|
||||
this.buttonList.clear();
|
||||
|
@ -43,6 +44,7 @@ public abstract class GuiPlatformContainer extends GuiContainer {
|
|||
));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateScreen() {
|
||||
super.updateScreen();
|
||||
|
||||
|
@ -51,7 +53,8 @@ public abstract class GuiPlatformContainer extends GuiContainer {
|
|||
}
|
||||
}
|
||||
|
||||
protected void func_73875_a(final GuiButton button) {
|
||||
@Override
|
||||
protected void actionPerformed(final GuiButton button) {
|
||||
if (this.tileEntity.getTurret(false) != null) {
|
||||
switch (button.id) {
|
||||
case 0: {
|
||||
|
@ -93,7 +96,8 @@ public abstract class GuiPlatformContainer extends GuiContainer {
|
|||
}
|
||||
}
|
||||
|
||||
protected void func_74189_g(final int x, final int y) {
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(final int x, final int y) {
|
||||
if (this.tileEntity.getTurret(false) != null) {
|
||||
final String title = this.tileEntity.getTurret(false).getName();
|
||||
this.fontRendererObj.drawString(
|
||||
|
@ -110,7 +114,8 @@ public abstract class GuiPlatformContainer extends GuiContainer {
|
|||
}
|
||||
}
|
||||
|
||||
protected void func_74185_a(final float par1, final int x, final int y) {
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(final float par1, final int x, final int y) {
|
||||
this.mc.renderEngine.bindTexture(
|
||||
new ResourceLocation("icbm", "textures/gui/gui_base.png")
|
||||
);
|
||||
|
|
|
@ -2,7 +2,7 @@ package icbm.gangshao.shimian;
|
|||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import icbm.gangshao.platform.TPlatform;
|
||||
import icbm.gangshao.platform.TTurretPlatform;
|
||||
import icbm.gangshao.turret.TTurretBase;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
@ -12,7 +12,7 @@ import universalelectricity.core.electricity.ElectricityDisplay;
|
|||
@SideOnly(Side.CLIENT)
|
||||
public class GuiPlatformSlots extends GuiPlatformContainer {
|
||||
public GuiPlatformSlots(
|
||||
final InventoryPlayer inventoryPlayer, final TPlatform tileEntity
|
||||
final InventoryPlayer inventoryPlayer, final TTurretPlatform tileEntity
|
||||
) {
|
||||
super(inventoryPlayer, tileEntity);
|
||||
}
|
||||
|
@ -61,7 +61,7 @@ public class GuiPlatformSlots extends GuiPlatformContainer {
|
|||
@Override
|
||||
protected void
|
||||
drawGuiContainerBackgroundLayer(final float par1, final int x, final int y) {
|
||||
// super.drawGuiContainerBackgroundLayer(par1, x, y);
|
||||
super.drawGuiContainerBackgroundLayer(par1, x, y);
|
||||
this.mc.renderEngine.bindTexture(
|
||||
new ResourceLocation("icbm", "textures/gui/gui_platform_slot.png")
|
||||
);
|
||||
|
|
|
@ -2,7 +2,7 @@ package icbm.gangshao.shimian;
|
|||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import icbm.gangshao.platform.TPlatform;
|
||||
import icbm.gangshao.platform.TTurretPlatform;
|
||||
import icbm.gangshao.terminal.TileEntityTerminal;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.gui.GuiTextField;
|
||||
|
@ -18,7 +18,7 @@ public class GuiPlatformTerminal extends GuiPlatformBase {
|
|||
private GuiTextField commandLine;
|
||||
|
||||
public GuiPlatformTerminal(
|
||||
final EntityPlayer entityPlayer, final TPlatform tileEntity
|
||||
final EntityPlayer entityPlayer, final TTurretPlatform tileEntity
|
||||
) {
|
||||
super(entityPlayer, tileEntity);
|
||||
this.tileEntity = tileEntity;
|
||||
|
|
|
@ -5,7 +5,7 @@ import java.util.List;
|
|||
|
||||
import icbm.gangshao.ISpecialAccess;
|
||||
import icbm.gangshao.access.AccessLevel;
|
||||
import icbm.gangshao.platform.TPlatform;
|
||||
import icbm.gangshao.platform.TTurretPlatform;
|
||||
import icbm.gangshao.terminal.ITerminal;
|
||||
import icbm.gangshao.terminal.TerminalCommand;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
@ -21,8 +21,8 @@ public class CommandAccess extends TerminalCommand {
|
|||
final EntityPlayer player, final ITerminal terminal, final String[] args
|
||||
) {
|
||||
if (args[0].equalsIgnoreCase("access") && args.length > 1 && args[1] != null
|
||||
&& terminal instanceof TPlatform) {
|
||||
final TPlatform platform = (TPlatform) terminal;
|
||||
&& terminal instanceof TTurretPlatform) {
|
||||
final TTurretPlatform platform = (TTurretPlatform) terminal;
|
||||
final AccessLevel userAccess
|
||||
= terminal.getUserAccess(player.getDisplayName());
|
||||
|
||||
|
@ -93,6 +93,6 @@ public class CommandAccess extends TerminalCommand {
|
|||
|
||||
@Override
|
||||
public boolean canMachineUse(final ISpecialAccess mm) {
|
||||
return mm instanceof TPlatform;
|
||||
return mm instanceof TTurretPlatform;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@ import java.util.List;
|
|||
|
||||
import icbm.gangshao.ISpecialAccess;
|
||||
import icbm.gangshao.access.AccessLevel;
|
||||
import icbm.gangshao.platform.TPlatform;
|
||||
import icbm.gangshao.platform.TTurretPlatform;
|
||||
import icbm.gangshao.terminal.ITerminal;
|
||||
import icbm.gangshao.terminal.TerminalCommand;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
@ -20,11 +20,11 @@ public class CommandDestroy extends TerminalCommand {
|
|||
public boolean processCommand(
|
||||
final EntityPlayer player, final ITerminal terminal, final String[] args
|
||||
) {
|
||||
if (!(terminal instanceof TPlatform)) {
|
||||
if (!(terminal instanceof TTurretPlatform)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
final TPlatform turret = (TPlatform) terminal;
|
||||
final TTurretPlatform turret = (TTurretPlatform) terminal;
|
||||
|
||||
if (args.length > 1) {
|
||||
turret.destroyTurret();
|
||||
|
@ -57,6 +57,6 @@ public class CommandDestroy extends TerminalCommand {
|
|||
|
||||
@Override
|
||||
public boolean canMachineUse(final ISpecialAccess mm) {
|
||||
return mm instanceof TPlatform;
|
||||
return mm instanceof TTurretPlatform;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@ import java.util.List;
|
|||
import icbm.gangshao.ISpecialAccess;
|
||||
import icbm.gangshao.access.AccessLevel;
|
||||
import icbm.gangshao.access.UserAccess;
|
||||
import icbm.gangshao.platform.TPlatform;
|
||||
import icbm.gangshao.platform.TTurretPlatform;
|
||||
import icbm.gangshao.terminal.ITerminal;
|
||||
import icbm.gangshao.terminal.TerminalCommand;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
@ -21,8 +21,8 @@ public class CommandGet extends TerminalCommand {
|
|||
public boolean
|
||||
processCommand(final EntityPlayer player, final ITerminal TE, final String[] args) {
|
||||
if (args[0].equalsIgnoreCase("get") && args.length > 1 && args[1] != null
|
||||
&& TE instanceof TPlatform) {
|
||||
final TPlatform turret = (TPlatform) TE;
|
||||
&& TE instanceof TTurretPlatform) {
|
||||
final TTurretPlatform turret = (TTurretPlatform) TE;
|
||||
|
||||
if (args[1].equalsIgnoreCase("owner")) {
|
||||
final List<UserAccess> userList
|
||||
|
@ -76,6 +76,6 @@ public class CommandGet extends TerminalCommand {
|
|||
|
||||
@Override
|
||||
public boolean canMachineUse(final ISpecialAccess mm) {
|
||||
return mm instanceof TPlatform;
|
||||
return mm instanceof TTurretPlatform;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@ import java.util.List;
|
|||
|
||||
import icbm.gangshao.ISpecialAccess;
|
||||
import icbm.gangshao.access.AccessLevel;
|
||||
import icbm.gangshao.platform.TPlatform;
|
||||
import icbm.gangshao.platform.TTurretPlatform;
|
||||
import icbm.gangshao.terminal.ITerminal;
|
||||
import icbm.gangshao.terminal.TerminalCommand;
|
||||
import icbm.gangshao.turret.sentries.TAutomaticTurret;
|
||||
|
@ -21,8 +21,8 @@ public class CommandTarget extends TerminalCommand {
|
|||
public boolean processCommand(
|
||||
final EntityPlayer player, final ITerminal terminal, final String[] args
|
||||
) {
|
||||
if (terminal instanceof TPlatform) {
|
||||
final TPlatform turret = (TPlatform) terminal;
|
||||
if (terminal instanceof TTurretPlatform) {
|
||||
final TTurretPlatform turret = (TTurretPlatform) terminal;
|
||||
|
||||
if (turret.getTurret(false) instanceof TAutomaticTurret) {
|
||||
final TAutomaticTurret sentry
|
||||
|
@ -108,7 +108,7 @@ public class CommandTarget extends TerminalCommand {
|
|||
|
||||
@Override
|
||||
public boolean canMachineUse(final ISpecialAccess mm) {
|
||||
return mm instanceof TPlatform
|
||||
&& ((TPlatform) mm).getTurret(false) instanceof TAutomaticTurret;
|
||||
return mm instanceof TTurretPlatform
|
||||
&& ((TTurretPlatform) mm).getTurret(false) instanceof TAutomaticTurret;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ import icbm.gangshao.ISentry;
|
|||
import icbm.gangshao.damage.EntityTileDamagable;
|
||||
import icbm.gangshao.damage.IHealthTile;
|
||||
import icbm.gangshao.packet.PacketTurret;
|
||||
import icbm.gangshao.platform.TPlatform;
|
||||
import icbm.gangshao.platform.TTurretPlatform;
|
||||
import icbm.gangshao.task.LookHelper;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
@ -147,15 +147,15 @@ public abstract class TTurretBase
|
|||
&& this.isAlive();
|
||||
}
|
||||
|
||||
public TPlatform getPlatform() {
|
||||
public TTurretPlatform getPlatform() {
|
||||
final TileEntity tileEntity = this.worldObj.getTileEntity(
|
||||
this.xCoord + this.platformDirection.offsetX,
|
||||
this.yCoord + this.platformDirection.offsetY,
|
||||
this.zCoord + this.platformDirection.offsetZ
|
||||
);
|
||||
|
||||
if (tileEntity instanceof TPlatform) {
|
||||
return (TPlatform) tileEntity;
|
||||
if (tileEntity instanceof TTurretPlatform) {
|
||||
return (TTurretPlatform) tileEntity;
|
||||
}
|
||||
|
||||
return null;
|
||||
|
|
|
@ -76,8 +76,8 @@ public class ESeat extends Entity implements IEntityAdditionalSpawnData {
|
|||
return;
|
||||
}
|
||||
|
||||
if (this.controller instanceof TPaoTaiQi) {
|
||||
((TPaoTaiQi) this.controller).entityFake = this;
|
||||
if (this.controller instanceof TTurretSeat) {
|
||||
((TTurretSeat) this.controller).entityFake = this;
|
||||
}
|
||||
|
||||
if (super.worldObj.isRemote && super.riddenByEntity != null) {
|
||||
|
|
|
@ -23,7 +23,7 @@ import universalelectricity.prefab.implement.IRedstoneReceptor;
|
|||
import universalelectricity.prefab.multiblock.IMultiBlock;
|
||||
import universalelectricity.prefab.multiblock.TileEntityMulti;
|
||||
|
||||
public class TRailgunTurret extends TPaoTaiQi implements IRedstoneReceptor {
|
||||
public class TRailgunTurret extends TTurretSeat implements IRedstoneReceptor {
|
||||
private int gunChargingTicks;
|
||||
private boolean redstonePowerOn;
|
||||
private boolean isAntimatter;
|
||||
|
@ -158,7 +158,7 @@ public class TRailgunTurret extends TPaoTaiQi implements IRedstoneReceptor {
|
|||
(double) this.xCoord,
|
||||
(double) this.yCoord,
|
||||
(double) this.zCoord,
|
||||
"icbm.railgun",
|
||||
"icbm:railgun",
|
||||
5.0f,
|
||||
1.0f
|
||||
);
|
||||
|
@ -247,7 +247,7 @@ public class TRailgunTurret extends TPaoTaiQi implements IRedstoneReceptor {
|
|||
(double) this.xCoord,
|
||||
(double) this.yCoord,
|
||||
(double) this.zCoord,
|
||||
"icbm.railgun",
|
||||
"icbm:railgun",
|
||||
5.0f,
|
||||
1.0f
|
||||
);
|
||||
|
|
|
@ -9,10 +9,10 @@ import net.minecraft.util.MovingObjectPosition;
|
|||
import universalelectricity.core.vector.Vector3;
|
||||
import universalelectricity.prefab.multiblock.IMultiBlock;
|
||||
|
||||
public abstract class TPaoTaiQi extends TTurretBase implements IMultiBlock {
|
||||
public abstract class TTurretSeat extends TTurretBase implements IMultiBlock {
|
||||
protected ESeat entityFake;
|
||||
|
||||
public TPaoTaiQi() {
|
||||
public TTurretSeat() {
|
||||
this.entityFake = null;
|
||||
}
|
||||
|
|
@ -52,7 +52,7 @@ public class TAATurret extends TAutomaticTurret {
|
|||
(double) this.xCoord,
|
||||
(double) this.yCoord,
|
||||
(double) this.zCoord,
|
||||
"icbm.aagun",
|
||||
"icbm:aagun",
|
||||
5.0f,
|
||||
1.0f
|
||||
);
|
||||
|
|
|
@ -9,7 +9,7 @@ import icbm.gangshao.ProjectileType;
|
|||
import icbm.gangshao.damage.TileDamageSource;
|
||||
import icbm.gangshao.packet.PacketTurret;
|
||||
import icbm.gangshao.packet.PacketTurret.Type;
|
||||
import icbm.gangshao.platform.TPlatform;
|
||||
import icbm.gangshao.platform.TTurretPlatform;
|
||||
import icbm.gangshao.task.TaskManager;
|
||||
import icbm.gangshao.task.TaskSearchTarget;
|
||||
import icbm.gangshao.turret.TTurretBase;
|
||||
|
@ -225,7 +225,7 @@ public abstract class TAutomaticTurret extends TTurretBase implements IAutoSentr
|
|||
final IAmmunition bullet = (IAmmunition) ammoStack.getItem();
|
||||
|
||||
if (this.target instanceof EntityLiving) {
|
||||
final TPlatform platform = this.getPlatform();
|
||||
final TTurretPlatform platform = this.getPlatform();
|
||||
platform.wattsReceived -= this.getFiringRequest();
|
||||
|
||||
if (bullet.getType(ammoStack) == ProjectileType.CONVENTIONAL) {
|
||||
|
|
|
@ -5,7 +5,7 @@ import icbm.api.sentry.IAATarget;
|
|||
import icbm.gangshao.ICBMSentry;
|
||||
import icbm.gangshao.ProjectileType;
|
||||
import icbm.gangshao.damage.TileDamageSource;
|
||||
import icbm.gangshao.platform.TPlatform;
|
||||
import icbm.gangshao.platform.TTurretPlatform;
|
||||
import net.minecraft.entity.EntityLiving;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.MathHelper;
|
||||
|
@ -60,7 +60,7 @@ public class TLaserTurret extends TAutomaticTurret {
|
|||
(double) this.xCoord,
|
||||
(double) this.yCoord,
|
||||
(double) this.zCoord,
|
||||
"icbm.lasershot",
|
||||
"icbm:lasershot",
|
||||
5.0f,
|
||||
1.0f - this.worldObj.rand.nextFloat() * 0.2f
|
||||
);
|
||||
|
@ -108,7 +108,7 @@ public class TLaserTurret extends TAutomaticTurret {
|
|||
protected boolean onFire() {
|
||||
if (!this.worldObj.isRemote && this.getPlatform() != null) {
|
||||
if (super.target instanceof EntityLiving) {
|
||||
final TPlatform platform = this.getPlatform();
|
||||
final TTurretPlatform platform = this.getPlatform();
|
||||
platform.wattsReceived -= this.getFiringRequest();
|
||||
super.target.attackEntityFrom(
|
||||
(DamageSource) TileDamageSource.doLaserDamage(this), 2
|
||||
|
|
|
@ -35,7 +35,7 @@ public class TMachineGunTurret extends TAutomaticTurret {
|
|||
(double) this.xCoord,
|
||||
(double) this.yCoord,
|
||||
(double) this.zCoord,
|
||||
"icbm.machinegun",
|
||||
"icbm:machinegun",
|
||||
5.0f,
|
||||
1.0f
|
||||
);
|
||||
|
|
|
@ -15,8 +15,8 @@ public class CommonProxy implements IGuiHandler {
|
|||
public void preInit() {}
|
||||
|
||||
public void init() {
|
||||
GameRegistry.registerTileEntity((Class) TCamouflage.class, "ICBMYinXin");
|
||||
GameRegistry.registerTileEntity((Class) TProximityDetector.class, "ICBMYinGanQi");
|
||||
GameRegistry.registerTileEntity((Class) TCamouflage.class, "ICBMCamouflage");
|
||||
GameRegistry.registerTileEntity((Class) TProximityDetector.class, "ICBMProximityDetector");
|
||||
}
|
||||
|
||||
public Object getClientGuiElement(
|
||||
|
|
|
@ -26,6 +26,7 @@ public class TProximityDetector
|
|||
public Vector3 maxCoord;
|
||||
public byte mode;
|
||||
public boolean isInverted;
|
||||
public double wattsForDisplay;
|
||||
|
||||
public TProximityDetector() {
|
||||
this.frequency = 0;
|
||||
|
@ -34,6 +35,7 @@ public class TProximityDetector
|
|||
this.maxCoord = new Vector3(9.0, 9.0, 9.0);
|
||||
this.mode = 0;
|
||||
this.isInverted = false;
|
||||
this.wattsForDisplay = 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -49,6 +51,7 @@ public class TProximityDetector
|
|||
super.updateEntity();
|
||||
|
||||
if (!this.worldObj.isRemote && super.ticks % 20L == 0L) {
|
||||
this.wattsForDisplay = super.wattsReceived;
|
||||
this.worldObj.markBlockForUpdate(this.xCoord, this.yCoord, this.zCoord);
|
||||
|
||||
if (!this.isDisabled()) {
|
||||
|
@ -136,6 +139,7 @@ public class TProximityDetector
|
|||
public Packet getDescriptionPacket() {
|
||||
NBTTagCompound nbt = new NBTTagCompound();
|
||||
|
||||
nbt.setDouble("wattsForDisplay", this.wattsForDisplay);
|
||||
nbt.setDouble("wattsReceived", super.wattsReceived);
|
||||
nbt.setShort("frequency", this.frequency);
|
||||
nbt.setByte("mode", this.mode);
|
||||
|
@ -152,6 +156,7 @@ public class TProximityDetector
|
|||
public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt) {
|
||||
NBTTagCompound nbt = pkt.func_148857_g();
|
||||
|
||||
this.wattsForDisplay = nbt.getDouble("wattsForDisplay");
|
||||
super.wattsReceived = nbt.getDouble("wattsReceived");
|
||||
this.frequency = nbt.getShort("frequency");
|
||||
this.mode = nbt.getByte("mode");
|
||||
|
|
|
@ -192,7 +192,7 @@ public class GProximityDetector extends GuiBase {
|
|||
|
||||
if (this.tileEntity.isDisabled()) {
|
||||
status = "Disabled";
|
||||
} else if (this.tileEntity.prevWatts < this.tileEntity.getRequest().getWatts()) {
|
||||
} else if (this.tileEntity.wattsForDisplay < this.tileEntity.getRequest().getWatts()) {
|
||||
status = "Insufficient electricity!";
|
||||
} else {
|
||||
color = "§2";
|
||||
|
|
|
@ -14,10 +14,10 @@ import icbm.zhapin.fx.FXPortal;
|
|||
import icbm.zhapin.fx.FXShockwave;
|
||||
import icbm.zhapin.fx.FXSmoke;
|
||||
import icbm.zhapin.gui.GEmpTower;
|
||||
import icbm.zhapin.gui.GFaSheDi;
|
||||
import icbm.zhapin.gui.GLauncherPlatform;
|
||||
import icbm.zhapin.gui.GCruiseLauncher;
|
||||
import icbm.zhapin.gui.GMissileLauncher;
|
||||
import icbm.zhapin.gui.GRadarTower;
|
||||
import icbm.zhapin.gui.GXiaoFaSheQi;
|
||||
import icbm.zhapin.jiqi.TCruiseLauncher;
|
||||
import icbm.zhapin.jiqi.TEmpTower;
|
||||
import icbm.zhapin.jiqi.TLauncher;
|
||||
|
@ -152,7 +152,7 @@ public class ClientProxy extends CommonProxy {
|
|||
if (tileEntity != null || ID == 5) {
|
||||
switch (ID) {
|
||||
case 1: {
|
||||
return new GXiaoFaSheQi(
|
||||
return new GCruiseLauncher(
|
||||
entityPlayer.inventory, (TCruiseLauncher) tileEntity
|
||||
);
|
||||
}
|
||||
|
@ -170,7 +170,7 @@ public class ClientProxy extends CommonProxy {
|
|||
}
|
||||
|
||||
case 7: {
|
||||
return new GFaSheDi(
|
||||
return new GLauncherPlatform(
|
||||
entityPlayer.inventory, (TLauncherPlatform) tileEntity
|
||||
);
|
||||
}
|
||||
|
|
|
@ -10,8 +10,8 @@ import icbm.zhapin.jiqi.TLauncherControlPanel;
|
|||
import icbm.zhapin.jiqi.TLauncherPlatform;
|
||||
import icbm.zhapin.jiqi.TMissileCoordinator;
|
||||
import icbm.zhapin.jiqi.TRadarTower;
|
||||
import icbm.zhapin.rongqi.CCruiseLauncher;
|
||||
import icbm.zhapin.rongqi.CFaShiDi;
|
||||
import icbm.zhapin.rongqi.CXiaoFaSheQi;
|
||||
import icbm.zhapin.zhapin.TExplosive;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.server.gui.IUpdatePlayerListBox;
|
||||
|
@ -61,7 +61,7 @@ public class CommonProxy implements IGuiHandler {
|
|||
if (tileEntity != null) {
|
||||
switch (ID) {
|
||||
case 1: {
|
||||
return new CXiaoFaSheQi(
|
||||
return new CCruiseLauncher(
|
||||
player.inventory, (TCruiseLauncher) tileEntity
|
||||
);
|
||||
}
|
||||
|
|
|
@ -33,7 +33,13 @@ import icbm.zhapin.dianqi.ItRadarGun;
|
|||
import icbm.zhapin.dianqi.ItRemoteDetonator;
|
||||
import icbm.zhapin.dianqi.ItRocketLauncher;
|
||||
import icbm.zhapin.jiqi.BMachine;
|
||||
import icbm.zhapin.jiqi.CruiseLauncherGuiPacket;
|
||||
import icbm.zhapin.jiqi.CruiseLauncherGuiPacketHandler;
|
||||
import icbm.zhapin.jiqi.EmpTowerGuiPacket;
|
||||
import icbm.zhapin.jiqi.EmpTowerGuiPacketHandler;
|
||||
import icbm.zhapin.jiqi.IBMachine;
|
||||
import icbm.zhapin.jiqi.LauncherControlPanelGuiPacket;
|
||||
import icbm.zhapin.jiqi.LauncherControlPanelGuiPacketHandler;
|
||||
import icbm.zhapin.po.PChuanRanDu;
|
||||
import icbm.zhapin.po.PDaDu;
|
||||
import icbm.zhapin.po.PDongShang;
|
||||
|
@ -258,6 +264,21 @@ public class ICBMExplosion extends MainBase {
|
|||
channel.registerMessage(
|
||||
ItemUsePacketHandler.class, ItemUsePacket.class, pktId++, Side.SERVER
|
||||
);
|
||||
channel.registerMessage(
|
||||
EmpTowerGuiPacketHandler.class, EmpTowerGuiPacket.class, pktId++, Side.SERVER
|
||||
);
|
||||
channel.registerMessage(
|
||||
LauncherControlPanelGuiPacketHandler.class,
|
||||
LauncherControlPanelGuiPacket.class,
|
||||
pktId++,
|
||||
Side.SERVER
|
||||
);
|
||||
channel.registerMessage(
|
||||
CruiseLauncherGuiPacketHandler.class,
|
||||
CruiseLauncherGuiPacket.class,
|
||||
pktId++,
|
||||
Side.SERVER
|
||||
);
|
||||
}
|
||||
|
||||
@Mod.EventHandler
|
||||
|
|
|
@ -45,7 +45,7 @@ public class ItemUsePacketHandler implements IMessageHandler<ItemUsePacket, IMes
|
|||
position.intX(),
|
||||
player.worldObj.getHeightValue(position.intX(), position.intZ()),
|
||||
position.intZ(),
|
||||
"icbm.airstrike",
|
||||
"icbm:airstrike",
|
||||
5.0f,
|
||||
(1.0f
|
||||
+ (player.worldObj.rand.nextFloat()
|
||||
|
|
|
@ -34,7 +34,7 @@ public class DAntiBallistic extends MissileBase {
|
|||
missileObj.lockedTarget = nearestEntity;
|
||||
missileObj.didTargetLockBefore = true;
|
||||
missileObj.worldObj.playSoundAtEntity(
|
||||
(Entity) missileObj, "icbm.targetlocked", 5.0f, 0.9f
|
||||
(Entity) missileObj, "icbm:targetlocked", 5.0f, 0.9f
|
||||
);
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -175,7 +175,7 @@ public class EMissile extends Entity
|
|||
this.jiSuan();
|
||||
super.worldObj.playSoundAtEntity(
|
||||
(Entity) this,
|
||||
"icbm.missilelaunch",
|
||||
"icbm:missilelaunch",
|
||||
4.0f,
|
||||
(1.0f
|
||||
+ (super.worldObj.rand.nextFloat() - super.worldObj.rand.nextFloat()) * 0.2f)
|
||||
|
|
|
@ -33,8 +33,9 @@ public class ItMissile extends ItICBM {
|
|||
return "icbm.missile";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getSubItems(
|
||||
final int par1, final CreativeTabs par2CreativeTabs, final List par3List
|
||||
final Item par1, final CreativeTabs par2CreativeTabs, final List par3List
|
||||
) {
|
||||
for (int i = 0; i < ZhaPin.E_SI_ID; ++i) {
|
||||
par3List.add(new ItemStack((Item) this, 1, i));
|
||||
|
|
|
@ -37,7 +37,7 @@ public class ItModuleMissile extends ItMissile {
|
|||
|
||||
@Override
|
||||
public void getSubItems(
|
||||
final int par1, final CreativeTabs par2CreativeTabs, final List par3List
|
||||
final Item par1, final CreativeTabs par2CreativeTabs, final List par3List
|
||||
) {
|
||||
for (int i = 0; i < 5; ++i) {
|
||||
par3List.add(new ItemStack((Item) this, 1, i));
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
package icbm.zhapin.gui;
|
||||
|
||||
import icbm.zhapin.ICBMExplosion;
|
||||
import icbm.zhapin.jiqi.CruiseLauncherGuiPacket;
|
||||
import icbm.zhapin.jiqi.TCruiseLauncher;
|
||||
import icbm.zhapin.rongqi.CXiaoFaSheQi;
|
||||
import icbm.zhapin.rongqi.CCruiseLauncher;
|
||||
import net.minecraft.client.gui.GuiTextField;
|
||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
|
@ -12,7 +14,7 @@ import org.lwjgl.opengl.GL11;
|
|||
import universalelectricity.core.electricity.ElectricityDisplay;
|
||||
import universalelectricity.core.vector.Vector3;
|
||||
|
||||
public class GXiaoFaSheQi extends GuiContainer {
|
||||
public class GCruiseLauncher extends GuiContainer {
|
||||
private TCruiseLauncher tileEntity;
|
||||
private GuiTextField textFieldX;
|
||||
private GuiTextField textFieldZ;
|
||||
|
@ -21,10 +23,10 @@ public class GXiaoFaSheQi extends GuiContainer {
|
|||
private int containerWidth;
|
||||
private int containerHeight;
|
||||
|
||||
public GXiaoFaSheQi(
|
||||
public GCruiseLauncher(
|
||||
final InventoryPlayer par1InventoryPlayer, final TCruiseLauncher tileEntity
|
||||
) {
|
||||
super((Container) new CXiaoFaSheQi(par1InventoryPlayer, tileEntity));
|
||||
super((Container) new CCruiseLauncher(par1InventoryPlayer, tileEntity));
|
||||
this.tileEntity = tileEntity;
|
||||
}
|
||||
|
||||
|
@ -67,19 +69,16 @@ public class GXiaoFaSheQi extends GuiContainer {
|
|||
Integer.parseInt(this.textFieldZ.getText())
|
||||
);
|
||||
this.tileEntity.setTarget(newTarget);
|
||||
// TODO: WTF
|
||||
// PacketDispatcher.sendPacketToServer(PacketManager.getPacket(
|
||||
// "ICBM|E", this.tileEntity, 2, this.tileEntity.getTarget().x,
|
||||
// this.tileEntity.getTarget().y, this.tileEntity.getTarget().z));
|
||||
ICBMExplosion.channel.sendToServer(new CruiseLauncherGuiPacket(this.tileEntity
|
||||
));
|
||||
} catch (final NumberFormatException ex) {}
|
||||
|
||||
try {
|
||||
final short newFrequency
|
||||
= (short) Math.max(Short.parseShort(this.textFieldFreq.getText()), 0);
|
||||
this.tileEntity.setFrequency(newFrequency);
|
||||
// TODO: WTF
|
||||
// PacketDispatcher.sendPacketToServer(PacketManager.getPacket(
|
||||
// "ICBM|E", this.tileEntity, 1, this.tileEntity.getFrequency()));
|
||||
ICBMExplosion.channel.sendToServer(new CruiseLauncherGuiPacket(this.tileEntity
|
||||
));
|
||||
} catch (final NumberFormatException ex2) {}
|
||||
}
|
||||
|
|
@ -1,11 +1,14 @@
|
|||
package icbm.zhapin.gui;
|
||||
|
||||
import icbm.zhapin.ICBMExplosion;
|
||||
import icbm.zhapin.jiqi.EmpTowerGuiPacket;
|
||||
import icbm.zhapin.jiqi.TEmpTower;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.gui.GuiTextField;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import universalelectricity.core.electricity.ElectricityDisplay;
|
||||
import universalelectricity.core.vector.Vector3;
|
||||
import universalelectricity.prefab.GuiBase;
|
||||
|
||||
public class GEmpTower extends GuiBase {
|
||||
|
@ -34,17 +37,6 @@ public class GEmpTower extends GuiBase {
|
|||
(this.textFieldBanJing = new GuiTextField(this.fontRendererObj, 72, 28, 30, 12))
|
||||
.setMaxStringLength(3);
|
||||
this.textFieldBanJing.setText(this.tileEntity.radius + "");
|
||||
// TODO: WTF
|
||||
// PacketDispatcher.sendPacketToServer(PacketManager.getPacket("ICBM|E",
|
||||
// this.tileEntity, -1, true));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onGuiClosed() {
|
||||
super.onGuiClosed();
|
||||
// TODO: WTF
|
||||
// PacketDispatcher.sendPacketToServer(PacketManager.getPacket("ICBM|E",
|
||||
// this.tileEntity, -1, false));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -66,9 +58,9 @@ public class GEmpTower extends GuiBase {
|
|||
}
|
||||
}
|
||||
|
||||
// TODO: WTF
|
||||
// PacketDispatcher.sendPacketToServer(PacketManager.getPacket("ICBM|E",
|
||||
// this.tileEntity, 3, this.tileEntity.muoShi));
|
||||
ICBMExplosion.channel.sendToServer(new EmpTowerGuiPacket(
|
||||
new Vector3(this.tileEntity), this.tileEntity.radius, this.tileEntity.holzOhJa
|
||||
));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -81,9 +73,11 @@ public class GEmpTower extends GuiBase {
|
|||
Math.max(Integer.parseInt(this.textFieldBanJing.getText()), 10), 150
|
||||
);
|
||||
this.tileEntity.radius = radius;
|
||||
// TODO: WTF
|
||||
// PacketDispatcher.sendPacketToServer(PacketManager.getPacket("ICBM|E",
|
||||
// this.tileEntity, 2, this.tileEntity.banJing));
|
||||
ICBMExplosion.channel.sendToServer(new EmpTowerGuiPacket(
|
||||
new Vector3(this.tileEntity),
|
||||
this.tileEntity.radius,
|
||||
this.tileEntity.holzOhJa
|
||||
));
|
||||
} catch (final NumberFormatException ex) {}
|
||||
}
|
||||
|
||||
|
|
|
@ -9,12 +9,12 @@ import net.minecraft.util.ResourceLocation;
|
|||
import net.minecraft.util.StatCollector;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
public class GFaSheDi extends GuiContainer {
|
||||
public class GLauncherPlatform extends GuiContainer {
|
||||
private TLauncherPlatform tileEntity;
|
||||
private int containerWidth;
|
||||
private int containerHeight;
|
||||
|
||||
public GFaSheDi(
|
||||
public GLauncherPlatform(
|
||||
final InventoryPlayer par1InventoryPlayer, final TLauncherPlatform tileEntity
|
||||
) {
|
||||
super((Container) new CFaShiDi(par1InventoryPlayer, tileEntity));
|
|
@ -1,5 +1,7 @@
|
|||
package icbm.zhapin.gui;
|
||||
|
||||
import icbm.zhapin.ICBMExplosion;
|
||||
import icbm.zhapin.jiqi.LauncherControlPanelGuiPacket;
|
||||
import icbm.zhapin.jiqi.TLauncherControlPanel;
|
||||
import net.minecraft.client.gui.GuiTextField;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
@ -72,28 +74,27 @@ public class GMissileLauncher extends GuiBase {
|
|||
Integer.parseInt(this.tFZ.getText())
|
||||
);
|
||||
this.tileEntity.setTarget(newTarget);
|
||||
// TODO: WTF
|
||||
// PacketDispatcher.sendPacketToServer(PacketManager.getPacket(
|
||||
// "ICBM|E", this.tileEntity, 2, this.tileEntity.getTarget().x,
|
||||
// this.tileEntity.getTarget().y, this.tileEntity.getTarget().z));
|
||||
ICBMExplosion.channel.sendToServer(
|
||||
new LauncherControlPanelGuiPacket(this.tileEntity)
|
||||
);
|
||||
} catch (final NumberFormatException ex) {}
|
||||
|
||||
try {
|
||||
final short newFrequency
|
||||
= (short) Math.max(Short.parseShort(this.tFFreq.getText()), 0);
|
||||
this.tileEntity.setFrequency(newFrequency);
|
||||
// TODO: WTF
|
||||
// PacketDispatcher.sendPacketToServer(PacketManager.getPacket(
|
||||
// "ICBM|E", this.tileEntity, 1, this.tileEntity.getFrequency()));
|
||||
ICBMExplosion.channel.sendToServer(
|
||||
new LauncherControlPanelGuiPacket(this.tileEntity)
|
||||
);
|
||||
} catch (final NumberFormatException ex2) {}
|
||||
|
||||
try {
|
||||
final short newGaoDu = (short
|
||||
) Math.max(Math.min(Short.parseShort(this.tFGaoDu.getText()), 99), 3);
|
||||
this.tileEntity.height = newGaoDu;
|
||||
// TODO: WTF
|
||||
// PacketDispatcher.sendPacketToServer(PacketManager.getPacket(
|
||||
// "ICBM|E", this.tileEntity, 3, this.tileEntity.gaoDu));
|
||||
ICBMExplosion.channel.sendToServer(
|
||||
new LauncherControlPanelGuiPacket(this.tileEntity)
|
||||
);
|
||||
} catch (final NumberFormatException ex3) {}
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,38 @@
|
|||
package icbm.zhapin.jiqi;
|
||||
|
||||
import cpw.mods.fml.common.network.simpleimpl.IMessage;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import universalelectricity.core.vector.Vector3;
|
||||
|
||||
public class CruiseLauncherGuiPacket implements IMessage {
|
||||
Vector3 pos;
|
||||
int frequency;
|
||||
Vector3 target;
|
||||
|
||||
public CruiseLauncherGuiPacket() {}
|
||||
public CruiseLauncherGuiPacket(TCruiseLauncher te) {
|
||||
this.pos = new Vector3(te);
|
||||
this.frequency = te.getFrequency();
|
||||
this.target = te.getTarget();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fromBytes(ByteBuf buf) {
|
||||
this.pos = new Vector3(buf.readInt(), buf.readInt(), buf.readInt());
|
||||
this.frequency = buf.readInt();
|
||||
this.target = new Vector3(buf.readInt(), buf.readInt(), buf.readInt());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void toBytes(ByteBuf buf) {
|
||||
buf.writeInt(this.pos.intX());
|
||||
buf.writeInt(this.pos.intY());
|
||||
buf.writeInt(this.pos.intZ());
|
||||
|
||||
buf.writeInt(this.frequency);
|
||||
|
||||
buf.writeInt(this.target.intX());
|
||||
buf.writeInt(this.target.intY());
|
||||
buf.writeInt(this.target.intZ());
|
||||
}
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
package icbm.zhapin.jiqi;
|
||||
|
||||
import cpw.mods.fml.common.network.simpleimpl.IMessage;
|
||||
import cpw.mods.fml.common.network.simpleimpl.IMessageHandler;
|
||||
import cpw.mods.fml.common.network.simpleimpl.MessageContext;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class CruiseLauncherGuiPacketHandler
|
||||
implements IMessageHandler<CruiseLauncherGuiPacket, IMessage> {
|
||||
@Override
|
||||
public IMessage onMessage(CruiseLauncherGuiPacket message, MessageContext ctx) {
|
||||
World world = ctx.getServerHandler().playerEntity.worldObj;
|
||||
|
||||
TileEntity te = message.pos.getTileEntity(world);
|
||||
|
||||
if (te instanceof TCruiseLauncher) {
|
||||
TCruiseLauncher cl = (TCruiseLauncher)te;
|
||||
|
||||
cl.setFrequency(message.frequency);
|
||||
cl.setTarget(message.target);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
package icbm.zhapin.jiqi;
|
||||
|
||||
import cpw.mods.fml.common.network.simpleimpl.IMessage;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import universalelectricity.core.vector.Vector3;
|
||||
|
||||
public class EmpTowerGuiPacket implements IMessage {
|
||||
Vector3 pos;
|
||||
int radius;
|
||||
byte holzOhJa;
|
||||
|
||||
public EmpTowerGuiPacket(Vector3 pos, int radius, byte holzOhJa) {
|
||||
this.holzOhJa = holzOhJa;
|
||||
this.pos = pos;
|
||||
this.radius = radius;
|
||||
}
|
||||
|
||||
public EmpTowerGuiPacket() {}
|
||||
|
||||
@Override
|
||||
public void fromBytes(ByteBuf buf) {
|
||||
this.pos = new Vector3(buf.readInt(), buf.readInt(), buf.readInt());
|
||||
this.radius = buf.readInt();
|
||||
this.holzOhJa = buf.readByte();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void toBytes(ByteBuf buf) {
|
||||
buf.writeInt(this.pos.intX());
|
||||
buf.writeInt(this.pos.intY());
|
||||
buf.writeInt(this.pos.intZ());
|
||||
|
||||
buf.writeInt(this.radius);
|
||||
buf.writeByte(this.holzOhJa);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
package icbm.zhapin.jiqi;
|
||||
|
||||
import cpw.mods.fml.common.network.simpleimpl.IMessage;
|
||||
import cpw.mods.fml.common.network.simpleimpl.IMessageHandler;
|
||||
import cpw.mods.fml.common.network.simpleimpl.MessageContext;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class EmpTowerGuiPacketHandler
|
||||
implements IMessageHandler<EmpTowerGuiPacket, IMessage> {
|
||||
@Override
|
||||
public IMessage onMessage(EmpTowerGuiPacket message, MessageContext ctx) {
|
||||
World world = ctx.getServerHandler().playerEntity.worldObj;
|
||||
|
||||
TileEntity te = message.pos.getTileEntity(world);
|
||||
|
||||
if (te instanceof TEmpTower) {
|
||||
((TEmpTower) te).radius = message.radius;
|
||||
((TEmpTower) te).holzOhJa = message.holzOhJa;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
package icbm.zhapin.jiqi;
|
||||
|
||||
import cpw.mods.fml.common.network.simpleimpl.IMessage;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import universalelectricity.core.vector.Vector3;
|
||||
|
||||
public class LauncherControlPanelGuiPacket implements IMessage {
|
||||
Vector3 pos;
|
||||
int frequency;
|
||||
Vector3 target;
|
||||
short height;
|
||||
|
||||
public LauncherControlPanelGuiPacket() {}
|
||||
|
||||
public LauncherControlPanelGuiPacket(TLauncherControlPanel te) {
|
||||
this.pos = new Vector3(te);
|
||||
this.frequency = te.getFrequency();
|
||||
this.target = te.getTarget();
|
||||
this.height = te.height;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fromBytes(ByteBuf buf) {
|
||||
this.pos = new Vector3(buf.readInt(), buf.readInt(), buf.readInt());
|
||||
this.frequency = buf.readInt();
|
||||
this.target = new Vector3(buf.readInt(), buf.readInt(), buf.readInt());
|
||||
this.height = buf.readShort();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void toBytes(ByteBuf buf) {
|
||||
buf.writeInt(this.pos.intX());
|
||||
buf.writeInt(this.pos.intY());
|
||||
buf.writeInt(this.pos.intZ());
|
||||
|
||||
buf.writeInt(this.frequency);
|
||||
|
||||
buf.writeInt(this.target.intX());
|
||||
buf.writeInt(this.target.intY());
|
||||
buf.writeInt(this.target.intZ());
|
||||
|
||||
buf.writeShort(this.height);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
package icbm.zhapin.jiqi;
|
||||
|
||||
import cpw.mods.fml.common.network.simpleimpl.IMessage;
|
||||
import cpw.mods.fml.common.network.simpleimpl.IMessageHandler;
|
||||
import cpw.mods.fml.common.network.simpleimpl.MessageContext;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class LauncherControlPanelGuiPacketHandler
|
||||
implements IMessageHandler<LauncherControlPanelGuiPacket, IMessage> {
|
||||
@Override
|
||||
public IMessage onMessage(LauncherControlPanelGuiPacket message, MessageContext ctx) {
|
||||
World world = ctx.getServerHandler().playerEntity.worldObj;
|
||||
|
||||
TileEntity te = message.pos.getTileEntity(world);
|
||||
|
||||
if (te instanceof TLauncherControlPanel) {
|
||||
TLauncherControlPanel lcp = ((TLauncherControlPanel) te);
|
||||
|
||||
lcp.setFrequency(message.frequency);
|
||||
lcp.target = message.target;
|
||||
if (lcp.getTier() < 2)
|
||||
lcp.target.y = 0.0;
|
||||
lcp.height = (short) Math.max(Math.min(message.height, 99), 3);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
|
@ -20,13 +20,13 @@ import universalelectricity.prefab.multiblock.IMultiBlock;
|
|||
public class TEmpTower
|
||||
extends TileEntityUniversalStorable implements IMultiBlock, IRedstoneReceptor {
|
||||
public static final int MAX_RADIUS = 150;
|
||||
public float xuanZhuan;
|
||||
public float rotation;
|
||||
private float xuanZhuanLu;
|
||||
public byte holzOhJa;
|
||||
public int radius;
|
||||
|
||||
public TEmpTower() {
|
||||
this.xuanZhuan = 0.0f;
|
||||
this.rotation = 0.0f;
|
||||
this.holzOhJa = 0;
|
||||
this.radius = 60;
|
||||
RadarRegistry.register(this);
|
||||
|
@ -48,7 +48,7 @@ public class TEmpTower
|
|||
(double) this.xCoord,
|
||||
(double) this.yCoord,
|
||||
(double) this.zCoord,
|
||||
"icbm.machinehum",
|
||||
"icbm:machinehum",
|
||||
0.5f,
|
||||
(float) (0.8500000238418579 * this.getJoules() / this.getMaxJoules())
|
||||
);
|
||||
|
@ -56,10 +56,10 @@ public class TEmpTower
|
|||
|
||||
this.xuanZhuanLu
|
||||
= (float) (Math.pow(this.getJoules() / this.getMaxJoules(), 2.0) * 0.5);
|
||||
this.xuanZhuan += this.xuanZhuanLu;
|
||||
this.rotation += this.xuanZhuanLu;
|
||||
|
||||
if (this.xuanZhuan > 360.0f) {
|
||||
this.xuanZhuan = 0.0f;
|
||||
if (this.rotation > 360.0f) {
|
||||
this.rotation = 0.0f;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -81,6 +81,8 @@ public class TLauncherControlPanel
|
|||
nbt.setInteger("tier", this.tier);
|
||||
nbt.setInteger("frequency", this.getFrequency());
|
||||
nbt.setShort("height", this.height);
|
||||
nbt.setInteger("disabledTicks", this.disabledTicks);
|
||||
nbt.setTag("target", super.target.writeToNBT(new NBTTagCompound()));
|
||||
|
||||
return new S35PacketUpdateTileEntity(
|
||||
this.xCoord, this.yCoord, this.zCoord, this.getBlockMetadata(), nbt
|
||||
|
@ -103,6 +105,8 @@ public class TLauncherControlPanel
|
|||
this.tier = nbt.getInteger("tier");
|
||||
this.setFrequency(nbt.getInteger("frequency"));
|
||||
this.height = nbt.getShort("height");
|
||||
this.disabledTicks = nbt.getInteger("disabledTicks");
|
||||
super.target = Vector3.readFromNBT(nbt.getCompoundTag("target"));
|
||||
}
|
||||
|
||||
// TODO: WTF
|
||||
|
|
|
@ -25,7 +25,7 @@ public class REmpTower extends TileEntitySpecialRenderer {
|
|||
GL11.glTranslatef((float) x + 0.5f, (float) y + 1.5f, (float) z + 0.5f);
|
||||
this.bindTexture(new ResourceLocation("icbm", "textures/models/emp_tower.png"));
|
||||
GL11.glRotatef(180.0f, 0.0f, 0.0f, 1.0f);
|
||||
REmpTower.MODEL.render(tileEntity.xuanZhuan, 0.0625f);
|
||||
REmpTower.MODEL.render(tileEntity.rotation, 0.0625f);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
|
|
|
@ -11,10 +11,10 @@ import net.minecraft.item.ItemStack;
|
|||
import universalelectricity.core.item.IItemElectric;
|
||||
import universalelectricity.prefab.SlotSpecific;
|
||||
|
||||
public class CXiaoFaSheQi extends Container {
|
||||
public class CCruiseLauncher extends Container {
|
||||
private TCruiseLauncher tileEntity;
|
||||
|
||||
public CXiaoFaSheQi(
|
||||
public CCruiseLauncher(
|
||||
final InventoryPlayer par1InventoryPlayer, final TCruiseLauncher tileEntity
|
||||
) {
|
||||
this.tileEntity = tileEntity;
|
|
@ -109,7 +109,7 @@ public class ExAntiGravitational extends ZhaPin {
|
|||
position.x,
|
||||
position.y,
|
||||
position.z,
|
||||
"icbm.antigravity",
|
||||
"icbm:antigravity",
|
||||
6.0f,
|
||||
(1.0f + (worldObj.rand.nextFloat() - worldObj.rand.nextFloat()) * 0.2f) * 0.7f
|
||||
);
|
||||
|
|
|
@ -37,7 +37,7 @@ public class ExAntimatter extends ZhaPin {
|
|||
position.x,
|
||||
position.y,
|
||||
position.z,
|
||||
"icbm.antimatter",
|
||||
"icbm:antimatter",
|
||||
7.0f,
|
||||
(float) (worldObj.rand.nextFloat() * 0.1 + 0.8999999761581421)
|
||||
);
|
||||
|
@ -109,7 +109,7 @@ public class ExAntimatter extends ZhaPin {
|
|||
|
||||
if (fuseTicks % 25 == 0) {
|
||||
worldObj.playSoundEffect(
|
||||
position.x, position.y, position.z, "icbm.alarm", 4.0f, 1.0f
|
||||
position.x, position.y, position.z, "icbm:alarm", 4.0f, 1.0f
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -100,7 +100,7 @@ public class ExChemical extends ZhaPin {
|
|||
position.x + 0.5,
|
||||
position.y + 0.5,
|
||||
position.z + 0.5,
|
||||
"icbm.gasleak",
|
||||
"icbm:gasleak",
|
||||
4.0f,
|
||||
(1.0f + (worldObj.rand.nextFloat() - worldObj.rand.nextFloat()) * 0.2f) * 1.0f
|
||||
);
|
||||
|
|
|
@ -32,7 +32,7 @@ public class ExDebilitation extends ZhaPin {
|
|||
position.x,
|
||||
position.y,
|
||||
position.z,
|
||||
"icbm.debilitation",
|
||||
"icbm:debilitation",
|
||||
4.0f,
|
||||
(1.0f + (worldObj.rand.nextFloat() - worldObj.rand.nextFloat()) * 0.2f) * 0.7f
|
||||
);
|
||||
|
|
|
@ -90,7 +90,7 @@ public class ExEmpSignal extends ZhaPin {
|
|||
position.x,
|
||||
position.y,
|
||||
position.z,
|
||||
"icbm.emp",
|
||||
"icbm:emp",
|
||||
4.0f,
|
||||
(1.0f + (worldObj.rand.nextFloat() - worldObj.rand.nextFloat()) * 0.2f) * 0.7f
|
||||
);
|
||||
|
|
|
@ -106,7 +106,7 @@ public class ExEmpWave extends ZhaPin {
|
|||
position.x,
|
||||
position.y,
|
||||
position.z,
|
||||
"icbm.emp",
|
||||
"icbm:emp",
|
||||
4.0f,
|
||||
(1.0f + (worldObj.rand.nextFloat() - worldObj.rand.nextFloat()) * 0.2f) * 0.7f
|
||||
);
|
||||
|
|
|
@ -170,7 +170,7 @@ public class ExEndothermic extends ZhaPin {
|
|||
}
|
||||
|
||||
worldObj.playSoundEffect(
|
||||
position.x, position.y, position.z, "icbm.redmatter", 4.0f, 0.8f
|
||||
position.x, position.y, position.z, "icbm:redmatter", 4.0f, 0.8f
|
||||
);
|
||||
return callCount <= 35;
|
||||
}
|
||||
|
|
|
@ -175,7 +175,7 @@ public class ExEndothermic2 extends ZhaPin {
|
|||
position.x + 0.5,
|
||||
position.y + 0.5,
|
||||
position.z + 0.5,
|
||||
"icbm.redmatter",
|
||||
"icbm:redmatter",
|
||||
6.0f,
|
||||
(1.0f + (worldObj.rand.nextFloat() - worldObj.rand.nextFloat()) * 0.2f)
|
||||
* 1.0f
|
||||
|
|
|
@ -167,7 +167,7 @@ public class ExExothermic extends ZhaPin {
|
|||
}
|
||||
|
||||
worldObj.playSoundEffect(
|
||||
position.x, position.y, position.z, "icbm.beamcharging", 4.0f, 0.8f
|
||||
position.x, position.y, position.z, "icbm:beamcharging", 4.0f, 0.8f
|
||||
);
|
||||
return callCount <= 35;
|
||||
}
|
||||
|
@ -184,7 +184,7 @@ public class ExExothermic extends ZhaPin {
|
|||
if (!worldObj.isRemote) {
|
||||
((EExplosion) explosionSource).entityList.get(0).setDead();
|
||||
worldObj.playSoundEffect(
|
||||
position.x, position.y, position.z, "icbm.powerdown", 4.0f, 0.8f
|
||||
position.x, position.y, position.z, "icbm:powerdown", 4.0f, 0.8f
|
||||
);
|
||||
|
||||
if (this.canFocusBeam(worldObj, position)) {
|
||||
|
|
|
@ -225,7 +225,7 @@ public class ExExothermic2 extends ZhaPin {
|
|||
position.x + 0.5,
|
||||
position.y + 0.5,
|
||||
position.z + 0.5,
|
||||
"icbm.explosionfire",
|
||||
"icbm:explosionfire",
|
||||
6.0f,
|
||||
(1.0f + (worldObj.rand.nextFloat() - worldObj.rand.nextFloat()) * 0.2f)
|
||||
* 1.0f
|
||||
|
|
|
@ -155,7 +155,7 @@ public class ExHypersonic extends ZhaPin {
|
|||
position.x,
|
||||
position.y,
|
||||
position.z,
|
||||
"icbm.hypersonic",
|
||||
"icbm:hypersonic",
|
||||
6.0f,
|
||||
(1.0f + (worldObj.rand.nextFloat() - worldObj.rand.nextFloat()) * 0.1f) * 0.9f
|
||||
);
|
||||
|
|
|
@ -135,7 +135,7 @@ public class ExIncendiary extends ZhaPin {
|
|||
position.x + 0.5,
|
||||
position.y + 0.5,
|
||||
position.z + 0.5,
|
||||
"icbm.explosionfire",
|
||||
"icbm:explosionfire",
|
||||
4.0f,
|
||||
(1.0f + (worldObj.rand.nextFloat() - worldObj.rand.nextFloat()) * 0.2f) * 1.0f
|
||||
);
|
||||
|
|
|
@ -81,7 +81,7 @@ public class ExNuclear extends ExThr {
|
|||
position.x,
|
||||
position.y,
|
||||
position.z,
|
||||
"icbm.explosion",
|
||||
"icbm:explosion",
|
||||
7.0f,
|
||||
(1.0f + (worldObj.rand.nextFloat() - worldObj.rand.nextFloat()) * 0.2f) * 0.7f
|
||||
);
|
||||
|
@ -128,7 +128,7 @@ public class ExNuclear extends ExThr {
|
|||
position.x,
|
||||
position.y,
|
||||
position.z,
|
||||
"icbm.explosion",
|
||||
"icbm:explosion",
|
||||
10.0f,
|
||||
(1.0f + (worldObj.rand.nextFloat() - worldObj.rand.nextFloat()) * 0.2f) * 0.7f
|
||||
);
|
||||
|
@ -152,7 +152,7 @@ public class ExNuclear extends ExThr {
|
|||
(double) (int) position.x,
|
||||
(double) (int) position.y,
|
||||
(double) (int) position.z,
|
||||
"icbm.alarm",
|
||||
"icbm:alarm",
|
||||
4.0f,
|
||||
1.0f
|
||||
);
|
||||
|
|
|
@ -91,7 +91,7 @@ public class ExPushPull extends ZhaPin {
|
|||
position.x,
|
||||
position.y,
|
||||
position.z,
|
||||
"random.explode",
|
||||
"random:explode",
|
||||
4.0f,
|
||||
(1.0f + (worldObj.rand.nextFloat() - worldObj.rand.nextFloat()) * 0.2f) * 0.7f
|
||||
);
|
||||
|
|
|
@ -242,7 +242,7 @@ public class ExRedMatter extends ZhaPin {
|
|||
position.x,
|
||||
position.y,
|
||||
position.z,
|
||||
"icbm.explosion",
|
||||
"icbm:explosion",
|
||||
7.0f,
|
||||
(1.0f + (worldObj.rand.nextFloat() - worldObj.rand.nextFloat()) * 0.2f
|
||||
) * 0.7f
|
||||
|
@ -266,7 +266,7 @@ public class ExRedMatter extends ZhaPin {
|
|||
position.x + (Math.random() - 0.5) * radius,
|
||||
position.y + (Math.random() - 0.5) * radius,
|
||||
position.z + (Math.random() - 0.5) * radius,
|
||||
"icbm.collapse",
|
||||
"icbm:collapse",
|
||||
6.0f - worldObj.rand.nextFloat(),
|
||||
1.0f - worldObj.rand.nextFloat() * 0.4f
|
||||
);
|
||||
|
@ -276,7 +276,7 @@ public class ExRedMatter extends ZhaPin {
|
|||
position.x,
|
||||
position.y,
|
||||
position.z,
|
||||
"icbm.redmatter",
|
||||
"icbm:redmatter",
|
||||
3.0f,
|
||||
(1.0f + (worldObj.rand.nextFloat() - worldObj.rand.nextFloat()) * 0.2f) * 1.0f
|
||||
);
|
||||
|
|
|
@ -110,7 +110,7 @@ public class ExSonic extends ZhaPin {
|
|||
position.x,
|
||||
position.y,
|
||||
position.z,
|
||||
"icbm.sonicwave",
|
||||
"icbm:sonicwave",
|
||||
4.0f,
|
||||
(1.0f + (worldObj.rand.nextFloat() - worldObj.rand.nextFloat()) * 0.2f) * 0.7f
|
||||
);
|
||||
|
|
|
@ -43,7 +43,7 @@ public class ExThermobaric extends ExThr {
|
|||
position.x,
|
||||
position.y,
|
||||
position.z,
|
||||
"icbm.explosion",
|
||||
"icbm:explosion",
|
||||
7.0f,
|
||||
(1.0f + (worldObj.rand.nextFloat() - worldObj.rand.nextFloat()) * 0.2f) * 0.7f
|
||||
);
|
||||
|
@ -128,7 +128,7 @@ public class ExThermobaric extends ExThr {
|
|||
position.x,
|
||||
position.y,
|
||||
position.z,
|
||||
"icbm.explosion",
|
||||
"icbm:explosion",
|
||||
10.0f,
|
||||
(1.0f + (worldObj.rand.nextFloat() - worldObj.rand.nextFloat()) * 0.2f) * 0.7f
|
||||
);
|
||||
|
|
|
@ -0,0 +1,263 @@
|
|||
{
|
||||
"aagun": {
|
||||
"category": "master",
|
||||
"sounds": [
|
||||
{
|
||||
"name": "aagun",
|
||||
"stream": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"airstrike": {
|
||||
"category": "master",
|
||||
"sounds": [
|
||||
{
|
||||
"name": "airstrike",
|
||||
"stream": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"alarm": {
|
||||
"category": "master",
|
||||
"sounds": [
|
||||
{
|
||||
"name": "alarm",
|
||||
"stream": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"antigravity": {
|
||||
"category": "master",
|
||||
"sounds": [
|
||||
{
|
||||
"name": "antigravity",
|
||||
"stream": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"antimatter": {
|
||||
"category": "master",
|
||||
"sounds": [
|
||||
{
|
||||
"name": "antimatter",
|
||||
"stream": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"beamcharging": {
|
||||
"category": "master",
|
||||
"sounds": [
|
||||
{
|
||||
"name": "beamcharging",
|
||||
"stream": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"collapse": {
|
||||
"category": "master",
|
||||
"sounds": [
|
||||
{
|
||||
"name": "collapse1",
|
||||
"stream": false
|
||||
},
|
||||
{
|
||||
"name": "collapse2",
|
||||
"stream": false
|
||||
},
|
||||
{
|
||||
"name": "collapse2",
|
||||
"stream": false
|
||||
},
|
||||
{
|
||||
"name": "collapse3",
|
||||
"stream": false
|
||||
},
|
||||
{
|
||||
"name": "collapse4",
|
||||
"stream": false
|
||||
},
|
||||
{
|
||||
"name": "collapse5",
|
||||
"stream": false
|
||||
},
|
||||
{
|
||||
"name": "collapse6",
|
||||
"stream": false
|
||||
},
|
||||
{
|
||||
"name": "collapse8",
|
||||
"stream": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"debilitation": {
|
||||
"category": "master",
|
||||
"sounds": [
|
||||
{
|
||||
"name": "debilitation",
|
||||
"stream": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"emp": {
|
||||
"category": "master",
|
||||
"sounds": [
|
||||
{
|
||||
"name": "emp",
|
||||
"stream": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"explosion": {
|
||||
"category": "master",
|
||||
"sounds": [
|
||||
{
|
||||
"name": "explosion1",
|
||||
"stream": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"explosionfire": {
|
||||
"category": "master",
|
||||
"sounds": [
|
||||
{
|
||||
"name": "explosionfire",
|
||||
"stream": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"gasleak": {
|
||||
"category": "master",
|
||||
"sounds": [
|
||||
{
|
||||
"name": "gasleak",
|
||||
"stream": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"hypersonic": {
|
||||
"category": "master",
|
||||
"sounds": [
|
||||
{
|
||||
"name": "hypersonic",
|
||||
"stream": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"laser": {
|
||||
"category": "master",
|
||||
"sounds": [
|
||||
{
|
||||
"name": "laser",
|
||||
"stream": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"lasershot": {
|
||||
"category": "master",
|
||||
"sounds": [
|
||||
{
|
||||
"name": "lasershot",
|
||||
"stream": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"machinegun": {
|
||||
"category": "master",
|
||||
"sounds": [
|
||||
{
|
||||
"name": "machinegun1",
|
||||
"stream": false
|
||||
},
|
||||
{
|
||||
"name": "machinegun2",
|
||||
"stream": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"machinehum": {
|
||||
"category": "master",
|
||||
"sounds": [
|
||||
{
|
||||
"name": "machinehum",
|
||||
"stream": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"missileinair": {
|
||||
"category": "master",
|
||||
"sounds": [
|
||||
{
|
||||
"name": "missileinair",
|
||||
"stream": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"missilelaunch": {
|
||||
"category": "master",
|
||||
"sounds": [
|
||||
{
|
||||
"name": "missilelaunch1",
|
||||
"stream": false
|
||||
},
|
||||
{
|
||||
"name": "missilelaunch2",
|
||||
"stream": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"powerdown": {
|
||||
"category": "master",
|
||||
"sounds": [
|
||||
{
|
||||
"name": "powerdown",
|
||||
"stream": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"radaralarm": {
|
||||
"category": "master",
|
||||
"sounds": [
|
||||
{
|
||||
"name": "radaralarm",
|
||||
"stream": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"railgun": {
|
||||
"category": "master",
|
||||
"sounds": [
|
||||
{
|
||||
"name": "railgun",
|
||||
"stream": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"redmatter": {
|
||||
"category": "master",
|
||||
"sounds": [
|
||||
{
|
||||
"name": "redmatter",
|
||||
"stream": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"sonicwave": {
|
||||
"category": "master",
|
||||
"sounds": [
|
||||
{
|
||||
"name": "sonicwave",
|
||||
"stream": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"targetlocked": {
|
||||
"category": "master",
|
||||
"sounds": [
|
||||
{
|
||||
"name": "targetlocked",
|
||||
"stream": false
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue