Jump to content

[SOLVED][1.7.2] Custom block not working in old world, but working in a new one.


Recommended Posts

Posted

Hi community,

 

I'm currently developing a mod that adds two custom blocks and recipes to build them, as well as their textures and localized names.

 

When testing it on my dev. environment without any other mod, it works just fine.

When trying it on my actual server with other mods and a new world, it works just fine.

When trying it on my actual server with the same setup, but my old world, it presents the following behavior:

  • None of my blocks show up on the creative mode tab.
  • When using any of the recipes in the Crafting Table, I see the correct custom block's texture (not the block, just the texture) flash and then dissapear, I can't grab any item from the output slot
  • I see no errors on the server

I can't afford to just throw away my world.

 

The code I'm using to register my blocks is:

      //Create base items, blocks
      goldenMilestone = blockFactory.getGoldenMilestoneBlock();
      minorGoldenMilestone = blockFactory.getMinorGoldenMilestoneBlock();

        //Register items and blocks
      GameRegistry.registerBlock(goldenMilestone, "goldenMilestone");
      GameRegistry.registerBlock(minorGoldenMilestone, "minorGoldenMilestone");

        //Create stacks
      goldenMilestoneStack  = new ItemStack(goldenMilestone, 1);
      minorGoldenMilestoneStack  = new ItemStack(minorGoldenMilestone, 1);
        goldenStack = new ItemStack(Blocks.gold_block, 1, -1);
      cobbleStack = new ItemStack(Blocks.cobblestone, 1, -1);

        //Add recipes
        GameRegistry.addShapelessRecipe(new ItemStack(Blocks.gold_block, 9), goldenMilestone);
      GameRegistry.addRecipe(goldenMilestoneStack, "xxx", "xxx", "xxx", 'x', goldenStack);
      GameRegistry.addRecipe(minorGoldenMilestoneStack, " x ", " y ", 'x', goldenStack, 'y', cobbleStack);

 

The version of Forge that I'm using on my client is 1.7.2-10.12.1.1060

My dev environment server is also 1.7.2-10.12.1.1060

My actual server is MCPC-Plus-1.7.2-R0.4-forge1033-51

 

The mods in my setup are:

  • Mine & Blade Battlegear 2 - Bullseye - 1.0.5.4
  • Archimedes Ships
  • secretroomsmod-1.7.2-4.6.3.346

 

Has anyone experienced similar behavior or know more or less what is happening?

Could this be caused by MCPC+? If so, why would it all be working in a new world?

Could this be caused by some kind of dynamic block id generation in Secret Rooms Mod? (I can't test my old world by removing it, sadly it crashes whit block id errors when I remove the mod :()

 

I don't usually ask for help in forums (I've been lurking here for a month now), but now I'm really clueless, any help will be very much appreciated, thanks a lot in advance!

Posted

Thank you! Makes some sense, however, it is actually working on the same MCPC+ (with the presumably older Forge version) but with a fresh world instead of my old one.

Could that still have something to do with diff. versions?

Posted

Oh dear, never heard about that.

The only thing I know is that there is always a huge chance that it don't work in older versions.

Also I didn't know there was MCCP+.

But the most times, things with a "+" might be more  advanced than the standard ones.

Posted

I'm not entirely sure, but adding a mod to a world that previously didn't have the mod can cause all sorts of problems.  For example, the registries will be different, therefore ids might be different and so you can get mismatches with the save data.  I think it really depends on the mod, but potential for weirdness is there.

 

Are you getting any errors in the server console?  Like is it complaining about missing or mismatched stuff?

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

Posted

Thank you for your answer. That's exactly what bugs me... I'm not getting any id mismatch error, just silent failure, no exceptions, no stack traces, no error logs of any kind.

Posted

Thank you for your answer. That's exactly what bugs me... I'm not getting any id mismatch error, just silent failure, no exceptions, no stack traces, no error logs of any kind.

 

I suggest you'll have to debug this the old-fashioned way -- add your own console messages (i.e. with System.out.println() type statements) for each step in the process of creating and registering the blocks and see where it goes wrong.  It will probably be pretty quickly apparent if you trace through the expected steps.

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

Posted

I've tested my world with my current mods in Single Player mode, it works perfectly.

So I assumed that this was a version issue.

I updated both my server and clients to:

MCPC+ 1.7.2-R0.4-forge1094

Forge 10.12.1.1094

And everything went smoothly.

 

Thanks again!

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.