Jump to content

[1.18.1][SOLVED] Importing files from Github as a depedency


Newek97

Recommended Posts

I'm kind of new to minecraft modding, and didn't used Gradle or any repository before, so I'm pretty confused with all this stuff. I've been struggling for a few days now to import any mod API in my dev environment through my build.gradle, and finally managed to suceed with JEI. But I'm now attempting to import Baubles : Reborn? API from Github, and followed indications from an old thread. But since they were given for ForgeGradle 4, the method compile doesn't exist anymore in 5.1 it seems. I tried the following instead :

repository { maven { url 'https://jitpack.io' } }
depedencies { compileOnly files('com.github.lazyMods:baubles:1.18:api') }

And if it doesn't throw any error upon rebuilding, it doesn't seem to work either. My question is : how do I import files as a compile and/or runtime depedency from a given repository (including a local repo, say projectDir/libs) ? Here is my full build.gradle file. Thanks !

Edited by Newek97
Added repository declaration for more clarity
Link to comment
Share on other sites

Thanks, I'll try to investigate a bit more with the implementation method, but for now it throws me error because it can't find .pom or .jar files, which is still an improvement !

Now how do I specify on which configuration I want to use this depedency ? Do I simply add compileOnly before the implementation method like before ? I'd want to try out soft depedency with Baubles, and as such I need to make the mod avaible or not during runtime.

Link to comment
Share on other sites

  Ok, so I did some investigations and after a lot of trial and error, I finally came up with a solution. I will try to explain what I did, and why, for anyone who might need it.

From what I understood, implementation will add a depedency for both compiling and runtime (pretty sure it will only include API files for compiling if there are, but I'm not 100% sure), and will resolve any nested depedencies aswell, so its kinda neat if one's mod permenently depends on other's mod or API ! Though I need to control whether a mod is included during runtime or not, so I need to specify the scope of my depedencies.

I did some searches, and it turned out that Gradle will consume either jars or source folders regardless, so there is not a specific way to deal with one or the other it seems. I then tried the following and it worked like a charm (modified the commit branch / tags so its pointing to a permanent commit, more info here) !

depedencies {
  compileOnly 'com.github.lazyMods:baubles:1.10.0.0-1.18:api'
  runtimeOnly 'com.github.lazyMods:baubles:1.10.0.0-1.18'
}

But, whenever I try to run, the game crashes with a NoSuchMethod exception, pointing towards a method MenuScreens::m_96206_ called within the Baubles main class during ClientSetup (which is the unmapped name of MenuScreens::register) ; which is clearly a mapping issue. It confused me at first, but now that I think of it it's quite obvious : trying to run the game with uncompiled source files will cause all sorts of issues. And even if Jitpack seems to compile on the go those files, it will lack any metadata expected by Forge or ForgeGradle, so it's no use anyway.

The only two solutions I can think of are :

  1. Download the mod jar, put it in a libs folder inside your workingDir that you can settup as a local repository, then add that jar as a runtime depedency
  2. Use CurseMaven as a repository (as @diesieben07 suggested), and add the correct mod jar as a depedency (more info here)

I chose the latter, so now I have the following in my build.gradle file, and it works perfectly (one can even remove the ":api" from the baubles depedency to show the entire mod source files in Eclipse) :

repositories {
  	maven { url "https://cursemaven.com" content { includeGroup "curse.maven" } }
  	maven { url "https://jitpack.io" }
}

depedencies {
 	compileOnly "com.github.lazyMods:baubles:1.10.0.0-1.18:api"
  	runtimeOnly fg.deobf("curse.maven:baubles-366844:3576950") // Points toward Baubles: Reborn? v1.10.0.1-1.18.1 on curseforge.com
}

I couldn't use CurseMaven straight up as lazynessmind didn't provide a source jar or an api jar on curse forge just yet, so I had to use its Github instead to get the API, hence the struggle. I could have added the mod jar itself as an API, but then I would have to manualy add the source files for Eclipse, which then makes this whole "manage your depedencies solely with Gradle" obsolete...

 

Thanks for the help, as I could not figure out those things on my own ! I hope that may be usefull to someone some day !

Link to comment
Share on other sites

  • Newek97 changed the title to [1.18.1][SOLVED] Importing files from Github as a depedency

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now


  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • I was plating on a aternos server with my friend. My friend logged of and I was alone. I installed some mods. In one moment I used the basuca from the a.v.a gun mod and the game suddenly crashed. I used the basuca when my friend was online and everything was perfect. I readed a lot of posts and edited the java execution command parameters. But nothing worked. I tried chaning the memory ram using this parameter -Xmx<MemoryRam>G But nothing worked. I even setted -Xmx15G and more it didn' work Can someone help me? These are the crash logs (Some information is removed for security as usernames and more.):   ---- Minecraft Crash Report ---- // Don't be sad, have a hug! <3 Time: 6/2/23 5:02 PM Description: Unexpected error java.lang.IndexOutOfBoundsException: Index: 0, Size: 0     at java.util.ArrayList.rangeCheck(ArrayList.java:653) ~[?:1.8.0_51] {}     at java.util.ArrayList.get(ArrayList.java:429) ~[?:1.8.0_51] {}     at pellucid.ava.misc.renderers.AVABakedModel.getPerspectiveInBetween(AVABakedModel.java:426) ~[?:1.9.8.77965] {re:classloading}     at pellucid.ava.misc.renderers.AVABakedModel.getPerspectiveInBetween(AVABakedModel.java:407) ~[?:1.9.8.77965] {re:classloading}     at pellucid.ava.misc.renderers.AVABakedModel.getPerspectiveInBetween(AVABakedModel.java:402) ~[?:1.9.8.77965] {re:classloading}     at pellucid.ava.misc.renderers.models.ModifiedGunModel.modifyPerspective(ModifiedGunModel.java:486) ~[?:1.9.8.77965] {re:classloading}     at pellucid.ava.misc.renderers.models.ModifiedGunModel.modifyPerspective(ModifiedGunModel.java:426) ~[?:1.9.8.77965] {re:classloading}     at pellucid.ava.misc.renderers.models.m202.M202Model.handlePerspective(M202Model.java:131) ~[?:1.9.8.77965] {re:classloading}     at net.minecraftforge.client.ForgeHooksClient.handleCameraTransforms(ForgeHooksClient.java:416) ~[?:?] {re:classloading}     at net.minecraft.client.renderer.ItemRenderer.func_229111_a_(ItemRenderer.java:98) ~[?:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}     at net.minecraft.client.renderer.ItemRenderer.func_229109_a_(ItemRenderer.java:207) ~[?:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}     at net.minecraft.client.renderer.FirstPersonRenderer.func_228397_a_(FirstPersonRenderer.java:50) ~[?:?] {re:mixin,pl:accesstransformer:B,xf:fml:forge:bows.1,xf:fml:forge:crossbows.0,xf:fml:forge:crossbows.1,xf:fml:forge:filled_map.0,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,xf:fml:forge:bows.1,xf:fml:forge:crossbows.0,xf:fml:forge:crossbows.1,xf:fml:forge:filled_map.0,pl:mixin:APP:ava.mixins.json:client.FirstPersonRendererMixin,pl:mixin:A,pl:runtimedistcleaner:A}     at net.minecraft.client.renderer.FirstPersonRenderer.func_228405_a_(FirstPersonRenderer.java:390) ~[?:?] {re:mixin,pl:accesstransformer:B,xf:fml:forge:bows.1,xf:fml:forge:crossbows.0,xf:fml:forge:crossbows.1,xf:fml:forge:filled_map.0,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,xf:fml:forge:bows.1,xf:fml:forge:crossbows.0,xf:fml:forge:crossbows.1,xf:fml:forge:filled_map.0,pl:mixin:APP:ava.mixins.json:client.FirstPersonRendererMixin,pl:mixin:A,pl:runtimedistcleaner:A}     at net.minecraft.client.renderer.FirstPersonRenderer.func_228396_a_(FirstPersonRenderer.java:244) ~[?:?] {re:mixin,pl:accesstransformer:B,xf:fml:forge:bows.1,xf:fml:forge:crossbows.0,xf:fml:forge:crossbows.1,xf:fml:forge:filled_map.0,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,xf:fml:forge:bows.1,xf:fml:forge:crossbows.0,xf:fml:forge:crossbows.1,xf:fml:forge:filled_map.0,pl:mixin:APP:ava.mixins.json:client.FirstPersonRendererMixin,pl:mixin:A,pl:runtimedistcleaner:A}     at net.minecraft.client.renderer.GameRenderer.func_228381_a_(GameRenderer.java:369) ~[?:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:A,pl:runtimedistcleaner:A}     at net.minecraft.client.renderer.GameRenderer.func_228378_a_(GameRenderer.java:614) ~[?:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:A,pl:runtimedistcleaner:A}     at net.minecraft.client.renderer.GameRenderer.func_195458_a(GameRenderer.java:425) ~[?:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:A,pl:runtimedistcleaner:A}     at net.minecraft.client.Minecraft.func_195542_b(Minecraft.java:977) [?:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:flywheel.mixins.json:ShaderCloseMixin,pl:mixin:APP:create.mixins.json:WindowResizeMixin,pl:mixin:A,pl:runtimedistcleaner:A}     at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:607) [?:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:flywheel.mixins.json:ShaderCloseMixin,pl:mixin:APP:create.mixins.json:WindowResizeMixin,pl:mixin:A,pl:runtimedistcleaner:A}     at net.minecraft.client.main.Main.main(Main.java:184) [?:?] {re:classloading,pl:runtimedistcleaner:A}     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_51] {}     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_51] {}     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_51] {}     at java.lang.reflect.Method.invoke(Method.java:497) ~[?:1.8.0_51] {}     at net.minecraftforge.fml.loading.FMLClientLaunchProvider.lambda$launchService$0(FMLClientLaunchProvider.java:51) [forge-1.16.5-36.2.34.jar:36.2] {}     at net.minecraftforge.fml.loading.FMLClientLaunchProvider$$Lambda$457/646445398.call(Unknown Source) [forge-1.16.5-36.2.34.jar:36.2] {}     at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-8.1.3.jar:?] {}     at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) [modlauncher-8.1.3.jar:?] {}     at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) [modlauncher-8.1.3.jar:?] {}     at cpw.mods.modlauncher.Launcher.run(Launcher.java:82) [modlauncher-8.1.3.jar:?] {}     at cpw.mods.modlauncher.Launcher.main(Launcher.java:66) [modlauncher-8.1.3.jar:?] {} A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Thread: Render thread Stacktrace:     at java.util.ArrayList.rangeCheck(ArrayList.java:653) ~[?:1.8.0_51] {}     at java.util.ArrayList.get(ArrayList.java:429) ~[?:1.8.0_51] {}     at pellucid.ava.misc.renderers.AVABakedModel.getPerspectiveInBetween(AVABakedModel.java:426) ~[?:1.9.8.77965] {re:classloading}     at pellucid.ava.misc.renderers.AVABakedModel.getPerspectiveInBetween(AVABakedModel.java:407) ~[?:1.9.8.77965] {re:classloading}     at pellucid.ava.misc.renderers.AVABakedModel.getPerspectiveInBetween(AVABakedModel.java:402) ~[?:1.9.8.77965] {re:classloading}     at pellucid.ava.misc.renderers.models.ModifiedGunModel.modifyPerspective(ModifiedGunModel.java:486) ~[?:1.9.8.77965] {re:classloading}     at pellucid.ava.misc.renderers.models.ModifiedGunModel.modifyPerspective(ModifiedGunModel.java:426) ~[?:1.9.8.77965] {re:classloading}     at pellucid.ava.misc.renderers.models.m202.M202Model.handlePerspective(M202Model.java:131) ~[?:1.9.8.77965] {re:classloading}     at net.minecraftforge.client.ForgeHooksClient.handleCameraTransforms(ForgeHooksClient.java:416) ~[?:?] {re:classloading}     at net.minecraft.client.renderer.ItemRenderer.func_229111_a_(ItemRenderer.java:98) ~[?:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}     at net.minecraft.client.renderer.ItemRenderer.func_229109_a_(ItemRenderer.java:207) ~[?:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}     at net.minecraft.client.renderer.FirstPersonRenderer.func_228397_a_(FirstPersonRenderer.java:50) ~[?:?] {re:mixin,pl:accesstransformer:B,xf:fml:forge:bows.1,xf:fml:forge:crossbows.0,xf:fml:forge:crossbows.1,xf:fml:forge:filled_map.0,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,xf:fml:forge:bows.1,xf:fml:forge:crossbows.0,xf:fml:forge:crossbows.1,xf:fml:forge:filled_map.0,pl:mixin:APP:ava.mixins.json:client.FirstPersonRendererMixin,pl:mixin:A,pl:runtimedistcleaner:A}     at net.minecraft.client.renderer.FirstPersonRenderer.func_228405_a_(FirstPersonRenderer.java:390) ~[?:?] {re:mixin,pl:accesstransformer:B,xf:fml:forge:bows.1,xf:fml:forge:crossbows.0,xf:fml:forge:crossbows.1,xf:fml:forge:filled_map.0,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,xf:fml:forge:bows.1,xf:fml:forge:crossbows.0,xf:fml:forge:crossbows.1,xf:fml:forge:filled_map.0,pl:mixin:APP:ava.mixins.json:client.FirstPersonRendererMixin,pl:mixin:A,pl:runtimedistcleaner:A}     at net.minecraft.client.renderer.FirstPersonRenderer.func_228396_a_(FirstPersonRenderer.java:244) ~[?:?] {re:mixin,pl:accesstransformer:B,xf:fml:forge:bows.1,xf:fml:forge:crossbows.0,xf:fml:forge:crossbows.1,xf:fml:forge:filled_map.0,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,xf:fml:forge:bows.1,xf:fml:forge:crossbows.0,xf:fml:forge:crossbows.1,xf:fml:forge:filled_map.0,pl:mixin:APP:ava.mixins.json:client.FirstPersonRendererMixin,pl:mixin:A,pl:runtimedistcleaner:A}     at net.minecraft.client.renderer.GameRenderer.func_228381_a_(GameRenderer.java:369) ~[?:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:A,pl:runtimedistcleaner:A}     at net.minecraft.client.renderer.GameRenderer.func_228378_a_(GameRenderer.java:614) ~[?:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:A,pl:runtimedistcleaner:A} -- Affected level -- Details:     All players: 1 total; [ClientPlayerEntity['***'/7634, l='ClientLevel', x=171.66, y=86.86, z=-217.27]]     Chunk stats: Client Chunk Cache: 289, 169     Level dimension: minecraft:overworld     Level spawn location: World: (128,64,-224), Chunk: (at 0,4,0 in 8,-14; contains blocks 128,0,-224 to 143,255,-209), Region: (0,-1; contains chunks 0,-32 to 31,-1, blocks 0,0,-512 to 511,255,-1)     Level time: 111187 game time, 117018 day time     Server brand: forge     Server type: Non-integrated multiplayer server Stacktrace:     at net.minecraft.client.world.ClientWorld.func_72914_a(ClientWorld.java:447) ~[?:?] {re:mixin,pl:runtimedistcleaner:A,re:classloading,pl:mixin:APP:create.mixins.json:BreakProgressMixin,pl:mixin:A,pl:runtimedistcleaner:A}     at net.minecraft.client.Minecraft.func_71396_d(Minecraft.java:2031) [?:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:flywheel.mixins.json:ShaderCloseMixin,pl:mixin:APP:create.mixins.json:WindowResizeMixin,pl:mixin:A,pl:runtimedistcleaner:A}     at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:628) [?:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:flywheel.mixins.json:ShaderCloseMixin,pl:mixin:APP:create.mixins.json:WindowResizeMixin,pl:mixin:A,pl:runtimedistcleaner:A}     at net.minecraft.client.main.Main.main(Main.java:184) [?:?] {re:classloading,pl:runtimedistcleaner:A}     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_51] {}     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_51] {}     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_51] {}     at java.lang.reflect.Method.invoke(Method.java:497) ~[?:1.8.0_51] {}     at net.minecraftforge.fml.loading.FMLClientLaunchProvider.lambda$launchService$0(FMLClientLaunchProvider.java:51) [forge-1.16.5-36.2.34.jar:36.2] {}     at net.minecraftforge.fml.loading.FMLClientLaunchProvider$$Lambda$457/646445398.call(Unknown Source) [forge-1.16.5-36.2.34.jar:36.2] {}     at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-8.1.3.jar:?] {}     at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) [modlauncher-8.1.3.jar:?] {}     at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) [modlauncher-8.1.3.jar:?] {}     at cpw.mods.modlauncher.Launcher.run(Launcher.java:82) [modlauncher-8.1.3.jar:?] {}     at cpw.mods.modlauncher.Launcher.main(Launcher.java:66) [modlauncher-8.1.3.jar:?] {} -- System Details -- Details:     Minecraft Version: 1.16.5     Minecraft Version ID: 1.16.5     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: 847399824 bytes (808 MB) / 2227699712 bytes (2124 MB) up to 3817865216 bytes (3641 MB)     CPUs: 24     JVM Flags: 5 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xss1M -Xmx15G -Xmx4096m -Xms256m     ModLauncher: 8.1.3+8.1.3+main-8.1.x.c94d18ec     ModLauncher launch target: fmlclient     ModLauncher naming: srg     ModLauncher services:          /mixin-0.8.4.jar mixin PLUGINSERVICE          /eventbus-4.0.0.jar eventbus PLUGINSERVICE          /forge-1.16.5-36.2.34.jar object_holder_definalize PLUGINSERVICE          /forge-1.16.5-36.2.34.jar runtime_enum_extender PLUGINSERVICE          /accesstransformers-3.0.1.jar accesstransformer PLUGINSERVICE          /forge-1.16.5-36.2.34.jar capability_inject_definalize PLUGINSERVICE          /forge-1.16.5-36.2.34.jar runtimedistcleaner PLUGINSERVICE          /mixin-0.8.4.jar mixin TRANSFORMATIONSERVICE          /forge-1.16.5-36.2.34.jar fml TRANSFORMATIONSERVICE      FML: 36.2     Forge: net.minecraftforge:36.2.34     FML Language Providers:          javafml@36.2         minecraft@1     Mod List:          forge-1.16.5-36.2.34-client.jar                   |Minecraft                     |minecraft                     |1.16.5              |DONE      |Manifest: NOSIGNATURE         forge-1.16.5-36.2.34-universal.jar                |Forge                         |forge                         |36.2.34             |DONE      |Manifest: 22:af:21:d8:19:82:7f:93:94:fe:2b:ac:b7:e4:41:57:68:39:87:b1:a7:5c:c6:44:f9:25:74:21:14:f5:0d:90         flywheel-1.16-0.2.5.jar                           |Flywheel                      |flywheel                      |1.16-0.2.5          |DONE      |Manifest: NOSIGNATURE         create-mc1.16.5_v0.3.2g.jar                       |Create                        |create                        |v0.3.2g             |DONE      |Manifest: NOSIGNATURE         ava-1.16.5-1.9.8.77965.jar                        |A.V.A - Alliance of Valiant Ar|ava                           |1.9.8.77965         |DONE      |Manifest: NOSIGNATURE         citadel-1.8.1-1.16.5.jar                          |Citadel                       |citadel                       |1.8.1               |DONE      |Manifest: NOSIGNATURE         iceandfire-2.1.12-1.16.5.jar                      |Ice and Fire                  |iceandfire                    |2.1.12-1.16.5       |DONE      |Manifest: NOSIGNATURE     Crash Report UUID: 6a363432-f2b6-40b6-b01c-3e44f1efd634     Launched Version: forge-36.2.34     Backend library: LWJGL version 3.2.2 build 10     Backend API: ***     GL Caps: Using framebuffer using OpenGL 3.0     Using VBOs: Yes     Is Modded: Definitely; Client brand changed to 'forge'     Type: Client (map_client.txt)     Graphics mode: fancy     Resource Packs:      Current Language: English (US)     CPU: ***
    • So what is the code for enchanting and where is the #accept?
    • Okay managed to track down which mod was causing the problem and works flawlessly without it. It was Environmental from Team Abnormals.
    • I have completed everything you mentioned, and here is an example from GitHub: https://github.com/Tutorials-By-Kaupenjoe/Forge-Tutorial-1.19.3/blob/7-treeGeneration I would like you to look at the two main classes as follows: ModConfiguredFeatures, located in the package net.kaupenjoe.tutorialmod.worldgen ModWorldGenProvider, located in the package net.kaupenjoe.tutorialmod.datagen If you're using version 1.19.4-45.0.39 without updating to 45.0.40, the mentioned code works fine. However, if you switch to version 45.0.40 and try to add the method ModConfiguredFeatures::bootstrap, there will be an immediate issue. It seems like it cannot accept a method with a parameter as an instance, but it can still work properly with an instance that doesn't have an instant parameter, such as BootstapContext<PlacedFeature>.
    • Ignoring the mismatched format, this doesn't really explain anything about what is needed. First, you have a bunch of random classes which you don't define: ExampleEntityModel, the layer location, model layers, etc. Even if they are not relevant, you should just hide them behind a `//...` so they don't detract from your main point. For example, what about registering the layer definitions? the entity renderer? Anything that is not explained should be mentioned to use the same method as usual. You should also explain why adding those two layers would do what you needed. Additionally, you need to explain when a different model layer should be used, since not all mobs will have the exact same dimensions as the player (e.g., piglin).  This will crash, it needs a semicolon. This is already added for HumanoidMobRenderer, so it is redundant. This will crash, you need to pass in a ModelManager from the context. Additionally, the type parameter for HumanoidModel should be inferred and not just removed.  
  • Topics

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.