mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2026-02-08 02:56:45 +01:00
Run Spotless on src/main
This commit is contained in:
@@ -1,23 +1,21 @@
|
||||
package emu.grasscutter.data.binout;
|
||||
|
||||
public class AbilityEmbryoEntry {
|
||||
private String name;
|
||||
private String[] abilities;
|
||||
|
||||
public AbilityEmbryoEntry() {
|
||||
|
||||
}
|
||||
|
||||
public AbilityEmbryoEntry(String avatarName, String[] array) {
|
||||
this.name = avatarName;
|
||||
this.abilities = array;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public String[] getAbilities() {
|
||||
return abilities;
|
||||
}
|
||||
}
|
||||
package emu.grasscutter.data.binout;
|
||||
|
||||
public class AbilityEmbryoEntry {
|
||||
private String name;
|
||||
private String[] abilities;
|
||||
|
||||
public AbilityEmbryoEntry() {}
|
||||
|
||||
public AbilityEmbryoEntry(String avatarName, String[] array) {
|
||||
this.name = avatarName;
|
||||
this.abilities = array;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public String[] getAbilities() {
|
||||
return abilities;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,97 +1,270 @@
|
||||
package emu.grasscutter.data.binout;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import emu.grasscutter.data.common.DynamicFloat;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class AbilityModifier implements Serializable {
|
||||
private static final long serialVersionUID = -2001232313615923575L;
|
||||
|
||||
@SerializedName(value = "onAdded", alternate = {"KCICDEJLIJD"})
|
||||
public AbilityModifierAction[] onAdded;
|
||||
@SerializedName(value = "onThinkInterval", alternate = {"PBDDACFFPOE"})
|
||||
public AbilityModifierAction[] onThinkInterval;
|
||||
public AbilityModifierAction[] onRemoved;
|
||||
public DynamicFloat duration = DynamicFloat.ZERO;
|
||||
|
||||
public static class AbilityModifierAction {
|
||||
@SerializedName("$type")
|
||||
public Type type;
|
||||
public String target;
|
||||
@SerializedName(value = "amount", alternate = "PDLLIFICICJ")
|
||||
public DynamicFloat amount = DynamicFloat.ZERO;
|
||||
public DynamicFloat amountByCasterAttackRatio = DynamicFloat.ZERO;
|
||||
public DynamicFloat amountByCasterCurrentHPRatio = DynamicFloat.ZERO;
|
||||
public DynamicFloat amountByCasterMaxHPRatio = DynamicFloat.ZERO;
|
||||
public DynamicFloat amountByGetDamage = DynamicFloat.ZERO;
|
||||
public DynamicFloat amountByTargetCurrentHPRatio = DynamicFloat.ZERO;
|
||||
public DynamicFloat amountByTargetMaxHPRatio = DynamicFloat.ZERO;
|
||||
@SerializedName(value = "ignoreAbilityProperty", alternate = "HHFGADCJJDI")
|
||||
public boolean ignoreAbilityProperty;
|
||||
public String modifierName;
|
||||
public enum Type {
|
||||
ActCameraRadialBlur, ActCameraShake, AddAvatarSkillInfo, AddChargeBarValue,
|
||||
AddClimateMeter, AddElementDurability, AddGlobalValue, AddGlobalValueToTarget,
|
||||
AddRegionalPlayVarValue, ApplyModifier, AttachAbilityStateResistance, AttachBulletAimPoint,
|
||||
AttachEffect, AttachEffectFirework, AttachElementTypeResistance, AttachModifier,
|
||||
AttachUIEffect, AvatarCameraParam, AvatarEnterCameraShot, AvatarEnterFocus,
|
||||
AvatarEnterViewBias, AvatarExitCameraShot, AvatarExitClimb, AvatarExitFocus,
|
||||
AvatarExitViewBias, AvatarShareCDSkillStart, AvatarSkillStart, BroadcastNeuronStimulate,
|
||||
CalcDvalinS04RebornPoint, CallLuaTask, ChangeEnviroWeather, ChangeFollowDampTime,
|
||||
ChangeGadgetUIInteractHint, ChangePlayMode, ChangeTag, ChangeUGCRayTag,
|
||||
ClearEndura, ClearGlobalPos, ClearGlobalValue, ClearLocalGadgets,
|
||||
ClearLockTarget, ClearPos, ConfigAbilityAction, ControlEmotion,
|
||||
CopyGlobalValue, CreateGadget, CreateMovingPlatform, CreateTile,
|
||||
DamageByAttackValue, DebugLog, DestroyTile, DoBlink,
|
||||
DoTileAction, DoWatcherSystemAction, DoWidgetSystemAction, DropSubfield,
|
||||
DummyAction, DungeonFogEffects, ElementAttachForActivityGacha, EnableAIStealthy,
|
||||
EnableAfterImage, EnableAvatarFlyStateTrail, EnableAvatarMoveOnWater, EnableBulletCollisionPluginTrigger,
|
||||
EnableGadgetIntee, EnableHeadControl, EnableHitBoxByName, EnableMainInterface,
|
||||
EnablePartControl, EnablePositionSynchronization, EnablePushColliderName, EnableRocketJump,
|
||||
EnableSceneTransformByName, EnterCameraLock, EntityDoSkill, EquipAffixStart,
|
||||
ExecuteGadgetLua, FireAISoundEvent, FireChargeBarEffect, FireEffect,
|
||||
FireEffectFirework, FireEffectForStorm, FireFishingEvent, FireHitEffect,
|
||||
FireSubEmitterEffect, FireUIEffect, FixedMonsterRushMove, ForceAirStateFly,
|
||||
ForceEnableShakeOffButton, GenerateElemBall, GetFightProperty, GetInteractIdToGlobalValue,
|
||||
GetPos, HealHP, HideUIBillBoard, IgnoreMoveColToRockCol,
|
||||
KillGadget, KillPlayEntity, KillSelf, KillServerGadget,
|
||||
LoseHP, ModifyAvatarSkillCD, ModifyVehicleSkillCD, PlayEmoSync,
|
||||
Predicated, PushDvalinS01Process, PushInterActionByConfigPath, PushPos,
|
||||
Randomed, ReTriggerAISkillInitialCD, RefreshUICombatBarLayout, RegisterAIActionPoint,
|
||||
ReleaseAIActionPoint, RemoveAvatarSkillInfo, RemoveModifier, RemoveModifierByAbilityStateResistanceID,
|
||||
RemoveServerBuff, RemoveUniqueModifier, RemoveVelocityForce, Repeated,
|
||||
ResetAIAttackTarget, ResetAIResistTauntLevel, ResetAIThreatBroadcastRange, ResetAnimatorTrigger,
|
||||
ReviveDeadAvatar, ReviveElemEnergy, ReviveStamina, SectorCityManeuver,
|
||||
SendEffectTrigger, SendEffectTriggerToLineEffect, SendEvtElectricCoreMoveEnterP1, SendEvtElectricCoreMoveInterrupt,
|
||||
ServerLuaCall, ServerLuaTriggerEvent, ServerMonsterLog, SetAIHitFeeling,
|
||||
SetAISkillCDAvailableNow, SetAISkillCDMultiplier, SetAISkillGCD, SetAnimatorBool,
|
||||
SetAnimatorFloat, SetAnimatorInt, SetAnimatorTrigger, SetAvatarCanShakeOff,
|
||||
SetAvatarHitBuckets, SetCanDieImmediately, SetChargeBarValue, SetDvalinS01FlyState,
|
||||
SetEmissionScaler, SetEntityScale, SetExtraAbilityEnable, SetExtraAbilityState,
|
||||
SetGlobalDir, SetGlobalPos, SetGlobalValue, SetGlobalValueByTargetDistance,
|
||||
SetGlobalValueToOverrideMap, SetKeepInAirVelocityForce, SetMaterialParamFloatByTransform, SetNeuronEnable,
|
||||
SetOverrideMapValue, SetPartControlTarget, SetPoseBool, SetPoseFloat,
|
||||
SetPoseInt, SetRandomOverrideMapValue, SetRegionalPlayVarValue, SetSelfAttackTarget,
|
||||
SetSkillAnchor, SetSpecialCamera, SetSurroundAnchor, SetSystemValueToOverrideMap,
|
||||
SetTargetNumToGlobalValue, SetUICombatBarAsh, SetUICombatBarSpark, SetVelocityIgnoreAirGY,
|
||||
SetWeaponAttachPointRealName, SetWeaponBindState, ShowExtraAbility, ShowProgressBarAction,
|
||||
ShowReminder, ShowScreenEffect, ShowTextMap, ShowUICombatBar,
|
||||
StartDither, SumTargetWeightToSelfGlobalValue, Summon, SyncToStageScript,
|
||||
TriggerAbility, TriggerAttackEvent, TriggerAttackTargetMapEvent, TriggerAudio,
|
||||
TriggerAuxWeaponTrans, TriggerBullet, TriggerCreateGadgetToEquipPart, TriggerDropEquipParts,
|
||||
TriggerFaceAnimation, TriggerGadgetInteractive, TriggerHideWeapon, TriggerSetCastShadow,
|
||||
TriggerSetPassThrough, TriggerSetRenderersEnable, TriggerSetShadowRamp, TriggerSetVisible,
|
||||
TriggerTaunt, TriggerThrowEquipPart, TriggerUGCGadgetMove, TryFindBlinkPoint,
|
||||
TryFindBlinkPointByBorn, TryTriggerPlatformStartMove, TurnDirection, TurnDirectionToPos,
|
||||
UpdateReactionDamage, UseSkillEliteSet, WidgetSkillStart
|
||||
}
|
||||
}
|
||||
|
||||
//The following should be implemented into DynamicFloat if older resource formats need to be supported
|
||||
// public static class AbilityModifierValue {
|
||||
// public boolean isFormula;
|
||||
// public boolean isDynamic;
|
||||
// public String dynamicKey;
|
||||
// }
|
||||
}
|
||||
package emu.grasscutter.data.binout;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import emu.grasscutter.data.common.DynamicFloat;
|
||||
import java.io.Serializable;
|
||||
|
||||
public class AbilityModifier implements Serializable {
|
||||
private static final long serialVersionUID = -2001232313615923575L;
|
||||
|
||||
@SerializedName(
|
||||
value = "onAdded",
|
||||
alternate = {"KCICDEJLIJD"})
|
||||
public AbilityModifierAction[] onAdded;
|
||||
|
||||
@SerializedName(
|
||||
value = "onThinkInterval",
|
||||
alternate = {"PBDDACFFPOE"})
|
||||
public AbilityModifierAction[] onThinkInterval;
|
||||
|
||||
public AbilityModifierAction[] onRemoved;
|
||||
public DynamicFloat duration = DynamicFloat.ZERO;
|
||||
|
||||
public static class AbilityModifierAction {
|
||||
@SerializedName("$type")
|
||||
public Type type;
|
||||
|
||||
public String target;
|
||||
|
||||
@SerializedName(value = "amount", alternate = "PDLLIFICICJ")
|
||||
public DynamicFloat amount = DynamicFloat.ZERO;
|
||||
|
||||
public DynamicFloat amountByCasterAttackRatio = DynamicFloat.ZERO;
|
||||
public DynamicFloat amountByCasterCurrentHPRatio = DynamicFloat.ZERO;
|
||||
public DynamicFloat amountByCasterMaxHPRatio = DynamicFloat.ZERO;
|
||||
public DynamicFloat amountByGetDamage = DynamicFloat.ZERO;
|
||||
public DynamicFloat amountByTargetCurrentHPRatio = DynamicFloat.ZERO;
|
||||
public DynamicFloat amountByTargetMaxHPRatio = DynamicFloat.ZERO;
|
||||
|
||||
@SerializedName(value = "ignoreAbilityProperty", alternate = "HHFGADCJJDI")
|
||||
public boolean ignoreAbilityProperty;
|
||||
|
||||
public String modifierName;
|
||||
|
||||
public enum Type {
|
||||
ActCameraRadialBlur,
|
||||
ActCameraShake,
|
||||
AddAvatarSkillInfo,
|
||||
AddChargeBarValue,
|
||||
AddClimateMeter,
|
||||
AddElementDurability,
|
||||
AddGlobalValue,
|
||||
AddGlobalValueToTarget,
|
||||
AddRegionalPlayVarValue,
|
||||
ApplyModifier,
|
||||
AttachAbilityStateResistance,
|
||||
AttachBulletAimPoint,
|
||||
AttachEffect,
|
||||
AttachEffectFirework,
|
||||
AttachElementTypeResistance,
|
||||
AttachModifier,
|
||||
AttachUIEffect,
|
||||
AvatarCameraParam,
|
||||
AvatarEnterCameraShot,
|
||||
AvatarEnterFocus,
|
||||
AvatarEnterViewBias,
|
||||
AvatarExitCameraShot,
|
||||
AvatarExitClimb,
|
||||
AvatarExitFocus,
|
||||
AvatarExitViewBias,
|
||||
AvatarShareCDSkillStart,
|
||||
AvatarSkillStart,
|
||||
BroadcastNeuronStimulate,
|
||||
CalcDvalinS04RebornPoint,
|
||||
CallLuaTask,
|
||||
ChangeEnviroWeather,
|
||||
ChangeFollowDampTime,
|
||||
ChangeGadgetUIInteractHint,
|
||||
ChangePlayMode,
|
||||
ChangeTag,
|
||||
ChangeUGCRayTag,
|
||||
ClearEndura,
|
||||
ClearGlobalPos,
|
||||
ClearGlobalValue,
|
||||
ClearLocalGadgets,
|
||||
ClearLockTarget,
|
||||
ClearPos,
|
||||
ConfigAbilityAction,
|
||||
ControlEmotion,
|
||||
CopyGlobalValue,
|
||||
CreateGadget,
|
||||
CreateMovingPlatform,
|
||||
CreateTile,
|
||||
DamageByAttackValue,
|
||||
DebugLog,
|
||||
DestroyTile,
|
||||
DoBlink,
|
||||
DoTileAction,
|
||||
DoWatcherSystemAction,
|
||||
DoWidgetSystemAction,
|
||||
DropSubfield,
|
||||
DummyAction,
|
||||
DungeonFogEffects,
|
||||
ElementAttachForActivityGacha,
|
||||
EnableAIStealthy,
|
||||
EnableAfterImage,
|
||||
EnableAvatarFlyStateTrail,
|
||||
EnableAvatarMoveOnWater,
|
||||
EnableBulletCollisionPluginTrigger,
|
||||
EnableGadgetIntee,
|
||||
EnableHeadControl,
|
||||
EnableHitBoxByName,
|
||||
EnableMainInterface,
|
||||
EnablePartControl,
|
||||
EnablePositionSynchronization,
|
||||
EnablePushColliderName,
|
||||
EnableRocketJump,
|
||||
EnableSceneTransformByName,
|
||||
EnterCameraLock,
|
||||
EntityDoSkill,
|
||||
EquipAffixStart,
|
||||
ExecuteGadgetLua,
|
||||
FireAISoundEvent,
|
||||
FireChargeBarEffect,
|
||||
FireEffect,
|
||||
FireEffectFirework,
|
||||
FireEffectForStorm,
|
||||
FireFishingEvent,
|
||||
FireHitEffect,
|
||||
FireSubEmitterEffect,
|
||||
FireUIEffect,
|
||||
FixedMonsterRushMove,
|
||||
ForceAirStateFly,
|
||||
ForceEnableShakeOffButton,
|
||||
GenerateElemBall,
|
||||
GetFightProperty,
|
||||
GetInteractIdToGlobalValue,
|
||||
GetPos,
|
||||
HealHP,
|
||||
HideUIBillBoard,
|
||||
IgnoreMoveColToRockCol,
|
||||
KillGadget,
|
||||
KillPlayEntity,
|
||||
KillSelf,
|
||||
KillServerGadget,
|
||||
LoseHP,
|
||||
ModifyAvatarSkillCD,
|
||||
ModifyVehicleSkillCD,
|
||||
PlayEmoSync,
|
||||
Predicated,
|
||||
PushDvalinS01Process,
|
||||
PushInterActionByConfigPath,
|
||||
PushPos,
|
||||
Randomed,
|
||||
ReTriggerAISkillInitialCD,
|
||||
RefreshUICombatBarLayout,
|
||||
RegisterAIActionPoint,
|
||||
ReleaseAIActionPoint,
|
||||
RemoveAvatarSkillInfo,
|
||||
RemoveModifier,
|
||||
RemoveModifierByAbilityStateResistanceID,
|
||||
RemoveServerBuff,
|
||||
RemoveUniqueModifier,
|
||||
RemoveVelocityForce,
|
||||
Repeated,
|
||||
ResetAIAttackTarget,
|
||||
ResetAIResistTauntLevel,
|
||||
ResetAIThreatBroadcastRange,
|
||||
ResetAnimatorTrigger,
|
||||
ReviveDeadAvatar,
|
||||
ReviveElemEnergy,
|
||||
ReviveStamina,
|
||||
SectorCityManeuver,
|
||||
SendEffectTrigger,
|
||||
SendEffectTriggerToLineEffect,
|
||||
SendEvtElectricCoreMoveEnterP1,
|
||||
SendEvtElectricCoreMoveInterrupt,
|
||||
ServerLuaCall,
|
||||
ServerLuaTriggerEvent,
|
||||
ServerMonsterLog,
|
||||
SetAIHitFeeling,
|
||||
SetAISkillCDAvailableNow,
|
||||
SetAISkillCDMultiplier,
|
||||
SetAISkillGCD,
|
||||
SetAnimatorBool,
|
||||
SetAnimatorFloat,
|
||||
SetAnimatorInt,
|
||||
SetAnimatorTrigger,
|
||||
SetAvatarCanShakeOff,
|
||||
SetAvatarHitBuckets,
|
||||
SetCanDieImmediately,
|
||||
SetChargeBarValue,
|
||||
SetDvalinS01FlyState,
|
||||
SetEmissionScaler,
|
||||
SetEntityScale,
|
||||
SetExtraAbilityEnable,
|
||||
SetExtraAbilityState,
|
||||
SetGlobalDir,
|
||||
SetGlobalPos,
|
||||
SetGlobalValue,
|
||||
SetGlobalValueByTargetDistance,
|
||||
SetGlobalValueToOverrideMap,
|
||||
SetKeepInAirVelocityForce,
|
||||
SetMaterialParamFloatByTransform,
|
||||
SetNeuronEnable,
|
||||
SetOverrideMapValue,
|
||||
SetPartControlTarget,
|
||||
SetPoseBool,
|
||||
SetPoseFloat,
|
||||
SetPoseInt,
|
||||
SetRandomOverrideMapValue,
|
||||
SetRegionalPlayVarValue,
|
||||
SetSelfAttackTarget,
|
||||
SetSkillAnchor,
|
||||
SetSpecialCamera,
|
||||
SetSurroundAnchor,
|
||||
SetSystemValueToOverrideMap,
|
||||
SetTargetNumToGlobalValue,
|
||||
SetUICombatBarAsh,
|
||||
SetUICombatBarSpark,
|
||||
SetVelocityIgnoreAirGY,
|
||||
SetWeaponAttachPointRealName,
|
||||
SetWeaponBindState,
|
||||
ShowExtraAbility,
|
||||
ShowProgressBarAction,
|
||||
ShowReminder,
|
||||
ShowScreenEffect,
|
||||
ShowTextMap,
|
||||
ShowUICombatBar,
|
||||
StartDither,
|
||||
SumTargetWeightToSelfGlobalValue,
|
||||
Summon,
|
||||
SyncToStageScript,
|
||||
TriggerAbility,
|
||||
TriggerAttackEvent,
|
||||
TriggerAttackTargetMapEvent,
|
||||
TriggerAudio,
|
||||
TriggerAuxWeaponTrans,
|
||||
TriggerBullet,
|
||||
TriggerCreateGadgetToEquipPart,
|
||||
TriggerDropEquipParts,
|
||||
TriggerFaceAnimation,
|
||||
TriggerGadgetInteractive,
|
||||
TriggerHideWeapon,
|
||||
TriggerSetCastShadow,
|
||||
TriggerSetPassThrough,
|
||||
TriggerSetRenderersEnable,
|
||||
TriggerSetShadowRamp,
|
||||
TriggerSetVisible,
|
||||
TriggerTaunt,
|
||||
TriggerThrowEquipPart,
|
||||
TriggerUGCGadgetMove,
|
||||
TryFindBlinkPoint,
|
||||
TryFindBlinkPointByBorn,
|
||||
TryTriggerPlatformStartMove,
|
||||
TurnDirection,
|
||||
TurnDirectionToPos,
|
||||
UpdateReactionDamage,
|
||||
UseSkillEliteSet,
|
||||
WidgetSkillStart
|
||||
}
|
||||
}
|
||||
|
||||
// The following should be implemented into DynamicFloat if older resource formats need to be
|
||||
// supported
|
||||
// public static class AbilityModifierValue {
|
||||
// public boolean isFormula;
|
||||
// public boolean isDynamic;
|
||||
// public String dynamicKey;
|
||||
// }
|
||||
}
|
||||
|
||||
@@ -1,37 +1,35 @@
|
||||
package emu.grasscutter.data.binout;
|
||||
|
||||
import emu.grasscutter.data.binout.AbilityModifier.AbilityModifierAction;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class AbilityModifierEntry {
|
||||
public List<AbilityModifierAction> onModifierAdded;
|
||||
public List<AbilityModifierAction> onThinkInterval;
|
||||
public List<AbilityModifierAction> onRemoved;
|
||||
private final String name; // Custom value
|
||||
|
||||
public AbilityModifierEntry(String name) {
|
||||
this.name = name;
|
||||
this.onModifierAdded = new ArrayList<>();
|
||||
this.onThinkInterval = new ArrayList<>();
|
||||
this.onRemoved = new ArrayList<>();
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public List<AbilityModifierAction> getOnAdded() {
|
||||
return onModifierAdded;
|
||||
}
|
||||
|
||||
public List<AbilityModifierAction> getOnThinkInterval() {
|
||||
return onThinkInterval;
|
||||
}
|
||||
|
||||
public List<AbilityModifierAction> getOnRemoved() {
|
||||
return onRemoved;
|
||||
}
|
||||
|
||||
}
|
||||
package emu.grasscutter.data.binout;
|
||||
|
||||
import emu.grasscutter.data.binout.AbilityModifier.AbilityModifierAction;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class AbilityModifierEntry {
|
||||
public List<AbilityModifierAction> onModifierAdded;
|
||||
public List<AbilityModifierAction> onThinkInterval;
|
||||
public List<AbilityModifierAction> onRemoved;
|
||||
private final String name; // Custom value
|
||||
|
||||
public AbilityModifierEntry(String name) {
|
||||
this.name = name;
|
||||
this.onModifierAdded = new ArrayList<>();
|
||||
this.onThinkInterval = new ArrayList<>();
|
||||
this.onRemoved = new ArrayList<>();
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public List<AbilityModifierAction> getOnAdded() {
|
||||
return onModifierAdded;
|
||||
}
|
||||
|
||||
public List<AbilityModifierAction> getOnThinkInterval() {
|
||||
return onThinkInterval;
|
||||
}
|
||||
|
||||
public List<AbilityModifierAction> getOnRemoved() {
|
||||
return onRemoved;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,15 +1,13 @@
|
||||
package emu.grasscutter.data.binout;
|
||||
|
||||
import lombok.AccessLevel;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.FieldDefaults;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
@Data
|
||||
@FieldDefaults(level = AccessLevel.PRIVATE)
|
||||
public class ConfigGadget {
|
||||
// There are more values that can be added that might be useful in the json
|
||||
@Nullable
|
||||
ConfigGadgetCombat combat;
|
||||
}
|
||||
package emu.grasscutter.data.binout;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import lombok.AccessLevel;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.FieldDefaults;
|
||||
|
||||
@Data
|
||||
@FieldDefaults(level = AccessLevel.PRIVATE)
|
||||
public class ConfigGadget {
|
||||
// There are more values that can be added that might be useful in the json
|
||||
@Nullable ConfigGadgetCombat combat;
|
||||
}
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
package emu.grasscutter.data.binout;
|
||||
|
||||
import lombok.AccessLevel;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.FieldDefaults;
|
||||
|
||||
@Data
|
||||
@FieldDefaults(level = AccessLevel.PRIVATE)
|
||||
public class ConfigGadgetCombatProperty {
|
||||
float HP;
|
||||
boolean isLockHP;
|
||||
boolean isInvincible;
|
||||
boolean isGhostToAllied;
|
||||
float attack;
|
||||
float defence;
|
||||
float weight;
|
||||
boolean useCreatorProperty;
|
||||
}
|
||||
package emu.grasscutter.data.binout;
|
||||
|
||||
import lombok.AccessLevel;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.FieldDefaults;
|
||||
|
||||
@Data
|
||||
@FieldDefaults(level = AccessLevel.PRIVATE)
|
||||
public class ConfigGadgetCombatProperty {
|
||||
float HP;
|
||||
boolean isLockHP;
|
||||
boolean isInvincible;
|
||||
boolean isGhostToAllied;
|
||||
float attack;
|
||||
float defence;
|
||||
float weight;
|
||||
boolean useCreatorProperty;
|
||||
}
|
||||
|
||||
@@ -1,56 +1,61 @@
|
||||
package emu.grasscutter.data.binout;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import emu.grasscutter.utils.Position;
|
||||
import lombok.AccessLevel;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.FieldDefaults;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@FieldDefaults(level = AccessLevel.PRIVATE)
|
||||
public class HomeworldDefaultSaveData {
|
||||
|
||||
@SerializedName(value = "KFHBFNPDJBE", alternate = "PKACPHDGGEI")
|
||||
List<HomeBlock> homeBlockLists;
|
||||
@SerializedName(value = "IJNPADKGNKE", alternate = "MINCKHBNING")
|
||||
Position bornPos;
|
||||
@SerializedName("IPIIGEMFLHK")
|
||||
Position bornRot;
|
||||
@SerializedName("HHOLBNPIHEM")
|
||||
Position djinPos;
|
||||
@SerializedName("KNHCJKHCOAN")
|
||||
HomeFurniture mainhouse;
|
||||
|
||||
@SerializedName("NIHOJFEKFPG")
|
||||
List<HomeFurniture> doorLists;
|
||||
@SerializedName("EPGELGEFJFK")
|
||||
List<HomeFurniture> stairLists;
|
||||
|
||||
@Data
|
||||
@FieldDefaults(level = AccessLevel.PRIVATE)
|
||||
public static class HomeBlock {
|
||||
|
||||
@SerializedName(value = "FGIJCELCGFI", alternate = "PGDPDIDJEEL")
|
||||
int blockId;
|
||||
|
||||
@SerializedName("BEAPOFELABD")
|
||||
List<HomeFurniture> furnitures;
|
||||
|
||||
@SerializedName("MLIODLGDFHJ")
|
||||
List<HomeFurniture> persistentFurnitures;
|
||||
}
|
||||
|
||||
@Data
|
||||
@FieldDefaults(level = AccessLevel.PRIVATE)
|
||||
public static class HomeFurniture {
|
||||
|
||||
@SerializedName(value = "ENHNGKJBJAB", alternate = "KMAAJJHPNBA")
|
||||
int id;
|
||||
@SerializedName(value = "NGIEEIOLPPO", alternate = "JFKAHNCPDME")
|
||||
Position pos;
|
||||
//@SerializedName(value = "HEOCEHKEBFM", alternate = "LKCKOOGFDBM")
|
||||
Position rot;
|
||||
}
|
||||
}
|
||||
package emu.grasscutter.data.binout;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import emu.grasscutter.utils.Position;
|
||||
import java.util.List;
|
||||
import lombok.AccessLevel;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.FieldDefaults;
|
||||
|
||||
@Data
|
||||
@FieldDefaults(level = AccessLevel.PRIVATE)
|
||||
public class HomeworldDefaultSaveData {
|
||||
|
||||
@SerializedName(value = "KFHBFNPDJBE", alternate = "PKACPHDGGEI")
|
||||
List<HomeBlock> homeBlockLists;
|
||||
|
||||
@SerializedName(value = "IJNPADKGNKE", alternate = "MINCKHBNING")
|
||||
Position bornPos;
|
||||
|
||||
@SerializedName("IPIIGEMFLHK")
|
||||
Position bornRot;
|
||||
|
||||
@SerializedName("HHOLBNPIHEM")
|
||||
Position djinPos;
|
||||
|
||||
@SerializedName("KNHCJKHCOAN")
|
||||
HomeFurniture mainhouse;
|
||||
|
||||
@SerializedName("NIHOJFEKFPG")
|
||||
List<HomeFurniture> doorLists;
|
||||
|
||||
@SerializedName("EPGELGEFJFK")
|
||||
List<HomeFurniture> stairLists;
|
||||
|
||||
@Data
|
||||
@FieldDefaults(level = AccessLevel.PRIVATE)
|
||||
public static class HomeBlock {
|
||||
|
||||
@SerializedName(value = "FGIJCELCGFI", alternate = "PGDPDIDJEEL")
|
||||
int blockId;
|
||||
|
||||
@SerializedName("BEAPOFELABD")
|
||||
List<HomeFurniture> furnitures;
|
||||
|
||||
@SerializedName("MLIODLGDFHJ")
|
||||
List<HomeFurniture> persistentFurnitures;
|
||||
}
|
||||
|
||||
@Data
|
||||
@FieldDefaults(level = AccessLevel.PRIVATE)
|
||||
public static class HomeFurniture {
|
||||
|
||||
@SerializedName(value = "ENHNGKJBJAB", alternate = "KMAAJJHPNBA")
|
||||
int id;
|
||||
|
||||
@SerializedName(value = "NGIEEIOLPPO", alternate = "JFKAHNCPDME")
|
||||
Position pos;
|
||||
// @SerializedName(value = "HEOCEHKEBFM", alternate = "LKCKOOGFDBM")
|
||||
Position rot;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,81 +1,78 @@
|
||||
package emu.grasscutter.data.binout;
|
||||
|
||||
import dev.morphia.annotations.Entity;
|
||||
import emu.grasscutter.game.quest.enums.QuestType;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
public class MainQuestData {
|
||||
private int id;
|
||||
private int ICLLDPJFIMA;
|
||||
private int series;
|
||||
private QuestType type;
|
||||
|
||||
private long titleTextMapHash;
|
||||
private int[] suggestTrackMainQuestList;
|
||||
private int[] rewardIdList;
|
||||
|
||||
private SubQuestData[] subQuests;
|
||||
private List<TalkData> talks;
|
||||
private long[] preloadLuaList;
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public int getSeries() {
|
||||
return series;
|
||||
}
|
||||
|
||||
public QuestType getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public long getTitleTextMapHash() {
|
||||
return titleTextMapHash;
|
||||
}
|
||||
|
||||
public int[] getSuggestTrackMainQuestList() {
|
||||
return suggestTrackMainQuestList;
|
||||
}
|
||||
|
||||
public int[] getRewardIdList() {
|
||||
return rewardIdList;
|
||||
}
|
||||
|
||||
public SubQuestData[] getSubQuests() {
|
||||
return subQuests;
|
||||
}
|
||||
|
||||
public List<TalkData> getTalks() {
|
||||
return talks;
|
||||
}
|
||||
|
||||
public void onLoad() {
|
||||
this.talks = talks.stream().filter(Objects::nonNull).toList();
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class SubQuestData {
|
||||
private int subId;
|
||||
private int order;
|
||||
}
|
||||
|
||||
|
||||
@Data
|
||||
@Entity
|
||||
public static class TalkData {
|
||||
private int id;
|
||||
private String heroTalk;
|
||||
|
||||
public TalkData() {
|
||||
}
|
||||
|
||||
public TalkData(int id, String heroTalk) {
|
||||
this.id = id;
|
||||
this.heroTalk = heroTalk;
|
||||
}
|
||||
}
|
||||
}
|
||||
package emu.grasscutter.data.binout;
|
||||
|
||||
import dev.morphia.annotations.Entity;
|
||||
import emu.grasscutter.game.quest.enums.QuestType;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import lombok.Data;
|
||||
|
||||
public class MainQuestData {
|
||||
private int id;
|
||||
private int ICLLDPJFIMA;
|
||||
private int series;
|
||||
private QuestType type;
|
||||
|
||||
private long titleTextMapHash;
|
||||
private int[] suggestTrackMainQuestList;
|
||||
private int[] rewardIdList;
|
||||
|
||||
private SubQuestData[] subQuests;
|
||||
private List<TalkData> talks;
|
||||
private long[] preloadLuaList;
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public int getSeries() {
|
||||
return series;
|
||||
}
|
||||
|
||||
public QuestType getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public long getTitleTextMapHash() {
|
||||
return titleTextMapHash;
|
||||
}
|
||||
|
||||
public int[] getSuggestTrackMainQuestList() {
|
||||
return suggestTrackMainQuestList;
|
||||
}
|
||||
|
||||
public int[] getRewardIdList() {
|
||||
return rewardIdList;
|
||||
}
|
||||
|
||||
public SubQuestData[] getSubQuests() {
|
||||
return subQuests;
|
||||
}
|
||||
|
||||
public List<TalkData> getTalks() {
|
||||
return talks;
|
||||
}
|
||||
|
||||
public void onLoad() {
|
||||
this.talks = talks.stream().filter(Objects::nonNull).toList();
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class SubQuestData {
|
||||
private int subId;
|
||||
private int order;
|
||||
}
|
||||
|
||||
@Data
|
||||
@Entity
|
||||
public static class TalkData {
|
||||
private int id;
|
||||
private String heroTalk;
|
||||
|
||||
public TalkData() {}
|
||||
|
||||
public TalkData(int id, String heroTalk) {
|
||||
this.id = id;
|
||||
this.heroTalk = heroTalk;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,72 +1,71 @@
|
||||
package emu.grasscutter.data.binout;
|
||||
|
||||
import emu.grasscutter.data.ResourceLoader.OpenConfigData;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class OpenConfigEntry {
|
||||
private final String name;
|
||||
private String[] addAbilities;
|
||||
private int extraTalentIndex;
|
||||
private SkillPointModifier[] skillPointModifiers;
|
||||
|
||||
public OpenConfigEntry(String name, OpenConfigData[] data) {
|
||||
this.name = name;
|
||||
|
||||
List<String> abilityList = new ArrayList<>();
|
||||
List<SkillPointModifier> modList = new ArrayList<>();
|
||||
|
||||
for (OpenConfigData entry : data) {
|
||||
if (entry.$type.contains("AddAbility")) {
|
||||
abilityList.add(entry.abilityName);
|
||||
} else if (entry.talentIndex > 0) {
|
||||
this.extraTalentIndex = entry.talentIndex;
|
||||
} else if (entry.$type.contains("ModifySkillPoint")) {
|
||||
modList.add(new SkillPointModifier(entry.skillID, entry.pointDelta));
|
||||
}
|
||||
}
|
||||
|
||||
if (abilityList.size() > 0) {
|
||||
this.addAbilities = abilityList.toArray(new String[0]);
|
||||
}
|
||||
|
||||
if (modList.size() > 0) {
|
||||
this.skillPointModifiers = modList.toArray(new SkillPointModifier[0]);
|
||||
}
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public String[] getAddAbilities() {
|
||||
return addAbilities;
|
||||
}
|
||||
|
||||
public int getExtraTalentIndex() {
|
||||
return extraTalentIndex;
|
||||
}
|
||||
|
||||
public SkillPointModifier[] getSkillPointModifiers() {
|
||||
return skillPointModifiers;
|
||||
}
|
||||
|
||||
public static class SkillPointModifier {
|
||||
private final int skillId;
|
||||
private final int delta;
|
||||
|
||||
public SkillPointModifier(int skillId, int delta) {
|
||||
this.skillId = skillId;
|
||||
this.delta = delta;
|
||||
}
|
||||
|
||||
public int getSkillId() {
|
||||
return skillId;
|
||||
}
|
||||
|
||||
public int getDelta() {
|
||||
return delta;
|
||||
}
|
||||
}
|
||||
}
|
||||
package emu.grasscutter.data.binout;
|
||||
|
||||
import emu.grasscutter.data.ResourceLoader.OpenConfigData;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class OpenConfigEntry {
|
||||
private final String name;
|
||||
private String[] addAbilities;
|
||||
private int extraTalentIndex;
|
||||
private SkillPointModifier[] skillPointModifiers;
|
||||
|
||||
public OpenConfigEntry(String name, OpenConfigData[] data) {
|
||||
this.name = name;
|
||||
|
||||
List<String> abilityList = new ArrayList<>();
|
||||
List<SkillPointModifier> modList = new ArrayList<>();
|
||||
|
||||
for (OpenConfigData entry : data) {
|
||||
if (entry.$type.contains("AddAbility")) {
|
||||
abilityList.add(entry.abilityName);
|
||||
} else if (entry.talentIndex > 0) {
|
||||
this.extraTalentIndex = entry.talentIndex;
|
||||
} else if (entry.$type.contains("ModifySkillPoint")) {
|
||||
modList.add(new SkillPointModifier(entry.skillID, entry.pointDelta));
|
||||
}
|
||||
}
|
||||
|
||||
if (abilityList.size() > 0) {
|
||||
this.addAbilities = abilityList.toArray(new String[0]);
|
||||
}
|
||||
|
||||
if (modList.size() > 0) {
|
||||
this.skillPointModifiers = modList.toArray(new SkillPointModifier[0]);
|
||||
}
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public String[] getAddAbilities() {
|
||||
return addAbilities;
|
||||
}
|
||||
|
||||
public int getExtraTalentIndex() {
|
||||
return extraTalentIndex;
|
||||
}
|
||||
|
||||
public SkillPointModifier[] getSkillPointModifiers() {
|
||||
return skillPointModifiers;
|
||||
}
|
||||
|
||||
public static class SkillPointModifier {
|
||||
private final int skillId;
|
||||
private final int delta;
|
||||
|
||||
public SkillPointModifier(int skillId, int delta) {
|
||||
this.skillId = skillId;
|
||||
this.delta = delta;
|
||||
}
|
||||
|
||||
public int getSkillId() {
|
||||
return skillId;
|
||||
}
|
||||
|
||||
public int getDelta() {
|
||||
return delta;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,29 +1,24 @@
|
||||
package emu.grasscutter.data.binout;
|
||||
|
||||
import com.github.davidmoten.rtreemulti.RTree;
|
||||
import com.github.davidmoten.rtreemulti.geometry.Geometry;
|
||||
import emu.grasscutter.scripts.data.SceneGroup;
|
||||
import lombok.AccessLevel;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.FieldDefaults;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
@Data
|
||||
@FieldDefaults(level = AccessLevel.PRIVATE)
|
||||
public class SceneNpcBornData {
|
||||
int sceneId;
|
||||
List<SceneNpcBornEntry> bornPosList;
|
||||
|
||||
/**
|
||||
* Spatial Index For NPC
|
||||
*/
|
||||
transient RTree<SceneNpcBornEntry, Geometry> index;
|
||||
|
||||
/**
|
||||
* npc groups
|
||||
*/
|
||||
transient Map<Integer, SceneGroup> groups = new ConcurrentHashMap<>();
|
||||
}
|
||||
package emu.grasscutter.data.binout;
|
||||
|
||||
import com.github.davidmoten.rtreemulti.RTree;
|
||||
import com.github.davidmoten.rtreemulti.geometry.Geometry;
|
||||
import emu.grasscutter.scripts.data.SceneGroup;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import lombok.AccessLevel;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.FieldDefaults;
|
||||
|
||||
@Data
|
||||
@FieldDefaults(level = AccessLevel.PRIVATE)
|
||||
public class SceneNpcBornData {
|
||||
int sceneId;
|
||||
List<SceneNpcBornEntry> bornPosList;
|
||||
|
||||
/** Spatial Index For NPC */
|
||||
transient RTree<SceneNpcBornEntry, Geometry> index;
|
||||
|
||||
/** npc groups */
|
||||
transient Map<Integer, SceneGroup> groups = new ConcurrentHashMap<>();
|
||||
}
|
||||
|
||||
@@ -1,31 +1,42 @@
|
||||
package emu.grasscutter.data.binout;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import emu.grasscutter.utils.Position;
|
||||
import lombok.AccessLevel;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.FieldDefaults;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@FieldDefaults(level = AccessLevel.PRIVATE)
|
||||
public class SceneNpcBornEntry {
|
||||
@SerializedName(value = "id", alternate = {"_id", "ID"})
|
||||
int id;
|
||||
|
||||
@SerializedName(value = "configId", alternate = {"_configId"})
|
||||
int configId;
|
||||
|
||||
@SerializedName(value = "pos", alternate = {"_pos"})
|
||||
Position pos;
|
||||
|
||||
@SerializedName(value = "rot", alternate = {"_rot"})
|
||||
Position rot;
|
||||
|
||||
@SerializedName(value = "groupId", alternate = {"_groupId"})
|
||||
int groupId;
|
||||
|
||||
@SerializedName(value = "suiteIdList", alternate = {"_suiteIdList"})
|
||||
List<Integer> suiteIdList;
|
||||
}
|
||||
package emu.grasscutter.data.binout;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import emu.grasscutter.utils.Position;
|
||||
import java.util.List;
|
||||
import lombok.AccessLevel;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.FieldDefaults;
|
||||
|
||||
@Data
|
||||
@FieldDefaults(level = AccessLevel.PRIVATE)
|
||||
public class SceneNpcBornEntry {
|
||||
@SerializedName(
|
||||
value = "id",
|
||||
alternate = {"_id", "ID"})
|
||||
int id;
|
||||
|
||||
@SerializedName(
|
||||
value = "configId",
|
||||
alternate = {"_configId"})
|
||||
int configId;
|
||||
|
||||
@SerializedName(
|
||||
value = "pos",
|
||||
alternate = {"_pos"})
|
||||
Position pos;
|
||||
|
||||
@SerializedName(
|
||||
value = "rot",
|
||||
alternate = {"_rot"})
|
||||
Position rot;
|
||||
|
||||
@SerializedName(
|
||||
value = "groupId",
|
||||
alternate = {"_groupId"})
|
||||
int groupId;
|
||||
|
||||
@SerializedName(
|
||||
value = "suiteIdList",
|
||||
alternate = {"_suiteIdList"})
|
||||
List<Integer> suiteIdList;
|
||||
}
|
||||
|
||||
@@ -1,26 +1,24 @@
|
||||
package emu.grasscutter.data.binout;
|
||||
|
||||
import emu.grasscutter.data.common.PointData;
|
||||
import lombok.Getter;
|
||||
|
||||
public class ScenePointEntry {
|
||||
@Getter
|
||||
final private int sceneId;
|
||||
@Getter
|
||||
final private PointData pointData;
|
||||
|
||||
@Deprecated(forRemoval = true)
|
||||
public ScenePointEntry(String name, PointData pointData) {
|
||||
this.sceneId = Integer.parseInt(name.split("_")[0]);
|
||||
this.pointData = pointData;
|
||||
}
|
||||
|
||||
public ScenePointEntry(int sceneId, PointData pointData) {
|
||||
this.sceneId = sceneId;
|
||||
this.pointData = pointData;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return this.sceneId + "_" + this.pointData.getId();
|
||||
}
|
||||
}
|
||||
package emu.grasscutter.data.binout;
|
||||
|
||||
import emu.grasscutter.data.common.PointData;
|
||||
import lombok.Getter;
|
||||
|
||||
public class ScenePointEntry {
|
||||
@Getter private final int sceneId;
|
||||
@Getter private final PointData pointData;
|
||||
|
||||
@Deprecated(forRemoval = true)
|
||||
public ScenePointEntry(String name, PointData pointData) {
|
||||
this.sceneId = Integer.parseInt(name.split("_")[0]);
|
||||
this.pointData = pointData;
|
||||
}
|
||||
|
||||
public ScenePointEntry(int sceneId, PointData pointData) {
|
||||
this.sceneId = sceneId;
|
||||
this.pointData = pointData;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return this.sceneId + "_" + this.pointData.getId();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,21 +1,18 @@
|
||||
package emu.grasscutter.data.binout;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Data
|
||||
public class ScriptSceneData {
|
||||
Map<String, ScriptObject> scriptObjectList;
|
||||
|
||||
@Data
|
||||
public static class ScriptObject {
|
||||
//private SceneGroup groups;
|
||||
@SerializedName("dummy_points")
|
||||
private Map<String, List<Float>> dummyPoints;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
package emu.grasscutter.data.binout;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class ScriptSceneData {
|
||||
Map<String, ScriptObject> scriptObjectList;
|
||||
|
||||
@Data
|
||||
public static class ScriptObject {
|
||||
// private SceneGroup groups;
|
||||
@SerializedName("dummy_points")
|
||||
private Map<String, List<Float>> dummyPoints;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user