I was following this tutorial, but I had eclipse set up before I did:
I was going to play the example mod to see if I set everything up right, but it doesn't work.
Now I get an error saying:
Invalid module name: '' is not a Java identifier
at java.base/jdk.internal.module.Checks.requireModuleName
I'm not sure how to fix this. It's the only error I'm getting, and I think I missed something in the tutorial around 1:11. (This might not have anything to do with the problem, I only think it may).
I was following this tutorial, but I had eclipse set up before I did:
I was going to play the example mod to see if I set everything up right, but it doesn't work.
Now I get an error saying:
Invalid module name: '' is not a Java identifier
at java.base/jdk.internal.module.Checks.requireModuleName
I'm not sure how to fix this. It's the only error I'm getting, and I think I missed something in the tutorial around 1:11. (This might not have anything to do with the problem, I only think it may).
What is "porting" a mod? Are you trying to upgrade / downgrade a mod to your favorite version? Do not expect it to work without rewrite if you are trying to port from a distant version.
If the mod has advanced implementations, also it is difficult to upgrade / downgrade.
I'm trying to rewrite a mod, but I haven't gotten that far. I can't even get the example mod to play so something is wrong with the way I have Eclipse set up or something.
I'm trying to rewrite a mod, but I haven't gotten that far. I can't even get the example mod to play so something is wrong with the way I have Eclipse set up or something.
If the mod that you try to rewrite is open source, download the source code and look at it, this really helps. If it is a closed source mod, deobfuscate the mod with BON2 or similar things, then decompile with your favorite decompiler.
Rollback Post to RevisionRollBack
My mod with manually registered ItemBlocks of technical blocks:
But the problem is I can't get the workspace to... work. Whenever I try to get anything to play, including the example mod, it says there is a problem. I haven't even added anything from the mod's code to the workspace yet.
But the problem is I can't get the workspace to... work. Whenever I try to get anything to play, including the example mod, it says there is a problem. I haven't even added anything from the mod's code to the workspace yet.
There might be a problem with JDK / JRE, 1.18 and onwards needs Java 17. If the Java version is correct, and the workspace still does not work, upgrade / downgrade MDK version.
Rollback Post to RevisionRollBack
My mod with manually registered ItemBlocks of technical blocks:
What exactly is the "problem"? You really need to provide a clear error message, not just "Whenever I try to get anything to play, including the example mod, it says there is a problem" - nobody can possibly know what "problem" means. Like, an error in finding a specific file? Compilation error (specifically?). It's just like somebody posting "exit code 1" as the only detail of a crash, as opposed to a complete crash report with the actual error message.
Thanks for the information. I realize it has been quite a long time since I posted here. I am attempting to port the mod again and have gotten much further. However I am stuck again, and I feel kind of bad making a new thread when this one is still on the front page. This time I have gotten items and blocks working, but I don't know how to go about converting my armor to the new version. The mod in question is an armor mod so it's important I get that working so I can update it.
Anyway
I have gotten to this point, but java is saying I get two main errors I don't know how to fix. The first is it says I need a super to ovveride with the "getArmorModel" even though I have Forgehooks imported. The second is that my model class has a "modelpart"
Instead of the whole model class here is the part I'm confused about. Before I had a float here, but now it says I need to add a ModelPart or something in order to not get an error message
public axl_main(ModelPart root, EquipmentSlot armorSlot) {
super(root);
//this is the part I can't seem to change.
I don't know what to put in the item class that is a "modelpart". Would I have to make one, or something esle I'm missing? I got the model for the armor from Blockbench if this helps people understand where I got the Modelpart thing from.
I was following this tutorial, but I had eclipse set up before I did:
I was going to play the example mod to see if I set everything up right, but it doesn't work.
Now I get an error saying:
Invalid module name: '' is not a Java identifier
at java.base/jdk.internal.module.Checks.requireModuleName
I'm not sure how to fix this. It's the only error I'm getting, and I think I missed something in the tutorial around 1:11. (This might not have anything to do with the problem, I only think it may).
What is "porting" a mod? Are you trying to upgrade / downgrade a mod to your favorite version? Do not expect it to work without rewrite if you are trying to port from a distant version.
If the mod has advanced implementations, also it is difficult to upgrade / downgrade.
My mod with manually registered ItemBlocks of technical blocks:
[mod]obtain-blocks-mod[/mod
I'm trying to rewrite a mod, but I haven't gotten that far. I can't even get the example mod to play so something is wrong with the way I have Eclipse set up or something.
If the mod that you try to rewrite is open source, download the source code and look at it, this really helps. If it is a closed source mod, deobfuscate the mod with BON2 or similar things, then decompile with your favorite decompiler.
My mod with manually registered ItemBlocks of technical blocks:
[mod]obtain-blocks-mod[/mod
Well., I wrote the original one from scratch using tutorials: Megaman Armor Mod - Mods - Minecraft - CurseForge
So I have the source code.
But the problem is I can't get the workspace to... work. Whenever I try to get anything to play, including the example mod, it says there is a problem. I haven't even added anything from the mod's code to the workspace yet.
There might be a problem with JDK / JRE, 1.18 and onwards needs Java 17. If the Java version is correct, and the workspace still does not work, upgrade / downgrade MDK version.
My mod with manually registered ItemBlocks of technical blocks:
[mod]obtain-blocks-mod[/mod
Hmmm... Okay, so it might be the MDK. For now I might stick to 1.16.5 but when I do update the mod finally I will try to get a new MDK
Most likely there is a problem with the Forge version that you use, not Minecraft version.
My mod with manually registered ItemBlocks of technical blocks:
[mod]obtain-blocks-mod[/mod
What exactly is the "problem"? You really need to provide a clear error message, not just "Whenever I try to get anything to play, including the example mod, it says there is a problem" - nobody can possibly know what "problem" means. Like, an error in finding a specific file? Compilation error (specifically?). It's just like somebody posting "exit code 1" as the only detail of a crash, as opposed to a complete crash report with the actual error message.
TheMasterCaver's First World - possibly the most caved-out world in Minecraft history - includes world download.
TheMasterCaver's World - my own version of Minecraft largely based on my views of how the game should have evolved since 1.6.4.
Why do I still play in 1.6.4?
Thanks for the information. I realize it has been quite a long time since I posted here. I am attempting to port the mod again and have gotten much further. However I am stuck again, and I feel kind of bad making a new thread when this one is still on the front page. This time I have gotten items and blocks working, but I don't know how to go about converting my armor to the new version. The mod in question is an armor mod so it's important I get that working so I can update it.
Anyway
I have gotten to this point, but java is saying I get two main errors I don't know how to fix. The first is it says I need a super to ovveride with the "getArmorModel" even though I have Forgehooks imported. The second is that my model class has a "modelpart"
Here is the Item Class I am working on:
package com.collecter128.megamanarmormod.items;
import com.collecter128.megamanarmormod.client.models.axl_main;
import net.minecraft.client.model.HumanoidModel;
import net.minecraft.client.model.Model;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.EquipmentSlot;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.item.ArmorItem;
import net.minecraft.world.item.ArmorMaterial;
import net.minecraft.world.item.ItemStack;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
import net.minecraftforge.client.ForgeHooksClient;
public class AxlArmor extends ArmorItem{
public int MainColorDefault = 4277608;//Main Body Color
public int SecondaryColorDefault = 9478540;//Secondary
public int ThirdColorDefault = 16756992;
public int WhiteColorDefault = 15395563;
public int GlowyColorDefault = 14690596;
public int GrayColorDefault = 9212065;
public int FourthColorDefault = 7249368;
public int MainColor = MainColorDefault;
public int SecondaryColor = SecondaryColorDefault;
public int ThirdColor = ThirdColorDefault;
public int WhiteColor = WhiteColorDefault;
public int GlowyColor = GlowyColorDefault;
public int GrayColor = GrayColorDefault;
public int FourthColor = FourthColorDefault;
public AxlArmor(ArmorMaterial materialIn, EquipmentSlot slot, Properties builderIn) {
super(materialIn, slot, builderIn);
}
@OnlyIn(Dist.CLIENT)
@Override
public static <A extends HumanoidModel<?>> A getArmorModel(LivingEntity entityLiving, ItemStack itemStack, EquipmentSlot armorSlot, A _default) {
if(armorSlot != EquipmentSlot.LEGS) {
axl_main model = underline wavy rgb(255, 0, 128) axl_main(1.0f, armorSlot);
model.hat.visible = armorSlot == EquipmentSlot.HEAD;
model.young = _default.young;
model.crouching = _default.crouching;
model.riding = _default.riding;
model.rightArmPose = _default.rightArmPose;
model.leftArmPose = _default.leftArmPose;
CompoundNBT compoundnbt = itemStack.getTagElement("displaymm");
if(compoundnbt != null && compoundnbt.contains("MainColor", 99)) {
model.MainColor = compoundnbt.getInt("MainColor");
}
else
itemStack.getOrCreateTagElement("displaymm").putInt("MainColor", MainColorDefault);
if(compoundnbt != null && compoundnbt.contains("SecondaryColor", 99)) {
model.SecondaryColor = compoundnbt.getInt("SecondaryColor");
}
else
itemStack.getOrCreateTagElement("displaymm").putInt("SecondaryColor", SecondaryColorDefault);
if(compoundnbt != null && compoundnbt.contains("WhiteColor", 99)) {
model.WhiteColor = compoundnbt.getInt("WhiteColor");
}
else
itemStack.getOrCreateTagElement("displaymm").putInt("WhiteColor", WhiteColorDefault);
if(compoundnbt != null && compoundnbt.contains("ThirdColor", 99)) {
model.ThirdColor = compoundnbt.getInt("ThirdColor");
}
else
itemStack.getOrCreateTagElement("displaymm").putInt("ThirdColor", ThirdColorDefault);
if(compoundnbt != null && compoundnbt.contains("GlowyColor", 99)) {
model.GlowyColor = compoundnbt.getInt("GlowyColor");
}
else
itemStack.getOrCreateTagElement("displaymm").putInt("GlowyColor", GlowyColorDefault);
if(compoundnbt != null && compoundnbt.contains("GrayColor", 99)) {
model.GrayColor = compoundnbt.getInt("GrayColor");
}
else
itemStack.getOrCreateTagElement("displaymm").putInt("GrayColor", GrayColorDefault);
if(compoundnbt != null && compoundnbt.contains("FourthColor", 99)) {
model.FourthColor = compoundnbt.getInt("FourthColor");
}
else
itemStack.getOrCreateTagElement("displaymm").putInt("FourthColor", FourthColorDefault);
underline wavy rgb(255, 0, 128).MainColor = model.MainColor;
underline wavy rgb(255, 0, 128).SecondaryColor = model.SecondaryColor;
underline wavy rgb(255, 0, 128).WhiteColor = model.WhiteColor;
underline wavy rgb(255, 0, 128).ThirdColor = model.ThirdColor;
underline wavy rgb(255, 0, 128).GlowyColor = model.GlowyColor;
underline wavy rgb(255, 0, 128).GrayColor = model.GrayColor;
return (A) model;
}
else {
axlarmor_leggings model = new axlarmor_leggings(1.0f);
model.hat.visible = armorSlot == EquipmentSlot.HEAD;
model.young = _default.young;
model.crouching = _default.crouching;
model.riding = _default.riding;
model.rightArmPose = _default.rightArmPose;
model.leftArmPose = _default.leftArmPose;
CompoundNBT compoundnbt = itemStack.getTagElement("displaymm");
if(compoundnbt != null && compoundnbt.contains("MainColor", 99)) {
//CompoundNBT maincompund = itemStack.getChildTag("MainColor");
//armorcolorer = compoundnbt.getInt("MainColor");
model.MainColor = compoundnbt.getInt("MainColor");
}
if(compoundnbt != null && compoundnbt.contains("SecondaryColor", 99)) {
model.SecondaryColor = compoundnbt.getInt("SecondaryColor");
}
if(compoundnbt != null && compoundnbt.contains("WhiteColor", 99)) {
model.WhiteColor = compoundnbt.getInt("WhiteColor");
}
if(compoundnbt != null && compoundnbt.contains("ThirdColor", 99)) {
model.ThirdColor = compoundnbt.getInt("ThirdColor");
}
if(compoundnbt != null && compoundnbt.contains("GlowyColor", 99)) {
model.GlowyColor = compoundnbt.getInt("GlowyColor");
}
if(compoundnbt != null && compoundnbt.contains("GrayColor", 99)) {
model.GrayColor = compoundnbt.getInt("GrayColor");
}
if(compoundnbt != null && compoundnbt.contains("FourthColor", 99)) {
model.FourthColor = compoundnbt.getInt("FourthColor");
}
underline wavy rgb(255, 0, 128).MainColor = model.MainColor;
underline wavy rgb(255, 0, 128).SecondaryColor = model.SecondaryColor;
underline wavy rgb(255, 0, 128).WhiteColor = model.WhiteColor;
underline wavy rgb(255, 0, 128).ThirdColor = model.ThirdColor;
underline wavy rgb(255, 0, 128).GlowyColor = model.GlowyColor;
underline wavy rgb(255, 0, 128).GrayColor = model.GrayColor;
return (A) model;
}
// if(slot == EquipmentSlotType.HEAD) {
// protomanarmor_main model = new protomanarmor_main(1.0f);
// model.bipedHeadwear.showModel = armorSlot == EquipmentSlotType.HEAD;
// }
// if(slot == EquipmentSlotType.CHEST) {
// protomanarmor_chestplate modelchestplate = new protomanarmor_chestplate(1.0f);
// model.bipedHeadwear.showModel = armorSlot == EquipmentSlotType.CHEST;
//
// modelchestplate.isChild = _default.isChild;
// modelchestplate.isSneak = _default.isSneak;
// modelchestplate.isSitting = _default.isSitting;
// modelchestplate.rightArmPose = _default.rightArmPose;
// modelchestplate.leftArmPose = _default.leftArmPose;
//
// return (A) modelchestplate;
// }
}
//
// @Override
//public <A extends BipedModel<?>> A getArmorModel(LivingEntity entityLiving, ItemStack itemStack, EquipmentSlotType armorSlot, A _default) {
// return null;
//}
// @Nullable
@Override
public String getArmorTexture(ItemStack stack, Entity entity, EquipmentSlot slot, String type) {
return "megamanarmormod:textures/armor/axl_armor.png";
}
}
Instead of the whole model class here is the part I'm confused about. Before I had a float here, but now it says I need to add a ModelPart or something in order to not get an error message
public axl_main(ModelPart root, EquipmentSlot armorSlot) {
super(root);
//this is the part I can't seem to change.
I don't know what to put in the item class that is a "modelpart". Would I have to make one, or something esle I'm missing? I got the model for the armor from Blockbench if this helps people understand where I got the Modelpart thing from.