Workspace not compiling Properly (Custom .Java armor files)

Started by hruk on Mon, 09/02/2019 - 07:52

Topic category: Help with MCreator's application

Last seen on 14:21, 19. Sep 2019
Joined Sep 2019
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
Workspace not compiling Properly (Custom .Java armor files)
Mon, 09/02/2019 - 07:52

Recently started to learn java with zero coding experience using eclipse, Trying to make a mod with custom armor models from tabula now exported as .Java files. I moved to Mcreator because it seemed like a very easy way to start learning Java whilst producing mods for minecraft. Now I'm getting an error while trying to test my custom armor.

 

"Your Workspace contains mod elements that don't compile properly."

Here is the gradle error log.

C:\Users\RUNE\MCreatorWorkspaces\thaumic_armors\build\sources\main\java\net\mcreator\thaumic_armors\MCreatorCrimsonRangerArmor.java:48: error: constructor ModelRanger2 in class ModelRanger2 cannot be applied to given types;
				armorModel.bipedHead = new ModelRanger2().Helmet;
				                       ^
  required: float
  found: no arguments
  reason: actual and formal argument lists differ in length
C:\Users\RUNE\MCreatorWorkspaces\thaumic_armors\build\sources\main\java\net\mcreator\thaumic_armors\MCreatorCrimsonRangerArmor.java:61: error: constructor ModelRanger2 in class ModelRanger2 cannot be applied to given types;
				armorModel.bipedBody = new ModelRanger2().Chestthing;
				                       ^
  required: float
  found: no arguments
  reason: actual and formal argument lists differ in length
C:\Users\RUNE\MCreatorWorkspaces\thaumic_armors\build\sources\main\java\net\mcreator\thaumic_armors\MCreatorCrimsonRangerArmor.java:74: error: constructor ModelRanger2 in class ModelRanger2 cannot be applied to given types;
				armorModel.bipedLeftLeg = new ModelRanger2().MbeltL;
				                          ^
  required: float
  found: no arguments
  reason: actual and formal argument lists differ in length
C:\Users\RUNE\MCreatorWorkspaces\thaumic_armors\build\sources\main\java\net\mcreator\thaumic_armors\MCreatorCrimsonRangerArmor.java:75: error: constructor ModelRanger2 in class ModelRanger2 cannot be applied to given types;
				armorModel.bipedRightLeg = new ModelRanger2().MbeltR;
				                           ^
  required: float
  found: no arguments
  reason: actual and formal argument lists differ in length
C:\Users\RUNE\MCreatorWorkspaces\thaumic_armors\build\sources\main\java\net\mcreator\thaumic_armors\MCreatorCrimsonRangerArmor.java:482: error: cannot find symbol
					ItemStack piece = ((EntityLivingBase) entity).getEquipmentInSlot(a + 1);
					                                             ^
  symbol:   method getEquipmentInSlot(int)
  location: class EntityLivingBase
C:\Users\RUNE\MCreatorWorkspaces\thaumic_armors\build\sources\main\java\net\mcreator\thaumic_armors\MCreatorCrimsonRangerArmor.java:483: error: cannot find symbol
					if (piece != null && piece.getItem() instanceof CultistRangerDyed) {
					                                                ^
  symbol:   class CultistRangerDyed
  location: class ModelRanger2
C:\Users\RUNE\MCreatorWorkspaces\thaumic_armors\build\sources\main\java\net\mcreator\thaumic_armors\MCreatorCrimsonRangerArmor.java:486: error: stackTagCompound has private access in ItemStack
							if (piece.hasTagCompound() && piece.stackTagCompound.hasKey("mask")) {
							                                   ^
C:\Users\RUNE\MCreatorWorkspaces\thaumic_armors\build\sources\main\java\net\mcreator\thaumic_armors\MCreatorCrimsonRangerArmor.java:487: error: stackTagCompound has private access in ItemStack
								hasMask.put(Integer.valueOf(entity.getEntityId()), Integer.valueOf(piece.stackTagCompound.getInteger("mask")));
								                                                                        ^
C:\Users\RUNE\MCreatorWorkspaces\thaumic_armors\build\sources\main\java\net\mcreator\thaumic_armors\MCreatorCrimsonRangerArmor.java:565: error: cannot find symbol
			float f6 = MathHelper.sin(this.onGround * 3.1415927F);
			                              ^
  symbol: variable onGround
C:\Users\RUNE\MCreatorWorkspaces\thaumic_armors\build\sources\main\java\net\mcreator\thaumic_armors\MCreatorCrimsonRangerArmor.java:566: error: cannot find symbol
			float f7 = MathHelper.sin((1.0F - (1.0F - this.onGround) * (1.0F - this.onGround)) * 3.1415927F);
			                                              ^
  symbol: variable onGround
C:\Users\RUNE\MCreatorWorkspaces\thaumic_armors\build\sources\main\java\net\mcreator\thaumic_armors\MCreatorCrimsonRangerArmor.java:566: error: cannot find symbol
			float f7 = MathHelper.sin((1.0F - (1.0F - this.onGround) * (1.0F - this.onGround)) * 3.1415927F);
			                                                                       ^
  symbol: variable onGround
Note: C:\Users\RUNE\MCreatorWorkspaces\thaumic_armors\build\sources\main\java\net\mcreator\thaumic_armors\thaumic_armors.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: C:\Users\RUNE\MCreatorWorkspaces\thaumic_armors\build\sources\main\java\net\mcreator\thaumic_armors\MCreatorCrimsonRangerArmor.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
11 errors

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileJava'.
> Compilation failed; see the compiler error output for details.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 1s

Could anyone help me figure this out? Thanks in advance.

Last seen on 14:21, 19. Sep 2019
Joined Sep 2019
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
Tabula, Imported the .Java…
Tue, 09/03/2019 - 16:37

Tabula, Imported the .Java file.

Last seen on 14:21, 19. Sep 2019
Joined Sep 2019
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
Porting to Eclipse actually…
Tue, 09/03/2019 - 16:40

Porting to Eclipse actually allows the Minecraft program to launch, With the proper mod working. The armor works however the render is completely Incorrect. and looks not at all like what it's supposed to be.

I'd like to add that the model isn't created by me, I'm trying to port an Open source mod from 1.7.10 to 1.12.2 with permission from the mod creator for personal use. 

So I don't have access to the TBL file, Only the .Java Model.

Last seen on 14:21, 19. Sep 2019
Joined Sep 2019
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
Apologies for the spam! But…
Tue, 09/03/2019 - 16:54

Apologies for the spam! But I forgot to mention one last thing. I DON'T know if the issue is from the MODEL rendering incorrectly or because of this "texture-lineup" Mcreator Shows how it doesn't line up.

Screenshot of the Texture UV unwrap in MCreator: https://gyazo.com/e6a2c0e987a218e6e67d55297ce39f6b

Screenshot of the armor in-game (Launched Via Eclipse): https://gyazo.com/66cd173312f5e62afa32fa0eec0297a0

 

 

The issue is that the model…
Tue, 09/03/2019 - 17:42

The issue is that the model ModelRanger2 does not seem to be a standard model, it requires custom constructor. Based on the armor in-game screenshot, this armor does not need custom model at all, just map the texutres.

Last seen on 14:21, 19. Sep 2019
Joined Sep 2019
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
How would I be able to fix…
Tue, 09/03/2019 - 17:50

How would I be able to fix this? I have the code from the original mod if thats required.

If you plan to deal with…
Tue, 09/03/2019 - 17:56

If you plan to deal with code, I suggest you to learn some Java as you will not be able to port this without some knowledge of it. The model you are using does not seem to be a standard model exported from one of the modelers.

Last seen on 14:21, 19. Sep 2019
Joined Sep 2019
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
I intend to learn java…
Tue, 09/03/2019 - 20:21

I intend to learn java however since I have no coding experience I don't exactly know if observing the code in Eclipse is the best way of achieving this? I can understand what some surrounding bodies mean but not all of it. 

To fix the issue like I said I ported the Mcreator mod to eclipse and was comparing the original code to the new one and figured that the problem most likely lay in the .JSON conversion of the PNG image which is the armor texture, Do you know any lines of code or what I can do to use the Original .PNG image for the texture (I believe the .JSON conversion from PNG alters the texture UV map Boxes)

Also, I apologise if I'm asking for too much. I just dont find many tutorials that deal with custom modelled armor in 1.12.2

How did you convert to json…
Wed, 09/04/2019 - 05:58

How did you convert to json from png? I don't think this is possible. You can past the code for models and other info in a pastebin and link it here.

Last seen on 14:21, 19. Sep 2019
Joined Sep 2019
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
I think I explained it…
Wed, 09/04/2019 - 10:09

I think I explained it poorly, As I mentioned I don't know java or how json files work, However there are 2 Json files that Mcreator generates has "(Texturename)_Layer01.Png" in its code, As well as "(Texturename)_Layer02.png. I figured this kind of messed with the UV Unwrap that makes the textures in the screenshots I provided messed up. Because the model I have actually does not follow the texture mapping that is shown in Mcreator as shown in the screenshots posted above there is extra textures outside of the box.