• 0

    posted a message on How To Debug Bytecode Verification Errors?

    I have reached an interesting point in a coremod that I am developing, when using the dev environment it works fine but when installed on a normal client it crashes as soon as it is about to render the main menu. It is a byte code verification error and I can not figure out a good way to debug why this is happening. I tried the ASM class verifier but that just causes a ton of ClassNotFoundExceptions.


    Relevent chunk of the crash report:

    java.lang.VerifyError: Bad local variable type
    Exception Details:
      Location:
        net/minecraft/client/renderer/RenderHelper.func_74518_a()V @0: aload_0
      Reason:
        Type top (current frame, locals[0]) is not assignable to reference type
      Current Frame:
        bci: @0
        flags: { }
        locals: { }
        stack: { }
      Bytecode:
        0x0000000: 2a12 0eb8 0014 b600 1ab8 001f 03b8 0023
        0x0000010: 04b8 0023 b800 26b1                    
    
    	at net.minecraft.client.gui.toasts.GuiToast.func_191783_a(SourceFile:32)
    	at net.minecraft.client.Minecraft.func_71411_J(Minecraft.java:1119)
    	at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:397)
    	at net.minecraft.client.main.Main.main(SourceFile:123)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    	at java.lang.reflect.Method.invoke(Unknown Source)
    	at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
    	at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
    


    And the entire thing for good measure:

    ---- Minecraft Crash Report ----
    
    WARNING: coremods are present:
     [redacted]
    Contact their authors BEFORE contacting forge
    
    // Shall we play a game?
    
    Time: 9/6/17 11:37 AM
    Description: Unexpected error
    
    java.lang.VerifyError: Bad local variable type
    Exception Details:
     Location:
     net/minecraft/client/renderer/RenderHelper.func_74518_a()V @0: aload_0
     Reason:
     Type top (current frame, locals[0]) is not assignable to reference type
     Current Frame:
     bci: @0
     flags: { }
     locals: { }
     stack: { }
     Bytecode:
     0x0000000: 2a12 0eb8 0014 b600 1ab8 001f 03b8 0023
     0x0000010: 04b8 0023 b800 26b1 
    
     at net.minecraft.client.gui.toasts.GuiToast.func_191783_a(SourceFile:32)
     at net.minecraft.client.Minecraft.func_71411_J(Minecraft.java:1119)
     at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:397)
     at net.minecraft.client.main.Main.main(SourceFile:123)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
     at java.lang.reflect.Method.invoke(Unknown Source)
     at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
     at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
    
    
    A detailed walkthrough of the error, its code path and all known details is as follows:
    ---------------------------------------------------------------------------------------
    
    -- System Details --
    Details:
     Minecraft Version: 1.12.1
     Operating System: Windows 10 (amd64) version 10.0
     Java Version: 1.8.0_144, Oracle Corporation
     Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
     Memory: 5447305032 bytes (5194 MB) / 6442450944 bytes (6144 MB) up to 10737418240 bytes (10240 MB)
     JVM Flags: 12 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xmx6144m -Xms256m -XX:PermSize=256m -XX:+UseG1GC -Xmx10G -Xms6G -XX:+UnlockExperimentalVMOptions -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=32M
     IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
     FML: MCP 9.41 Powered by Forge 14.22.0.2469 5 mods loaded, 5 mods active
     States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored
    
     | State | ID | Version | Source | Signature |
     |:------ |:---------- |:------------ |:----------------------------- |:---------------------------------------- |
     | UCHIJA | minecraft | 1.12.1 | minecraft.jar | None |
     | UCHIJA | mcp | 9.19 | minecraft.jar | None |
     | UCHIJA | FML | 8.0.99.99 | forge-1.12.1-14.22.0.2469.jar | e3c3d50c7c986df74c645c0ac54639741c90a557 |
     | UCHIJA | forge | 14.22.0.2469 | forge-1.12.1-14.22.0.2469.jar | e3c3d50c7c986df74c645c0ac54639741c90a557 |
     | UCHIJA | [redacted] | | minecraft.jar | None |
    
     Loaded coremods (and transformers): 
    [redacted]
     net.gudenau.[redacted]
     net.gudenau.[redacted]
     GL info: ' Vendor: 'NVIDIA Corporation' Version: '4.5.0 NVIDIA 382.05' Renderer: 'GeForce GTX 960/PCIe/SSE2'
     Launched Version: forge-14.22.0.2469
     LWJGL: 2.9.4 HACKED TO 3.1.2 build 29
     OpenGL: GeForce GTX 960/PCIe/SSE2 GL version 4.5.0 NVIDIA 382.05, NVIDIA Corporation
     GL Caps: Using GL 1.3 multitexturing.
    Using GL 1.3 texture combiners.
    Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported.
    Shaders are available because OpenGL 2.1 is supported.
    VBOs are available because OpenGL 1.5 is supported.
    
     Using VBOs: Yes
     Is Modded: Definitely; Client brand changed to 'fml,forge'
     Type: Client (map_client.txt)
     Resource Packs: 
     Current Language: English (US)
     Profiler Position: N/A (disabled)
     CPU: 4x Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz
    Posted in: Modification Development
  • 0

    posted a message on How to Get List of Forge Versions?

    I have been working on a tool that requires the ability to query for and download versions of Minecraft Forge. I know the Twitch app does it, but I would like to know if there is a "clean" list of versions that is not the HTML from that website.

    Posted in: Mods Discussion
  • 0

    posted a message on Block with Variants Have Broken Item Model
    Quote from Choonster»

    There's no black variant, but there is a color=black variant (i.e a color property with a value called black). This applies to the other colours as well.


    Registry events were first added in 1.10.2, but 1.12 encouraged their use by making GameRegistry.register private. They were also fired before preInit in 1.10.2-1.11.2.



    Oh, I got you. That was stupid.

    I guess I should read changelogs better. .-.


    Edit:

    Yeah, that works. Now I need to figure out why the names are tile.Block{NULL}.color.name.


    Edit 2:

    That works now, thanks.

    Posted in: Modification Development
  • 0

    posted a message on Block with Variants Have Broken Item Model
    Quote from Choonster»

    You're using a ModelResourceLocation with the dye colour as the variant for each colour of the Stained Clear Jukebox, but your blockstates file doesn't have these variants. Instead, it has a color property with the dye colours as values; so you need to use "color=<dye_color>" as the variant.


    Model registration should be done in a client-only class. If you use the @Mod.EventBusSubscriber annotation on it, pass Side.CLIENT to the annotation to prevent the class from being loaded on the physical server.


    Either instantiate your Blocks, Items and other IForgeRegistryEntry implementations in their respective registry events or in static initialisers. There's no reason to instantiate them in preInit.


    Correct me if I'm wrong, but this seems to have the variants in it. I moved some stuff into the common for now because I was refactoring a little, making more things in the same class to be moved later. I also had the stuff created in preInit because that is how it had to be done in the last version, as far as I know.


    {
      "forge_marker": 1,
      "defaults": {
        "model": "gud_clear_jukebox:clear_jukebox"
      },
      "variants":{
        "color":{
          "black":{
            "textures": {
              "side": "gud_clear_jukebox:blocks/clear_jukebox_black"
            }
          },
          "blue":{
            "textures": {
              "side": "gud_clear_jukebox:blocks/clear_jukebox_blue"
            }
          },
          "brown":{
            "textures": {
              "side": "gud_clear_jukebox:blocks/clear_jukebox_brown"
            }
          },
          "cyan":{
            "textures": {
              "side": "gud_clear_jukebox:blocks/clear_jukebox_cyan"
            }
          },
          "gray":{
            "textures": {
              "side": "gud_clear_jukebox:blocks/clear_jukebox_gray"
            }
          },
          "green":{
            "textures": {
              "side": "gud_clear_jukebox:blocks/clear_jukebox_green"
            }
          },
          "light_blue":{
            "textures": {
              "side": "gud_clear_jukebox:blocks/clear_jukebox_light_blue"
            }
          },
          "lime":{
            "textures": {
              "side": "gud_clear_jukebox:blocks/clear_jukebox_lime"
            }
          },
          "magenta":{
            "textures": {
              "side": "gud_clear_jukebox:blocks/clear_jukebox_magenta"
            }
          },
          "orange":{
            "textures": {
              "side": "gud_clear_jukebox:blocks/clear_jukebox_orange"
            }
          },
          "pink":{
            "textures": {
              "side": "gud_clear_jukebox:blocks/clear_jukebox_pink"
            }
          },
          "purple":{
            "textures": {
              "side": "gud_clear_jukebox:blocks/clear_jukebox_purple"
            }
          },
          "red":{
            "textures": {
              "side": "gud_clear_jukebox:blocks/clear_jukebox_red"
            }
          },
          "silver":{
            "textures": {
              "side": "gud_clear_jukebox:blocks/clear_jukebox_silver"
            }
          },
          "white":{
            "textures": {
              "side": "gud_clear_jukebox:blocks/clear_jukebox_white"
            }
          },
          "yellow":{
            "textures": {
              "side": "gud_clear_jukebox:blocks/clear_jukebox_yellow"
            }
          }
        }
      }
    }
    Posted in: Modification Development
  • 0

    posted a message on Block with Variants Have Broken Item Model

    I am trying to update this mod to Minecraft 1.12, but I am running into an issue with the stained jukeboxes. The items are only rendering as missing models when they worked in 1.11.2. What am I doing wrong?


    (This is after I messed with it a bunch to try and make them work)


    Source code

    Console output

    Posted in: Modification Development
  • 0

    posted a message on Remove Library From Forgegradle?
    Quote from UpcraftLP»

    1. what mod is it?
    2. does the mod have it's soruce publicly available? maybe you can find out how to remove that library there ;)


    The source is not available yet. But it is forge itself that is adding the dependency that I want to remove from the build. I just can not get it to exclude it. Just for the sake of argument it is "example.com:foo:bar-1.2.3".
    Posted in: Modification Development
  • 0

    posted a message on Remove Library From Forgegradle?

    I am working on a mod that requires the removal of a library that Forgegradle adds as a dependency. I am wondering if there is a way that I can tell gradle to not use that library. I have attempted using `configurations` with `compile.exclude`, and putting `exclude` inside `compile` inside of `dependencies` but both of these still left the library in the project.

    Posted in: Modification Development
  • 0

    posted a message on Custom Event <init> not found?
    Quote from Choonster»

    EventSubscriptionTransformer is supposed to add the no-argument constructor (and a few other things) to all classes that extend Event.


    I noticed you have a coremod, see if you can reproduce this without it.


    I was accidentally excluding my events from transformation, thanks for the help! At least I knew what <init> and <cinit> where! :-P
    Posted in: Modification Development
  • 0

    posted a message on Custom Event <init> not found?
    Quote from Choonster»

    Could you post the full FML log using Gist?


    In future, please use Gist or Pastebin to post code with syntax highlighting. To get syntax highlighting on Gist, give each file the appropriate extension (.java for Java code). To get syntax highlighting on Pastebin, select the language from the dropdown at the bottom of the page.


    It's much easier to read code with proper formatting and syntax highlighting.


    Okay, updated that.
    Posted in: Modification Development
  • 0

    posted a message on Custom Event <init> not found?

    For some reason when I added a custom event and try to create a subscriber for it the EventBuss can not find the default constructor for it. The other events in forge do not appear to ever implement a default constructor, what am I doing wrong?


    This is the problematic class in my library mod.

    This is the log.


    (asdf is the test mod)

    Posted in: Modification Development
  • 0

    posted a message on How To Create a Cached Block Renderer?
    Quote from UpcraftLP»



    no, it doesn't. Refer to this guide for further information on the Forge blockstates format ;)


    EDIT: maybe this will be be helpful as well ;)


    I swear that I saw an extra rotation field in the forge JSON parser. Wish I could ask in the IRC channel. :-/
    Posted in: Modification Development
  • 0

    posted a message on How To Create a Cached Block Renderer?
    Quote from UpcraftLP»

    the rotations in blockstates file can only be multiples of 90, so you can rotate your model clockwise or counter-clockwise easily. All orientable blocks use this (ex. furnace, piston, door...).


    However, you can easily specify rotations like this.


    If you need to rotate differently than this, use either a TESR or FastTESR.


    I am not trying to use the vanilla method, as it appears that the forge json allows for a different method of rotation.
    Posted in: Modification Development
  • 0

    posted a message on How To Create a Cached Block Renderer?
    Quote from UpcraftLP»

    I never used FastTESRs myself, but maybe this can help you out...

    That led me to find "rotation" in the forge blockstate, but I can not seem to get it to work correctly.

    Here is a snippet of my blockstate:

    "variants":{
    		"facing": {
    			"north": {
    				"rotation":{
    					"x": 0,
    					"y": 0,
    					"z": 0
    				}
    			},

    Of course there is much more than that, but the rotations do not seem to do anything even though the blockstate shows up in the debug menu just fine.

    Posted in: Modification Development
  • 0

    posted a message on How To Create a Cached Block Renderer?
    Quote from UpcraftLP»

    try using a FastTESR ;)


    Could I use a block model with that and apply transformations?
    Posted in: Modification Development
  • 0

    posted a message on How To Create a Cached Block Renderer?

    I have a block that requires more control over the rendering than the block model system provides, how could I create a custom renderer for my block that is cached by the chunk renderer? I would like it to to be cached because it will not change unless the player interacts in a specific way.

    Posted in: Modification Development
  • To post a comment, please .