Fabric API

Fabric API

106M Downloads

The game crashed whilst initializing game Error: java.lang.RuntimeException: Could not execute entrypoint stage 'main' due to errors, provided by 'ModID'!

sheeeev66 opened this issue ยท 3 comments

commented

I was coding my mod but the game crashes each time I load the mod. The problem started happening when I added new armor. I have no idea what could cause the problem...

this is the crash report:

---- Minecraft Crash Report ----
// There are four lights!

Time: 6/1/20 1:59 PM
Description: Initializing game

java.lang.RuntimeException: Could not execute entrypoint stage 'main' due to errors, provided by 'starwarsmaterials'!
	at net.fabricmc.loader.entrypoint.minecraft.hooks.EntrypointUtils.invoke0(EntrypointUtils.java:53)
	at net.fabricmc.loader.entrypoint.minecraft.hooks.EntrypointUtils.invoke(EntrypointUtils.java:36)
	at net.fabricmc.loader.entrypoint.minecraft.hooks.EntrypointClient.start(EntrypointClient.java:32)
	at net.minecraft.class_310.<init>(class_310.java:392)
	at net.minecraft.client.main.Main.main(Main.java:166)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:497)
	at net.fabricmc.loader.game.MinecraftGameProvider.launch(MinecraftGameProvider.java:192)
	at net.fabricmc.loader.launch.knot.Knot.init(Knot.java:140)
	at net.fabricmc.loader.launch.knot.KnotClient.main(KnotClient.java:26)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 4
	at net.star.wars.materials.armor.BeskarArmorMaterial.method_7697(BeskarArmorMaterial.java:22)
	at net.minecraft.class_1738.<init>(class_1738.java:69)
	at net.star.wars.materials.armor.BaseArmor.<init>(BaseArmor.java:12)
	at net.star.wars.materials.StarWarsMaterials.onInitialize(StarWarsMaterials.java:90)
	at net.fabricmc.loader.entrypoint.minecraft.hooks.EntrypointClient$$Lambda$1420/188928456.accept(Unknown Source)
	at net.fabricmc.loader.entrypoint.minecraft.hooks.EntrypointUtils.invoke0(EntrypointUtils.java:50)
	... 11 more


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

-- Head --
Thread: Render thread
Stacktrace:
	at net.fabricmc.loader.entrypoint.minecraft.hooks.EntrypointUtils.invoke0(EntrypointUtils.java:53)
	at net.fabricmc.loader.entrypoint.minecraft.hooks.EntrypointUtils.invoke(EntrypointUtils.java:36)
	at net.fabricmc.loader.entrypoint.minecraft.hooks.EntrypointClient.start(EntrypointClient.java:32)
	at net.minecraft.class_310.<init>(class_310.java:392)

-- Initialization --
Details:
Stacktrace:
	at net.minecraft.client.main.Main.main(Main.java:166)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:497)
	at net.fabricmc.loader.game.MinecraftGameProvider.launch(MinecraftGameProvider.java:192)
	at net.fabricmc.loader.launch.knot.Knot.init(Knot.java:140)
	at net.fabricmc.loader.launch.knot.KnotClient.main(KnotClient.java:26)

-- System Details --
Details:
	Minecraft Version: 1.15.2
	Minecraft Version ID: 1.15.2
	Operating System: Windows 10 (amd64) version 10.0
	Java Version: 1.8.0_51, Oracle Corporation
	Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
	Memory: 764902016 bytes (729 MB) / 1140850688 bytes (1088 MB) up to 2147483648 bytes (2048 MB)
	CPUs: 12
	JVM Flags: 9 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xss1M -Xmx2G -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=32M
	Fabric Mods: 
		fabric: Fabric API 0.11.1+build.312-1.15
		fabric-api-base: Fabric API Base 0.1.2+b7f9825d0c
		fabric-biomes-v1: Fabric Biomes (v1) 0.1.5+3b05f68e0c
		fabric-blockrenderlayer-v1: Fabric BlockRenderLayer Registration (v1) 1.1.4+c6a8ea890c
		fabric-climbable-api-v1: Fabric Climbable API (v1) 1.0.0+6ffe71e20c
		fabric-command-api-v1: Fabric Command API (v1) 1.0.2+2aebb7ff0c
		fabric-commands-v0: Fabric Commands (v0) 0.2.0+2e0c4ff50c
		fabric-containers-v0: Fabric Containers (v0) 0.1.3+b7f9825d0c
		fabric-content-registries-v0: Fabric Content Registries (v0) 0.1.3+b7f9825d0c
		fabric-crash-report-info-v1: Fabric Crash Report Info (v1) 0.1.2+b7f9825d0c
		fabric-dimensions-v1: fabric-dimensions-v1 0.3.0+2ad156310c
		fabric-events-interaction-v0: Fabric Events Interaction (v0) 0.3.0+fac69e320c
		fabric-events-lifecycle-v0: Fabric Events Lifecycle (v0) 0.1.2+003643510c
		fabric-item-groups-v0: Fabric Item Groups (v0) 0.1.6+045efb460c
		fabric-keybindings-v0: Fabric Key Bindings (v0) 0.1.1+dfdb52d60c
		fabric-loot-tables-v1: Fabric Loot Tables (v1) 0.1.5+e08a73050c
		fabric-mining-levels-v0: Fabric Mining Levels (v0) 0.1.2+ec951ea40c
		fabric-models-v0: Fabric Models (v0) 0.1.0+dfdb52d60c
		fabric-networking-blockentity-v0: Fabric Networking Block Entity (v0) 0.2.3+e08a73050c
		fabric-networking-v0: Fabric Networking (v0) 0.1.7+003643510c
		fabric-object-builder-api-v1: Fabric Object Builder API (v1) 1.2.1+e7a4edb30c
		fabric-object-builders-v0: Fabric Object Builders (v0) 0.5.1+3e5587510c
		fabric-particles-v1: fabric-particles-v1 0.1.2+ad2f81bd0c
		fabric-registry-sync-v0: Fabric Registry Sync (v0) 0.2.6+f3d8141b0c
		fabric-renderer-api-v1: Fabric Renderer API (v1) 0.2.10+f08b61330c
		fabric-renderer-indigo: Fabric Renderer - Indigo 0.2.23+9290e2ed0c
		fabric-renderer-registries-v1: Fabric Renderer Registries (v1) 2.0.1+5a0f9a600c
		fabric-rendering-data-attachment-v1: Fabric Rendering Data Attachment (v1) 0.1.3+b7f9825d0c
		fabric-rendering-fluids-v1: Fabric Rendering Fluids (v1) 0.1.6+12515ed90c
		fabric-rendering-v0: Fabric Rendering (v0) 1.1.0+534104900c
		fabric-rendering-v1: Fabric Rendering (v1) 1.0.0+2a034f0a0c
		fabric-resource-loader-v0: Fabric Resource Loader (v0) 0.1.10+06c939b30c
		fabric-tag-extensions-v0: Fabric Tag Extensions (v0) 0.1.3+abd915800c
		fabric-textures-v0: Fabric Textures (v0) 1.0.4+821cdba70c
		fabric-tool-attribute-api-v1: Fabric Tool Attribute API (v1) 1.1.0+3e5587510c
		fabricloader: Fabric Loader 0.8.2+build.194
		minecraft: Minecraft 1.15.2
		starwarsmaterials: Star Wars Materials and tools 1.0.0
	Launched Version: fabric-loader-0.8.2+build.194-1.15.2
	Backend library: LWJGL version 3.2.2 build 10
	Backend API: NO CONTEXT
	GL Caps: 
	Using VBOs: Yes
	Is Modded: Definitely; Client brand changed to 'fabric'
	Type: Client (map_client.txt)
	CPU: <unknown>

edit: I did some further research and testing and I figured out what causes the bug.

[...]
private static final int[] PROTECTION_AMOUNTS = new int[] {3, 6, 8, 3};

[...]

@Override
public int getProtectionAmount(EquipmentSlot arg1) {
return PROTECTION_AMOUNTS[arg1.getArmorStandSlotId()];
}

[...]

I still have no idea how to fix it

commented

Caused by: java.lang.ArrayIndexOutOfBoundsException: 4

Seems like an issue with starwarsmaterials. I'd see if the mod author released any fixes on this

commented

Caused by: java.lang.ArrayIndexOutOfBoundsException: 4

Seems like an issue with starwarsmaterials. I'd see if the mod author released any fixes on this

I am the author. the bug accrued after I added armor to it.

commented

I fixed the bug! turnes out i did .getArmorStandSlotId instead of .getEntitySlotId!