DavidQF555
-
Joined
-
Last visited
Posts posted by DavidQF555
-
-
-
-
-
-
2 minutes ago, diesieben07 said:
The packet class is still loaded on both sides. You have to use DistExecutor when accessing dist-only classes from common code.
I updated my handle method to:
private void handle(NetworkEvent.Context context) { NetworkDirection dir = context.getDirection(); if (dir == NetworkDirection.PLAY_TO_CLIENT) { context.enqueueWork(() -> DistExecutor.safeRunWhenOn(Dist.CLIENT, () -> () -> Minecraft.getInstance().displayGuiScreen(new FloorTeleportationTerminalScreen(level, teleporter, direction)))); context.setPacketHandled(true); } }Just to check, is the way I'm using DistExecutor correct in terms of convention?
-
Edited by DavidQF555
SolvedI'm getting
[00:59:39] [Server thread/FATAL] [ne.mi.fm.lo.RuntimeDistCleaner/DISTXFORM]: Attempted to load class net/minecraft/client/gui/screen/Screen for invalid dist DEDICATED_SERVER [00:59:39] [Server thread/FATAL] [minecraft/ThreadTaskExecutor]: Error executing task on Server java.lang.RuntimeException: Attempted to load class net/minecraft/client/gui/screen/Screen for invalid dist DEDICATED_SERVER at net.minecraftforge.fml.loading.RuntimeDistCleaner.processClassWithFlags(RuntimeDistCleaner.java:71) ~[forge-1.16.5-36.2.20_mapped_snapshot_20210309-1.16.5-launcher.jar:36.2] {} at cpw.mods.modlauncher.LaunchPluginHandler.offerClassNodeToPlugins(LaunchPluginHandler.java:85) ~[modlauncher-8.0.9.jar:?] {} at cpw.mods.modlauncher.ClassTransformer.transform(ClassTransformer.java:120) ~[modlauncher-8.0.9.jar:?] {} at cpw.mods.modlauncher.TransformingClassLoader$DelegatedClassLoader.findClass(TransformingClassLoader.java:265) ~[modlauncher-8.0.9.jar:?] {} at cpw.mods.modlauncher.TransformingClassLoader.loadClass(TransformingClassLoader.java:136) ~[modlauncher-8.0.9.jar:?] {re:classloading} at cpw.mods.modlauncher.TransformingClassLoader.loadClass(TransformingClassLoader.java:98) ~[modlauncher-8.0.9.jar:?] {re:classloading} at java.lang.ClassLoader.loadClass(ClassLoader.java:351) ~[?:1.8.0_302] {} at io.github.davidqf555.minecraft.towerofgod.common.blocks.FloorTeleportationTerminalBlock.onBlockActivated(FloorTeleportationTerminalBlock.java:56) ~[?:?] {re:classloading} at net.minecraft.block.AbstractBlock$AbstractBlockState.onBlockActivated(AbstractBlock.java:732) ~[forge:?] {re:classloading,pl:runtimedistcleaner:A} at net.minecraft.server.management.PlayerInteractionManager.func_219441_a(PlayerInteractionManager.java:347) ~[forge:?] {re:classloading} at net.minecraft.network.play.ServerPlayNetHandler.processTryUseItemOnBlock(ServerPlayNetHandler.java:986) ~[forge:?] {re:classloading} at net.minecraft.network.play.client.CPlayerTryUseItemOnBlockPacket.processPacket(CPlayerTryUseItemOnBlockPacket.java:45) ~[forge:?] {re:classloading,pl:runtimedistcleaner:A} at net.minecraft.network.play.client.CPlayerTryUseItemOnBlockPacket.processPacket(CPlayerTryUseItemOnBlockPacket.java:12) ~[forge:?] {re:classloading,pl:runtimedistcleaner:A} at net.minecraft.network.PacketThreadUtil.lambda$checkThreadAndEnqueue$0(PacketThreadUtil.java:19) ~[forge:?] {re:classloading} at net.minecraft.util.concurrent.TickDelayedTask.run(TickDelayedTask.java:20) ~[forge:?] {re:classloading} at net.minecraft.util.concurrent.ThreadTaskExecutor.run(ThreadTaskExecutor.java:139) ~[forge:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.util.concurrent.RecursiveEventLoop.run(RecursiveEventLoop.java:22) ~[forge:?] {re:classloading} at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:759) ~[forge:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:159) ~[forge:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.util.concurrent.ThreadTaskExecutor.driveOne(ThreadTaskExecutor.java:109) ~[forge:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.server.MinecraftServer.driveOneInternal(MinecraftServer.java:742) ~[forge:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.server.MinecraftServer.driveOne(MinecraftServer.java:736) ~[forge:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.util.concurrent.ThreadTaskExecutor.driveUntil(ThreadTaskExecutor.java:122) ~[forge:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.server.MinecraftServer.runScheduledTasks(MinecraftServer.java:722) ~[forge:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.server.MinecraftServer.func_240802_v_(MinecraftServer.java:668) ~[forge:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.server.MinecraftServer.lambda$startServer$0(MinecraftServer.java:233) ~[forge:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at java.lang.Thread.run(Thread.java:748) [?:1.8.0_302] {}for this mod when playing it on dedicated servers. I understand that Screens should not be used on dedicated servers, but I was using packets to make sure that the screen only opened on client. I'm wondering if I need to add checks or something elsewhere to make sure that the packet is only handled on clients.
-
-
For this teleporter, I'm trying to make a portal that links to another dimension that has naturally spawning portals as features, and I want it to teleport the player into one of the portals of the other dimension, if possible, instead of creating a new one. However, it cannot seem to find any POIs in the target dimension because they aren't generated yet, and I don't think PointOfInterestManager.ensureLoadedAndValid() really generates my feature. I was wondering how I could find the POI for chunks that haven't been generated yet.
-
I have a portal block that functions pretty similarly to a nether portal, so it teleports entities when they enter it, but often players will enter it, appear on the other side, and then instantly get transported back. Sometimes they are transported back, sometimes it works as intended and they aren't, and I cannot really tell what is causing it. The portal cooldown is somehow at 0 sometimes when the player/entity appears in the other dimension. I'm working with dynamic dimensions, and I have a feeling it has something to do with chunk loading, but I made sure to load the chunks on the other sides of the portal, so I'm not sure.
-
My logs are getting spammed by
Received invalid biome id: -1in this project that does not add any biomes but dynamically creates dimensions. I thought the issue would be similar to this, but it does not seem to be from the same situation. I'm having difficulty replicating the situation, but the actual logging is from handling SChunkDataPacket. The packet is sent with the biomes int[] full of -1's, and the BiomeContainer biomes Biome[] that is written to the packet is full of Biomes.THE_VOID. I've used registry keys for biomes everywhere, so I'm unsure what is causing this.
-
-
Edited by DavidQF555
For this branch, after I wrote the latest commit, it caused the loading percent to be stuck at 0% whenever I create a new world. I'm really confused as to what I changed to cause this. The versions before did not have this issue, but it appeared after the latest commit.
-
Edited by DavidQF555
I'm trying to automate publishing my mod using github actions. This is my action, but the runData generates this error. Does anyone have any examples of using github actions and generating data?
EDIT: I fixed the data generation, but now I'm having trouble locating the built jar. Is my use of #v and the tag_name wrong?
EDIT2: Completely got the scripting language wrong
-
I realized the error but I'm not sure how I'm supposed to solve it. Some vanilla feature in the biome I'm using in my dimensions uses an absolute upper bound but relative lower bound. So when I made the min built height of my dimension greater, the lower bound increased so much that it became higher than the upper bound. I'm not sure how to fix this other than change my dimension min height, but I was trying to center my dimension at about surface level so that the correct features were carved.
-
-
15 minutes ago, Luis_ST said:
post full log, are you sure the texture is in the correct location and is named correctly
Logs. For the first case, I'm pretty sure. For the second case, it is a minecraft texture, not a modded one so I hope so.
-
There are a lot of instances of this happening when I ported my mod from 1.16.5 to 1.17.1. One specific instance is this item. The textures somehow cannot be found and it is displayed with the purple and black squares. I'm also getting this error:
[20:25:45] [Render thread/ERROR]: Error rendering overlay 'Shinsu Meters' net.minecraft.ReportedException: Registering texture at net.minecraft.client.renderer.texture.TextureManager.loadTexture(TextureManager.java:110) ~[forge-1.17.1-37.0.68_mapped_official_1.17.1-recomp.jar%2375!:?] at net.minecraft.client.renderer.texture.TextureManager.register(TextureManager.java:66) ~[forge-1.17.1-37.0.68_mapped_official_1.17.1-recomp.jar%2375!:?] at net.minecraft.client.renderer.texture.TextureManager.getTexture(TextureManager.java:118) ~[forge-1.17.1-37.0.68_mapped_official_1.17.1-recomp.jar%2375!:?] at com.mojang.blaze3d.systems.RenderSystem._setShaderTexture(RenderSystem.java:755) ~[forge-1.17.1-37.0.68_mapped_official_1.17.1-recomp.jar%2375!:?] at com.mojang.blaze3d.systems.RenderSystem.setShaderTexture(RenderSystem.java:747) ~[forge-1.17.1-37.0.68_mapped_official_1.17.1-recomp.jar%2375!:?] at io.github.davidqf555.minecraft.towerofgod.client.gui.ClientTextureRenderData.render(ClientTextureRenderData.java:37) ~[%2379!:?] at io.github.davidqf555.minecraft.towerofgod.client.gui.ShinsuStatsMeterOverlay.renderBar(ShinsuStatsMeterOverlay.java:55) ~[%2379!:?] at io.github.davidqf555.minecraft.towerofgod.client.gui.ShinsuStatsMeterOverlay.render(ShinsuStatsMeterOverlay.java:39) ~[%2379!:?] at net.minecraftforge.client.gui.ForgeIngameGui.lambda$render$26(ForgeIngameGui.java:363) ~[forge-1.17.1-37.0.68_mapped_official_1.17.1-recomp.jar%2374%2380!:?] at java.util.ArrayList.forEach(ArrayList.java:1511) ~[?:?] at java.util.Collections$UnmodifiableCollection.forEach(Collections.java:1087) ~[?:?] at net.minecraftforge.client.gui.ForgeIngameGui.render(ForgeIngameGui.java:357) ~[forge-1.17.1-37.0.68_mapped_official_1.17.1-recomp.jar%2374%2380!:?] at net.minecraft.client.renderer.GameRenderer.render(GameRenderer.java:865) ~[forge-1.17.1-37.0.68_mapped_official_1.17.1-recomp.jar%2375!:?] at net.minecraft.client.Minecraft.runTick(Minecraft.java:1039) ~[forge-1.17.1-37.0.68_mapped_official_1.17.1-recomp.jar%2375!:?] at net.minecraft.client.Minecraft.run(Minecraft.java:659) ~[forge-1.17.1-37.0.68_mapped_official_1.17.1-recomp.jar%2375!:?] at net.minecraft.client.main.Main.main(Main.java:186) ~[forge-1.17.1-37.0.68_mapped_official_1.17.1-recomp.jar%2375!:?] at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?] at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78) ~[?:?] at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?] at java.lang.reflect.Method.invoke(Method.java:567) ~[?:?] at net.minecraftforge.fml.loading.targets.ForgeClientUserdevLaunchHandler.lambda$launchService$0(ForgeClientUserdevLaunchHandler.java:38) ~[fmlloader-1.17.1-37.0.68.jar%233!:?] at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-9.0.7.jar%238!:?] at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53) [modlauncher-9.0.7.jar%238!:?] at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71) [modlauncher-9.0.7.jar%238!:?] at cpw.mods.modlauncher.Launcher.run(Launcher.java:106) [modlauncher-9.0.7.jar%238!:?] at cpw.mods.modlauncher.Launcher.main(Launcher.java:77) [modlauncher-9.0.7.jar%238!:?] at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26) [modlauncher-9.0.7.jar%238!:?] at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23) [modlauncher-9.0.7.jar%238!:?] at cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:90) [bootstraplauncher-0.1.17.jar:?] Caused by: java.lang.NullPointerException: Cannot invoke "net.minecraft.resources.ResourceLocation.getNamespace()" because "p_10895_" is null at net.minecraft.server.packs.resources.SimpleReloadableResourceManager.getResource(SimpleReloadableResourceManager.java:58) ~[forge-1.17.1-37.0.68_mapped_official_1.17.1-recomp.jar%2375!:?] at net.minecraft.client.renderer.texture.SimpleTexture$TextureImage.load(SimpleTexture.java:84) ~[forge-1.17.1-37.0.68_mapped_official_1.17.1-recomp.jar%2375!:?] at net.minecraft.client.renderer.texture.SimpleTexture.getTextureImage(SimpleTexture.java:58) ~[forge-1.17.1-37.0.68_mapped_official_1.17.1-recomp.jar%2375!:?] at net.minecraft.client.renderer.texture.SimpleTexture.load(SimpleTexture.java:28) ~[forge-1.17.1-37.0.68_mapped_official_1.17.1-recomp.jar%2375!:?] at net.minecraft.client.renderer.texture.TextureManager.loadTexture(TextureManager.java:95) ~[forge-1.17.1-37.0.68_mapped_official_1.17.1-recomp.jar%2375!:?] ... 28 moreEven though the texture in question is at minecraft:textures/gui/bars.png, which should be there. I'm really confused as to why this is happening.
-
11 minutes ago, DavidQF555 said:
Actually nevermind, I just didn't account for tints in my Item color. An issue still remains though because I'm using overrides with a custom property to define whether or not multiple layers should even be used, and in the case of the single layer, I want it to not be colored. I'm not sure if directly reading the property in the item color is the correct play though because I feel like the colors should be defined in the model instead so that changing the model would also change the color, instead of just hardcoding it within the color.
Because under certain overrides/properties, the layer I don't want to be colored is on the 0th layer, and other wise its on the 1st layer, so I'm not sure how I should restrict this in the ItemColor. Can I have like a blank 0th layer or something?
-
2 hours ago, Luis_ST said:
layer1 is colored (only the overlay texture), you can copy the logic to your Item
Actually nevermind, I just didn't account for tints in my Item color. An issue still remains though because I'm using overrides with a custom property to define whether or not multiple layers should even be used, and in the case of the single layer, I want it to not be colored. I'm not sure if directly reading the property in the item color is the correct play though because I feel like the colors should be defined in the model instead so that changing the model would also change the color, instead of just hardcoding it within the color.
-
-
-
I'm trying to make a colored item using ItemColors, but I also only want 1 layer to be colored while the other is just normal. I'm trying to use the item/generated model, so I'm not sure how to do this because normally you'd just change the face tint index, but I can't find any elements and it seems like it is just generated.
-
-
1 hour ago, diesieben07 said:
You cannot create an item instance here. Items must be created during the registry events, it is recommended to use DeferredRegister.
I changed to using Suppliers so now all my items are made in the registry event. The model issue still remains though.
[1.18.2] Do not know how to append a primitive value
in Modder Support
I'm getting:
[Render thread/ERROR] [minecraft/RegistryResourceAccess$InMemoryStorage]: Error adding element: Do not know how to append a primitive value 1 to 3; Do not know how to append a primitive value 0.0 to 180.0; Do not know how to append a primitive value 0.0 to 180.0; Do not know how to append a primitive value 0.0 to 180.0; Do not know how to append a primitive value 6 to 10when I try to open the create new world screen. I'm assuming it has something to do with my feature config due to the similarity in the default values, but I can't tell what the issue is. Looking at debug mode, it seems to be thrown because the first and second values of my pair are different, which should not be an issue.