Jump to content

[Unsolved] Updating mod with updateJSON


DarkEyeDragon

Recommended Posts

So i'm trying to make an update notification for my mod using the built in forge system.


Original JSON

{
  "homepage": "http://darkeyedragon.me/mods",
  "1.12.2": {
    "1.0": "Initial release.", 
  },
  "promos": {
    "1.12.2-latest": "1.0",
    // Declare the latest "bleeding-edge" version of your mod for the given Minecraft version
    "1.12.2-recommended": "1.0",
    // Declare the latest "stable" version of your mod for the given Minecraft version
  }
}

Updated JSON

{
  "homepage": "http://darkeyedragon.me/mods",
  "1.12.2": {
    "1.2.3": "Initial release.", 
  },
  "promos": {
    "1.12.2-latest": "1.4.3",
    // Declare the latest "bleeding-edge" version of your mod for the given Minecraft version
    "1.12.2-recommended": "1.2.3",
    // Declare the latest "stable" version of your mod for the given Minecraft version
  }
}

However forge doesn't seem to give any notices about there being an update. I checked the settings and it was there. I also added the URL to point directly to the JSON file in the @mod

@Mod(modid = ScreenshotMain.MODID, version = ScreenshotMain.VERSION, updateJSON = "http://darkeyedragon.me/mods/updates/screenshotuploader.json")

http://prntscr.com/i2y1jo

Part of the startup log:
 

[03:21:35] [Forge Version Check/INFO] [ForgeVersionCheck]: [screenshotuploader] Starting version check at http://darkeyedragon.me/mods/updates/screenshotuploader.json
[03:21:35] [main/INFO] [FML]: Applying holder lookups
[03:21:35] [main/INFO] [FML]: Holder lookups applied

It just seems to skip it. Or not find any changes?
Am i missing something/ doing something wrong?

Edited by DarkEyeDragon
Link to comment
Share on other sites

Your latest version is pointing to a version you don't have in your list. The idea is that you're supposed to list all your versions in the one section and then the promos will point so some of those that you want to recommend. Note I switch the sections around as well to put the promos first because eventually your list of version history will probably get large so makes more sense to have the promos at the top.

Check out my tutorials here: http://jabelarminecraft.blogspot.com/

Link to comment
Share on other sites

5 hours ago, jabelar said:

Your latest version is pointing to a version you don't have in your list. The idea is that you're supposed to list all your versions in the one section and then the promos will point so some of those that you want to recommend. Note I switch the sections around as well to put the promos first because eventually your list of version history will probably get large so makes more sense to have the promos at the top.

Ah yeah of course! Thanks for the heads up

Link to comment
Share on other sites

Okay so i tried this but it still doesnt seem to display any messages. Not ingame not in the modlist.

My current json

 

{
  "homepage": "http://darkeyedragon.me/mods",
  "promos": {
    "1.12.2-latest": "1.0.1",
    // Declare the latest "bleeding-edge" version of your mod for the given Minecraft version
    "1.12.2-recommended": "1.0.1",
    // Declare the latest "stable" version of your mod for the given Minecraft version
  }
  "1.12.2": {
    "1.0.0": "Initial release.",
    "1.0.1": "Testing the update system", 
  },
 
}

However now i got Target: null in my console
 

[14:49:45] [Forge Version Check/INFO] [ForgeVersionCheck]: [forge] Found status: UP_TO_DATE Target: null
[14:49:45] [Forge Version Check/INFO] [ForgeVersionCheck]: [screenshotuploader] Starting version check at http://darkeyedragon.me/mods/updates/screenshotuploader.json

is my homepage wrong? From what i get thats the link that will be displayed when it detects an update?

Link to comment
Share on other sites

Judging by the log output you posted, it looks like an exception was thrown while processing your mod's version check. The version checker (the Thread created in ForgeVersion#startVersionCheck) logs the received version check data and any thrown exception at the DEBUG level, which is only visible in the FML log and not in the IDE's output window.

 

The FML log will probably tell you what's going wrong.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Link to comment
Share on other sites

[14:49:44] [main/DEBUG] [FML/]: Bar Step: Construction - Minecraft Forge took 0.090s
[14:49:44] [main/TRACE] [screenshotuploader/screenshotuploader]: Sending event FMLConstructionEvent to mod screenshotuploader
[14:49:44] [main/TRACE] [FML/screenshotuploader]: Mod screenshotuploader is using network checker : Accepting version 1.0.0
[14:49:44] [main/TRACE] [FML/screenshotuploader]: Testing mod screenshotuploader to verify it accepts its own version in a remote connection
[14:49:44] [main/TRACE] [FML/screenshotuploader]: The mod screenshotuploader accepts its own version (1.0.0)
[14:49:44] [main/DEBUG] [FML/screenshotuploader]: Attempting to inject @SidedProxy classes into screenshotuploader
[14:49:44] [main/DEBUG] [FML/screenshotuploader]: Attempting to inject @EventBusSubscriber classes into the eventbus for screenshotuploader
[14:49:44] [main/DEBUG] [FML/screenshotuploader]: Attempting to inject @Config classes into screenshotuploader for type INSTANCE
[14:49:44] [main/TRACE] [screenshotuploader/screenshotuploader]: Sent event FMLConstructionEvent to mod screenshotuploader
[14:49:44] [main/DEBUG] [FML/]: Bar Step: Construction - Screenshot Uploader took 0.035s[14:49:44] [main/TRACE] [screenshotuploader/screenshotuploader]: Sending event FMLConstructionEvent to mod screenshotuploader
[14:49:44] [main/TRACE] [FML/screenshotuploader]: Mod screenshotuploader is using network checker : Accepting version 1.0.0
[14:49:44] [main/TRACE] [FML/screenshotuploader]: Testing mod screenshotuploader to verify it accepts its own version in a remote connection
[14:49:44] [main/TRACE] [FML/screenshotuploader]: The mod screenshotuploader accepts its own version (1.0.0)
[14:49:44] [main/DEBUG] [FML/screenshotuploader]: Attempting to inject @SidedProxy classes into screenshotuploader
[14:49:44] [main/DEBUG] [FML/screenshotuploader]: Attempting to inject @EventBusSubscriber classes into the eventbus for screenshotuploader
[14:49:44] [main/DEBUG] [FML/screenshotuploader]: Attempting to inject @Config classes into screenshotuploader for type INSTANCE
[14:49:44] [main/TRACE] [screenshotuploader/screenshotuploader]: Sent event FMLConstructionEvent to mod screenshotuploader

Its checking. But its still "accepting" the current version. Why is this? Does it have something to do with versioning? Are 0.0.x considered to be compatible?
I've red the versioning conventions (https://semver.org/) However most of it is gibberish for me.

Edited by DarkEyeDragon
Link to comment
Share on other sites

I don't think that's the right part of the log. The section you're looking for will start with this line (the first thing logged by the version checker Thread when it starts the check for a mod):

[screenshotuploader] Starting version check at http://darkeyedragon.me/mods/updates/screenshotuploader.json

 

Could you please post the whole log using Gist?

Edited by Choonster

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Link to comment
Share on other sites

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

    • They were already updated, and just to double check I even did a cleanup and fresh update from that same page. I'm quite sure drivers are not the problem here. 
    • i tried downloading the drivers but it says no AMD graphics hardware has been detected    
    • Update your AMD/ATI drivers - get the drivers from their website - do not update via system  
    • As the title says i keep on crashing on forge 1.20.1 even without any mods downloaded, i have the latest drivers (nvidia) and vanilla minecraft works perfectly fine for me logs: https://pastebin.com/5UR01yG9
    • Hello everyone, I'm making this post to seek help for my modded block, It's a special block called FrozenBlock supposed to take the place of an old block, then after a set amount of ticks, it's supposed to revert its Block State, Entity, data... to the old block like this :  The problem I have is that the system breaks when handling multi blocks (I tried some fix but none of them worked) :  The bug I have identified is that the function "setOldBlockFields" in the item's "setFrozenBlock" function gets called once for the 1st block of multiblock getting frozen (as it should), but gets called a second time BEFORE creating the first FrozenBlock with the data of the 1st block, hence giving the same data to the two FrozenBlock :   Old Block Fields set BlockState : Block{minecraft:black_bed}[facing=east,occupied=false,part=head] BlockEntity : net.minecraft.world.level.block.entity.BedBlockEntity@73681674 BlockEntityData : id:"minecraft:bed",x:3,y:-60,z:-6} Old Block Fields set BlockState : Block{minecraft:black_bed}[facing=east,occupied=false,part=foot] BlockEntity : net.minecraft.world.level.block.entity.BedBlockEntity@6d1aa3da BlockEntityData : {id:"minecraft:bed",x:2,y:-60,z:-6} Frozen Block Entity set BlockState : Block{minecraft:black_bed}[facing=east,occupied=false,part=foot] BlockPos{x=3, y=-60, z=-6} BlockEntity : net.minecraft.world.level.block.entity.BedBlockEntity@6d1aa3da BlockEntityData : {id:"minecraft:bed",x:2,y:-60,z:-6} Frozen Block Entity set BlockState : Block{minecraft:black_bed}[facing=east,occupied=false,part=foot] BlockPos{x=2, y=-60, z=-6} BlockEntity : net.minecraft.world.level.block.entity.BedBlockEntity@6d1aa3da BlockEntityData : {id:"minecraft:bed",x:2,y:-60,z:-6} here is the code inside my custom "freeze" item :    @Override     public @NotNull InteractionResult useOn(@NotNull UseOnContext pContext) {         if (!pContext.getLevel().isClientSide() && pContext.getHand() == InteractionHand.MAIN_HAND) {             BlockPos blockPos = pContext.getClickedPos();             BlockPos secondBlockPos = getMultiblockPos(blockPos, pContext.getLevel().getBlockState(blockPos));             if (secondBlockPos != null) {                 createFrozenBlock(pContext, secondBlockPos);             }             createFrozenBlock(pContext, blockPos);             return InteractionResult.SUCCESS;         }         return super.useOn(pContext);     }     public static void createFrozenBlock(UseOnContext pContext, BlockPos blockPos) {         BlockState oldState = pContext.getLevel().getBlockState(blockPos);         BlockEntity oldBlockEntity = oldState.hasBlockEntity() ? pContext.getLevel().getBlockEntity(blockPos) : null;         CompoundTag oldBlockEntityData = oldState.hasBlockEntity() ? oldBlockEntity.serializeNBT() : null;         if (oldBlockEntity != null) {             pContext.getLevel().removeBlockEntity(blockPos);         }         BlockState FrozenBlock = setFrozenBlock(oldState, oldBlockEntity, oldBlockEntityData);         pContext.getLevel().setBlockAndUpdate(blockPos, FrozenBlock);     }     public static BlockState setFrozenBlock(BlockState blockState, @Nullable BlockEntity blockEntity, @Nullable CompoundTag blockEntityData) {         BlockState FrozenBlock = BlockRegister.FROZEN_BLOCK.get().defaultBlockState();         ((FrozenBlock) FrozenBlock.getBlock()).setOldBlockFields(blockState, blockEntity, blockEntityData);         return FrozenBlock;     }  
  • Topics

×
×
  • Create New...

Important Information

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