Jump to content

Elix_x

Members
  • Posts

    878
  • Joined

  • Last visited

Posts posted by Elix_x

  1. Note:

    If i remove this from NewKeyBindingEvent:

    public NewKeyBindingEvent() {
    	super();
    }
    

    I get this in log:

    [15:37:32] [Client thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: java.lang.NoSuchMethodException: code.elix_x.coremods.keybindingsoverhaul.api.NewKeyBindingEvent.<init>()
    [15:37:32] [Client thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at java.lang.Class.getConstructor0(Unknown Source)
    [15:37:32] [Client thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at java.lang.Class.getConstructor(Unknown Source)
    [15:37:32] [Client thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at cpw.mods.fml.common.eventhandler.EventBus.register(EventBus.java:101)
    [15:37:32] [Client thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at cpw.mods.fml.common.eventhandler.EventBus.register(EventBus.java:85)
    [15:37:32] [Client thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at code.elix_x.coremods.keybindingsoverhaul.KeyBindingsOverhaulBase.init(KeyBindingsOverhaulBase.java:39)
    [15:37:32] [Client thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    [15:37:32] [Client thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    [15:37:32] [Client thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    [15:37:32] [Client thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at java.lang.reflect.Method.invoke(Unknown Source)
    [15:37:32] [Client thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:532)
    [15:37:32] [Client thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    [15:37:32] [Client thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    [15:37:32] [Client thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    [15:37:32] [Client thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at java.lang.reflect.Method.invoke(Unknown Source)
    [15:37:32] [Client thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
    [15:37:32] [Client thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
    [15:37:32] [Client thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
    [15:37:32] [Client thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
    [15:37:32] [Client thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at com.google.common.eventbus.EventBus.post(EventBus.java:275)
    [15:37:32] [Client thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:212)
    [15:37:32] [Client thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:190)
    [15:37:32] [Client thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    [15:37:32] [Client thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    [15:37:32] [Client thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    [15:37:32] [Client thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at java.lang.reflect.Method.invoke(Unknown Source)
    [15:37:32] [Client thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
    [15:37:32] [Client thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
    [15:37:32] [Client thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
    [15:37:32] [Client thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
    [15:37:32] [Client thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at com.google.common.eventbus.EventBus.post(EventBus.java:275)
    [15:37:32] [Client thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:119)
    [15:37:32] [Client thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at cpw.mods.fml.common.Loader.initializeMods(Loader.java:737)
    [15:37:32] [Client thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:311)
    [15:37:32] [Client thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at net.minecraft.client.Minecraft.startGame(Minecraft.java:597)
    [15:37:32] [Client thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at net.minecraft.client.Minecraft.run(Minecraft.java:942)
    [15:37:32] [Client thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at net.minecraft.client.main.Main.main(Main.java:164)
    [15:37:32] [Client thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    [15:37:32] [Client thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    [15:37:32] [Client thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    [15:37:32] [Client thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at java.lang.reflect.Method.invoke(Unknown Source)
    [15:37:32] [Client thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
    [15:37:32] [Client thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
    [15:37:32] [Client thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source)
    [15:37:32] [Client thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at GradleStart.main(Unknown Source)
    

    And it seems that event is not working.

  2. Hello.

    So, here is my problem:

    After i created custom event and i'm trying to use it, game crashes:

    [12:55:06] [Client thread/ERROR] [FML]: Exception caught during firing event net.minecraftforge.client.event.TextureStitchEvent$Pre@3700d4c1:
    java.lang.ClassCastException: net.minecraftforge.client.event.TextureStitchEvent$Pre cannot be cast to code.elix_x.coremods.keybindingsoverhaul.api.NewKeyBindingEvent
    at cpw.mods.fml.common.eventhandler.ASMEventHandler_9_OnNewKeyBindingEvent_onNewKeyBinding_NewKeyBindingEvent.invoke(.dynamic) ~[?:?]
    at cpw.mods.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:54) ~[ASMEventHandler.class:?]
    at cpw.mods.fml.common.eventhandler.EventBus.post(EventBus.java:138) [EventBus.class:?]
    at net.minecraftforge.client.ForgeHooksClient.onTextureStitchedPre(ForgeHooksClient.java:271) [ForgeHooksClient.class:?]
    at net.minecraft.client.renderer.texture.TextureMap.loadTextureAtlas(TextureMap.java:110) [TextureMap.class:?]
    at net.minecraft.client.renderer.texture.TextureMap.loadTexture(TextureMap.java:98) [TextureMap.class:?]
    at net.minecraft.client.renderer.texture.TextureManager.loadTexture(TextureManager.java:89) [TextureManager.class:?]
    at net.minecraft.client.renderer.texture.TextureManager.onResourceManagerReload(TextureManager.java:172) [TextureManager.class:?]
    at net.minecraft.client.resources.SimpleReloadableResourceManager.notifyReloadListeners(SimpleReloadableResourceManager.java:143) [simpleReloadableResourceManager.class:?]
    at net.minecraft.client.resources.SimpleReloadableResourceManager.reloadResources(SimpleReloadableResourceManager.java:121) [simpleReloadableResourceManager.class:?]
    at net.minecraft.client.Minecraft.refreshResources(Minecraft.java:654) [Minecraft.class:?]
    at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:327) [FMLClientHandler.class:?]
    at net.minecraft.client.Minecraft.startGame(Minecraft.java:597) [Minecraft.class:?]
    at net.minecraft.client.Minecraft.run(Minecraft.java:942) [Minecraft.class:?]
    at net.minecraft.client.main.Main.main(Main.java:164) [Main.class:?]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_25]
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_25]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_25]
    at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_25]
    at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?]
    at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?]
    at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source) [start/:?]
    at GradleStart.main(Unknown Source) [start/:?]
    [12:55:06] [Client thread/ERROR] [FML]: Index: 1 Listeners:
    [12:55:06] [Client thread/ERROR] [FML]: 0: NORMAL
    [12:55:06] [Client thread/ERROR] [FML]: 1: ASM: code.elix_x.coremods.keybindingsoverhaul.events.OnNewKeyBindingEvent@56ddd82a onNewKeyBinding(Lcode/elix_x/coremods/keybindingsoverhaul/api/NewKeyBindingEvent;)V
    [12:55:06] [Client thread/INFO]: Caught error stitching, removing all assigned resourcepacks
    net.minecraft.util.ReportedException: Registering texture
    at net.minecraft.client.renderer.texture.TextureManager.loadTexture(TextureManager.java:111) ~[TextureManager.class:?]
    at net.minecraft.client.renderer.texture.TextureManager.onResourceManagerReload(TextureManager.java:172) ~[TextureManager.class:?]
    at net.minecraft.client.resources.SimpleReloadableResourceManager.notifyReloadListeners(SimpleReloadableResourceManager.java:143) ~[simpleReloadableResourceManager.class:?]
    at net.minecraft.client.resources.SimpleReloadableResourceManager.reloadResources(SimpleReloadableResourceManager.java:121) ~[simpleReloadableResourceManager.class:?]
    at net.minecraft.client.Minecraft.refreshResources(Minecraft.java:654) [Minecraft.class:?]
    at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:327) [FMLClientHandler.class:?]
    at net.minecraft.client.Minecraft.startGame(Minecraft.java:597) [Minecraft.class:?]
    at net.minecraft.client.Minecraft.run(Minecraft.java:942) [Minecraft.class:?]
    at net.minecraft.client.main.Main.main(Main.java:164) [Main.class:?]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_25]
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_25]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_25]
    at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_25]
    at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?]
    at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?]
    at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source) [start/:?]
    at GradleStart.main(Unknown Source) [start/:?]
    Caused by: java.lang.ClassCastException: net.minecraftforge.client.event.TextureStitchEvent$Pre cannot be cast to code.elix_x.coremods.keybindingsoverhaul.api.NewKeyBindingEvent
    at cpw.mods.fml.common.eventhandler.ASMEventHandler_9_OnNewKeyBindingEvent_onNewKeyBinding_NewKeyBindingEvent.invoke(.dynamic) ~[?:?]
    at cpw.mods.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:54) ~[ASMEventHandler.class:?]
    at cpw.mods.fml.common.eventhandler.EventBus.post(EventBus.java:138) ~[EventBus.class:?]
    at net.minecraftforge.client.ForgeHooksClient.onTextureStitchedPre(ForgeHooksClient.java:271) ~[ForgeHooksClient.class:?]
    at net.minecraft.client.renderer.texture.TextureMap.loadTextureAtlas(TextureMap.java:110) ~[TextureMap.class:?]
    at net.minecraft.client.renderer.texture.TextureMap.loadTexture(TextureMap.java:98) ~[TextureMap.class:?]
    at net.minecraft.client.renderer.texture.TextureManager.loadTexture(TextureManager.java:89) ~[TextureManager.class:?]
    ... 16 more
    [12:55:06] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Key Bindings Overhaul, FMLFileResourcePack:EXCore
    [12:55:06] [Client thread/ERROR] [FML]: Exception caught during firing event net.minecraftforge.client.event.TextureStitchEvent$Pre@78fee50c:
    java.lang.ClassCastException: net.minecraftforge.client.event.TextureStitchEvent$Pre cannot be cast to code.elix_x.coremods.keybindingsoverhaul.api.NewKeyBindingEvent
    at cpw.mods.fml.common.eventhandler.ASMEventHandler_9_OnNewKeyBindingEvent_onNewKeyBinding_NewKeyBindingEvent.invoke(.dynamic) ~[?:?]
    at cpw.mods.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:54) ~[ASMEventHandler.class:?]
    at cpw.mods.fml.common.eventhandler.EventBus.post(EventBus.java:138) [EventBus.class:?]
    at net.minecraftforge.client.ForgeHooksClient.onTextureStitchedPre(ForgeHooksClient.java:271) [ForgeHooksClient.class:?]
    at net.minecraft.client.renderer.texture.TextureMap.loadTextureAtlas(TextureMap.java:110) [TextureMap.class:?]
    at net.minecraft.client.renderer.texture.TextureMap.loadTexture(TextureMap.java:98) [TextureMap.class:?]
    at net.minecraft.client.renderer.texture.TextureManager.loadTexture(TextureManager.java:89) [TextureManager.class:?]
    at net.minecraft.client.renderer.texture.TextureManager.onResourceManagerReload(TextureManager.java:172) [TextureManager.class:?]
    at net.minecraft.client.resources.SimpleReloadableResourceManager.notifyReloadListeners(SimpleReloadableResourceManager.java:143) [simpleReloadableResourceManager.class:?]
    at net.minecraft.client.resources.SimpleReloadableResourceManager.reloadResources(SimpleReloadableResourceManager.java:121) [simpleReloadableResourceManager.class:?]
    at net.minecraft.client.Minecraft.refreshResources(Minecraft.java:662) [Minecraft.class:?]
    at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:327) [FMLClientHandler.class:?]
    at net.minecraft.client.Minecraft.startGame(Minecraft.java:597) [Minecraft.class:?]
    at net.minecraft.client.Minecraft.run(Minecraft.java:942) [Minecraft.class:?]
    at net.minecraft.client.main.Main.main(Main.java:164) [Main.class:?]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_25]
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_25]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_25]
    at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_25]
    at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?]
    at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?]
    at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source) [start/:?]
    at GradleStart.main(Unknown Source) [start/:?]
    [12:55:06] [Client thread/ERROR] [FML]: Index: 1 Listeners:
    [12:55:06] [Client thread/ERROR] [FML]: 0: NORMAL
    [12:55:06] [Client thread/ERROR] [FML]: 1: ASM: code.elix_x.coremods.keybindingsoverhaul.events.OnNewKeyBindingEvent@56ddd82a onNewKeyBinding(Lcode/elix_x/coremods/keybindingsoverhaul/api/NewKeyBindingEvent;)V
    [12:55:06] [Client thread/INFO] [sTDOUT]: [net.minecraft.client.Minecraft:displayCrashReport:388]: ---- Minecraft Crash Report ----
    // Ooh. Shiny.
    
    Time: 08.08.15 12:55
    Description: Registering texture
    
    java.lang.ClassCastException: net.minecraftforge.client.event.TextureStitchEvent$Pre cannot be cast to code.elix_x.coremods.keybindingsoverhaul.api.NewKeyBindingEvent
    at cpw.mods.fml.common.eventhandler.ASMEventHandler_9_OnNewKeyBindingEvent_onNewKeyBinding_NewKeyBindingEvent.invoke(.dynamic)
    at cpw.mods.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:54)
    at cpw.mods.fml.common.eventhandler.EventBus.post(EventBus.java:138)
    at net.minecraftforge.client.ForgeHooksClient.onTextureStitchedPre(ForgeHooksClient.java:271)
    at net.minecraft.client.renderer.texture.TextureMap.loadTextureAtlas(TextureMap.java:110)
    at net.minecraft.client.renderer.texture.TextureMap.loadTexture(TextureMap.java:98)
    at net.minecraft.client.renderer.texture.TextureManager.loadTexture(TextureManager.java:89)
    at net.minecraft.client.renderer.texture.TextureManager.onResourceManagerReload(TextureManager.java:172)
    at net.minecraft.client.resources.SimpleReloadableResourceManager.notifyReloadListeners(SimpleReloadableResourceManager.java:143)
    at net.minecraft.client.resources.SimpleReloadableResourceManager.reloadResources(SimpleReloadableResourceManager.java:121)
    at net.minecraft.client.Minecraft.refreshResources(Minecraft.java:662)
    at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:327)
    at net.minecraft.client.Minecraft.startGame(Minecraft.java:597)
    at net.minecraft.client.Minecraft.run(Minecraft.java:942)
    at net.minecraft.client.main.Main.main(Main.java:164)
    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)
    at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source)
    at GradleStart.main(Unknown Source)
    
    
    A detailed walkthrough of the error, its code path and all known details is as follows:
    ---------------------------------------------------------------------------------------
    
    -- Head --
    Stacktrace:
    at cpw.mods.fml.common.eventhandler.ASMEventHandler_9_OnNewKeyBindingEvent_onNewKeyBinding_NewKeyBindingEvent.invoke(.dynamic)
    at cpw.mods.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:54)
    at cpw.mods.fml.common.eventhandler.EventBus.post(EventBus.java:138)
    at net.minecraftforge.client.ForgeHooksClient.onTextureStitchedPre(ForgeHooksClient.java:271)
    at net.minecraft.client.renderer.texture.TextureMap.loadTextureAtlas(TextureMap.java:110)
    at net.minecraft.client.renderer.texture.TextureMap.loadTexture(TextureMap.java:98)
    
    -- Resource location being registered --
    Details:
    Resource location: minecraft:textures/atlas/blocks.png
    Texture object class: net.minecraft.client.renderer.texture.TextureMap
    Stacktrace:
    at net.minecraft.client.renderer.texture.TextureManager.loadTexture(TextureManager.java:89)
    at net.minecraft.client.renderer.texture.TextureManager.onResourceManagerReload(TextureManager.java:172)
    at net.minecraft.client.resources.SimpleReloadableResourceManager.notifyReloadListeners(SimpleReloadableResourceManager.java:143)
    at net.minecraft.client.resources.SimpleReloadableResourceManager.reloadResources(SimpleReloadableResourceManager.java:121)
    at net.minecraft.client.Minecraft.refreshResources(Minecraft.java:662)
    at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:327)
    at net.minecraft.client.Minecraft.startGame(Minecraft.java:597)
    
    -- Initialization --
    Details:
    Stacktrace:
    at net.minecraft.client.Minecraft.run(Minecraft.java:942)
    at net.minecraft.client.main.Main.main(Main.java:164)
    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)
    at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source)
    at GradleStart.main(Unknown Source)
    
    -- System Details --
    Details:
    Minecraft Version: 1.7.10
    Operating System: Windows 7 (amd64) version 6.1
    Java Version: 1.8.0_25, Oracle Corporation
    Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
    Memory: 819016648 bytes (781 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 MB)
    JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
    AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
    IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
    FML: MCP v9.05 FML v7.10.99.99 Minecraft Forge 10.13.4.1492 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
    UCHIJA	mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) 
    UCHIJA	FML{7.10.99.99} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.4.1492-1.7.10.jar) 
    UCHIJA	Forge{10.13.4.1492} [Minecraft Forge] (forgeSrc-1.7.10-10.13.4.1492-1.7.10.jar) 
    UCHIJA	excore{1.0} [EXCore] (bin) 
    UCHIJA	keybindingsoverhaul{1.2.2} [Key Bindings Overhaul] (bin) 
    GL info: ' Vendor: 'ATI Technologies Inc.' Version: '4.4.13084 Compatibility Profile Context 14.301.1001.0' Renderer: 'AMD Radeon HD 8570D'
    Launched Version: 1.7.10
    LWJGL: 2.9.1
    OpenGL: AMD Radeon HD 8570D GL version 4.4.13084 Compatibility Profile Context 14.301.1001.0, ATI Technologies Inc.
    GL Caps: Using GL 1.3 multitexturing.
    Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported.
    Anisotropic filtering is supported and maximum anisotropy is 16.
    Shaders are available because OpenGL 2.1 is supported.
    
    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)
    Vec3 Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
    Anisotropic Filtering: Off (1)
    [12:55:06] [Client thread/INFO] [sTDOUT]: [net.minecraft.client.Minecraft:displayCrashReport:398]: #@!@# Game crashed! Crash report saved to: #@!@# C:\my\mcmodding\mods\Key-Bindings-Overhaul\1.7.10\eclipse\.\crash-reports\crash-2015-08-08_12.55.06-client.txt
    AL lib: (EE) alc_cleanup: 1 device not closed
    Java HotSpot(TM) 64-Bit Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release
    

    As you can see, it crashes when it tries to invoke my event handler with wrong event. And i don't understand why it does that.

    Here's my event class:

    @Cancelable
    public class NewKeyBindingEvent extends Event{
    
    public KeyBinding keybinding;
    public int keyId;	
    
    public NewKeyBindingEvent(KeyBinding keybinding, int keyId) {
    	this.keybinding = keybinding;
    	this.keyId = keyId;
    }
    
    public NewKeyBindingEvent() {
    	super();
    }
    
    }
    

    Event handler:

    public class OnNewKeyBindingEvent {
    
    public OnNewKeyBindingEvent() {
    
    }
    
    @SubscribeEvent
    public void onNewKeyBinding(NewKeyBindingEvent event){
    	if(event.keybinding == Minecraft.getMinecraft().gameSettings.keyBindUseItem || event.keybinding == Minecraft.getMinecraft().gameSettings.keyBindAttack){
    		event.setCanceled(true);
    		KBOAPI.add(new AdvancedSimpleKeyBinding(event.keybinding, event.keyId){
    
    			private int cooldown = 0;
    
    			@Override
    			public void update() {
    				if(keyIds.isEmpty()){
    					return;
    				}
    
    				cooldown = cooldown <= 0 ? 0 : cooldown - 1;
    
    				boolean b = true;
    				for(Integer i : keyIds){
    					if(!isKeyDown(i)){
    						b = false;
    						break;
    					}
    				}
    				if(b && !getSimpleKeyBinding().pressed && cooldown == 0){
    					getSimpleKeyBinding().pressed = true;
    					getSimpleKeyBinding().pressTime++;
    					cooldown = 3;
    				} else if(b && getSimpleKeyBinding().pressed){
    					getSimpleKeyBinding().pressed = false;
    					getSimpleKeyBinding().pressTime = 0;
    				} else if(!b) {
    					getSimpleKeyBinding().pressed = false;
    					getSimpleKeyBinding().pressTime = 0;
    				}
    			}
    
    		});
    	}
    }
    
    }
    

    And how i register event handler (in main class, init phase):

    	MinecraftForge.EVENT_BUS.register(new OnNewKeyBindingEvent());
    

    So i don't see anything wrong here, but it crashes while loading...

    Thanks for help!

    If you have any questions - just ask!

  3. Hello, here i am with some problems:

    My mod uses payer.posY each tick and checks for block on that position (after checking other stuff). And the problem i met in deobf environment was that posY of player on client was server's y position + eyeHeight. So i had to change code to following:

    		Block block;
    		if(player.getClass().getName().contains("net.minecraft.client")){
    			block = player.worldObj.getBlock((int) Math.floor(player.posX), (int) Math.floor(player.posY - 1), (int) Math.floor(player.posZ));
    		} else {
    			block = player.worldObj.getBlock((int) Math.floor(player.posX), (int) Math.floor(player.posY), (int) Math.floor(player.posZ));
    		}
    

    This code is working with zero problems in dev environment... But, when i run it in obf environment, on client it is not working, as it is in dev. How ever, server part of code is working equally good in both environments.

    How do i know that this is not working on client in obf?

    Here's logging code:

    			logger.debug(player.rotationPitch == 90 && ((block == TeleplatesBase.teleplate && EnergyManager.canTeleportFromTeleplate(player))));
    			logger.debug((player.rotationPitch == 90) + " && ((" + (block == TeleplatesBase.teleplate) + "&&" + (EnergyManager.canTeleportFromTeleplate(player)) + "))");
    

    And here's logging results i get in dev environment:

    [16:59:55] [server thread/DEBUG] [Teleportation Manager/]: true
    [16:59:55] [server thread/DEBUG] [Teleportation Manager/]: true&& ((true&&true))
    [16:59:55] [Client thread/DEBUG] [Teleportation Manager/]: true
    [16:59:55] [Client thread/DEBUG] [Teleportation Manager/]: true&& ((true&&true))
    

    And in obf environment:

    [16:57:36] [server thread/DEBUG] [Teleportation Manager/]: true
    [16:57:36] [server thread/DEBUG] [Teleportation Manager/]: true && ((true&&true))
    [16:57:36] [Client thread/DEBUG] [Teleportation Manager/]: false
    [16:57:36] [Client thread/DEBUG] [Teleportation Manager/]: true && ((false&&true))
    

    So it leads me to fact that yPos of player on client is different in 2 environments... Why??? And how to fix it???

     

    Thanks for help!

    If you have any questions - just ask!

  4. Yes, it's right, there's no gl context!

    And also your code will crash on server (unless you are registering event in client proxy).

     

    How mc runs (Minecraft.runTick()):

    -Update key bindings an mouse

    -Draw screen

    -Update world

    Where Draw screen includes:

    -Create gl context

    -Render world (if present)

    -Render game overlay (hotbar, hunger bar...)

    -Render current gui

    -Remove gl context

     

    So, you're drawing in Update world part, where gl context is not present!

    So, you must do it in one of place where gl context is present.

  5. Hello everybody.

    This is really strange bug i have discovered:

    Whenever i destroy my tileentity, it's destrcution should be logged, but it is not. After further testing, i came with fact that shouldRefresh is called on client only.

    Using following code:

    @Override
    public boolean shouldRefresh(Block oldBlock, Block newBlock, int oldMeta, int newMeta, World world, int x, int y, int z) {
    	boolean b = super.shouldRefresh(oldBlock, newBlock, oldMeta, newMeta, world, x, y, z);
    	if(b){
    		System.out.print("Invalidating on " + (worldObj.isRemote ? "CLIENT" : "SERVER"));
    		TeleplatesManager.invalidate(teleplate);
    	}
    	return b;
    }
    

    I got only this in console ("Invalidating 0" is from TeleplatesManager.invalidate method):

    Invalidating on CLIENT[12:48:05] [Client thread/INFO] [Teleplates Manager]: Invalidating 0
    

    And this gives me problems, because i want to invalidate tileentity from my mapping whenever it gets destroyed.

    Does anybody know why this happens?

     

    Thanks for help!

    If you have any questions - just ask!

     

    EDIT: Note: my te extends TileEntity, so

    b

    is true on server too in this case.

  6. I'm aware of all that, and I agree with you (except the nothing will happen part). All my logic is server side. I've even fixed the problem. I just want extra security to know that someone can't hack my packets. Stuff CAN happen when packets get hacked, they can trigger server logic that shouldn't be triggered unless under certain circumstance. The circumstance is irrelevant though, since it is a straightforward question.

     

    The question still stands, can I get the ModID from a custom packet?

    As far as i know, (if you are using SimpleNetwrkWrapper,) no. Only by writing it yourself...

     

  7. You are kinda wrong:

    1) Yes, anybody can send packets to anybody.

    2) Yes, you can "hack"-send packet.

    , BUT:

    1) In all mods, all logic happens on server.

    2) Client only tells server that key/button in gui was pressed.

    3) Server does all logic and processing.

    4) You can't change server code from client.

    5) If client mod part does logic and sends to server packet, what he has to do AND server does that, then it's wrongly coded mod and must NOT be used on servers.

     

    So, as you can see, if you hack packet, nothing will happen, because server does logic and server knows that this player can't do that. And if mod that you saw has "client the almighty controller" logic, then you should report it to mod author.

  8. Your method with new customblock and tileentity may and will work, but it will not support some modded blocks/blocks with tile entities.

    ---

    So yeah, it depends on what you want to achieve. New block and tile entity method is most simple one in both coding, and using. It will be compatible with ~95% modded blocks. One thing i may reccomend is following: when your block is rendered, render "original" block on it's place. Because recoloring will happen before model is rendered. For that, i think, you will have to use ISmartBlockModel. Like that your block will be able to take model of torches, fences, stairs, even other "smart" models...

    As far as i know, that is only color method (one suggested by coolAlias) that has at least world and block position. I don't know any with EnumFacing... Again - I... Maybe you will find them...

    Good luck!

×
×
  • Create New...

Important Information

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