Jump to content

Mightydanp

Members
  • Posts

    225
  • Joined

  • Last visited

Posts posted by Mightydanp

  1. i am doing something simular but i am getting a out of bounds
     

    java.lang.ArrayIndexOutOfBoundsException: 4
        at net.minecraftforge.client.model.pipeline.BakedQuadBuilder.put(BakedQuadBuilder.java:99) ~[forge-1.16.5-36.2.20_mapped_official_1.16.5-recomp.jar:?] {re:classloading}
        at mightydanp.industrialtech.api.client.helper.BakedModelHelper.putVertex(BakedModelHelper.java:31) ~[main/:?] {re:classloading}
        at mightydanp.industrialtech.api.client.helper.BakedModelHelper.createQuad(BakedModelHelper.java:80) ~[main/:?] {re:classloading}
        at mightydanp.industrialtech.client.rendering.models.CampFireBakedModel.getQuads(CampFireBakedModel.java:51) ~[main/:?] {re:classloading}

    https://github.com/mightydanp/IndustrialTech/blob/master/src/main/java/mightydanp/industrialtech/api/client/helper/BakedModelHelper.java

    https://github.com/mightydanp/IndustrialTech/blob/master/src/main/java/mightydanp/industrialtech/client/rendering/models/CampFireBakedModel.java

    i cant figure out whats causing the out of bounds

  2. I am having a problem. I ran my runData and i got this where it didnt run anything in my GatherDataEvent

     

    [05:07:01] [main/DEBUG] [ne.mi.re.GameData/REGISTRIES]: Applying holder lookups: minecraft:worldgen/foliage_placer_type
    [05:07:01] [main/DEBUG] [ne.mi.re.GameData/REGISTRIES]: Holder lookups applied: minecraft:worldgen/foliage_placer_type
    [05:07:01] [main/DEBUG] [ne.mi.re.GameData/REGISTRIES]: Applying holder lookups: minecraft:worldgen/structure_feature
    [05:07:01] [main/DEBUG] [ne.mi.re.GameData/REGISTRIES]: Holder lookups applied: minecraft:worldgen/structure_feature
    [05:07:01] [main/DEBUG] [ne.mi.re.GameData/REGISTRIES]: Applying holder lookups: minecraft:worldgen/surface_builder
    [05:07:01] [main/DEBUG] [ne.mi.re.GameData/REGISTRIES]: Holder lookups applied: minecraft:worldgen/surface_builder
    [05:07:01] [main/DEBUG] [ne.mi.re.GameData/REGISTRIES]: Applying holder lookups: minecraft:worldgen/tree_decorator_type
    [05:07:01] [main/DEBUG] [ne.mi.re.GameData/REGISTRIES]: Holder lookups applied: minecraft:worldgen/tree_decorator_type
    
    Process finished with exit code 0

    I then put breakpoints and runData again. the break points stopped at one of the breakpoint in the GatherDataEvent image.thumb.png.2e81870a8ff205982afd344f2323a1da.png

    since that caught a break point i put a breakpoint in GenItemModels. It caught the first breakpoint but after i pressed resume it didnt catch the other break pointsimage.thumb.png.8793a5766af5961850c5fb8b41f12910.png


     

  3. Hello I have a big question on how to do something. My question is that I have a item that has a gui. The gui has 3 slots. The item is a tool that you can change the items out. When you change out the items the items save data to nbt. such as mining speed, durability, enchants, color of the layer of that item. What would be the best way to implement this? Would I have problems  setting the value of the tool after changing out the part? Would there be texture issues because changed the color of the tool? if so isn't there a way to refresh the items texture?

    For an example of a tool I have a axe. The axe has 3 parts. The axe head, wedge, and the handle. Say the tool has a wooden handle and a wooden wedge. The pickaxe head is stone. The pickaxe head sets the color and the mining speed of the tool. Each part has its own durability of its own and gets damaged over time. When I switch out the pickaxe head with a Bronze pickaxe head it changes the color of that items layer and the mining speed and saves those values into nbt to use for later on if needed.

    What is the best way to go about this and what will me problems be? 

  4. i just figured that out. i got it to generate almost all files correctly it generates a \industrialtech\models\block\ore\andesite_ore.json aswell for some reason that i dont know. What part of my could do i chance to generate a model file for andesite_ore.

    Also is there not a way to get models/item instead of generating everyting there generate it in models/items/ore? atm i dont know how to classify where the resource location is for a block or item

  5. sweet i got it to find my file but i get a crash on line 51 so i am doing something wrong

     https://github.com/mightydanp/IndustrialTech/blob/master/src/main/java/mightydanp/industrialtech/api/common/datagen/BlockStates.java#L51
     

    [23:13:38] [main/INFO] [minecraft/DataGenerator]: Starting provider: Block States: industrialtech
    Exception in thread "main" [23:14:00] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
    [23:14:00] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: 	at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:39)
    [23:14:00] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: 	at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54)
    [23:14:00] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: 	at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72)
    [23:14:00] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: 	at cpw.mods.modlauncher.Launcher.run(Launcher.java:81)
    [23:14:00] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: 	at cpw.mods.modlauncher.Launcher.main(Launcher.java:65)
    [23:14:00] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: 	at net.minecraftforge.userdev.LaunchTesting.main(LaunchTesting.java:105)
    [23:14:00] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1061]: Caused by: java.lang.reflect.InvocationTargetException
    [23:14:00] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1061]: 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    [23:14:00] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1061]: 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    [23:14:00] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1061]: 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    [23:14:00] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1061]: 	at java.lang.reflect.Method.invoke(Method.java:498)
    [23:14:00] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1061]: 	at net.minecraftforge.userdev.FMLUserdevDataLaunchProvider.lambda$launchService$0(FMLUserdevDataLaunchProvider.java:51)
    [23:14:00] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1061]: 	at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37)
    [23:14:00] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1061]: 	... 5 more
    [23:14:00] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:643]: Caused by: java.lang.IllegalArgumentException: Cannot set models for a state that has already been configured: 
    [23:14:00] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:643]: 	at com.google.common.base.Preconditions.checkArgument(Preconditions.java:191)
    [23:14:00] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:643]: 	at net.minecraftforge.client.model.generators.VariantBlockStateBuilder.setModels(VariantBlockStateBuilder.java:146)
    [23:14:00] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:643]: 	at net.minecraftforge.client.model.generators.VariantBlockStateBuilder$PartialBlockstate.setModels(VariantBlockStateBuilder.java:249)
    [23:14:00] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:643]: 	at net.minecraftforge.client.model.generators.BlockStateProvider.simpleBlock(BlockStateProvider.java:193)
    [23:14:00] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:643]: 	at net.minecraftforge.client.model.generators.BlockStateProvider.simpleBlock(BlockStateProvider.java:184)
    [23:14:00] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:643]: 	at mightydanp.industrialtech.api.common.datagen.BlockStates.materialHandlerHelper(BlockStates.java:51)
    [23:14:00] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:643]: 	at mightydanp.industrialtech.api.common.datagen.BlockStates.registerStatesAndModels(BlockStates.java:36)
    [23:14:00] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:643]: 	at net.minecraftforge.client.model.generators.BlockStateProvider.act(BlockStateProvider.java:108)
    [23:14:00] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:643]: 	at net.minecraft.data.DataGenerator.run(DataGenerator.java:53)
    [23:14:00] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:643]: 	at net.minecraftforge.fml.event.lifecycle.GatherDataEvent$DataGeneratorConfig.lambda$runAll$0(GatherDataEvent.java:111)
    [23:14:00] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:643]: 	at cpw.mods.modlauncher.api.LamdbaExceptionUtils.lambda$rethrowConsumer$0(LamdbaExceptionUtils.java:34)
    [23:14:00] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:643]: 	at java.util.HashMap$Values.forEach(HashMap.java:980)
    [23:14:00] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:643]: 	at net.minecraftforge.fml.event.lifecycle.GatherDataEvent$DataGeneratorConfig.runAll(GatherDataEvent.java:107)
    [23:14:00] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:643]: 	at net.minecraftforge.fml.DatagenModLoader.begin(DatagenModLoader.java:51)
    [23:14:00] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:643]: 	at net.minecraft.data.Main.main(Main.java:41)
    [23:14:00] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:643]: 	... 11 more
    Disconnected from the target VM, address: '127.0.0.1:12041', transport: 'socket'
    
    Process finished with exit code 1

     

  6. rebuilding runs fix the problem 
    my only problem atm is i have a 
    IndustrialTech\src\main\resources\assets\industrialtech\models\block\ore\stone_ore.json

    and i get Caused by: java.lang.IllegalStateException: Model at industrialtech:block/ore/stone_ore does not exist

     

    i have it setup like so 

    ModelFile ore = models().withExistingParent(oreName, modId + ":block/ore/" + stoneVariant + "_ore");

    i have 
     

    data {
                workingDirectory project.file('run')
    
                // Recommended logging data for a userdev environment
                property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
    
                // Recommended logging level for the console
                property 'forge.logging.console.level', 'debug'
    
                args '--mod', 'industrialtech', '--all', '--output', file('src/generated/resources/')
    
                mods {
                    industrialtech {
                        source sourceSets.main
                    }
                }
            }

     

×
×
  • Create New...

Important Information

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