Jump to content

Remapping missing blocks


JasonMcRay

Recommended Posts

Hi.

 

I have a custom modpack with my custom mod for adding some blocks/items and making some compatibility between some mods (GregTech, Thaumcraft mainly). I had in the modpack Bluepower mod, but since it has been stopped from development my team decided to switch to Project Red and remove Bluepower.

 

Removing Bluepower will remove all the blocks that are from Bluepower (obviously), what my concern is, are volcanos. They are huge and might (and probably will) lead to ugly terrain (also if the volcano has spawn in water, it can cause further issues with flowing water) in already generated chunks with the volcanos. What I am trying to do is use FMLMissingMappingsEvent to catch certain blocks (namely bluepower:basalt) and turn it into either Project Red basalt or other block.

 

Here is a code I am using (with help of Blood Asp) to remap the bluepower:basalt to GregTech Granite:

@Mod.EventHandler
  public void onMissingMappings(FMLMissingMappingsEvent event)
  {
//  System.out.println("Remapping");
  for (FMLMissingMappingsEvent.MissingMapping mapping : event.getAll()) {
     if(mapping!=null){
//     System.out.println("mappingname: "+mapping.name);
  if (mapping.name.equals("bluepower:basalt")) {
  if (mapping.type == GameRegistry.Type.BLOCK) {
//     System.out.println("Remap Block");
     Block tBlock = GregTech_API.sBlockGranites;
//  System.out.println("Block: "+tBlock==null?"null":tBlock.getLocalizedName()+" "+tBlock.getUnlocalizedName());
  mapping.remap(tBlock);
  }else{
     mapping.remap(Item.getItemFromBlock(GregTech_API.sBlockGranites));
  }
  }
     }
  }
  }

 

Problem we are having is that after bluepower is removed and the world is loaded we get the MAP is unrecoverably broken Image.

To quote Blood Asp:

Somehow i think maybe the event does not work correctly anymore in current forge versions. Or it is not meant to be used like that.

 

Forge version used is 10.13.4.1566

 

Putting in Bluepower back will make the world load just fine, still with the basalt present in world

 

Any help is greatly appreciated. Thank you

Link to comment
Share on other sites

There's probably more being ripped out than just some block IDs. Fixing this, if it's even possible, will probably require deep understanding of Bluepower.

 

If it were me, I would just keep using the original mods in that world. To effect a sea change in mods, you should probably start a new world.

The debugger is a powerful and necessary tool in any IDE, so learn how to use it. You'll be able to tell us more and get better help here if you investigate your runtime problems in the debugger before posting.

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



×
×
  • Create New...

Important Information

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