mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-02-09 06:18:20 +08:00
Fix whitespace [skip actions]
This commit is contained in:
parent
08f361954a
commit
e9f5d98466
@ -53,7 +53,7 @@ public class EntityGadget extends EntityBaseGadget {
|
||||
public EntityGadget(Scene scene, int gadgetId, Position pos, Position rot) {
|
||||
super(scene);
|
||||
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.id = getScene().getWorld().getNextEntityId(EntityIdType.GADGET);
|
||||
|
@ -293,7 +293,7 @@ public class EntityMonster extends GameEntity {
|
||||
|
||||
monsterInfo.addWeaponList(weaponInfo);
|
||||
}
|
||||
if(this.aiId!=-1){
|
||||
if (this.aiId!=-1) {
|
||||
monsterInfo.setAiConfigId(aiId);
|
||||
}
|
||||
|
||||
|
@ -626,10 +626,10 @@ public class TeamManager extends BasePlayerDataManager {
|
||||
}
|
||||
|
||||
// Teleport player and set player position
|
||||
try{
|
||||
try {
|
||||
this.getPlayer().sendPacket(new PacketPlayerEnterSceneNotify(this.getPlayer(), EnterType.ENTER_TYPE_SELF, EnterReason.Revival, player.getSceneId(), 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));
|
||||
player.getPosition().set(GameConstants.START_POSITION); // If something goes wrong, the resurrection is here
|
||||
}
|
||||
|
@ -8,60 +8,60 @@ import it.unimi.dsi.fastutil.ints.Int2ObjectMap;
|
||||
import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap;
|
||||
|
||||
public enum EntityType {
|
||||
None (0),
|
||||
Avatar (1),
|
||||
Monster (2),
|
||||
Bullet (3),
|
||||
AttackPhyisicalUnit (4),
|
||||
AOE (5),
|
||||
Camera (6),
|
||||
EnviroArea (7),
|
||||
Equip (8),
|
||||
MonsterEquip (9),
|
||||
Grass (10),
|
||||
Level (11),
|
||||
NPC (12),
|
||||
TransPointFirst (13),
|
||||
TransPointFirstGadget (14),
|
||||
TransPointSecond (15),
|
||||
TransPointSecondGadget (16),
|
||||
DropItem (17),
|
||||
Field (18),
|
||||
Gadget (19),
|
||||
Water (20),
|
||||
GatherPoint (21),
|
||||
GatherObject (22),
|
||||
AirflowField (23),
|
||||
SpeedupField (24),
|
||||
Gear (25),
|
||||
Chest (26),
|
||||
EnergyBall (27),
|
||||
ElemCrystal (28),
|
||||
Timeline (29),
|
||||
Worktop (30),
|
||||
Team (31),
|
||||
Platform (32),
|
||||
AmberWind (33),
|
||||
EnvAnimal (34),
|
||||
SealGadget (35),
|
||||
Tree (36),
|
||||
Bush (37),
|
||||
QuestGadget (38),
|
||||
Lightning (39),
|
||||
RewardPoint (40),
|
||||
RewardStatue (41),
|
||||
MPLevel (42),
|
||||
WindSeed (43),
|
||||
MpPlayRewardPoint (44),
|
||||
ViewPoint (45),
|
||||
RemoteAvatar (46),
|
||||
GeneralRewardPoint (47),
|
||||
PlayTeam (48),
|
||||
OfferingGadget (49),
|
||||
EyePoint (50),
|
||||
MiracleRing (51),
|
||||
Foundation (52),
|
||||
WidgetGadget (53),
|
||||
None (0),
|
||||
Avatar (1),
|
||||
Monster (2),
|
||||
Bullet (3),
|
||||
AttackPhyisicalUnit (4),
|
||||
AOE (5),
|
||||
Camera (6),
|
||||
EnviroArea (7),
|
||||
Equip (8),
|
||||
MonsterEquip (9),
|
||||
Grass (10),
|
||||
Level (11),
|
||||
NPC (12),
|
||||
TransPointFirst (13),
|
||||
TransPointFirstGadget (14),
|
||||
TransPointSecond (15),
|
||||
TransPointSecondGadget (16),
|
||||
DropItem (17),
|
||||
Field (18),
|
||||
Gadget (19),
|
||||
Water (20),
|
||||
GatherPoint (21),
|
||||
GatherObject (22),
|
||||
AirflowField (23),
|
||||
SpeedupField (24),
|
||||
Gear (25),
|
||||
Chest (26),
|
||||
EnergyBall (27),
|
||||
ElemCrystal (28),
|
||||
Timeline (29),
|
||||
Worktop (30),
|
||||
Team (31),
|
||||
Platform (32),
|
||||
AmberWind (33),
|
||||
EnvAnimal (34),
|
||||
SealGadget (35),
|
||||
Tree (36),
|
||||
Bush (37),
|
||||
QuestGadget (38),
|
||||
Lightning (39),
|
||||
RewardPoint (40),
|
||||
RewardStatue (41),
|
||||
MPLevel (42),
|
||||
WindSeed (43),
|
||||
MpPlayRewardPoint (44),
|
||||
ViewPoint (45),
|
||||
RemoteAvatar (46),
|
||||
GeneralRewardPoint (47),
|
||||
PlayTeam (48),
|
||||
OfferingGadget (49),
|
||||
EyePoint (50),
|
||||
MiracleRing (51),
|
||||
Foundation (52),
|
||||
WidgetGadget (53),
|
||||
Vehicle (54),
|
||||
SubEquip (55),
|
||||
FishRod (56),
|
||||
@ -75,32 +75,32 @@ public enum EntityType {
|
||||
Screen (64),
|
||||
EchoShell (65),
|
||||
UIInteractGadget (66),
|
||||
PlaceHolder (99);
|
||||
PlaceHolder (99);
|
||||
|
||||
private final int value;
|
||||
private static final Int2ObjectMap<EntityType> map = new Int2ObjectOpenHashMap<>();
|
||||
private static final Map<String, EntityType> stringMap = new HashMap<>();
|
||||
private final int value;
|
||||
private static final Int2ObjectMap<EntityType> map = new Int2ObjectOpenHashMap<>();
|
||||
private static final Map<String, EntityType> stringMap = new HashMap<>();
|
||||
|
||||
static {
|
||||
Stream.of(values()).forEach(e -> {
|
||||
map.put(e.getValue(), e);
|
||||
stringMap.put(e.name(), e);
|
||||
});
|
||||
}
|
||||
static {
|
||||
Stream.of(values()).forEach(e -> {
|
||||
map.put(e.getValue(), e);
|
||||
stringMap.put(e.name(), e);
|
||||
});
|
||||
}
|
||||
|
||||
private EntityType(int value) {
|
||||
this.value = value;
|
||||
}
|
||||
private EntityType(int value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public int getValue() {
|
||||
return value;
|
||||
}
|
||||
public int getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public static EntityType getTypeByValue(int value) {
|
||||
return map.getOrDefault(value, None);
|
||||
}
|
||||
public static EntityType getTypeByValue(int value) {
|
||||
return map.getOrDefault(value, None);
|
||||
}
|
||||
|
||||
public static EntityType getTypeByName(String name) {
|
||||
return stringMap.getOrDefault(name, None);
|
||||
}
|
||||
public static EntityType getTypeByName(String name) {
|
||||
return stringMap.getOrDefault(name, None);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user