Jump to content

[1.16.5] update of a mod : replacing block when opening the old world


matt1999rd

Recommended Posts

hello everyone, I have done a mod in version 1.14 and 1.15 and I am actually updating it to version 1.16.5. But in this process I want to replace some block in it. How can I replace block before loading the world (after clicking on play button on the main menu screen). My block are some simple switchrail (see picture below) that have only two states : the axis of the straight line and the switch position of the block (straight or turn). After this modification, there must be three property : facing, hinge( if the switch turn is on right or left ), switch position.

2021-12-21_11_35_26.png.b15183e3b68446685472dc90e15105f0.png

Link to comment
Share on other sites

i assume it's the same block (as far as registration is concerned)? same modid:blockname?

if the block was changed too much, i'd consider having two blocks: legacy block and new block. make legacy block tick every minute (like crops) and on tick, replace with the new one. nice and clean.

Link to comment
Share on other sites

yes it is the same modid but not the same registry name. The thing I want to do is to replace all occurrences of the block in the world. I tried to do it using the WorldEvent.Load function but I am not sure I can redefine all block especially the ones that are far away from the spawning position. (edit start) I can do it using ChunkEvent.Load but I am not sure of whether this event is reached when loading the world.(edit stop) The solution of replacing the block does not satisfy me as it keeps the bad block in the delivered mods jar file.

Edited by matt1999rd
new information found on event
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now


  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Hi, I have built a new ai model that can create any minecraft texture 16X16 pixels from a text prompt. I've deployed this model on a server with a standard http request.  I want to build a mod where the player can enter text through the chat/text box and load the created texture from the ai model to a simple block. Any ideas for where to start?, I think the most challenging part is loading texture to an object dynamically, do you know any similar projects?
    • If donation/download revenue won't cut it I may also be willing to make arrangements to pay for at least an assistant that can deal with Networking(Pipe Logic & Packets), and ANYTHING rendering related that is not adding basic block models(Anything to do with OpenGL, especially in minecraft, makes my head spin and I just can't wrap my mind around it). We can discuss amounts through messages if it comes to this.
    • Hello, I installed minecraft 1.16.2, then i downloaded forge 1.16.2-33.0.20 and it just won t open...no error message...
    • [29may2023 23:10:06.337] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher running: args [--username, Fabu10th, --version, 1.19.3-forge-44.1.23, --gameDir, C:\Users\fabuo\AppData\Roaming\.minecraft, --assetsDir, C:\Users\fabuo\AppData\Roaming\.minecraft\assets, --assetIndex, 2, --uuid, 1f7b7b2f9e814cf4b23dfa2f0ccb79a1, --accessToken, ????????, --clientId, N2EyZmZhMTUtYjA0OC00N2RkLTg2NTgtZDM2YTUwNTZlODFj, --xuid, 2535425619212215, --userType, msa, --versionType, release, --launchTarget, forgeclient, --fml.forgeVersion, 44.1.23, --fml.mcVersion, 1.19.3, --fml.forgeGroup, net.minecraftforge, --fml.mcpVersion, 20221207.122022] [29may2023 23:10:06.341] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher 10.0.8+10.0.8+main.0ef7e830 starting: java version 17.0.3 by Microsoft; OS Windows 10 arch amd64 version 10.0 [29may2023 23:10:07.130] [main/INFO] [optifine.OptiFineTransformationService/]: OptiFineTransformationService.onLoad [29may2023 23:10:07.131] [main/INFO] [optifine.OptiFineTransformationService/]: OptiFine ZIP file URL: union:/C:/Users/fabuo/AppData/Roaming/.minecraft/mods/OptiFine_1.19.3_HD_U_I3.jar%23265!/ [29may2023 23:10:07.138] [main/INFO] [optifine.OptiFineTransformationService/]: OptiFine ZIP file: C:\Users\fabuo\AppData\Roaming\.minecraft\mods\OptiFine_1.19.3_HD_U_I3.jar [29may2023 23:10:07.140] [main/INFO] [optifine.OptiFineTransformer/]: Target.PRE_CLASS is available [29may2023 23:10:07.185] [main/INFO] [mixin/]: SpongePowered MIXIN Subsystem Version=0.8.5 Source=union:/C:/Users/fabuo/AppData/Roaming/.minecraft/libraries/org/spongepowered/mixin/0.8.5/mixin-0.8.5.jar%2398!/ Service=ModLauncher Env=CLIENT [29may2023 23:10:07.190] [main/INFO] [optifine.OptiFineTransformationService/]: OptiFineTransformationService.initialize [29may2023 23:10:07.783] [main/WARN] [net.minecraftforge.fml.loading.moddiscovery.ModFileParser/LOADING]: Mod file C:\Users\fabuo\AppData\Roaming\.minecraft\libraries\net\minecraftforge\fmlcore\1.19.3-44.1.23\fmlcore-1.19.3-44.1.23.jar is missing mods.toml file [29may2023 23:10:07.787] [main/WARN] [net.minecraftforge.fml.loading.moddiscovery.ModFileParser/LOADING]: Mod file C:\Users\fabuo\AppData\Roaming\.minecraft\libraries\net\minecraftforge\javafmllanguage\1.19.3-44.1.23\javafmllanguage-1.19.3-44.1.23.jar is missing mods.toml file [29may2023 23:10:07.791] [main/WARN] [net.minecraftforge.fml.loading.moddiscovery.ModFileParser/LOADING]: Mod file C:\Users\fabuo\AppData\Roaming\.minecraft\libraries\net\minecraftforge\lowcodelanguage\1.19.3-44.1.23\lowcodelanguage-1.19.3-44.1.23.jar is missing mods.toml file [29may2023 23:10:07.794] [main/WARN] [net.minecraftforge.fml.loading.moddiscovery.ModFileParser/LOADING]: Mod file C:\Users\fabuo\AppData\Roaming\.minecraft\libraries\net\minecraftforge\mclanguage\1.19.3-44.1.23\mclanguage-1.19.3-44.1.23.jar is missing mods.toml file [29may2023 23:10:07.935] [main/INFO] [net.minecraftforge.fml.loading.moddiscovery.JarInJarDependencyLocator/]: Found 8 dependencies adding them to mods collection [29may2023 23:10:08.445] [main/INFO] [optifine.OptiFineTransformationService/]: OptiFineTransformationService.transformers [29may2023 23:10:08.451] [main/INFO] [optifine.OptiFineTransformer/]: Targets: 395 [29may2023 23:10:09.288] [main/INFO] [optifine.OptiFineTransformationService/]: additionalClassesLocator: [optifine., net.optifine.] [29may2023 23:10:10.427] [main/INFO] [mixin/]: Compatibility level set to JAVA_17 [29may2023 23:10:10.610] [main/INFO] [mixin/]: Successfully loaded Mixin Connector [ca.spottedleaf.starlight.mixin.MixinConnector] [29may2023 23:10:10.610] [main/INFO] [cpw.mods.modlauncher.LaunchServiceHandler/MODLAUNCHER]: Launching target 'forgeclient' with arguments [--version, 1.19.3-forge-44.1.23, --gameDir, C:\Users\fabuo\AppData\Roaming\.minecraft, --assetsDir, C:\Users\fabuo\AppData\Roaming\.minecraft\assets, --uuid, 1f7b7b2f9e814cf4b23dfa2f0ccb79a1, --username, Fabu10th, --assetIndex, 2, --accessToken, ????????, --clientId, N2EyZmZhMTUtYjA0OC00N2RkLTg2NTgtZDM2YTUwNTZlODFj, --xuid, 2535425619212215, --userType, msa, --versionType, release] [29may2023 23:10:10.650] [main/INFO] [Rubidium/]: Loaded configuration file for Rubidium: 30 options available, 0 override(s) found [29may2023 23:10:10.684] [main/WARN] [mixin/]: Reference map 'yungsextras.refmap.json' for yungsextras.mixins.json could not be read. If this is a development environment you can ignore this message [29may2023 23:10:10.686] [main/WARN] [mixin/]: Reference map 'yungsextras.refmap.json' for yungsextras_forge.mixins.json could not be read. If this is a development environment you can ignore this message [29may2023 23:10:10.703] [main/WARN] [mixin/]: Reference map 'xlpackets.refmap.json' for xlpackets.mixins.json could not be read. If this is a development environment you can ignore this message [29may2023 23:10:10.718] [main/WARN] [mixin/]: Reference map 'configured.refmap.json' for configured.mixins.json could not be read. If this is a development environment you can ignore this message [29may2023 23:10:10.728] [main/WARN] [mixin/]: Reference map 'simplyswords-common-refmap.json' for simplyswords-common.mixins.json could not be read. If this is a development environment you can ignore this message [29may2023 23:10:10.729] [main/WARN] [mixin/]: Reference map 'simplyswords-forge-refmap.json' for simplyswords.mixins.json could not be read. If this is a development environment you can ignore this message [29may2023 23:10:10.767] [main/WARN] [mixin/]: Reference map 'apexcore.refmap.json' for apexcore.mixins.json could not be read. If this is a development environment you can ignore this message
    • I'm looking for someone who for the most part would be taking over my mods main development. With work I just can't give it the time it deserves but I think it will be a good mod to fill the void of BuildCraft while still having its own unique twist. It is currently still only on 1.16.5 only because I just haven't had the time to try and get an update plus there were features I was working on that I had wanted to hammer out first. Not to mention I'm just not very good at Java or Programming in general. I can get things done and they mostly work but I am just not skilled enough to keep my brain child alive and honestly optimized. My only real requirement is that if I choose to come back I want to be able to jump back in and do so(Not take over per say just add to it again from time to time). I have a basic outline of how I want things to work in general for the things not added yet that were planned features and I also have some started but not yet finished ideas in. I'm currently working on getting a repo up on github that has my most current code so that way its easier for everyone involved to contribute. I'm sure the best first step would be to update to the newest version of forge first before doing this to give the next person a good head start but I'm sure alot of my stuff needs rewritten anyways so I figured I'd do this now as it sits.  Any other questions or details can be worked out through messages but if you are interested please drop a reply. Here is the link to the curseforge page which you can use to get to the github repo: https://www.curseforge.com/minecraft/mc-mods/mechanicraft For anyone who is interested please leave a reply. You will be added to the curseforge as a member and since I will be contributing less 80% of anything that is earned/donated because of this mod will be kicked your way(Can be controlled through curseforge, they have a way to split the earning).
  • Topics

×
×
  • Create New...

Important Information

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