StellarWind22 / Basic-Shields-Fabric

Adds shields for all the vanilla materials and more!
https://www.curseforge.com/minecraft/mc-mods/basic-shields-fabric
Creative Commons Zero v1.0 Universal
6 stars 10 forks source link

[BUG] MC 1.18.2 Basic Shield 1.3.1 #40

Closed crest1993 closed 2 years ago

crest1993 commented 2 years ago

Crash when trying to block Shulker projectile. Minecraft 1.18.2 BasicShields-1.3.1-1.18.2

I think it's because the reflect damage, but the shulker is already dead and the projectile is still coming.

`---- Minecraft Crash Report ---- // Why did you do that?

Time: 24/03/2022, 07:54 Description: Ticking entity

java.lang.NullPointerException: Cannot invoke "net.minecraft.class_1297.method_5643(net.minecraft.class_1282, float)" because "attacker" is null at com.github.crimsondawn45.basicshields.module.VanillaModule.lambda$registerContent$0(VanillaModule.java:66) at com.github.crimsondawn45.fabricshieldlib.lib.event.ShieldBlockCallback.lambda$static$0(ShieldBlockCallback.java:22) at net.minecraft.class_1309.handler$bih000$damage(class_1309.java:9152) at net.minecraft.class_1309.method_5643(class_1309.java) at net.minecraft.class_1657.method_5643(class_1657.java:925) at net.minecraft.class_3222.method_5643(class_3222.java:704) at net.minecraft.class_1678.method_7454(class_1678.java:304) at net.minecraft.class_1676.method_7488(class_1676.java:148) at net.minecraft.class_1678.method_7488(class_1678.java:322) at net.minecraft.class_1678.method_5773(class_1678.java:237) at net.minecraft.class_3218.method_18762(class_3218.java:702) at net.minecraft.class_1937.method_18472(class_1937.java:485) at net.minecraft.class_3218.method_31420(class_3218.java:363) at net.minecraft.class_5574.method_31791(class_5574.java:54) at net.minecraft.class_3218.method_18765(class_3218.java:331) at net.minecraft.server.MinecraftServer.method_3813(MinecraftServer.java:907) at net.minecraft.server.MinecraftServer.method_3748(MinecraftServer.java:851) at net.minecraft.class_1132.method_3748(class_1132.java:97) at net.minecraft.server.MinecraftServer.method_29741(MinecraftServer.java:697) at net.minecraft.server.MinecraftServer.method_29739(MinecraftServer.java:273) at java.base/java.lang.Thread.run(Thread.java:833)

A detailed walkthrough of the error, its code path and all known details is as follows:

-- Head -- Thread: Server thread Stacktrace: at com.github.crimsondawn45.basicshields.module.VanillaModule.lambda$registerContent$0(VanillaModule.java:66) at com.github.crimsondawn45.fabricshieldlib.lib.event.ShieldBlockCallback.lambda$static$0(ShieldBlockCallback.java:22) at net.minecraft.class_1309.handler$bih000$damage(class_1309.java:9152) at net.minecraft.class_1309.method_5643(class_1309.java) at net.minecraft.class_1657.method_5643(class_1657.java:925) at net.minecraft.class_3222.method_5643(class_3222.java:704) at net.minecraft.class_1678.method_7454(class_1678.java:304) at net.minecraft.class_1676.method_7488(class_1676.java:148) at net.minecraft.class_1678.method_7488(class_1678.java:322) at net.minecraft.class_1678.method_5773(class_1678.java:237) at net.minecraft.class_3218.method_18762(class_3218.java:702) at net.minecraft.class_1937.method_18472(class_1937.java:485) at net.minecraft.class_3218.method_31420(class_3218.java:363) at net.minecraft.class_5574.method_31791(class_5574.java:54) at net.minecraft.class_3218.method_18765(class_3218.java:331)

-- Entity being ticked -- Details: Entity Type: minecraft:shulker_bullet (net.minecraft.class_1678) Entity ID: 5847 Entity Name: Shulker Bullet Entity's Exact location: -905.04, 59.06, -2211.08 Entity's Block location: World: (-906,59,-2212), Section: (at 6,11,12 in -57,3,-139; chunk contains blocks -912,0,-2224 to -897,255,-2209), Region: (-2,-5; contains chunks -64,-160 to -33,-129, blocks -1024,0,-2560 to -513,255,-2049) Entity's Momentum: 0.18, -0.00, -0.02 Entity's Passengers: [] Entity's Vehicle: null Stacktrace: at net.minecraft.class_1937.method_18472(class_1937.java:485) at net.minecraft.class_3218.method_31420(class_3218.java:363) at net.minecraft.class_5574.method_31791(class_5574.java:54) at net.minecraft.class_3218.method_18765(class_3218.java:331) at net.minecraft.server.MinecraftServer.method_3813(MinecraftServer.java:907) at net.minecraft.server.MinecraftServer.method_3748(MinecraftServer.java:851) at net.minecraft.class_1132.method_3748(class_1132.java:97) at net.minecraft.server.MinecraftServer.method_29741(MinecraftServer.java:697) at net.minecraft.server.MinecraftServer.method_29739(MinecraftServer.java:273) at java.base/java.lang.Thread.run(Thread.java:833)

-- Affected level -- Details: All players: 1 total; [class_3222['crest93'/184, l='ServerLevel[Skyblock 4.10]', x=-904.29, y=59.00, z=-2210.95]] Chunk stats: 2348 Level dimension: minecraft:the_end Derived: true Level spawn location: World: (8,64,7), Section: (at 8,0,7 in 0,4,0; chunk contains blocks 0,0,0 to 15,255,15), Region: (0,0; contains chunks 0,0 to 31,31, blocks 0,0,0 to 511,255,511) Level time: 5323241 game time, 1837772 day time Level name: Skyblock 4.10 Level game mode: Game mode: survival (ID 0). Hardcore: false. Cheats: true Level weather: Rain time: 71258 (now: false), thunder time: 101973 (now: false) Known server brands: vanilla, fabric Level was modded: true Level storage version: 0x04ABD - Anvil Stacktrace: at net.minecraft.server.MinecraftServer.method_3813(MinecraftServer.java:907) at net.minecraft.server.MinecraftServer.method_3748(MinecraftServer.java:851) at net.minecraft.class_1132.method_3748(class_1132.java:97) at net.minecraft.server.MinecraftServer.method_29741(MinecraftServer.java:697) at net.minecraft.server.MinecraftServer.method_29739(MinecraftServer.java:273) at java.base/java.lang.Thread.run(Thread.java:833)

-- System Details -- Details: Minecraft Version: 1.18.2 Minecraft Version ID: 1.18.2 Operating System: Windows 10 (amd64) version 10.0 Java Version: 17, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode, sharing), Oracle Corporation Memory: 1310504912 bytes (1249 MiB) / 2684354560 bytes (2560 MiB) up to 2684354560 bytes (2560 MiB) CPUs: 4 Processor Vendor: GenuineIntel Processor Name: Intel(R) Core(TM) i5 CPU M 460 @ 2.53GHz Identifier: Intel64 Family 6 Model 37 Stepping 5 Microarchitecture: Westmere (Client) Frequency (GHz): 2.53 Number of physical packages: 1 Number of physical CPUs: 2 Number of logical CPUs: 4 Graphics card #0 name: NVIDIA GeForce 310M
Graphics card #0 vendor: NVIDIA (0x10de) Graphics card #0 VRAM (MB): 1024.00 Graphics card #0 deviceId: 0x0a70 Graphics card #0 versionInfo: DriverVersion=21.21.13.4201 Memory slot #0 capacity (MB): 2048.00 Memory slot #0 clockSpeed (GHz): 1.07 Memory slot #0 type: DDR3 Memory slot #1 capacity (MB): 4096.00 Memory slot #1 clockSpeed (GHz): 1.07 Memory slot #1 type: DDR3 Virtual memory max (MB): 10550.50 Virtual memory used (MB): 7405.37 Swap memory total (MB): 4608.00 Swap memory used (MB): 519.21 JVM Flags: 14 total; -XX:+UnlockExperimentalVMOptions -XX:-UseParallelGC -XX:+UseG1GC -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=32M -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:+ParallelRefProcEnabled -Xms2048M -Xmx2560M -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xss1M Fabric Mods: actuallyunbreaking: Actually Unbreaking 1.18.2-0.4.0 advanced_runtime_resource_pack: Runtime Resource Pack 0.5.5 airaffinity: AirAffinity 1.18.2-Fabric-v1.0.0 allarrowsinfinityfix: All Arrows Infinity Fix 1.0.0 alwaysawitherskull-fabric: Always a Wither Skull (Fabric) 1.4 amecsapi: Amecs API 1.3.5+mc22w06a anvil_fix: AnvilFix 1.3.0 appleskin: AppleSkin 2.4.0+mc1.18.2 architectury: Architectury 4.1.34 attributefix: AttributeFix 14.0.1 autoharvest: autoharvest 1.3.2 bagofholding: Bag Of Holding 3.1.0 balm-fabric: Balm 3.0.0+0 basicshields: Basic Shields [Fabric] 1.3.1-1.18.2 beenfo: Beenfo 1.18.2-fabric0.47.10-1.3.3 betterspawnercontrol-fabric: Better Spawner Control (Fabric) 1.6 blue_endless_jankson: jankson 1.2.1 bookshelf: Bookshelf 13.0.7 bosses_of_mass_destruction: Bosses of Mass Destruction (Beta) 1.3.6-1.18.2 bowinfinityfix: Bow Infinity Fix rv11 cardinal-components: Cardinal Components API 4.1.4 cardinal-components-base: Cardinal Components API (base) 4.1.4 cardinal-components-block: Cardinal Components API (blocks) 4.1.4 cardinal-components-chunk: Cardinal Components API (chunks) 4.1.4 cardinal-components-entity: Cardinal Components API (entities) 4.1.4 cardinal-components-item: Cardinal Components API (items) 4.1.4 cardinal-components-level: Cardinal Components API (world saves) 4.1.4 cardinal-components-scoreboard: Cardinal Components API (scoreboard) 4.1.4 cardinal-components-world: Cardinal Components API (worlds) 4.1.4 carrier: Carrier 1.10.0 cleardespawn: Clear Despawn 1.1.7 cloth-basic-math: cloth-basic-math 0.6.0 cloth-config: Cloth Config v6 6.2.57 cloth-config-lite: cloth-config-lite 2.0.6 clumps: Clumps 8.0.0+7 coat: Coat 1.0.0-beta.17+mc1.18.2 collective-fabric: Collective (Fabric) 4.25 com_electronwill_night-config_core: core 3.6.3 com_electronwill_night-config_toml: toml 3.6.3 com_eliotlash_mclib_mclib: mclib 18 com_eliotlash_molang_molang: molang 18 com_github_luben_zstd-jni: zstd-jni 1.5.2-2 com_moandjiezana_toml_toml4j: toml4j 0.7.2 controlling: Controlling For Fabric 9.0+17 craftingcraft: CraftingCraft 12.0.0 crawl: Crawl 0.10.2 crowdin-translate: CrowdinTranslate 1.4+1.18.2 customskinloader: CustomSkinLoader 14.13-SNAPSHOT-317 dark-enchanting: Dark Enchanting 0.6.3+1.18 dashloader: DashLoader 3.0.1+1.18 dev_quantumfusion_dashloader_dashloader-core: dashloader-core 1.3.0 dev_quantumfusion_hyphen: hyphen 0.2.0 diggusmaximus: Diggus Maximus 1.5.4-1.18 doubledoors-fabric: Double Doors (Fabric) 3.3 durability101: Durability101 0.0.4 dynamicfps: Dynamic FPS 2.1.0 easymagic: Easy Magic 3.3.0 eldritch_mobs: Eldritch Mobs 1.11.0 elytranofall: ElytraNoFall 1.18.2-Fabric-v1.0.0 elytratrinket: Elytra Trinket 3.0.0-1.18.1 enchantingcommands-fabric: Enchanting Commands (Fabric) 1.7 enchantinginfuser: Enchanting Infuser 3.2.0 enchdesc: EnchantmentDescriptions 10.0.2 enriched: Enriched 2.3.0 enriched-infusions: Enriched Infusions 1.1 entityoutliner: Entity Outliner 1.2.1 exenchants: Extended Enchantments 0.0.2 expanded_armor_enchanting: Expanded Armor Enchanting 1.0.2 expanded_axe_enchanting: Expanded Axe Enchanting 1.0.3 expanded_trident_enchanting: Expanded Trident Enchanting 1.0.3 expanded_weapon_enchanting: Expanded Weapon Enchanting 1.0.2 expandedstorage: Expanded Storage 7.3.11 extended_armor_bars: Extended Armor Bars 1.2.1 extensibleenums: Extensible Enums 3.0.0 fabric: Fabric API 0.48.0+1.18.2 fabric-api-base: Fabric API Base 0.4.4+d7c144a860 fabric-api-lookup-api-v1: Fabric API Lookup API (v1) 1.5.7+d7c144a860 fabric-biome-api-v1: Fabric Biome API (v1) 8.0.3+801ec85b60 fabric-blockrenderlayer-v1: Fabric BlockRenderLayer Registration (v1) 1.1.12+3ac43d9560 fabric-command-api-v1: Fabric Command API (v1) 1.1.9+d7c144a860 fabric-commands-v0: Fabric Commands (v0) 0.2.8+b4f4f6cd60 fabric-containers-v0: Fabric Containers (v0) 0.1.21+d7c144a860 fabric-content-registries-v0: Fabric Content Registries (v0) 3.0.2+d82b939260 fabric-crash-report-info-v1: Fabric Crash Report Info (v1) 0.1.11+3ac43d9560 fabric-dimensions-v1: Fabric Dimensions API (v1) 2.1.17+2540745460 fabric-entity-events-v1: Fabric Entity Events (v1) 1.4.8+d7c144a860 fabric-events-interaction-v0: Fabric Events Interaction (v0) 0.4.19+d7c144a860 fabric-events-lifecycle-v0: Fabric Events Lifecycle (v0) 0.2.13+d7c144a860 fabric-game-rule-api-v1: Fabric Game Rule API (v1) 1.0.13+d7c144a860 fabric-item-api-v1: Fabric Item API (v1) 1.3.3+691a79b560 fabric-item-groups-v0: Fabric Item Groups (v0) 0.3.10+3ac43d9560 fabric-key-binding-api-v1: Fabric Key Binding API (v1) 1.0.12+54e5b2ec60 fabric-keybindings-v0: Fabric Key Bindings (v0) 0.2.10+b4f4f6cd60 fabric-language-kotlin: Fabric Language Kotlin 1.7.1+kotlin.1.6.10 fabric-lifecycle-events-v1: Fabric Lifecycle Events (v1) 2.0.2+2540745460 fabric-loot-tables-v1: Fabric Loot Tables (v1) 1.0.11+d7c144a860 fabric-mining-level-api-v1: Fabric Mining Level API (v1) 2.0.4+d1027f7d60 fabric-models-v0: Fabric Models (v0) 0.3.6+d7c144a860 fabric-networking-api-v1: Fabric Networking API (v1) 1.0.21+d882b91560 fabric-networking-v0: Fabric Networking (v0) 0.3.8+b4f4f6cd60 fabric-object-builder-api-v1: Fabric Object Builder API (v1) 2.0.3+40c91ec860 fabric-particles-v1: Fabric Particles (v1) 0.2.12+526dc1ac60 fabric-registry-sync-v0: Fabric Registry Sync (v0) 0.9.8+0d9ab37260 fabric-renderer-api-v1: Fabric Renderer API (v1) 0.4.13+d882b91560 fabric-renderer-indigo: Fabric Renderer - Indigo 0.4.17+d8c7b9ae60 fabric-renderer-registries-v1: Fabric Renderer Registries (v1) 3.2.11+b4f4f6cd60 fabric-rendering-data-attachment-v1: Fabric Rendering Data Attachment (v1) 0.3.7+d7c144a860 fabric-rendering-fluids-v1: Fabric Rendering Fluids (v1) 2.0.2+54e5b2ec60 fabric-rendering-v0: Fabric Rendering (v0) 1.1.13+b4f4f6cd60 fabric-rendering-v1: Fabric Rendering (v1) 1.10.7+54e5b2ec60 fabric-resource-conditions-api-v1: Fabric Resource Conditions API (v1) 2.0.2+d1027f7d60 fabric-resource-loader-v0: Fabric Resource Loader (v0) 0.4.18+2de5574560 fabric-screen-api-v1: Fabric Screen API (v1) 1.0.10+d882b91560 fabric-screen-handler-api-v1: Fabric Screen Handler API (v1) 1.1.14+40c91ec860 fabric-textures-v0: Fabric Textures (v0) 1.0.12+3ac43d9560 fabric-transfer-api-v1: Fabric Transfer API (v1) 1.5.14+cca23f9360 fabric-transitive-access-wideners-v1: Fabric Transitive Access Wideners (v1) 1.0.0+40c91ec860 fabricloader: Fabric Loader 0.13.3 fabricshieldlib: Fabric Shield Lib 1.5.3-1.18 fabrilousupdater: FabrilousUpdater 2.6+1.18.2 fallingtree: FallingTree 3.4.1 fasterfurnaces: Faster Furnaces Mod 1.0.1 ferritecore: FerriteCore 4.2.0 fertilization: Fertilization 8.0.0 fiber: fiber 0.23.0-2 forgeconfigapiport: Forge Config API Port 3.2.0 gbfabrictools: GBfabrictools 1.3.4+1.18.2 geckolib3: Geckolib 3.0.35 gobber2: Gobber2 2.5.68 hardcorequesting: Hardcore Questing Mode 1.18.2-5.10.0 harvest_scythes: Harvest Scythes 2.5.0 here-be-no-dragons: Here be no Dragons! 1.0.0 indium: Indium 1.0.2+mc1.18.2 infinitevillagertrading: InfiniteVillagerTrading 1.18.2-fabric0.47.10-1.1 inventoryhud: Inventory HUD + 3.4.2 inventorysorter: Inventory Sorter 1.8.6-1.18 inventorytotem-fabric: Inventory Totem (Fabric) 1.5 jankson: Jankson 4.0.0+j1.2.0 java: Java HotSpot(TM) 64-Bit Server VM 17 justenoughkeys: Just Enough Keys 0.5.3 kyrptconfig: Kyrpt Config 1.4.2-1.18 libblockattributes_core: LibBlockAttributes (Core) 0.10.2 libblockattributes_fluids: LibBlockAttributes (Fluids) 0.10.2 libgui: LibGui 5.3.1+1.18 libninepatch: LibNinePatch 1.1.0 lithium: Lithium 0.7.9 maelstrom_library: Maelstrom Library 1.2.4-1.18.2 midnightlib: MidnightLib 0.4.0 minecraft: Minecraft 1.18.2 mm: Manningham Mills 2.3 mob_catcher: Mob Catcher 1.1.26 modmanager: Mod Manager 1.2.3+1.18 modmenu: Mod Menu 3.1.0 mousewheelie: Mouse Wheelie 1.8.3+mc1.18.2 multipart_entities: MultipartEntities 1.1.5-1.18.2 ninjaphenix_container_lib: NinjaPhenix's Container Library 1.3.0 omega-config: OmegaConfig 1.2.3-1.18.1 omega-config-gui: Omega Config GUI 1.2.3-1.18.1 org_jetbrains_annotations: annotations 19.0.0 org_jetbrains_kotlin_kotlin-reflect: kotlin-reflect 1.6.10 org_jetbrains_kotlin_kotlin-stdlib: kotlin-stdlib 1.6.10 org_jetbrains_kotlin_kotlin-stdlib-jdk7: kotlin-stdlib-jdk7 1.6.10 org_jetbrains_kotlin_kotlin-stdlib-jdk8: kotlin-stdlib-jdk8 1.6.10 org_jetbrains_kotlinx_kotlinx-coroutines-core-jvm: kotlinx-coroutines-core-jvm 1.5.2 org_jetbrains_kotlinx_kotlinx-coroutines-jdk8: kotlinx-coroutines-jdk8 1.5.2 org_jetbrains_kotlinx_kotlinx-serialization-cbor-jvm: kotlinx-serialization-cbor-jvm 1.3.1 org_jetbrains_kotlinx_kotlinx-serialization-core-jvm: kotlinx-serialization-core-jvm 1.3.1 org_jetbrains_kotlinx_kotlinx-serialization-json-jvm: kotlinx-serialization-json-jvm 1.3.1 org_joml_joml: joml 1.10.2 oro_config: OroArmor Config 3.1.0 overpoweredmending: OverpoweredMending 2.4.1 owo: oωo 0.6.0+1.18 patchouli: Patchouli 1.18.2-66-FABRIC phosphor: Phosphor 0.8.1 polymorph: Polymorph 0.0.19-1.18.1 pugh_lib: Pugh Lib 1.3.0 pugh_tools: Pugh Tools 1.2.2 puzzleslib: Puzzles Lib 3.3.1 quartzelv: Quartz Elevator 2.1.1+1.18 quickshulker: Quick Shulker 1.3.6-1.18 retraining: Retraining 1.1.0 rib: The Real Infinity Bow 1.1.0-1.18.1 rightclickharvest: Right Click Harvest 1.5.1 roughlyenoughitems: Roughly Enough Items 8.0.442 runelic: Runelic 11.0.1 securecrops: Secure Crops [Fabric] 0.2.0-1.18.x sheepconsistency: Sheep Consistency 1.0.4 shulkerutils: shulkerutils 1.0.4-1.18 sodium: Sodium 0.4.1+build.15 spellbound: Spellbound 1.8.0 stacc: Stacc 1.3.0 stacker: Stacker 2.1.3 stylisheffects: Stylish Effects 3.1.0 things: Things 0.2.16+1.18 tooltipfix: ToolTip Fix 1.0.4-1.18 totemmod: Wither Totems Mod 0.3.5-1.18.2-pre2 tradingpost: Trading Post 3.2.0 trinketofundying: Trinket of Undying 2.0.1-1.18 trinkets: Trinkets 3.3.0 trinketshulkerboxes: Trinket Shulker Boxes 2.0.1-1.18.1 tweed4_annotated: tweed4_annotated 1.3.0+mc1.18.2 tweed4_base: tweed4_base 1.4.1+mc1.18.2 tweed4_data: tweed4_data 1.2.1+mc1.18.2 tweed4_data_hjson: tweed4_data_hjson 1.1.0+mc1.18.2 tweed4_tailor_coat: tweed4_tailor_coat 1.1.1+mc1.18.2 tweed4_tailor_screen: tweed4_tailor_screen 1.0.2+mc1.18.2 upgradedechests: Upgraded Ender Chests 1.0.3-1.18 upgradedshulkers: Upgraded Shulkers 1.1.1-1.18 villagernames: Villager Names 4.0.3 visualoverhaul: VisualOverhaul 4.1.0 ward_blocks: Ward Blocks 1.2.28 waystones: Waystones 2.5.0 worldedit: WorldEdit 7.2.10+1742f98 worldeditcui: WorldEditCUI 1.18.2+01 wthit: wthit 4.8.0 xaerominimap: Xaero's Minimap 22.3.0 xaeroworldmap: Xaero's World Map 1.20.3.1 xray: XrayMod 2.0.1 xtraarrows: Xtra Arrows 1.8 yigd: You're in Grave Danger 1.3.1 Server Running: true Player Count: 1 / 8; [class_3222['crest93'/184, l='ServerLevel[Skyblock 4.10]', x=-904.29, y=59.00, z=-2210.95]] Data Packs: vanilla, file/skyblockDatapack (incompatible), Fabric Mods World Generation: Stable Type: Integrated Server (map_client.txt) Is Modded: Definitely; Client brand changed to 'fabric'; Server brand changed to 'fabric'`

StellarWind22 commented 2 years ago

Yeah, I forgot to put a null check on the part of the code that damages what tried to damage you.

StellarWind22 commented 2 years ago

This is a duplicate of another issue & has been fixed in the latest commit that will be included in 1.4.0