Jump to content

[1.8.9] Rebuild of 1.8 mod causes mod blocks to do all kinds of crazy.


Recommended Posts

Posted

Any pointers deeply appreciated; I have no clue and am truly stumped.

 

Background: I just started migrating 1.8 mods to 1.8.9 (build 11.15.1.1722). Did a rebuild and fixed compiler issues. NO other changes. Opened an existing 1.8 world for a smoke test. Here are the issues I'm getting (I see no one else referring to these kinds of errors so I'm assuming it's something with my mods):

  • Some blocks (simple blocks, no entities, renderers, etc.) are just GONE (no errors, warnings, etc.) The blocks just aren't where they were in the 1.8 version.
  • Lots of errors from Forge looking for blockstates files for ITEMS (it's like the game as substituted items names(?) for existing blocks). Of course there are no blockstates for these things as they're not blocks. Again no big errors or warnings except for these.
  • Some blocks have been swapped for other blocks, sometimes a vanilla block (eg ice blocks shown in pics below) is where a custom mod block was before!

I see this behavior with development IDE saves (Eclipse) as well as standalone games. Old saves and brand new 1.8 saves (just created in 1.8 and re-opened in 1.8.9).

 

Example (snip) FileNotFoundException for items being looked up with blockstates:

java.lang.Exception: Could not load model definition for variant vanillafoodpantry:breads#inventory
at net.minecraftforge.client.model.ModelLoader.func_177586_a(ModelLoader.java:215) ~[ModelLoader.class:?]
at net.minecraftforge.client.model.ModelLoader.loadItems(ModelLoader.java:252) ~[ModelLoader.class:?]
at net.minecraftforge.client.model.ModelLoader.func_177570_a(ModelLoader.java:116) ~[ModelLoader.class:?]
at net.minecraft.client.resources.model.ModelManager.func_110549_a(ModelManager.java:28) [bou.class:?]
at net.minecraft.client.resources.SimpleReloadableResourceManager.func_110542_a(SimpleReloadableResourceManager.java:120) [bnn.class:?]
at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:478) [ave.class:?]
at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:329) [ave.class:?]
at net.minecraft.client.main.Main.main(SourceFile:124) [Main.class:?]
[sNIP...]
Caused by: java.lang.RuntimeException: Encountered an exception when loading model definition of model vanillafoodpantry:blockstates/breads.json
at net.minecraft.client.resources.model.ModelBakery.func_177586_a(ModelBakery.java:165) ~[bot.class:?]
at net.minecraftforge.client.model.ModelLoader.func_177586_a(ModelLoader.java:211) ~[ModelLoader.class:?]
... 21 more
Caused by: java.io.FileNotFoundException: vanillafoodpantry:blockstates/breads.json
at net.minecraft.client.resources.FallbackResourceManager.func_135056_b(FallbackResourceManager.java:93) ~[bnb.class:?]
at net.minecraft.client.resources.SimpleReloadableResourceManager.func_135056_b(SimpleReloadableResourceManager.java:78) ~[bnn.class:?]
at net.minecraft.client.resources.model.ModelBakery.func_177586_a(ModelBakery.java:143) ~[bot.class:?]
at net.minecraftforge.client.model.ModelLoader.func_177586_a(ModelLoader.java:211) ~[ModelLoader.class:?]
... 21 more

 

Example pics of weirdness

Yeah...those ice blocks shouldn't be there...

width=641 height=421http://jwaresoftware.org/files/mcmods/bugs/1.8.9/Vanilla_Blocks_Switched_For_Mod_Blocks.png[/img]

All kinds of confusion in this one...

width=392 height=450http://jwaresoftware.org/files/mcmods/bugs/1.8.9/MyFav_CustomHoppers_Switched_For_OtherMod_Blocks.png[/img]

Posted

It would help to have some code to look at. I can however answer the thing about blockstates, even though they're items, if a model file fails to be found, it searches for a blockstate model it could possibly use. Simply making an item model for "breads" will clear up the block state error.

Posted

To expand -- it's complaining about various items blockstates but all those item models are present (there isn't a single black-n-purple box shown and all items look correct once the game comes up). The usual model file missing errors aren't the ones generated. This seems to be the only symptom of some bigger issue...Are blockstate files required for items now? Or is there a format change or something I've missed?

 

What code would you like to see? There isn't a specific thing that seems to be a problem which is the problem. Forge seems quite silent but there is this weird issue. The library does not complain about missing blocks or bad tile entities or anything. Just loads of model files not found and all of those are present. Everything looks OK on creative tabs and new blocks when placed are also OK. It's just existing blocks in old saves (build 1.8 11.14.3.1450) that are being screwed up.

 

I will post after turning on all of Forge's debugging outside of IDE environment.

Posted

I posted an almost identical thread back in the fall. What I discovered was that nobody else ever even tried to migrate an existing world with modded blocks in it.

 

You may upgrade your mods and create a new world. You might even get away with upgrading mods, installing them only on clients, and then logging into an existing 1.8 world server. However, a modded world created in one MC version of Forge and subsequently opened in another will always be vulnerable to gross memory-structure errors (such as block shuffling). I gave up.

 

The good news: I discovered that if I reverted to a Minecraft 1.8 version of Forge, I could reopen my world, and the riot of random blocks seemed to have gone back to normal (I didn't notice any permanent corruption).

 

Sorry I couldn't offer a migration solution, but maybe I saved you some wasted effort in a lost cause.

 

My recommendations are:

 

1) To continue playing your existing 1.8 world, upgrade Forge to the latest build for pure 1.8 and park it there permanently.

 

2) To upgrade mods, jump up to 1.9.4 and then create a new world. Don't bother creating a new world for an intermediate release.

 

BTW, If you know your Linux, you can setup multiple server worlds, each running a different build of Forge out of a different subdirectory. They can run simultaneously; just give each its own port number and remember to forward all those ports to the host machine.

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.

Posted

Just a follow-up (for anyone looking for this in future). I created a very simple 1.8 test-mod that defines a simple item and a simple multi-variant item. Saved a world with the items in frames. Rebuilt said mod for 1.8.9 and loaded 1.8 world. Also broken, but at least there is some code to go with the issue now.

 

All code, asset files, and some screenshots located here: http://jwaresoftware.org/files/mcmods/bugs/1.8.9/TestMod_MC1.8_to_MC1.8.9/.

 

Main code body (as above link may disappear someday):

/** -------- TestMod.java (ClientOnly) -------- **/
/** COMMENTED LINES ARE THE 1.8 LINES replaced **/
package testmod;

//import  net.minecraft.client.Minecraft;
//import  net.minecraft.client.renderer.ItemModelMesher;
//import  net.minecraft.client.resources.model.ModelBakery;
import  net.minecraft.client.resources.model.ModelResourceLocation;
import  net.minecraftforge.client.model.ModelLoader;
import  net.minecraftforge.fml.common.Mod;
import  net.minecraftforge.fml.common.Mod.EventHandler;
import  net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
import  net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
import  net.minecraftforge.fml.common.registry.GameRegistry;

@Mod(modid = "testmod", name = "Test Mod", version="1.8")
public class TestMod
{
    @Mod.Instance(value="testmod")
    public static TestMod instance;

    public static ItemSimple itemSimple;
    public static ItemVariant itemVariant;

    @EventHandler
    public void preInit(FMLPreInitializationEvent event) // seed: -8913466909937400889
    {
        itemSimple = (ItemSimple)(new ItemSimple().setUnlocalizedName("tm_simple_item"));
        GameRegistry.registerItem(itemSimple,"tm_simple_item");

        itemVariant = (ItemVariant)(new ItemVariant().setUnlocalizedName("tm_variant_item"));
        GameRegistry.registerItem(itemVariant,"tm_variant_item");
    }

    @EventHandler
    public void postInit(FMLPostInitializationEvent event)
    {
        ModelResourceLocation model;
        //ItemModelMesher mesher = Minecraft.getMinecraft().getRenderItem().getItemModelMesher();

        model = new ModelResourceLocation("testmod:tm_simple_item","inventory");
        //mesher.register(itemSimple,0,model);
        ModelLoader.setCustomModelResourceLocation(itemSimple,0,model);

        //String[] itemids = new String[]{"testmod:tm_variant_item_0","testmod:tm_variant_item_1"};
        //ModelBakery.addVariantName(itemVariant, itemids);

        model = new ModelResourceLocation("testmod:tm_variant_item_0","inventory");
        //mesher.register(itemVariant,0,model);
        ModelLoader.setCustomModelResourceLocation(itemVariant,0,model);

        model = new ModelResourceLocation("testmod:tm_variant_item_1","inventory");
        //mesher.register(itemVariant,1,model);
        ModelLoader.setCustomModelResourceLocation(itemVariant,1,model);
    }
}

/** --------- ItemSimple.java ---------- **/
package testmod;

import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;

public class ItemSimple extends Item
{
    public ItemSimple()
    {
        setCreativeTab(CreativeTabs.tabDecorations);
    }
}


/** ----------- ItemVariant.java --------- **/
package testmod;

import  java.util.List;

import  net.minecraft.creativetab.CreativeTabs;
import  net.minecraft.item.Item;
import  net.minecraft.item.ItemStack;
import  net.minecraftforge.fml.relauncher.Side;
import  net.minecraftforge.fml.relauncher.SideOnly;

public class ItemVariant extends Item
{
    public ItemVariant()
    {
        setMaxDamage(0);
        setHasSubtypes(true);
        setCreativeTab(CreativeTabs.tabDecorations);
    }

    public int getMetadata(int damage)
    {
        return damage;
    }

    @SideOnly(Side.CLIENT)
    public void getSubItems(Item item, CreativeTabs tab, List subItems)
    {
        ItemStack stack;
        stack = new ItemStack(item,1,0);
        subItems.add(stack);
        stack = new ItemStack(item,1,1);
        subItems.add(stack);
    }

    public String getUnlocalizedName(ItemStack stack)
    {
      int metadata = stack.getMetadata();
      return super.getUnlocalizedName() + "_"+ metadata;
    }
}

 

Pictures of issues even for this simple mod

(1.8 -- Baseline [yellow=simple, green/blue=variant])

width=623 height=413http://jwaresoftware.org/files/mcmods/bugs/1.8.9/TestMod_MC1.8_to_MC1.8.9/screenshots/MC1.8%20-%20The%20Items.png[/img]

 

(1.8.9 -- Same thing; not so good)  :-[

width=640 height=433http://jwaresoftware.org/files/mcmods/bugs/1.8.9/TestMod_MC1.8_to_MC1.8.9/screenshots/MC1.8.9%20-%20The%20Items.png[/img]

 

I didn't bother adding a Simple Block as there seemed no point based on previous commenter's advice.

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

    • When I first heard about Bitcoin back in 2018, I was skeptical. The idea of a decentralized, digital currency seemed too good to be true. But I was intrigued as I learned more about the technology behind it and its potential. I started small, investing just a few hundred dollars, dipping my toes into the cryptocurrency waters. At first, it was exhilarating to watch the value of my investment grow exponentially. I felt like I was part of the future, an early adopter of this revolutionary new asset. But that euphoria was short-lived. One day, I logged into my digital wallet only to find it empty - my Bitcoin had vanished without a trace. It turned out that the online exchange I had trusted had been hacked, and my funds were stolen. I was devastated, both financially and emotionally. All the potential I had seen in Bitcoin was tainted by the harsh reality that with decentralization came a lack of regulation and oversight. My hard-earned money was gone, lost to the ether of the digital world. This experience taught me a painful lesson about the price of trust in the uncharted territory of cryptocurrency. While the technology holds incredible promise, the risks can be catastrophic if you don't approach it with extreme caution. My Bitcoin investment gamble had failed, and I was left to pick up the pieces, wiser but poorer for having placed my faith in the wrong hands. My sincere appreciation goes to MUYERN TRUST HACKER. You are my hero in recovering my lost funds. Send a direct m a i l ( muyerntrusted ( @ ) mail-me ( . )c o m ) or message on whats app : + 1 ( 4-4-0 ) ( 3 -3 -5 ) ( 0-2-0-5 )
    • You could try posting a log (if there is no log at all, it may be the launcher you are using, the FAQ may have info on how to enable the log) as described in the FAQ, however this will probably need to be reported to/remedied by the mod author.
    • So me and a couple of friends are playing with a shitpost mod pack and one of the mods in the pack is corail tombstone and for some reason there is a problem with it, where on death to fire the player will get kicked out of the server and the tombstone will not spawn basically deleting an entire inventory, it doesn't matter what type of fire it is, whether it's from vanilla fire/lava, or from modded fire like ice&fire/lycanites and it's common enough to where everyone on the server has experienced at least once or twice and it doesn't give any crash log. a solution to this would be much appreciated thank you!
    • It is 1.12.2 - I have no idea if there is a 1.12 pack
  • Topics

×
×
  • Create New...

Important Information

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