傻逼UUID😅
This commit is contained in:
parent
d57bd9016a
commit
b4ea5bb23a
6 changed files with 59 additions and 26 deletions
|
@ -1,5 +1,6 @@
|
|||
package com.atsuishio.superbwarfare.entity;
|
||||
|
||||
import com.atsuishio.superbwarfare.Mod;
|
||||
import com.atsuishio.superbwarfare.entity.vehicle.damage.DamageModifier;
|
||||
import com.atsuishio.superbwarfare.init.ModDamageTypes;
|
||||
import com.atsuishio.superbwarfare.init.ModEntities;
|
||||
|
@ -125,10 +126,15 @@ public class Blu43Entity extends Entity implements GeoEntity, OwnableEntity {
|
|||
} else {
|
||||
String s = compound.getString("Owner");
|
||||
|
||||
if (this.getServer() == null) {
|
||||
uuid = UUID.fromString(s);
|
||||
} else {
|
||||
uuid = OldUsersConverter.convertMobOwnerIfNecessary(this.getServer(), s);
|
||||
try {
|
||||
if (this.getServer() == null) {
|
||||
uuid = UUID.fromString(s);
|
||||
} else {
|
||||
uuid = OldUsersConverter.convertMobOwnerIfNecessary(this.getServer(), s);
|
||||
}
|
||||
} catch (Exception exception) {
|
||||
Mod.LOGGER.error("Couldn't load owner UUID of {}: {}", this, exception);
|
||||
uuid = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -130,10 +130,15 @@ public class ClaymoreEntity extends Entity implements GeoEntity, OwnableEntity {
|
|||
} else {
|
||||
String s = compound.getString("Owner");
|
||||
|
||||
if (this.getServer() == null) {
|
||||
uuid = UUID.fromString(s);
|
||||
} else {
|
||||
uuid = OldUsersConverter.convertMobOwnerIfNecessary(this.getServer(), s);
|
||||
try {
|
||||
if (this.getServer() == null) {
|
||||
uuid = UUID.fromString(s);
|
||||
} else {
|
||||
uuid = OldUsersConverter.convertMobOwnerIfNecessary(this.getServer(), s);
|
||||
}
|
||||
} catch (Exception exception) {
|
||||
Mod.LOGGER.error("Couldn't load owner UUID of {}: {}", this, exception);
|
||||
uuid = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package com.atsuishio.superbwarfare.entity;
|
||||
|
||||
import com.atsuishio.superbwarfare.Mod;
|
||||
import com.atsuishio.superbwarfare.config.server.ExplosionConfig;
|
||||
import com.atsuishio.superbwarfare.entity.vehicle.damage.DamageModifier;
|
||||
import com.atsuishio.superbwarfare.init.ModDamageTypes;
|
||||
|
@ -134,10 +135,15 @@ public class Tm62Entity extends Entity implements GeoEntity, OwnableEntity {
|
|||
} else {
|
||||
String s = compound.getString("Owner");
|
||||
|
||||
if (this.getServer() == null) {
|
||||
uuid = UUID.fromString(s);
|
||||
} else {
|
||||
uuid = OldUsersConverter.convertMobOwnerIfNecessary(this.getServer(), s);
|
||||
try {
|
||||
if (this.getServer() == null) {
|
||||
uuid = UUID.fromString(s);
|
||||
} else {
|
||||
uuid = OldUsersConverter.convertMobOwnerIfNecessary(this.getServer(), s);
|
||||
}
|
||||
} catch (Exception exception) {
|
||||
Mod.LOGGER.error("Couldn't load owner UUID of {}: {}", this, exception);
|
||||
uuid = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package com.atsuishio.superbwarfare.entity.projectile;
|
||||
|
||||
import com.atsuishio.superbwarfare.Mod;
|
||||
import com.atsuishio.superbwarfare.config.server.ExplosionConfig;
|
||||
import com.atsuishio.superbwarfare.init.ModDamageTypes;
|
||||
import com.atsuishio.superbwarfare.init.ModEntities;
|
||||
|
@ -144,10 +145,15 @@ public class C4Entity extends Entity implements GeoEntity, OwnableEntity {
|
|||
} else {
|
||||
String s = compound.getString("Owner");
|
||||
|
||||
if (this.getServer() == null) {
|
||||
uuid = UUID.fromString(s);
|
||||
} else {
|
||||
uuid = OldUsersConverter.convertMobOwnerIfNecessary(this.getServer(), s);
|
||||
try {
|
||||
if (this.getServer() == null) {
|
||||
uuid = UUID.fromString(s);
|
||||
} else {
|
||||
uuid = OldUsersConverter.convertMobOwnerIfNecessary(this.getServer(), s);
|
||||
}
|
||||
} catch (Exception exception) {
|
||||
Mod.LOGGER.error("Couldn't load owner UUID of {}: {}", this, exception);
|
||||
uuid = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -110,7 +110,7 @@ public class Hpj11Entity extends ContainerMobileVehicleEntity implements GeoEnti
|
|||
}
|
||||
|
||||
@Override
|
||||
public void addAdditionalSaveData(CompoundTag compound) {
|
||||
public void addAdditionalSaveData(@NotNull CompoundTag compound) {
|
||||
super.addAdditionalSaveData(compound);
|
||||
compound.putInt("AnimTime", this.entityData.get(ANIM_TIME));
|
||||
compound.putBoolean("Active", this.entityData.get(ACTIVE));
|
||||
|
@ -120,7 +120,7 @@ public class Hpj11Entity extends ContainerMobileVehicleEntity implements GeoEnti
|
|||
}
|
||||
|
||||
@Override
|
||||
public void readAdditionalSaveData(CompoundTag compound) {
|
||||
public void readAdditionalSaveData(@NotNull CompoundTag compound) {
|
||||
super.readAdditionalSaveData(compound);
|
||||
this.entityData.set(ANIM_TIME, compound.getInt("AnimTime"));
|
||||
this.entityData.set(ACTIVE, compound.getBoolean("Active"));
|
||||
|
@ -131,10 +131,15 @@ public class Hpj11Entity extends ContainerMobileVehicleEntity implements GeoEnti
|
|||
} else {
|
||||
String s = compound.getString("Owner");
|
||||
|
||||
if (this.getServer() == null) {
|
||||
uuid = UUID.fromString(s);
|
||||
} else {
|
||||
uuid = OldUsersConverter.convertMobOwnerIfNecessary(this.getServer(), s);
|
||||
try {
|
||||
if (this.getServer() == null) {
|
||||
uuid = UUID.fromString(s);
|
||||
} else {
|
||||
uuid = OldUsersConverter.convertMobOwnerIfNecessary(this.getServer(), s);
|
||||
}
|
||||
} catch (Exception exception) {
|
||||
Mod.LOGGER.error("Couldn't load owner UUID of {}: {}", this, exception);
|
||||
uuid = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -110,10 +110,15 @@ public class LaserTowerEntity extends VehicleEntity implements GeoEntity, Ownabl
|
|||
} else {
|
||||
String s = compound.getString("Owner");
|
||||
|
||||
if (this.getServer() == null) {
|
||||
uuid = UUID.fromString(s);
|
||||
} else {
|
||||
uuid = OldUsersConverter.convertMobOwnerIfNecessary(this.getServer(), s);
|
||||
try {
|
||||
if (this.getServer() == null) {
|
||||
uuid = UUID.fromString(s);
|
||||
} else {
|
||||
uuid = OldUsersConverter.convertMobOwnerIfNecessary(this.getServer(), s);
|
||||
}
|
||||
} catch (Exception exception) {
|
||||
Mod.LOGGER.error("Couldn't load owner UUID of {}: {}", this, exception);
|
||||
uuid = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue