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
|
- flying blocks dont properly render
|
||||||
- black hole doesn't suck in blocks
|
- black hole doesn't suck in blocks
|
||||||
- remote detonator doesnt work
|
- remote detonator doesnt work
|
||||||
- emp tower only deletes missiles on client
|
|
||||||
|
|
||||||
- see `// TODO: WTF`
|
- see `// TODO: WTF`
|
||||||
|
|
|
@ -576,7 +576,7 @@ public class EMissile extends Entity
|
||||||
|
|
||||||
public void explode() {
|
public void explode() {
|
||||||
try {
|
try {
|
||||||
if (!this.exploded) {
|
if (!this.exploded && !this.isDead) {
|
||||||
if (this.missileId == 0) {
|
if (this.missileId == 0) {
|
||||||
if (!super.worldObj.isRemote) {
|
if (!super.worldObj.isRemote) {
|
||||||
super.worldObj.createExplosion(
|
super.worldObj.createExplosion(
|
||||||
|
|
|
@ -82,6 +82,7 @@ public class TLauncherControlPanel
|
||||||
nbt.setInteger("frequency", this.getFrequency());
|
nbt.setInteger("frequency", this.getFrequency());
|
||||||
nbt.setShort("height", this.height);
|
nbt.setShort("height", this.height);
|
||||||
nbt.setInteger("disabledTicks", this.disabledTicks);
|
nbt.setInteger("disabledTicks", this.disabledTicks);
|
||||||
|
if (super.target != null)
|
||||||
nbt.setTag("target", super.target.writeToNBT(new NBTTagCompound()));
|
nbt.setTag("target", super.target.writeToNBT(new NBTTagCompound()));
|
||||||
|
|
||||||
return new S35PacketUpdateTileEntity(
|
return new S35PacketUpdateTileEntity(
|
||||||
|
@ -106,6 +107,7 @@ public class TLauncherControlPanel
|
||||||
this.setFrequency(nbt.getInteger("frequency"));
|
this.setFrequency(nbt.getInteger("frequency"));
|
||||||
this.height = nbt.getShort("height");
|
this.height = nbt.getShort("height");
|
||||||
this.disabledTicks = nbt.getInteger("disabledTicks");
|
this.disabledTicks = nbt.getInteger("disabledTicks");
|
||||||
|
if (nbt.hasKey("target"))
|
||||||
super.target = Vector3.readFromNBT(nbt.getCompoundTag("target"));
|
super.target = Vector3.readFromNBT(nbt.getCompoundTag("target"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue