Run IntelliJ IDEA code formatter

This commit is contained in:
KingRainbow44
2023-03-31 17:19:26 -04:00
Unverified
parent 5bf5fb07a2
commit 15e2f3ca34
917 changed files with 30025 additions and 22441 deletions
@@ -8,58 +8,60 @@ import emu.grasscutter.net.proto.LifeStateChangeNotifyOuterClass.LifeStateChange
import emu.grasscutter.net.proto.PlayerDieTypeOuterClass.PlayerDieType;
public class PacketLifeStateChangeNotify extends BasePacket {
public PacketLifeStateChangeNotify(GameEntity target, LifeState lifeState) {
super(PacketOpcodes.LifeStateChangeNotify);
public PacketLifeStateChangeNotify(GameEntity target, LifeState lifeState) {
super(PacketOpcodes.LifeStateChangeNotify);
LifeStateChangeNotify proto = LifeStateChangeNotify.newBuilder()
.setEntityId(target.getId())
.setLifeState(lifeState.getValue())
.build();
LifeStateChangeNotify proto = LifeStateChangeNotify.newBuilder()
.setEntityId(target.getId())
.setLifeState(lifeState.getValue())
.build();
this.setData(proto);
}
public PacketLifeStateChangeNotify(GameEntity attacker, GameEntity target, LifeState lifeState) {
super(PacketOpcodes.LifeStateChangeNotify);
this.setData(proto);
}
LifeStateChangeNotify proto = LifeStateChangeNotify.newBuilder()
.setEntityId(target.getId())
.setLifeState(lifeState.getValue())
.setSourceEntityId(attacker.getId())
.build();
this.setData(proto);
}
public PacketLifeStateChangeNotify(int attackerId, GameEntity target, LifeState lifeState) {
super(PacketOpcodes.LifeStateChangeNotify);
public PacketLifeStateChangeNotify(GameEntity attacker, GameEntity target, LifeState lifeState) {
super(PacketOpcodes.LifeStateChangeNotify);
LifeStateChangeNotify proto = LifeStateChangeNotify.newBuilder()
.setEntityId(target.getId())
.setLifeState(lifeState.getValue())
.setSourceEntityId(attackerId)
.build();
LifeStateChangeNotify proto = LifeStateChangeNotify.newBuilder()
.setEntityId(target.getId())
.setLifeState(lifeState.getValue())
.setSourceEntityId(attacker.getId())
.build();
this.setData(proto);
}
this.setData(proto);
}
public PacketLifeStateChangeNotify(GameEntity entity, LifeState lifeState, PlayerDieType dieType) {
this(entity, lifeState, null, "", dieType);
}
public PacketLifeStateChangeNotify(int attackerId, GameEntity target, LifeState lifeState) {
super(PacketOpcodes.LifeStateChangeNotify);
public PacketLifeStateChangeNotify(GameEntity entity, LifeState lifeState, GameEntity sourceEntity,
String attackTag, PlayerDieType dieType) {
super(PacketOpcodes.LifeStateChangeNotify);
LifeStateChangeNotify proto = LifeStateChangeNotify.newBuilder()
.setEntityId(target.getId())
.setLifeState(lifeState.getValue())
.setSourceEntityId(attackerId)
.build();
LifeStateChangeNotify.Builder proto = LifeStateChangeNotify.newBuilder();
this.setData(proto);
}
public PacketLifeStateChangeNotify(GameEntity entity, LifeState lifeState, PlayerDieType dieType) {
this(entity, lifeState, null, "", dieType);
}
public PacketLifeStateChangeNotify(GameEntity entity, LifeState lifeState, GameEntity sourceEntity,
String attackTag, PlayerDieType dieType) {
super(PacketOpcodes.LifeStateChangeNotify);
LifeStateChangeNotify.Builder proto = LifeStateChangeNotify.newBuilder();
proto.setEntityId(entity.getId());
proto.setLifeState(lifeState.getValue());
if (sourceEntity != null) {
proto.setSourceEntityId(sourceEntity.getId());
}
proto.setAttackTag(attackTag);
proto.setDieType(dieType);
proto.setEntityId(entity.getId());
proto.setLifeState(lifeState.getValue());
if (sourceEntity != null) {
proto.setSourceEntityId(sourceEntity.getId());
}
proto.setAttackTag(attackTag);
proto.setDieType(dieType);
this.setData(proto.build());
}
this.setData(proto.build());
}
}