generated from tilera/1710mod
fix: EMP tower properly deletes missiles
This commit is contained in:
parent
dece854363
commit
9a42fed16c
|
@ -7,6 +7,5 @@
|
|||
- flying blocks dont properly render
|
||||
- black hole doesn't suck in blocks
|
||||
- remote detonator doesnt work
|
||||
- emp tower only deletes missiles on client
|
||||
|
||||
- see `// TODO: WTF`
|
||||
|
|
|
@ -576,7 +576,7 @@ public class EMissile extends Entity
|
|||
|
||||
public void explode() {
|
||||
try {
|
||||
if (!this.exploded) {
|
||||
if (!this.exploded && !this.isDead) {
|
||||
if (this.missileId == 0) {
|
||||
if (!super.worldObj.isRemote) {
|
||||
super.worldObj.createExplosion(
|
||||
|
|
|
@ -82,7 +82,8 @@ public class TLauncherControlPanel
|
|||
nbt.setInteger("frequency", this.getFrequency());
|
||||
nbt.setShort("height", this.height);
|
||||
nbt.setInteger("disabledTicks", this.disabledTicks);
|
||||
nbt.setTag("target", super.target.writeToNBT(new NBTTagCompound()));
|
||||
if (super.target != null)
|
||||
nbt.setTag("target", super.target.writeToNBT(new NBTTagCompound()));
|
||||
|
||||
return new S35PacketUpdateTileEntity(
|
||||
this.xCoord, this.yCoord, this.zCoord, this.getBlockMetadata(), nbt
|
||||
|
@ -106,7 +107,8 @@ public class TLauncherControlPanel
|
|||
this.setFrequency(nbt.getInteger("frequency"));
|
||||
this.height = nbt.getShort("height");
|
||||
this.disabledTicks = nbt.getInteger("disabledTicks");
|
||||
super.target = Vector3.readFromNBT(nbt.getCompoundTag("target"));
|
||||
if (nbt.hasKey("target"))
|
||||
super.target = Vector3.readFromNBT(nbt.getCompoundTag("target"));
|
||||
}
|
||||
|
||||
// TODO: WTF
|
||||
|
|
Loading…
Reference in New Issue