mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-12-22 20:04:56 +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);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user