Can't Change Java Model's Code 1.17.1

Started by phillipw1954 on

Topic category: Help with modding (Java Edition)

Last seen on 03:07, 26. Jan 2023
Joined Dec 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Can't Change Java Model's Code 1.17.1

So I'm attempting to edit a java model's code so I can re-scale it without making a new model. I'm using this code...

@Override
    public void renderToBuffer(PoseStack poseStack, VertexConsumer buffer, int packedLight, int packedOverlay, float red, float green, float blue, float alpha) {
            poseStack.pushPose();
            poseStack.translate(0f, 1.5f - 0.5 * 1.5f, 0f);
            poseStack.scale(4.0f, 4.0f, 4.0);
        Head.render(poseStack, buffer, packedLight, packedOverlay);
        Tail.render(poseStack, buffer, packedLight, packedOverlay);
        Arm1.render(poseStack, buffer, packedLight, packedOverlay);
        Leg1.render(poseStack, buffer, packedLight, packedOverlay);
        Leg2.render(poseStack, buffer, packedLight, packedOverlay);
        Arm2.render(poseStack, buffer, packedLight, packedOverlay);
        bb_main.render(poseStack, buffer, packedLight, packedOverlay);
        poseStack.popPose();

This code should work, but it keeps reverting to the model's unedited code once I exit it...

@Override
    public void renderToBuffer(PoseStack poseStack, VertexConsumer buffer, int packedLight, int packedOverlay, float red, float green, float blue,
            float alpha) {
        Head.render(poseStack, buffer, packedLight, packedOverlay);
        Tail.render(poseStack, buffer, packedLight, packedOverlay);
        Arm1.render(poseStack, buffer, packedLight, packedOverlay);
        Leg1.render(poseStack, buffer, packedLight, packedOverlay);
        Leg2.render(poseStack, buffer, packedLight, packedOverlay);
        Arm2.render(poseStack, buffer, packedLight, packedOverlay);
        bb_main.render(poseStack, buffer, packedLight, packedOverlay);

even after I use Ctrl+S to save the code (I get a "code saved" notification as well).

Any tips?

 

 

Last seen on 02:51, 19. Feb 2022
Joined Dec 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Mmm, I remember running into…
Mon, 01/17/2022 - 22:24

Mmm, I remember running into this issue before when I was helping somebody else modify the code. It would "save", but not properly lock the file.

Save the file again and then try going to the dashboard thingy where your entities and procedures are it (I think it's in the resources tab(?) and right click on the file you're trying to lock. If it says locked, press unlock, then edit and save the file, and lock it if it doesn't lock. If it says it isn't locked, press the option to lock the file.

Last seen on 03:07, 26. Jan 2023
Joined Dec 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Do you mean my mod elements?…
Mon, 01/17/2022 - 22:49

Do you mean my mod elements? Like the actual entity? Because I cannot seem to right click on the entity's model and "lock" it.

 

Last seen on 02:51, 19. Feb 2022
Joined Dec 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Yes, mod elements, sorry lol
Mon, 01/17/2022 - 22:52

Yes, mod elements, sorry lol

Last seen on 03:07, 26. Jan 2023
Joined Dec 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Okay so I tried that, and…
Mon, 01/17/2022 - 23:06

Okay so I tried that, and locked the entity after editing (that's the pink icon right?), but it still didn't work

Any other directions to try?

 

Last seen on 02:51, 19. Feb 2022
Joined Dec 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Do you have Discord? It'd be…
Tue, 01/18/2022 - 23:39

Do you have Discord? It'd be easier give advice on there, especially since I actually get notifications on Discord and uploading images isn't as annoying.

Last seen on 03:07, 26. Jan 2023
Joined Dec 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Yup, @philward1954
Wed, 01/19/2022 - 03:32

Yup, @philward1954

Last seen on 02:51, 19. Feb 2022
Joined Dec 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
What's the 4 digit code…
Wed, 01/19/2022 - 03:37

What's the 4 digit code after your username?

Try adding me, Gravity#9828