isXander / Controlify

Another controller mod - for fabric!
https://www.isxander.dev/mods/controlify
GNU Lesser General Public License v3.0
155 stars 36 forks source link

[Bug] Crossbow with Quick Charge 6 or higher crashing the game with vibration #164

Open dotPast opened 1 year ago

dotPast commented 1 year ago

Current Behaviour

Crash on attempt to charge a crossbow with Quick Charge 6 on mod trying to vibrate the controller

Expected Behaviour

Crossbow failing to charge (Normal behavior without mod) and no vibration

Screenshots

image

Reproduction Steps

  1. Enable Vibration
  2. Get a crossbow with Quick Charge 6 using commands - /give @s minecraft:crossbow{Enchantments:[{id:quick_charge,lvl:6}]}
  3. Try to charge it (Input method does not matter)

Logs

---- Minecraft Crash Report ----
// Uh... Did I do that?
Time: 2023-09-21 07:58:13
Description: Unexpected error
java.lang.IllegalArgumentException: the timeout cannot be negative!
    at org.apache.commons.lang3.Validate.isTrue(Validate.java:158)
    at dev.isxander.controlify.rumble.ContinuousRumbleEffect$Builder.timeout(ContinuousRumbleEffect.java:93)
    at net.minecraft.class_746.handler$zlo000$controlify$onStartUsingItem(class_746.java:4342)
    at net.minecraft.class_1309.method_6019(class_1309.java:3062)
    at net.minecraft.class_746.method_6019(class_746.java:533)
    at net.minecraft.class_1764.method_7836(class_1764.java:86)
    at net.minecraft.class_1799.method_7913(class_1799.java:284)
    at net.minecraft.class_636.method_41929(class_636.java:387)
    at net.minecraft.class_636.method_41931(class_636.java:278)
    at net.minecraft.class_636.method_2919(class_636.java:379)
    at net.minecraft.class_310.method_1583(class_310.java:1822)
    at net.minecraft.class_310.method_1508(class_310.java:2052)
    at net.minecraft.class_310.method_1574(class_310.java:1883)
    at net.minecraft.class_310.method_1523(class_310.java:1181)
    at net.minecraft.class_310.method_1514(class_310.java:802)
    at net.minecraft.client.main.Main.main(Main.java:250)
    at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:468)
    at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74)
    at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23)
    at org.prismlauncher.launcher.impl.StandardLauncher.launch(StandardLauncher.java:88)
    at org.prismlauncher.EntryPoint.listen(EntryPoint.java:126)
    at org.prismlauncher.EntryPoint.main(EntryPoint.java:71)
A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------
-- Head --
Thread: Render thread
Stacktrace:
    at org.apache.commons.lang3.Validate.isTrue(Validate.java:158)
    at dev.isxander.controlify.rumble.ContinuousRumbleEffect$Builder.timeout(ContinuousRumbleEffect.java:93)
    at net.minecraft.class_746.handler$zlo000$controlify$onStartUsingItem(class_746.java:4342)
    at net.minecraft.class_1309.method_6019(class_1309.java:3062)
    at net.minecraft.class_746.method_6019(class_746.java:533)
    at net.minecraft.class_1764.method_7836(class_1764.java:86)
    at net.minecraft.class_1799.method_7913(class_1799.java:284)
    at net.minecraft.class_636.method_41929(class_636.java:387)
    at net.minecraft.class_636.method_41931(class_636.java:278)
    at net.minecraft.class_636.method_2919(class_636.java:379)
    at net.minecraft.class_310.method_1583(class_310.java:1822)
    at net.minecraft.class_310.method_1508(class_310.java:2052)
-- Affected level --
Details:
    All players: 1 total; [class_746['dotPast'/1, l='ClientLevel', x=-10.88, y=-60.00, z=50.87]]
    Chunk stats: 1024, 625
    Level dimension: minecraft:overworld
    Level spawn location: World: (0,-60,0), Section: (at 0,4,0 in 0,-4,0; chunk contains blocks 0,-64,0 to 15,319,15), Region: (0,0; contains chunks 0,0 to 31,31, blocks 0,-64,0 to 511,319,511)
    Level time: 226880 game time, 226880 day time
    Server brand: fabric
    Server type: Integrated singleplayer server
Stacktrace:
    at net.minecraft.class_638.method_8538(class_638.java:458)
    at net.minecraft.class_310.method_1587(class_310.java:2406)
    at net.minecraft.class_310.method_1514(class_310.java:826)
    at net.minecraft.client.main.Main.main(Main.java:250)
    at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:468)
    at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74)
    at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23)
    at org.prismlauncher.launcher.impl.StandardLauncher.launch(StandardLauncher.java:88)
    at org.prismlauncher.EntryPoint.listen(EntryPoint.java:126)
    at org.prismlauncher.EntryPoint.main(EntryPoint.java:71)
-- Last reload --
Details:
    Reload number: 2
    Reload reason: manual
    Finished: Yes
    Packs: vanilla, fabric, essential
-- System Details --
Details:
    Minecraft Version: 1.20.1
    Minecraft Version ID: 1.20.1
    Operating System: Linux (amd64) version 6.4.14-200.fc38.x86_64
    Java Version: 17.0.8, Red Hat, Inc.
    Java VM Version: OpenJDK 64-Bit Server VM (mixed mode, sharing), Red Hat, Inc.
    Memory: 965171208 bytes (920 MiB) / 2499805184 bytes (2384 MiB) up to 4294967296 bytes (4096 MiB)
    CPUs: 12
    Processor Vendor: AuthenticAMD
    Processor Name: AMD Ryzen 5 3600 6-Core Processor
    Identifier: AuthenticAMD Family 23 Model 113 Stepping 0
    Microarchitecture: Zen 2
    Frequency (GHz): -0.00
    Number of physical packages: 1
    Number of physical CPUs: 6
    Number of logical CPUs: 12
    Graphics card #0 name: TU117 [GeForce GTX 1650]
    Graphics card #0 vendor: NVIDIA Corporation (0x10de)
    Graphics card #0 VRAM (MB): 288.00
    Graphics card #0 deviceId: 0x1f82
    Graphics card #0 versionInfo: unknown
    Virtual memory max (MB): 20236.25
    Virtual memory used (MB): 8318.86
    Swap memory total (MB): 12287.99
    Swap memory used (MB): 0.00
    JVM Flags: 2 total; -Xms512m -Xmx4096m
    Fabric Mods: 
        animatica: Animatica 0.6+1.20
        appleskin: AppleSkin 2.5.0+mc1.20
        bettermounthud: Better Mount HUD 1.2.2
        blur: Blur (Fabric) 3.1.0
            midnightlib: MidnightLib 1.4.1
            satin: Satin 1.13.0
        borderlessmining: Borderless Mining 1.1.8+1.20.1
        camerautils: Camera Utils 1.20.1-1.0.4
            fabric-key-binding-api-v1: Fabric Key Binding API (v1) 1.0.36+fb8d95da82
        capes: Capes 1.5.2+1.20
        chat_heads: Chat Heads 0.10.20
        citresewn: CIT Resewn 1.1.3+1.20
            citresewn-defaults: CIT Resewn: Defaults 1.1.3+1.20
        clientcommands: Client Commands 2.8.3
            betterconfig: BetterConfig 1.1.4
            clientarguments: clientarguments 1.5
        cloth-config: Cloth Config v11 11.1.106
            cloth-basic-math: cloth-basic-math 0.6.1
        cmdkeybind: Command Macros 1.6.3-1.20
            kyrptconfig: Kyrpt Config 1.5.6-1.20
        collective: Collective 6.65
        command-block-ide: Command Block IDE 0.4.3
        completeconfig: CompleteConfig 2.5.0
            completeconfig-base: completeconfig-base 2.5.0
            completeconfig-gui-cloth: completeconfig-gui-cloth 2.5.0
            completeconfig-gui-yacl: completeconfig-gui-yacl 2.5.0
        continuity: Continuity 3.0.0-beta.3+1.20.1
        controlify: Controlify 1.7.0-beta.1+1.20
            dev_isxander_libsdl4j: libsdl4j 2.28.2-11
            org_hid4java_hid4java: hid4java 0.7.0
            org_quiltmc_quilt-json5: quilt-json5 1.0.3
        craftpresence: CraftPresence 2.2.2
        deathlog: DeathLog 0.3.2+1.20
        debugify: Debugify 1.20.1+2.0
        dynamic_fps: Dynamic FPS 3.0.0
        elementa: Elementa 604
        emotecraft: Emotecraft 2.2.7-a.build.49
            bendy-lib: Bendy api 4.0.0
            player-animator: Player Animator 1.0.2-rc1+1.20
        enhancedblockentities: Enhanced Block Entities 0.9+1.20
            advanced_runtime_resource_pack: Runtime Resource Pack 0.6.7
            spruceui: SpruceUI 5.0.0+1.20
        entity_model_features: Entity Model Features 0.2.13
        entity_texture_features: Entity Texture Features 4.5.1
            org_apache_httpcomponents_httpmime: httpmime 4.5.10
        entityculling: EntityCulling-Fabric 1.6.2-mc1.20
        essential: Essential 14042+deploy-staging+g1f07116f2
        essential-container: essential-container 1.0.0
            essential-loader: essential-loader 1.2.1
        exordium: Exordium 1.1.4-mc1.20.1
        fabric-api: Fabric API 0.87.0+1.20.1
            fabric-api-base: Fabric API Base 0.4.30+7abfd51577
            fabric-api-lookup-api-v1: Fabric API Lookup API (v1) 1.6.35+4d8536c977
            fabric-biome-api-v1: Fabric Biome API (v1) 13.0.10+b3afc78b77
            fabric-block-api-v1: Fabric Block API (v1) 1.0.9+e022e5d177
            fabric-blockrenderlayer-v1: Fabric BlockRenderLayer Registration (v1) 1.1.40+b3afc78b77
            fabric-client-tags-api-v1: Fabric Client Tags 1.1.1+97bb207577
            fabric-command-api-v1: Fabric Command API (v1) 1.2.33+f71b366f77
            fabric-command-api-v2: Fabric Command API (v2) 2.2.12+b3afc78b77
            fabric-commands-v0: Fabric Commands (v0) 0.2.50+df3654b377
            fabric-containers-v0: Fabric Containers (v0) 0.1.63+df3654b377
            fabric-content-registries-v0: Fabric Content Registries (v0) 4.0.9+b3afc78b77
            fabric-convention-tags-v1: Fabric Convention Tags 1.5.4+a1a980da77
            fabric-crash-report-info-v1: Fabric Crash Report Info (v1) 0.2.18+aeb40ebe77
            fabric-data-generation-api-v1: Fabric Data Generation API (v1) 12.2.2+1e61dba177
            fabric-dimensions-v1: Fabric Dimensions API (v1) 2.1.53+8536527b77
            fabric-entity-events-v1: Fabric Entity Events (v1) 1.5.22+b3afc78b77
            fabric-events-interaction-v0: Fabric Events Interaction (v0) 0.6.1+e91849a877
            fabric-events-lifecycle-v0: Fabric Events Lifecycle (v0) 0.2.62+df3654b377
            fabric-game-rule-api-v1: Fabric Game Rule API (v1) 1.0.38+b04edc7a77
            fabric-item-api-v1: Fabric Item API (v1) 2.1.27+b3afc78b77
            fabric-item-group-api-v1: Fabric Item Group API (v1) 4.0.10+23d9108177
            fabric-keybindings-v0: Fabric Key Bindings (v0) 0.2.34+df3654b377
            fabric-lifecycle-events-v1: Fabric Lifecycle Events (v1) 2.2.21+b3afc78b77
            fabric-loot-api-v2: Fabric Loot API (v2) 1.1.39+b3afc78b77
            fabric-loot-tables-v1: Fabric Loot Tables (v1) 1.1.43+9e7660c677
            fabric-message-api-v1: Fabric Message API (v1) 5.1.7+3265161977
            fabric-mining-level-api-v1: Fabric Mining Level API (v1) 2.1.49+b3afc78b77
            fabric-model-loading-api-v1: Fabric Model Loading API (v1) 1.0.2+709a987177
            fabric-models-v0: Fabric Models (v0) 0.4.1+9386d8a777
            fabric-networking-api-v1: Fabric Networking API (v1) 1.3.10+eeb8eb3677
            fabric-networking-v0: Fabric Networking (v0) 0.3.50+df3654b377
            fabric-object-builder-api-v1: Fabric Object Builder API (v1) 11.1.1+6beca84877
            fabric-particles-v1: Fabric Particles (v1) 1.1.1+201a23a077
            fabric-recipe-api-v1: Fabric Recipe API (v1) 1.0.20+b3afc78b77
            fabric-registry-sync-v0: Fabric Registry Sync (v0) 2.3.2+4df89eb277
            fabric-renderer-api-v1: Fabric Renderer API (v1) 3.1.2+6bdb2ed077
            fabric-renderer-indigo: Fabric Renderer - Indigo 1.4.2+6bdb2ed077
            fabric-renderer-registries-v1: Fabric Renderer Registries (v1) 3.2.45+df3654b377
            fabric-rendering-data-attachment-v1: Fabric Rendering Data Attachment (v1) 0.3.34+b3afc78b77
            fabric-rendering-fluids-v1: Fabric Rendering Fluids (v1) 3.0.27+b3afc78b77
            fabric-rendering-v0: Fabric Rendering (v0) 1.1.48+df3654b377
            fabric-rendering-v1: Fabric Rendering (v1) 3.0.7+b3afc78b77
            fabric-resource-conditions-api-v1: Fabric Resource Conditions API (v1) 2.3.5+ea08f9d877
            fabric-resource-loader-v0: Fabric Resource Loader (v0) 0.11.9+132c48c177
            fabric-screen-api-v1: Fabric Screen API (v1) 2.0.7+b3afc78b77
            fabric-screen-handler-api-v1: Fabric Screen Handler API (v1) 1.3.29+b3afc78b77
            fabric-sound-api-v1: Fabric Sound API (v1) 1.0.12+b3afc78b77
            fabric-transfer-api-v1: Fabric Transfer API (v1) 3.3.0+cdf060b277
            fabric-transitive-access-wideners-v1: Fabric Transitive Access Wideners (v1) 4.3.0+6c31357e77
        fabric-language-kotlin: Fabric Language Kotlin 1.10.10+kotlin.1.9.10
            org_jetbrains_kotlin_kotlin-reflect: kotlin-reflect 1.9.10
            org_jetbrains_kotlin_kotlin-stdlib: kotlin-stdlib 1.9.10
            org_jetbrains_kotlin_kotlin-stdlib-jdk7: kotlin-stdlib-jdk7 1.9.10
            org_jetbrains_kotlin_kotlin-stdlib-jdk8: kotlin-stdlib-jdk8 1.9.10
            org_jetbrains_kotlinx_atomicfu-jvm: atomicfu-jvm 0.22.0
            org_jetbrains_kotlinx_kotlinx-coroutines-core-jvm: kotlinx-coroutines-core-jvm 1.7.3
            org_jetbrains_kotlinx_kotlinx-coroutines-jdk8: kotlinx-coroutines-jdk8 1.7.3
            org_jetbrains_kotlinx_kotlinx-datetime-jvm: kotlinx-datetime-jvm 0.4.0
            org_jetbrains_kotlinx_kotlinx-serialization-cbor-jvm: kotlinx-serialization-cbor-jvm 1.6.0
            org_jetbrains_kotlinx_kotlinx-serialization-core-jvm: kotlinx-serialization-core-jvm 1.6.0
            org_jetbrains_kotlinx_kotlinx-serialization-json-jvm: kotlinx-serialization-json-jvm 1.6.0
        fabricloader: Fabric Loader 0.14.22
        fabricskyboxes: FabricSkyBoxes 0.7.2+mc1.20.1
        fadeless: Fadeless 1.0.1
        fallingleaves: Falling Leaves 1.15.2+1.20.1
        fastquit: FastQuit 3.0.0-beta.2+1.20+
        ferritecore: FerriteCore 6.0.0
        forgeconfigapiport: Forge Config API Port 8.0.0
        fsb-interop: FabricSkyBoxes Interop 1.3.4+mc1.20-build.47
        fullbrightnesstoggle: Full Brightness Toggle 3.0
        gammautils: Gamma Utils 1.7.15
        graphutil: GraphUtil-Fabric 1.0.0-mc1.20.1
        holdthatchunk: Hold That Chunk 2.0.1
        iceberg: Iceberg 1.1.15
        immediatelyfast: ImmediatelyFast 1.2.1+1.20.1
            com_github_llamalad7_mixinextras: MixinExtras 0.2.0-beta.10
            net_lenni0451_reflect: Reflect 1.2.1
        indium: Indium 1.0.25+mc1.20.1
        inventoryhud: Inventory HUD + 3.4.18
        inventoryprofilesnext: Inventory Profiles Next 1.10.5
        iris: Iris 1.6.8
            io_github_douira_glsl-transformer: glsl-transformer 2.0.0-pre13
            org_anarres_jcpp: jcpp 1.4.14
            org_antlr_antlr4-runtime: antlr4-runtime 4.11.1
        isxander-main-menu-credits: Main Menu Credits 1.1.2
        java: OpenJDK 64-Bit Server VM 17
        krypton: Krypton 0.2.3
            com_velocitypowered_velocity-native: velocity-native 3.2.0-SNAPSHOT
        lambdynlights: LambDynamicLights 2.3.1+1.20.1
            pride: Pride Lib 1.2.0+1.19.4
        languagereload: Language Reload 1.5.8+1.20.1
        legendarytooltips: Legendary Tooltips 1.4.4
        libipn: libIPN 3.0.2
        litematica: Litematica 0.15.3
        lithium: Lithium 0.11.2
        malilib: MaLiLib 0.16.2
        mcg: MCG 1.4.0
        minecraft: Minecraft 1.20.1
        minihud: MiniHUD 0.27.0
        modelfix: Model Gap Fix 1.14
        modernfix: ModernFix 5.7.2+mc1.20.1
        modmenu: Mod Menu 7.2.1
        moreculling: More Culling 1.20.1-0.19.0
            conditional-mixin: conditional mixin 0.3.2
        nbttooltip: NBT Tooltip 1.7.1
        notenoughanimations: NotEnoughAnimations 1.6.4
        optigui: OptiGUI 2.1.5
            optiglue: OptiGlue 2.1.5-mc.1.19.3
            org_apache_commons_commons-text: commons-text 1.10.0
            org_ini4j_ini4j: ini4j 0.5.4
        org_jetbrains_annotations: annotations 13.0
        owo: oωo 0.11.0+1.20
            blue_endless_jankson: jankson 1.2.2
        plasmovoice: Plasmo Voice 2.0.6
            aopalliance_aopalliance: aopalliance 1.0
            com_google_inject_guice: guice 5.0.1
            fabric-permissions-api-v0: fabric-permissions-api 0.2-SNAPSHOT
            javax_inject_javax_inject: javax.inject 1
        prism: Prism 1.0.5
        raised: Raised 2.0.0
        raisedxappleskin: Raised x Appleskin 2.5.0
        reeses-sodium-options: Reese's Sodium Options 1.6.5+mc1.20.1-build.95
        rprenames: RP Renames 0.6.0
            libgui: LibGui 8.0.0-beta.1+1.20-rc1
                jankson: Jankson 5.0.1+j1.2.2
                libninepatch: LibNinePatch 1.2.0
        sneaktweak: Sneak Tweak 1.10.0
        sodium: Sodium 0.5.2
        sodium-extra: Sodium Extra 0.5.1+mc1.20.1-build.112
            caffeineconfig: CaffeineConfig 1.3.0+1.17
            crowdin-translate: CrowdinTranslate 1.4+1.19.3
        spark: spark 1.10.42
        symbol-chat: Symbol Chat 1.20.1-1.1.2
        threadtweak: ThreadTweak 1.20.1-0.1.0
        universalcraft: UniversalCraft 289
        viafabricplus: ViaFabricPlus 2.8.5
        vigilance: Vigilance 286
        vmp: Very Many Players 0.2.0+beta.7.101
        yet_another_config_lib_v3: YetAnotherConfigLib 3.1.1+1.20
            com_twelvemonkeys_common_common-image: common-image 3.10.0-SNAPSHOT
            com_twelvemonkeys_common_common-io: common-io 3.10.0-SNAPSHOT
            com_twelvemonkeys_common_common-lang: common-lang 3.10.0-SNAPSHOT
            com_twelvemonkeys_imageio_imageio-core: imageio-core 3.10.0-SNAPSHOT
            com_twelvemonkeys_imageio_imageio-metadata: imageio-metadata 3.10.0-SNAPSHOT
            com_twelvemonkeys_imageio_imageio-webp: imageio-webp 3.10.0-SNAPSHOT
        yosbr: YOSBR 0.1.2
    Loaded Shaderpack: (off)
    NEC status: No NEC detected
    Launched Version: 1.20.1
    Backend library: LWJGL version 3.3.1 SNAPSHOT
    Backend API: NVIDIA GeForce GTX 1650/PCIe/SSE2 GL version 3.2.0 NVIDIA 535.104.05, NVIDIA Corporation
    Window size: 1920x1080
    GL Caps: Using framebuffer using OpenGL 3.2
    GL debug messages: 
    Using VBOs: Yes
    Is Modded: Definitely; Client brand changed to 'fabric'; Server brand changed to 'fabric'
    Type: Integrated Server (map_client.txt)
    Graphics mode: fancy
    Resource Packs: vanilla, fabric
    Current Language: en_us
    CPU: 12x AMD Ryzen 5 3600 6-Core Processor
    Server Running: true
    Player Count: 1 / 8; [class_3222['dotPast'/1, l='ServerLevel[New World]', x=-10.88, y=-60.00, z=50.87]]
    Data Packs: vanilla, fabric
    Enabled Feature Flags: minecraft:vanilla
    World Generation: Stable
#@!@# Game crashed! Crash report saved to: #@!@# /home/dotpast/.local/share/PrismLauncher/instances/Hydrogen(1)/.minecraft/crash-reports/crash-2023-09-21_07.58.13-client.txt
Process exited with code 255.

Mod Version

1.7.0-beta.1+1.20

Controller

Sony DUALSHOCK 4 Wireless Controller (https://www.playstation.com/en-us/accessories/dualshock-4-wireless-controller/)

Bluetooth

Operating System

Linux/SteamOS

ARM

Additional Information

No response

Just to make sure...