Closed ShadowBoxx-LLC closed 5 years ago
That json didn't come out as expected...
Here it is in a gist: https://gist.github.com/Shadow-Boxx/16d4863dd234ece45b6c8e43f7ecd69c
Also, it's worth noting that absolutely nothing happens on the server side? Which is rather strange, but I suspect that a required step (casting from minecraft's BlockPortal to the mod's BlockNetherPortal) is not happening, which results in the server never getting the call to activate the portal? I would assume the majority of this would have to happen server side, but I suppose I'm really not all that educated on how the portals work in the code really.
RandomPortals should be replacing the vanilla portal with its own portal so this shouldn't be possible. Can I have your debug.log
?
@TheRandomLabs sure. I just reproduced the bug again on my server, and the only thing that happens at the time of placing the soulsand block in the server's debug log is this:
[14:28:56] [Dynmap Render Thread/INFO] [Dynmap]: [Dynmap] Full render of map 'surface' of 'world' in progress - 6225900 tiles rendered (168.79 msec/tile, 82.95 msec per render) [14:28:56] [Netty Epoll Server IO #3/DEBUG] [FML]: Muted NetworkDispatcher exception io.netty.channel.unix.Errors$NativeIoException: syscall:read(..) failed: Connection reset by peer at io.netty.channel.unix.FileDescriptor.readAddress(..)(Unknown Source) ~[minecraft_server.1.12.2.jar:?] [14:28:56] [Server thread/INFO] [net.minecraft.network.NetHandlerPlayServer]: Palejack lost connection: Internal Exception: io.netty.channel.unix.Errors$NativeIoException: syscall:read(..) failed: Connection reset by peer [14:28:56] [Server thread/INFO] [net.minecraft.server.dedicated.DedicatedServer]: Palejack left the game
Here is the debug.log file from the client, which is definitely where the crash is occuring: https://www.dropbox.com/s/wghy6vfgvwddta4/debug.zip?dl=0
Here is the exact config I am using on my client and server, in case this helps: https://www.dropbox.com/s/cyopwxb6hvaozhj/randomportals.zip?dl=0
Some further testing I performed:
The same error occurs in both single player survival and single player creative. The error occurs in single player survival and single player creative with no mods installed other than randompatches and randomportals. The error only occurs when placing blocks, if I have "canBeActivatedByFire": true set in the json config for the portal, then igniting a block with flint and steel activates the portal just fine.
Just to reiterate from before, I am using Forge 1.12.2-14.23.5.2838 along with randomportals 1.12.2-1.8.1.0 and it's dependency randompatches 1.12.2-1.16.0.0
Hopefully you are able to reproduce and track down the issue.
@TheRandomLabs Eureka! I found the source of the problem, and it's not on your mod! Not exactly anyway.
So I forked your repo and pulled it down, ran the client in eclipse so it would generate the configs in the run directory, modified everything necessary. Started the server and the client, connected to the server. Went to put the sandstone block in the glowstone frame and... it worked! Which had me very confused!
So I built the mod, copied the jar file over to my mods folder, and tried testing it in single player creative. It broke! I uninstalled everything except for RandomPatches and RandomPortals. Performed the same action again. Still broke. Then it dawned on me.
The only difference between what I was running out of Eclipse and what I was running independently of Eclipse was I had LiteLoader installed. No actual LiteLoader mods installed, just LiteLoader installed on top of Forge. I ran the Forge profile, without LiteLoader, tested it and it worked! Hurray! Also ARGH!
I wish I would have considered this before hand. It makes perfect sense. The bug only occurred on the client and LiteLoader is client side only. Sorry for any head scratching you incured for this.
Now I am trying to figure out why LiteLoader isn't allowing RandomPortals to replace the portal block. I honestly wouldn't think it does anything with Blocks.PORTAL, but I suppose stranger things have happened. Also, I'm confused why it doesn't happen with the flint and steel fire activation.
Unfortunately it doesn't look like LiteLoader is being maintained any longer, so my only option for an official fix is to see if there is a way to work around it in RandomPortals. If I find a way to work around it, I will send you a pull request.
Thanks for listening to me ramble, I absolutely love the mod by the way!
Cheers!
Thanks for figuring it out! I was working on other things so I hadn't even begun to debug. I'll see what I can do about LiteLoader.
I can do even better! So after doing some digging around and coming up empty handed, I started digging through your mod. I realized you were basically using registry subsitution for the portal blocks, which made sense. So it occurred to me that LiteLoader must be doing something that blocks registry substitution. I also realized, that if this is the case, someone else must have reported it at some point.
That led me to the LiteLoader bugtracker, which ultimately led me to this thread and specifically this comment: https://github.com/mezz/JustEnoughItems/issues/1189#issuecomment-498078956 the mod that is mentioned there completely fixes the issue. However, if you don't want people using LiteLoader to have to download yet another coremod in order to fix the problem, you could probably implement their fix in RandomPortals itself I would imagine. It would have to be a coremod and run after LiteLoader however. Maybe simply setting it as an optional dependency on the curseforge project page would do the trick. In any case, you can find what asiekierka is doing to fix it here: https://git.asie.pl/asie-minecraft/ExtraFoamForLiteLoader
Hope this helps! Thanks again!
Thank you for figuring it out without me! I won't implement it in RandomPortals itself since I'm trying to keep ASM in RandomPatches/RandomPatches Integration, but I'll make Extra Foam For LiteLoader an optional dependency and maybe figure out another solution later.
Found what I believe is a bug of sorts. Using this config:
{ "frame": { "type": "LATERAL_OR_VERTICAL", "size": { "lateral": { "minWidth": 3, "maxWidth": 30, "minHeight": 3, "maxHeight": 30 }, "verticalX": { "minWidth": 3, "maxWidth": 30, "minHeight": 3, "maxHeight": 30 }, "verticalZ": { "minWidth": 3, "maxWidth": 30, "minHeight": 3, "maxHeight": 30 } }, "blocks": [ { "registryName": "minecraft:glowstone", "meta": 32767, "minimumAmount": 0 } ], "requiredCorner": "ANY_NON_AIR", "cornerBlocksContributeToMinimumAmount": true, "doGeneratedFramesDrop": true }, "activation": { "canBeActivatedByFire": false, "activators": [ { "registryName": "minecraft:soul_sand", "meta": 32767 } ], "activatorConsumeBehavior": "CONSUME", "spawnFireBeforeActivating": true, "activationSounds": [] }, "color": { "colors": [ "LIGHT_BLUE" ], "dyeBehavior": "DISABLE" }, "destination": { "dimensionID": 4, "locationDetectionBehavior": "IGNORE_INITIAL", "initialLocation": { "x": 0, "y": 0, "z": 0 }, "coordinateMultiplier": 1.0, "teleportToPortal": true, "oneWay": false, "generatePortalIfNotFound": true, "portalGenerationBehavior": "CLONE", "generatedFrameType": "SAME", "generatedFrameSize": { "lateral": { "minWidth": 0, "maxWidth": 3, "minHeight": 0, "maxHeight": 3 }, "verticalX": { "minWidth": 0, "maxWidth": 3, "minHeight": 0, "maxHeight": 3 }, "verticalZ": { "minWidth": 0, "maxWidth": 3, "minHeight": 0, "maxHeight": 3 } } }, "teleportationDelay": { "lateral": 20, "verticalX": 20, "verticalZ": 20 }, "decorative": false }
When I place the soul sand down on the 4x3 portal frame I built, it crashes my client with this message:
java.lang.ClassCastException: net.minecraft.block.BlockPortal cannot be cast to com.therandomlabs.randomportals.block.BlockNetherPortal at com.therandomlabs.randomportals.api.netherportal.NetherPortalActivator.lambda$activate$0(NetherPortalActivator.java:143) at com.therandomlabs.randomportals.api.netherportal.NetherPortalActivator.onActivate(NetherPortalActivator.java:236) at com.therandomlabs.randomportals.api.netherportal.NetherPortalActivator.activate(NetherPortalActivator.java:225) at com.therandomlabs.randomportals.api.netherportal.NetherPortalActivator.activate(NetherPortalActivator.java:132) at com.therandomlabs.randomportals.handler.NetherPortalActivationHandler.onRightClickBlock(NetherPortalActivationHandler.java:68) at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_1129_NetherPortalActivationHandler_onRightClickBlock_RightClickBlock.invoke(.dynamic) at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90) at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:182) at net.minecraftforge.common.ForgeHooks.onRightClickBlock(ForgeHooks.java:1137) at net.minecraft.client.multiplayer.PlayerControllerMP.func_187099_a(PlayerControllerMP.java:398) at net.optifine.override.PlayerControllerOF.func_187099_a(PlayerControllerOF.java:96) at net.minecraft.client.Minecraft.func_147121_ag(Minecraft.java:1579) at net.minecraft.client.Minecraft.redirect$onRightClickMouse$zzn000(Minecraft.java:3505) at net.minecraft.client.Minecraft.func_184117_aA(Minecraft.java:2254) at net.minecraft.client.Minecraft.func_184118_az(Minecraft.java:2020) at net.minecraft.client.Minecraft.func_71407_l(Minecraft.java:1808) at net.minecraft.client.Minecraft.func_71411_J(Minecraft.java:1098) at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:398) at net.minecraft.client.main.Main.main(SourceFile:123) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.multimc.onesix.OneSixLauncher.launchWithMainClass(OneSixLauncher.java:196) at org.multimc.onesix.OneSixLauncher.launch(OneSixLauncher.java:231) at org.multimc.EntryPoint.listen(EntryPoint.java:143) at org.multimc.EntryPoint.main(EntryPoint.java:34)
This is a multiplayer survival server running Forge 1.12.2-14.23.5.2838 and using the 1.12.2-1.8.1.0 version of the mod.