mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-12-17 09:25:06 +01:00
Fix whitespace [skip actions]
This commit is contained in:
@@ -11,18 +11,18 @@ import emu.grasscutter.server.game.GameSession;
|
||||
@Opcodes(PacketOpcodes.EvtCreateGadgetNotify)
|
||||
public class HandlerEvtCreateGadgetNotify extends PacketHandler {
|
||||
|
||||
@Override
|
||||
public void handle(GameSession session, byte[] header, byte[] payload) throws Exception {
|
||||
EvtCreateGadgetNotify notify = EvtCreateGadgetNotify.parseFrom(payload);
|
||||
@Override
|
||||
public void handle(GameSession session, byte[] header, byte[] payload) throws Exception {
|
||||
EvtCreateGadgetNotify notify = EvtCreateGadgetNotify.parseFrom(payload);
|
||||
|
||||
// Sanity check - dont add duplicate entities
|
||||
if (session.getPlayer().getScene().getEntityById(notify.getEntityId()) != null) {
|
||||
return;
|
||||
}
|
||||
// Sanity check - dont add duplicate entities
|
||||
if (session.getPlayer().getScene().getEntityById(notify.getEntityId()) != null) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Create entity and summon in world
|
||||
// Create entity and summon in world
|
||||
var gadgetId = notify.getConfigId();
|
||||
EntityClientGadget gadget = switch (gadgetId) {
|
||||
EntityClientGadget gadget = switch (gadgetId) {
|
||||
//Solar Isotoma.
|
||||
case EntitySolarIsotomaClientGadget.GADGET_ID ->
|
||||
new EntitySolarIsotomaClientGadget(session.getPlayer().getScene(), session.getPlayer(), notify);
|
||||
@@ -33,6 +33,6 @@ public class HandlerEvtCreateGadgetNotify extends PacketHandler {
|
||||
};
|
||||
|
||||
session.getPlayer().getScene().onPlayerCreateGadget(gadget);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -7,14 +7,14 @@ import emu.grasscutter.net.proto.SceneTimeNotifyOuterClass.SceneTimeNotify;
|
||||
|
||||
public class PacketSceneTimeNotify extends BasePacket {
|
||||
|
||||
public PacketSceneTimeNotify(Player player) {
|
||||
super(PacketOpcodes.SceneTimeNotify);
|
||||
public PacketSceneTimeNotify(Player player) {
|
||||
super(PacketOpcodes.SceneTimeNotify);
|
||||
|
||||
SceneTimeNotify proto = SceneTimeNotify.newBuilder()
|
||||
.setSceneId(player.getSceneId())
|
||||
.setSceneTime(player.getScene().getSceneTime())
|
||||
.build();
|
||||
SceneTimeNotify proto = SceneTimeNotify.newBuilder()
|
||||
.setSceneId(player.getSceneId())
|
||||
.setSceneTime(player.getScene().getSceneTime())
|
||||
.build();
|
||||
|
||||
this.setData(proto);
|
||||
}
|
||||
this.setData(proto);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user