LinsMinecraftStudio / LighterAPI

Bukkit/Sponge library for create invisible light source(A fork of LightAPI)
MIT License
13 stars 0 forks source link

[Bug] Lighting doesn't work #2

Open OpticFusion1 opened 8 months ago

OpticFusion1 commented 8 months ago

java.lang.IllegalArgumentException: object is not an instance of declaring class at jdk.internal.reflect.DirectMethodHandleAccessor.checkReceiver(DirectMethodHandleAccessor.java:197) ~[?:?] at jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:99) ~[?:?] at java.lang.reflect.Method.invoke(Method.java:580) ~[?:?] at ru.beykerykt.minecraft.lightapi.bukkit.internal.handler.craftbukkit.nms.v1_20_R3.VanillaNMSHandler.onBlockEmissionIncrease(VanillaNMSHandler.java:253) ~[?:?] at ru.beykerykt.minecraft.lightapi.bukkit.internal.handler.craftbukkit.nms.v1_20_R3.VanillaNMSHandler.lambda$setRawLightLevel$0(VanillaNMSHandler.java:221) ~[?:?] at ru.beykerykt.minecraft.lightapi.bukkit.internal.handler.craftbukkit.nms.v1_20_R3.VanillaNMSHandler.executeSync(VanillaNMSHandler.java:112) ~[?:?] at ru.beykerykt.minecraft.lightapi.bukkit.internal.handler.craftbukkit.nms.v1_20_R3.VanillaNMSHandler.setRawLightLevel(VanillaNMSHandler.java:213) ~[?:?] at ru.beykerykt.minecraft.lightapi.bukkit.internal.engine.sched.BukkitScheduledLightEngineImpl.setRawLightLevelLocked(BukkitScheduledLightEngineImpl.java:191) ~[?:?] at ru.beykerykt.minecraft.lightapi.bukkit.internal.engine.sched.BukkitScheduledLightEngineImpl.setRawLightLevel(BukkitScheduledLightEngineImpl.java:197) ~[?:?] at ru.beykerykt.minecraft.lightapi.common.internal.engine.sched.PriorityScheduler.handleLightRequest(PriorityScheduler.java:140) ~[?:?] at ru.beykerykt.minecraft.lightapi.common.internal.engine.sched.ScheduledLightEngineImpl.handleLightRequest(ScheduledLightEngineImpl.java:261) ~[?:?] at ru.beykerykt.minecraft.lightapi.common.internal.engine.sched.ScheduledLightEngineImpl.onShutdown(ScheduledLightEngineImpl.java:92) ~[?:?] at ru.beykerykt.minecraft.lightapi.bukkit.internal.engine.sched.BukkitScheduledLightEngineImpl.onShutdown(BukkitScheduledLightEngineImpl.java:151) ~[?:?] at ru.beykerykt.minecraft.lightapi.bukkit.internal.BukkitPlatformImpl.shutdown(BukkitPlatformImpl.java:246) ~[?:?] at ru.beykerykt.minecraft.lightapi.common.LightAPI.shutdown(LightAPI.java:110) ~[?:?] at ru.beykerykt.minecraft.lightapi.bukkit.BukkitPlugin.onDisable(BukkitPlugin.java:79) ~[?:?] at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:268) ~[spigot-api-1.20.4-R0.1-SNAPSHOT.jar:?] at org.bukkit.plugin.java.JavaPluginLoader.disablePlugin(JavaPluginLoader.java:367) ~[spigot-api-1.20.4-R0.1-SNAPSHOT.jar:?] at org.bukkit.plugin.SimplePluginManager.disablePlugin(SimplePluginManager.java:501) ~[spigot-api-1.20.4-R0.1-SNAPSHOT.jar:?] at org.bukkit.plugin.SimplePluginManager.disablePlugins(SimplePluginManager.java:493) ~[spigot-api-1.20.4-R0.1-SNAPSHOT.jar:?] at org.bukkit.craftbukkit.v1_20_R3.CraftServer.disablePlugins(CraftServer.java:475) ~[spigot-1.20.4-R0.1-SNAPSHOT.jar:4045-Spigot-c198da2-38fd4bd] at net.minecraft.server.MinecraftServer.t(MinecraftServer.java:895) ~[spigot-1.20.4-R0.1-SNAPSHOT.jar:4045-Spigot-c198da2-38fd4bd] at net.minecraft.server.dedicated.DedicatedServer.t(DedicatedServer.java:697) ~[spigot-1.20.4-R0.1-SNAPSHOT.jar:4045-Spigot-c198da2-38fd4bd] at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:1087) ~[spigot-1.20.4-R0.1-SNAPSHOT.jar:4045-Spigot-c198da2-38fd4bd] at net.minecraft.server.MinecraftServer.lambda$0(MinecraftServer.java:304) ~[spigot-1.20.4-R0.1-SNAPSHOT.jar:4045-Spigot-c198da2-38fd4bd] at java.lang.Thread.run(Thread.java:1583) ~[?:?]

lijinhong11 commented 8 months ago

will fix

OpticFusion1 commented 8 months ago

Looks like the problem's fixed, however, lighting still doesn't work. The impl I'm using atm is https://paste.md-5.net/kositaziku.java which is called via getLightAPI().setLight(locs[locIndex], LightFlag.BLOCK_LIGHTING, 15, true, false);

The setLightLevel num is 1, likely important

lijinhong11 commented 8 months ago

that's strange, yeah I use a new TickingTracker to do the job, so it may not work I will check if I have time

OpticFusion1 commented 8 months ago

That's the only class you'll have to test with, so you should be fine to test and rewrite just that to work

OpticFusion1 commented 7 months ago

Any updates?

lijinhong11 commented 7 months ago

no bc i only have time on the weekends

获取Outlook for Androidhttps://aka.ms/AAb9ysg


From: Optic_Fusion1 @.> Sent: Sunday, April 14, 2024 11:09:50 AM To: LinsMinecraftStudio/LighterAPI @.> Cc: lijinhong11 @.>; State change @.> Subject: Re: [LinsMinecraftStudio/LighterAPI] [Bug] java.lang.IllegalArgumentException: object is not an instance of declaring class (Issue #2)

Any updates?

― Reply to this email directly, view it on GitHubhttps://github.com/LinsMinecraftStudio/LighterAPI/issues/2#issuecomment-2053877178, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AO6JU5CA7SOROEBZ3SDRL6TY5HXP5AVCNFSM6AAAAABFBIBD46VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANJTHA3TOMJXHA. You are receiving this because you modified the open/close state.Message ID: @.***>