Jump to content

Recommended Posts

Posted (edited)

I want to create a BlockState that is the same as another BlockState but with the block changed. I am missing the MapCodec<BlockState>

Edited by hiperion14
Posted (edited)
  On 10/25/2020 at 12:17 PM, hiperion14 said:

I am missing the MapCodec<BlockState>

Expand  

Then just reuse the code present in the other object or if the object doesn't have any design issues extend it. If they are separate, they should not be related to one another. You shouldn't need an instance of the codec as you shouldn't be reading/writing a block state to make it similar to another.

Edited by ChampionAsh5357

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • i was playing a custom modpack and i cant open the world anymore.  here are the logs :  [15:28:31] [Server thread/ERROR]:Encountered an unexpected exception net.minecraftforge.fml.config.ConfigFileTypeHandler$ConfigLoadingException: Failed loading config file jei-server.toml of type SERVER for modid jei at net.minecraftforge.fml.config.ConfigFileTypeHandler.lambda$reader$1(ConfigFileTypeHandler.java:47) ~[fmlcore-1.20.1-47.4.0.jar%23305!/:?] at net.minecraftforge.fml.config.ConfigTracker.openConfig(ConfigTracker.java:60) ~[fmlcore-1.20.1-47.4.0.jar%23305!/:?] at net.minecraftforge.fml.config.ConfigTracker.lambda$loadConfigs$1(ConfigTracker.java:50) ~[fmlcore-1.20.1-47.4.0.jar%23305!/:?] at java.lang.Iterable.forEach(Iterable.java:75) ~[?:?] at java.util.Collections$SynchronizedCollection.forEach(Collections.java:2131) ~[?:?] at net.minecraftforge.fml.config.ConfigTracker.loadConfigs(ConfigTracker.java:50) ~[fmlcore-1.20.1-47.4.0.jar%23305!/:?] at net.minecraftforge.server.ServerLifecycleHooks.handleServerAboutToStart(ServerLifecycleHooks.java:96) ~[forge-1.20.1-47.4.0-universal.jar%23309!/:?] at net.minecraft.client.server.IntegratedServer.m_7038_(IntegratedServer.java:62) ~[client-1.20.1-20230612.114412-srg.jar%23304!/:?] at net.minecraft.server.MinecraftServer.m_130011_(MinecraftServer.java:634) ~[client-1.20.1-20230612.114412-srg.jar%23304!/:?] at net.minecraft.server.MinecraftServer.m_206580_(MinecraftServer.java:251) ~[client-1.20.1-20230612.114412-srg.jar%23304!/:?] at java.lang.Thread.run(Thread.java:840) ~[?:?] Caused by: com.electronwill.nightconfig.core.io.ParsingException: Not enough data available at com.electronwill.nightconfig.core.io.ParsingException.notEnoughData(ParsingException.java:22) ~[core-3.6.4.jar%2393!/:?] at com.electronwill.nightconfig.core.io.ReaderInput.directReadChar(ReaderInput.java:36) ~[core-3.6.4.jar%2393!/:?] at com.electronwill.nightconfig.core.io.AbstractInput.readChar(AbstractInput.java:49) ~[core-3.6.4.jar%2393!/:?] at com.electronwill.nightconfig.core.io.AbstractInput.readCharsUntil(AbstractInput.java:123) ~[core-3.6.4.jar%2393!/:?] at com.electronwill.nightconfig.toml.TableParser.parseKey(TableParser.java:166) ~[toml-3.6.4.jar%2394!/:?] at com.electronwill.nightconfig.toml.TableParser.parseDottedKey(TableParser.java:145) ~[toml-3.6.4.jar%2394!/:?] at com.electronwill.nightconfig.toml.TableParser.parseNormal(TableParser.java:55) ~[toml-3.6.4.jar%2394!/:?] at com.electronwill.nightconfig.toml.TomlParser.parse(TomlParser.java:44) ~[toml-3.6.4.jar%2394!/:?] at com.electronwill.nightconfig.toml.TomlParser.parse(TomlParser.java:37) ~[toml-3.6.4.jar%2394!/:?] at com.electronwill.nightconfig.core.io.ConfigParser.parse(ConfigParser.java:113) ~[core-3.6.4.jar%2393!/:?] at com.electronwill.nightconfig.core.io.ConfigParser.parse(ConfigParser.java:219) ~[core-3.6.4.jar%2393!/:?] at com.electronwill.nightconfig.core.io.ConfigParser.parse(ConfigParser.java:202) ~[core-3.6.4.jar%2393!/:?] at com.electronwill.nightconfig.core.file.WriteSyncFileConfig.load(WriteSyncFileConfig.java:73) ~[core-3.6.4.jar%2393!/:?] at com.electronwill.nightconfig.core.file.AutosaveCommentedFileConfig.load(AutosaveCommentedFileConfig.java:85) ~[core-3.6.4.jar%2393!/:?] at net.minecraftforge.fml.config.ConfigFileTypeHandler.lambda$reader$1(ConfigFileTypeHandler.java:43) ~[fmlcore-1.20.1-47.4.0.jar%23305!/:?] ... 10 more [15:28:31] [Server thread/FATAL]:Preparing crash report with UUID 2a3982ea-90f2-492d-85e7-f1cb63906dcb [15:28:31] [Server thread/ERROR]:This crash report has been saved to: C:\Users\gueri\curseforge\minecraft\Instances\modpack je sais pas\crash-reports\crash-2025-05-29_15.28.31-server.txt [15:28:31] [Server thread/INFO]:Stopping server [15:28:31] [Server thread/INFO]:Saving players [15:28:31] [Server thread/INFO]:Saving worlds [15:28:31] [Server thread/ERROR]:Exception stopping the server java.lang.NullPointerException: Cannot invoke "net.minecraft.server.level.ServerLevel.m_6857_()" because "serverlevel2" is null at net.minecraft.server.MinecraftServer.m_129885_(MinecraftServer.java:513) ~[client-1.20.1-20230612.114412-srg.jar%23304!/:?] at net.minecraft.server.MinecraftServer.m_7041_(MinecraftServer.java:584) ~[client-1.20.1-20230612.114412-srg.jar%23304!/:?] at net.minecraft.client.server.IntegratedServer.m_7041_(IntegratedServer.java:187) ~[client-1.20.1-20230612.114412-srg.jar%23304!/:?] at net.minecraft.server.MinecraftServer.m_130011_(MinecraftServer.java:689) ~[client-1.20.1-20230612.114412-srg.jar%23304!/:?] at net.minecraft.server.MinecraftServer.m_206580_(MinecraftServer.java:251) ~[client-1.20.1-20230612.114412-srg.jar%23304!/:?] at java.lang.Thread.run(Thread.java:840) ~[?:?]
    • Add the crash-report or latest.log (logs-folder) with sites like https://mclo.gs/ and paste the link to it here  
    • I recently updated my mods for prominence 2 and instead of opening like usual it just crashes. I already disable any incompatible mods and I don't know what to do. If anyone could help that would be nice. Thanks Latest log:https://mclo.gs/jsuIlZX
    • I dont know how I can elaborate more, just every time I try to create a new instance where its forge, its 1.20.1 and the forge version is 47.4.1 it doesnt work. Im really confused because it works for my friend he even showed it to me. This is on modrinth btw
  • Topics

×
×
  • Create New...

Important Information

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