Stripped data from if-then on import from 2020.4 to 2021.2

Started by kreatorKen on

Topic category: General discussion

Last seen on 07:39, 14. Oct 2021
Joined Aug 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Stripped data from if-then on import from 2020.4 to 2021.2

I am trying to port my code from 2020.4 to 2021.2 and apparently some of the field data was completely stripped. I don't have permission to start a GitHub ticket.

Secondarily, I don't understand why the code in 2020.4 is well readable and not in 2021.2. After reformatting, here is what I got:

2020.4

if (((PosY) >= 0)) {
                    for (int index0 = 0; index0 < (int) (128); index0++) {
                        if ((((ForgeRegistries.ITEMS.getKey((ItemInSlot0).getItem()).toString()))
                                .equals((ForgeRegistries.ITEMS.getKey(new ItemStack(Blocks.WHITE_TULIP, (int) (1)).getItem()).toString()))))
{
                            if (((world.getBlockState(new BlockPos((int) Math.floor(x), (int) (PosY), (int) Math.floor(z))))
                                    .getBlock() == Blocks.COAL_ORE.getDefaultState().getBlock())) {
                                keepLooking = (boolean) (false);
                                break;
                            }
                        } else if ((((ForgeRegistries.ITEMS.getKey((ItemInSlot0).getItem()).toString()))
                                .equals((ForgeRegistries.ITEMS.getKey(new ItemStack(Blocks.DANDELION, (int) (1)).getItem()).toString())))) {
                            if (((world.getBlockState(new BlockPos((int) Math.floor(x), (int) (PosY), (int) Math.floor(z))))
                                    .getBlock() == Blocks.IRON_ORE.getDefaultState().getBlock())) {
                                keepLooking = (boolean) (false);
                                break;
                            }

...etc.

2021.2

if ((PosY>=0)) {
        for (int index0 = 0; index0<(int)(128); index0++) {
            if ((().equals())) {
                if (((world.getBlockState(new BlockPos((int)Math.floor(x),(int)PosY,(int)Math.floor(z)))).getBlock() == Blocks.COAL_ORE)) {
                    keepLooking = (boolean) (false);break;}
                    }
                 else if ((().equals())) {
                     if (((world.getBlockState(new BlockPos((int)Math.floor(x),(int)PosY,(int)Math.floor(z)))).getBlock() == Blocks.IRON_ORE)) {
                         keepLooking = (boolean) (false);break;
                     }

...etc.

thanks for any help.

Last seen on 07:39, 14. Oct 2021
Joined Aug 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Ah yes, the miscellaneous…
Sun, 08/29/2021 - 11:09

Ah yes, the miscellaneous plugin, and maybe another one. I'll have a look.

Last seen on 07:39, 14. Oct 2021
Joined Aug 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I used the ItemStacks and…
Mon, 08/30/2021 - 08:31

I used the ItemStacks and Miscellaneous plugins. I installed both now.

I also saved my Workspace from my 2020.4 version that works, and re-imported it in 2020.4 and 2021.2 on a different computer.

Everything works now in 2020.4, but I still get errors in 2021.2, different ones, but not the missing plugins. (I need to make a note in my Mod page).

The only errors I get are on my entities. When I click on the entities, I also get this message: "This mod does not have a saved instance. If you want to make it editable, you need to remake it. You probably see this because you updated MCreator and your mod was made before saving was possible."

 

Here is some of the console output...only for my entities, but all of them.

New Dep: net.minecraftforge:forge:1.15.2-31.2.0_mapped_snapshot_20200514-1.15.1
> Task :compileJava
C:\Users\....\MCreatorWorkspaces\MM310v2021\src\main\java\net\mcreator\miningmannies\entity\MiningManniSlot10Entity.java:281: error: cannot find symbol
            UpdateTickLevel10Procedure.executeProcedure($_dependencies);
            ^
  symbol:   variable UpdateTickLevel10Procedure
  location: class CustomEntity

C:\Users\....\MCreatorWorkspaces\MM310v2021\src\main\java\net\mcreator\miningmannies\entity\MiningManniSlot11Entity.java:281: error: cannot find symbol
            UpdateTickLevel11Procedure.executeProcedure($_dependencies);
            ^
  symbol:   variable UpdateTickLevel11Procedure
  location: class CustomEntity

etc.

 

 

Last seen on 07:39, 14. Oct 2021
Joined Aug 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Okay...this is a bit weird…
Mon, 08/30/2021 - 18:39

Okay...this is a bit weird. It says the procedure is not there, but if open the entity in 2021.2, I can go to the triggers and open it (e.g. UpdateTickLevel10 procedure), but it is not in the list of Procedures in the Workspace file browser. How can that be?

side note: if I keep rebuilding/reopening then get other errors, but I think the main problem might be the "lost" procedures in the first place. I made some screen shots, but I dont know where to upload them to (would that be helpful?). Thanks for your help Klemen, I know you are super busy. Is there something simple I am overlooking?