Fix whitespace [skip actions]

This commit is contained in:
github-actions 2022-09-16 17:04:44 +00:00
parent 08f361954a
commit e9f5d98466
4 changed files with 80 additions and 80 deletions

View File

@ -53,7 +53,7 @@ public class EntityGadget extends EntityBaseGadget {
public EntityGadget(Scene scene, int gadgetId, Position pos, Position rot) { public EntityGadget(Scene scene, int gadgetId, Position pos, Position rot) {
super(scene); super(scene);
this.data = GameData.getGadgetDataMap().get(gadgetId); this.data = GameData.getGadgetDataMap().get(gadgetId);
if(data!=null && data.getJsonName()!=null) { if (data!=null && data.getJsonName()!=null) {
this.configGadget = GameData.getGadgetConfigData().get(data.getJsonName()); this.configGadget = GameData.getGadgetConfigData().get(data.getJsonName());
} }
this.id = getScene().getWorld().getNextEntityId(EntityIdType.GADGET); this.id = getScene().getWorld().getNextEntityId(EntityIdType.GADGET);

View File

@ -293,7 +293,7 @@ public class EntityMonster extends GameEntity {
monsterInfo.addWeaponList(weaponInfo); monsterInfo.addWeaponList(weaponInfo);
} }
if(this.aiId!=-1){ if (this.aiId!=-1) {
monsterInfo.setAiConfigId(aiId); monsterInfo.setAiConfigId(aiId);
} }

View File

@ -626,10 +626,10 @@ public class TeamManager extends BasePlayerDataManager {
} }
// Teleport player and set player position // Teleport player and set player position
try{ try {
this.getPlayer().sendPacket(new PacketPlayerEnterSceneNotify(this.getPlayer(), EnterType.ENTER_TYPE_SELF, EnterReason.Revival, player.getSceneId(), getRespawnPosition())); this.getPlayer().sendPacket(new PacketPlayerEnterSceneNotify(this.getPlayer(), EnterType.ENTER_TYPE_SELF, EnterReason.Revival, player.getSceneId(), getRespawnPosition()));
player.getPosition().set(getRespawnPosition()); player.getPosition().set(getRespawnPosition());
}catch(Exception e){ }catch (Exception e) {
this.getPlayer().sendPacket(new PacketPlayerEnterSceneNotify(this.getPlayer(), EnterType.ENTER_TYPE_SELF, EnterReason.Revival, 3, GameConstants.START_POSITION)); this.getPlayer().sendPacket(new PacketPlayerEnterSceneNotify(this.getPlayer(), EnterType.ENTER_TYPE_SELF, EnterReason.Revival, 3, GameConstants.START_POSITION));
player.getPosition().set(GameConstants.START_POSITION); // If something goes wrong, the resurrection is here player.getPosition().set(GameConstants.START_POSITION); // If something goes wrong, the resurrection is here
} }

View File

@ -8,60 +8,60 @@ import it.unimi.dsi.fastutil.ints.Int2ObjectMap;
import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap; import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap;
public enum EntityType { public enum EntityType {
None (0), None (0),
Avatar (1), Avatar (1),
Monster (2), Monster (2),
Bullet (3), Bullet (3),
AttackPhyisicalUnit (4), AttackPhyisicalUnit (4),
AOE (5), AOE (5),
Camera (6), Camera (6),
EnviroArea (7), EnviroArea (7),
Equip (8), Equip (8),
MonsterEquip (9), MonsterEquip (9),
Grass (10), Grass (10),
Level (11), Level (11),
NPC (12), NPC (12),
TransPointFirst (13), TransPointFirst (13),
TransPointFirstGadget (14), TransPointFirstGadget (14),
TransPointSecond (15), TransPointSecond (15),
TransPointSecondGadget (16), TransPointSecondGadget (16),
DropItem (17), DropItem (17),
Field (18), Field (18),
Gadget (19), Gadget (19),
Water (20), Water (20),
GatherPoint (21), GatherPoint (21),
GatherObject (22), GatherObject (22),
AirflowField (23), AirflowField (23),
SpeedupField (24), SpeedupField (24),
Gear (25), Gear (25),
Chest (26), Chest (26),
EnergyBall (27), EnergyBall (27),
ElemCrystal (28), ElemCrystal (28),
Timeline (29), Timeline (29),
Worktop (30), Worktop (30),
Team (31), Team (31),
Platform (32), Platform (32),
AmberWind (33), AmberWind (33),
EnvAnimal (34), EnvAnimal (34),
SealGadget (35), SealGadget (35),
Tree (36), Tree (36),
Bush (37), Bush (37),
QuestGadget (38), QuestGadget (38),
Lightning (39), Lightning (39),
RewardPoint (40), RewardPoint (40),
RewardStatue (41), RewardStatue (41),
MPLevel (42), MPLevel (42),
WindSeed (43), WindSeed (43),
MpPlayRewardPoint (44), MpPlayRewardPoint (44),
ViewPoint (45), ViewPoint (45),
RemoteAvatar (46), RemoteAvatar (46),
GeneralRewardPoint (47), GeneralRewardPoint (47),
PlayTeam (48), PlayTeam (48),
OfferingGadget (49), OfferingGadget (49),
EyePoint (50), EyePoint (50),
MiracleRing (51), MiracleRing (51),
Foundation (52), Foundation (52),
WidgetGadget (53), WidgetGadget (53),
Vehicle (54), Vehicle (54),
SubEquip (55), SubEquip (55),
FishRod (56), FishRod (56),
@ -75,32 +75,32 @@ public enum EntityType {
Screen (64), Screen (64),
EchoShell (65), EchoShell (65),
UIInteractGadget (66), UIInteractGadget (66),
PlaceHolder (99); PlaceHolder (99);
private final int value; private final int value;
private static final Int2ObjectMap<EntityType> map = new Int2ObjectOpenHashMap<>(); private static final Int2ObjectMap<EntityType> map = new Int2ObjectOpenHashMap<>();
private static final Map<String, EntityType> stringMap = new HashMap<>(); private static final Map<String, EntityType> stringMap = new HashMap<>();
static { static {
Stream.of(values()).forEach(e -> { Stream.of(values()).forEach(e -> {
map.put(e.getValue(), e); map.put(e.getValue(), e);
stringMap.put(e.name(), e); stringMap.put(e.name(), e);
}); });
} }
private EntityType(int value) { private EntityType(int value) {
this.value = value; this.value = value;
} }
public int getValue() { public int getValue() {
return value; return value;
} }
public static EntityType getTypeByValue(int value) { public static EntityType getTypeByValue(int value) {
return map.getOrDefault(value, None); return map.getOrDefault(value, None);
} }
public static EntityType getTypeByName(String name) { public static EntityType getTypeByName(String name) {
return stringMap.getOrDefault(name, None); return stringMap.getOrDefault(name, None);
} }
} }