• Recently Browsing

    No registered users viewing this page.

  • Posts

    • It's not the responsibility of the Open Source Project (Forge) to maintain compatibility with the Closed Source Project (Optifine).
    • Thank you very much! You was right - problem was related to code Minecraft.getInstance().player. I Have read page about networking few times and missed this example of common beginners mistakes... But how I should get opened container at server side? I added list of listeners into ModNetworking  private static final NonNullList<WeakReference<Object>> serverListeners = NonNullList.create(); public static void addServerListener(Object obj) { serverListeners.add(new WeakReference(obj)); } public static void removeServerListener(Object obj) { serverListeners.remove(obj); } public static <T> Stream<T> listeners(Class<T> listenerClass) { serverListeners.removeIf(r -> r.get() == null); return serverListeners.stream() .filter(r -> listenerClass.isAssignableFrom(r.get().getClass())) .map(r -> ((T) r.get())); }   At packet processing ModNetworking provides listeners of necessary type: public void processPacket(Supplier<NetworkEvent.Context> ctx) { Stream<IUpdateConceptPacketHandler> listeners = ModNetworking.listeners(IUpdateConceptPacketHandler.class); listeners.forEach( l -> l.handleConceptUpdate(conceptId)); ctx.get().setPacketHandled(true); }   My container add itself like a listener in constructor and remove at the finalize(). This solution works, but is it brilliant idea or ugly implementation of something, which platform already may provide to me?   P.S. Why you notify me to not use @OnlyIn? As I understood, it should be written everywhere, in case when method should be called only from client. Is it wrong vision?
    • Oh I just fixed it! I installed Java 11 and it worked, thanks
    • here are the details: java.lang.NullPointerException: mouseClicked event handler     at net.minecraft.client.renderer.WorldRenderer.handler$zzo000$handleOptifineCompat(WorldRenderer.java:4590) ~[?:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,xf:OptiFine:default,pl:mixin:A}     at net.minecraft.client.renderer.WorldRenderer.func_72712_a(WorldRenderer.java) ~[?:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,xf:OptiFine:default,pl:mixin:A}     at net.optifine.shaders.Shaders.handler$zji000$onAboutToLoadShaderPack(Shaders.java:6497) ~[?:?] {re:mixin,re:classloading,pl:mixin:APP:imm_ptl_mixins_optifine.json:MixinShaders,pl:mixin:APP:imm_ptl_mixins_optifine.json:MixinShaders_DimensionRedirect,pl:mixin:APP:imm_ptl_mixins_optifine.json:MixinShaders_Swap,pl:mixin:A}     at net.optifine.shaders.Shaders.loadShaderPack(Shaders.java) ~[?:?] {re:mixin,re:classloading,pl:mixin:APP:imm_ptl_mixins_optifine.json:MixinShaders,pl:mixin:APP:imm_ptl_mixins_optifine.json:MixinShaders_DimensionRedirect,pl:mixin:APP:imm_ptl_mixins_optifine.json:MixinShaders_Swap,pl:mixin:A}     at net.optifine.shaders.Shaders.setShaderPack(Shaders.java:890) ~[?:?] {re:mixin,re:classloading,pl:mixin:APP:imm_ptl_mixins_optifine.json:MixinShaders,pl:mixin:APP:imm_ptl_mixins_optifine.json:MixinShaders_DimensionRedirect,pl:mixin:APP:imm_ptl_mixins_optifine.json:MixinShaders_Swap,pl:mixin:A}     at net.optifine.shaders.gui.GuiSlotShaders.selectIndex(GuiSlotShaders.java:97) ~[?:?] {re:classloading}     at net.optifine.shaders.gui.GuiSlotShaders.selectItem(GuiSlotShaders.java:85) ~[?:?] {re:classloading}     at net.optifine.gui.SlotGui.func_231044_a_(SlotGui.java:281) ~[?:?] {re:classloading}     at net.minecraft.client.gui.INestedGuiEventHandler.func_231044_a_(SourceFile:27) ~[?:?] {re:mixin,re:classloading}     at net.optifine.gui.GuiScreenOF.func_231044_a_(GuiScreenOF.java:51) ~[?:?] {re:classloading}     at net.minecraft.client.MouseHelper.lambda$mouseButtonCallback$0(MouseHelper.java:87) ~[?:?] {re:classloading,pl:runtimedistcleaner:A}     at net.minecraft.client.MouseHelper$$Lambda$8273/438998190.run(Unknown Source) ~[?:?] {}     at net.minecraft.client.gui.screen.Screen.func_231153_a_(Screen.java:427) ~[?:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:quark.mixins.json:client.ScreenMixin,pl:mixin:A,pl:runtimedistcleaner:A}     at net.minecraft.client.MouseHelper.func_198023_a(MouseHelper.java:85) ~[?:?] {re:classloading,pl:runtimedistcleaner:A}     at net.minecraft.client.MouseHelper.lambda$null$4(MouseHelper.java:175) ~[?:?] {re:classloading,pl:runtimedistcleaner:A}     at net.minecraft.client.MouseHelper$$Lambda$8272/1910812539.run(Unknown Source) ~[?:?] {}     at net.minecraft.util.concurrent.ThreadTaskExecutor.execute(ThreadTaskExecutor.java:104) ~[?:?] {re:mixin,pl:accesstransformer:B,re:computing_frames,pl:accesstransformer:B,xf:OptiFine:default,re:classloading,pl:accesstransformer:B,xf:OptiFine:default}     at net.minecraft.client.MouseHelper.lambda$registerCallbacks$5(MouseHelper.java:174) ~[?:?] {re:classloading,pl:runtimedistcleaner:A}     at net.minecraft.client.MouseHelper$$Lambda$6645/1898500295.invoke(Unknown Source) ~[?:?] {}     at org.lwjgl.glfw.GLFWMouseButtonCallbackI.callback(GLFWMouseButtonCallbackI.java:36) ~[lwjgl-glfw-3.2.2.jar:build 10] {}     at org.lwjgl.system.JNI.invokeV(Native Method) ~[lwjgl-3.2.2.jar:build 10] {}     at org.lwjgl.glfw.GLFW.glfwPollEvents(GLFW.java:3101) ~[lwjgl-glfw-3.2.2.jar:build 10] {}     at com.mojang.blaze3d.systems.RenderSystem.flipFrame(SourceFile:102) ~[?:?] {re:mixin,re:classloading}     at net.minecraft.client.MainWindow.func_227802_e_(MainWindow.java:388) ~[?:?] {re:classloading,xf:OptiFine:default}     at net.minecraft.client.Minecraft.func_195542_b(Minecraft.java:996) [?:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:computing_frames,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:imm_ptl_mixins.json:client.MixinMinecraftClient,pl:mixin:APP:imm_ptl_mixins.json:client.block_manipulation.MixinMinecraftClient_B,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:computing_frames,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:imm_ptl_mixins.json:client.MixinMinecraftClient,pl:mixin:APP:imm_ptl_mixins.json:client.block_manipulation.MixinMinecraftClient_B,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.4-35.1.37.jar:35.1] {}     at net.minecraftforge.fml.loading.FMLClientLaunchProvider$$Lambda$483/174383157.call(Unknown Source) [forge-1.16.4-35.1.37.jar:35.1] {}     at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-8.0.9.jar:?] {}     at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) [modlauncher-8.0.9.jar:?] {}     at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) [modlauncher-8.0.9.jar:?] {}     at cpw.mods.modlauncher.Launcher.run(Launcher.java:82) [modlauncher-8.0.9.jar:?] {}     at cpw.mods.modlauncher.Launcher.main(Launcher.java:66) [modlauncher-8.0.9.jar:?] {}
    • Do you know what version of Java that forge supports? The version that's bundled with the Minecraft Launcher is 15 oddly
  • Topics

  • Who's Online (See full list)