Jump to content

The mod (modname) appears to reject its own version number (version)... Error


dude22072

Recommended Posts

What causes this and how can i fix it?

 

2013-06-23 15:51:58 [sEVERE] [ForgeModLoader] The mod ACMod appears to reject its own version number (1.1.2) in its version handling. This is likely a severe bug in the mod!
2013-06-23 15:51:58 [sEVERE] [ForgeModLoader] The mod complicationcraft appears to reject its own version number (0.0.14.1) in its version handling. This is likely a severe bug in the mod!
2013-06-23 15:51:58 [sEVERE] [ForgeModLoader] The mod cookiecraft appears to reject its own version number (3.0.0) in its version handling. This is likely a severe bug in the mod!
2013-06-23 15:51:58 [sEVERE] [ForgeModLoader] The mod elemental appears to reject its own version number (1.0.0) in its version handling. This is likely a severe bug in the mod!

Legend of Zelda Mod[updated September 20th to 3.1.1]

Extra Achievements(Minecraft 1.8!)[updated April 3rd to 2.3.0]

Fancy Cheeses[updated May 8th to 0.5.0]

Link to comment
Share on other sites

ComplicationCraft:

/*made by dude22072*/
package dudesmods.complicationcraft;

import java.util.ArrayList;

import net.minecraft.block.Block;
import net.minecraft.block.BlockWorkbench;
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.CraftingManager;
import net.minecraft.item.crafting.IRecipe;
import net.minecraft.item.crafting.RecipesTools;
import net.minecraft.item.crafting.RecipesWeapons;
import net.minecraft.item.crafting.ShapedRecipes;
import net.minecraft.item.crafting.ShapelessRecipes;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.Init;
import cpw.mods.fml.common.Mod.PreInit;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.network.NetworkMod;
import cpw.mods.fml.common.network.NetworkRegistry;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraftforge.common.Configuration;
import net.minecraftforge.oredict.ShapedOreRecipe;
import net.minecraftforge.oredict.ShapelessOreRecipe;

@Mod(modid = "complicationcraft", name= "Complication Craft", version= "0.0.14.1")
@NetworkMod(
	clientSideRequired = true,
	serverSideRequired = false,
	versionBounds = "[1.5.2]")

public class ComplicationCraft {
//Static Registration-Items

public static Item StickyGoo;
public static Item pistonRod;
public static Block pistonBaseComp;
public static Item pistonHead;
public static Item pistonHeadSticky;
public static Item ToolShaftRedstone;
public static Item poweredLight;
public static Item doorFrame;
public static Item doorKnob;
public static Item doorLock;
public static Item doorLockKnob;
public static Item stoneBase;
public static Item doorFrameReenforced;
public static Item emptyDoor;
public static Item doorHinge;
public static Item doorFrameTop;
public static Item doorFrameBottom;
public static Item itemToolMeta;

//creative tabs
public static CreativeTabs tabComplicationCraft = new tabComplicationCraft("tabComplicationCraft");
public static CreativeTabs tabComplicationCraftRedstone = new tabComplicationCraftRedstone("tabComplicationCraftRedstone");
public static CreativeTabs tabComplicationCraftTools = new tabComplicationCraftTools("tabComplicationCraftTools");
public static CreativeTabs tabComplicationCraftDoors = new tabComplicationCraftDoors("tabComplicationCraftDoors");

private static void removeRecipe(ItemStack resultItem)
{
         ItemStack recipeResult = null;
         ArrayList recipes = (ArrayList) CraftingManager.getInstance().getRecipeList();
         for (int scan = 0; scan < recipes.size(); scan++)
         {
                 IRecipe tmpRecipe = (IRecipe) recipes.get(scan);
                 if (tmpRecipe instanceof ShapelessRecipes)
                 {
                         ShapelessRecipes recipe = (ShapelessRecipes)tmpRecipe;
                         recipeResult = recipe.getRecipeOutput();
                 }
                 else if (tmpRecipe instanceof ShapedRecipes)
                 {
                         ShapedRecipes recipe = (ShapedRecipes)tmpRecipe;
                         recipeResult = recipe.getRecipeOutput();
                 }
                 else if (tmpRecipe instanceof ShapedOreRecipe)
                 {
                 ShapedOreRecipe recipe = (ShapedOreRecipe)tmpRecipe;
                         recipeResult = recipe.getRecipeOutput();
                 }
                 else if (tmpRecipe instanceof ShapelessOreRecipe)
                 {
                 ShapelessOreRecipe recipe = (ShapelessOreRecipe)tmpRecipe;
                         recipeResult = recipe.getRecipeOutput();
                 }
                 if (ItemStack.areItemStacksEqual(resultItem, recipeResult))
                 {
                         System.out.println("ComplicationCraft Removed Recipe: " + recipes.get(scan) + " -> " + recipeResult);
                         recipes.remove(scan);
                 }
         }
}
private static int ToolPeiceIds = 10000;
private static int StickyGooID = 10033;
private static int pistonRodID = 10034;
private static int pistonBaseCompID = 600;
private static int pistonHeadID = 10036;
private static int pistonHeadStickyID = 10037;
private static int ToolShaftRedstoneID = 10038;
private static int poweredLightID = 10039;
private static int doorFrameID = 10040;
private static int doorKnobID = 10041;
private static int doorLockID = 10042;
private static int doorLockKnobID = 10043;
private static int stoneBaseID = 10044;
private static int doorFrameReenforcedID = 10045;
private static int emptyDoorID = 10046;
private static int doorHingeID = 10047;
private static int doorFrameTopID = 10048;
private static int doorFrameBottomID = 10049;

@PreInit
public void myNewPreLoad(FMLPreInitializationEvent event) {
	/*Configuration config = new Configuration(event.getSuggestedConfigurationFile());

	config.load();

	ToolPeiceIds = config.getItem("ToolsPeiceIds", 10000).getInt();
	new ItemStack(itemToolMeta, 1, 0)ID = config.getItem("new ItemStack(itemToolMeta, 1, 0)ID", 10001).getInt();
	new ItemStack(itemToolMeta, 1, 1)ID = config.getItem("new ItemStack(itemToolMeta, 1, 1)ID", 10002).getInt();
	new ItemStack(itemToolMeta, 1, 2)ID = config.getItem("new ItemStack(itemToolMeta, 1, 2)ID", 10003).getInt();
	new ItemStack(itemToolMeta, 1, 3)ID = config.getItem("new ItemStack(itemToolMeta, 1, 3)ID", 10004).getInt();
	new ItemStack(itemToolMeta, 1, 4)ID = config.getItem("new ItemStack(itemToolMeta, 1, 4)ID", 10005).getInt();
	new ItemStack(itemToolMeta, 1, 5)ID = config.getItem("new ItemStack(itemToolMeta, 1, 5)ID", 10006).getInt();
	new ItemStack(itemToolMeta, 1, 6)ID = config.getItem("new ItemStack(itemToolMeta, 1, 6)ID", 10007).getInt();
	new ItemStack(itemToolMeta, 1, 7)ID = config.getItem("new ItemStack(itemToolMeta, 1, 7)ID", 10008).getInt();
	new ItemStack(itemToolMeta, 1, 8)ID = config.getItem("new ItemStack(itemToolMeta, 1, 8)ID", 10009).getInt();
	new ItemStack(itemToolMeta, 1, 9)ID = config.getItem("new ItemStack(itemToolMeta, 1, 9)ID", 10010).getInt();
	new ItemStack(itemToolMeta, 1, 10)ID = config.getItem("new ItemStack(itemToolMeta, 1, 10)ID", 10011).getInt();
	new ItemStack(itemToolMeta, 1, 11)ID = config.getItem("new ItemStack(itemToolMeta, 1, 11)ID", 10012).getInt();
	new ItemStack(itemToolMeta, 1, 12)ID = config.getItem("new ItemStack(itemToolMeta, 1, 12)ID", 10013).getInt();
	new ItemStack(itemToolMeta, 1, 13)ID = config.getItem("new ItemStack(itemToolMeta, 1, 13)ID", 10014).getInt();
	new ItemStack(itemToolMeta, 1, 14)ID = config.getItem("new ItemStack(itemToolMeta, 1, 14)ID", 10015).getInt();
	new ItemStack(itemToolMeta, 1, 15)ID = config.getItem("new ItemStack(itemToolMeta, 1, 15)ID", 10016).getInt();
	new ItemStack(itemToolMeta, 1, 16)ID = config.getItem("new ItemStack(itemToolMeta, 1, 16)ID", 10017).getInt();
	new ItemStack(itemToolMeta, 1, 17)ID = config.getItem("new ItemStack(itemToolMeta, 1, 17)ID", 10018).getInt();
	new ItemStack(itemToolMeta, 1, 18)ID = config.getItem("new ItemStack(itemToolMeta, 1, 18)ID", 10019).getInt();
	new ItemStack(itemToolMeta, 1, 19)ID = config.getItem("new ItemStack(itemToolMeta, 1, 19)ID", 10020).getInt();
	new ItemStack(itemToolMeta, 1, 20)ID = config.getItem("new ItemStack(itemToolMeta, 1, 20)ID", 10021).getInt();
	new ItemStack(itemToolMeta, 1, 21)ID = config.getItem("new ItemStack(itemToolMeta, 1, 21)ID", 10022).getInt();
	new ItemStack(itemToolMeta, 1, 22)ID = config.getItem("new ItemStack(itemToolMeta, 1, 22)ID", 10023).getInt();
	new ItemStack(itemToolMeta, 1, 23)ID = config.getItem("new ItemStack(itemToolMeta, 1, 23)ID", 10024).getInt();
	new ItemStack(itemToolMeta, 1, 24)ID = config.getItem("new ItemStack(itemToolMeta, 1, 24)ID", 10025).getInt();
	new ItemStack(itemToolMeta, 1, 25)ID = config.getItem("new ItemStack(itemToolMeta, 1, 25)ID", 10026).getInt();
	new ItemStack(itemToolMeta, 1, 26)ID = config.getItem("new ItemStack(itemToolMeta, 1, 26)ID", 10027).getInt();
	new ItemStack(itemToolMeta, 1, 27)ID = config.getItem("new ItemStack(itemToolMeta, 1, 27)ID", 10028).getInt();
	new ItemStack(itemToolMeta, 1, 28)ID = config.getItem("new ItemStack(itemToolMeta, 1, 28)ID", 10029).getInt();
	new ItemStack(itemToolMeta, 1, 29)ID = config.getItem("new ItemStack(itemToolMeta, 1, 29)ID", 10030).getInt();
	new ItemStack(itemToolMeta, 1, 30)ID = config.getItem("new ItemStack(itemToolMeta, 1, 30)ID", 10031).getInt();
	new ItemStack(itemToolMeta, 1, 31)ID = config.getItem("new ItemStack(itemToolMeta, 1, 31)ID", 10032).getInt();
	StickyGooID = config.getItem("StickyGooID", 10033).getInt();
	pistonRodID = config.getItem("pistonRodID", 10034).getInt();
	pistonBaseCompID = config.getBlock("pistonBaseCompID", 600).getInt();
	pistonHeadID = config.getItem("pistonHeadID", 10036).getInt();
	pistonHeadStickyID = config.getItem("pistonHeadStickyID", 10037).getInt();
	new ItemStack(itemToolMeta, 1, 0)RedstoneID = config.getItem("new ItemStack(itemToolMeta, 1, 0)RedstoneID", 10038).getInt();
	poweredLightID = config.getItem("poweredLightID", 10039).getInt();
	doorFrameID = config.getItem("doorFrameID", 10040).getInt();
	doorKnobID = config.getItem("doorKnobID", 10041).getInt();
	doorLockID = config.getItem("doorLockID", 10042).getInt();
	doorLockKnobID = config.getItem("doorLockKnobID", 10043).getInt();
	stoneBaseID = config.getItem("stoneBaseID", 10044).getInt();
	doorFrameReenforcedID = config.getItem("doorFrameReenforcedID", 10045).getInt();
	emptyDoorID = config.getItem("emptyDoorID", 10046).getInt();
	doorHingeID = config.getItem("doorHingeID", 10047).getInt();
	doorFrameTopID = config.getItem("doorFrameTopID", 10048).getInt();
	doorFrameBottomID = config.getItem("doorFrameBottomID", 10049).getInt();

	config.save();*/

	this.removeRecipe(new ItemStack(Item.shears));
	this.removeRecipe(new ItemStack(Item.pickaxeWood));
	this.removeRecipe(new ItemStack(Item.pickaxeStone));
	this.removeRecipe(new ItemStack(Item.pickaxeIron));
	this.removeRecipe(new ItemStack(Item.pickaxeDiamond));
	this.removeRecipe(new ItemStack(Item.pickaxeGold)); 
	this.removeRecipe(new ItemStack(Item.shovelWood));
	this.removeRecipe(new ItemStack(Item.shovelStone));
	this.removeRecipe(new ItemStack(Item.shovelIron));
	this.removeRecipe(new ItemStack(Item.shovelDiamond));
	this.removeRecipe(new ItemStack(Item.shovelGold));
	this.removeRecipe(new ItemStack(Item.axeWood));
	this.removeRecipe(new ItemStack(Item.axeStone));
	this.removeRecipe(new ItemStack(Item.axeIron));
	this.removeRecipe(new ItemStack(Item.axeDiamond));
	this.removeRecipe(new ItemStack(Item.axeGold));
	this.removeRecipe(new ItemStack(Item.hoeWood));
	this.removeRecipe(new ItemStack(Item.hoeStone));
	this.removeRecipe(new ItemStack(Item.hoeIron));
	this.removeRecipe(new ItemStack(Item.hoeDiamond));
	this.removeRecipe(new ItemStack(Item.hoeGold));
	this.removeRecipe(new ItemStack(Item.swordWood));
	this.removeRecipe(new ItemStack(Item.swordStone));
	this.removeRecipe(new ItemStack(Item.swordIron));
	this.removeRecipe(new ItemStack(Item.swordDiamond));
	this.removeRecipe(new ItemStack(Item.swordGold));
	this.removeRecipe(new ItemStack(Block.pistonBase, 1));
	this.removeRecipe(new ItemStack(Block.pistonStickyBase, 1));

	LocalizationHandler.loadLanguages();

}

@Init
public void myNewLoad(FMLInitializationEvent event) {

	GameRegistry.registerBlock(pistonBaseComp);
	//Names
	///UK
	LanguageRegistry.instance().addStringLocalization("item.null.ToolShaft.name", "en_GB", "Tool Rod");
	LanguageRegistry.instance().addStringLocalization("item.null.spadeHandle.name", "en_GB", "Spade Handle");
	LanguageRegistry.instance().addStringLocalization("item.null.spadeHeadWood.name", "en_GB", "Wooden Spade Head");
	LanguageRegistry.instance().addStringLocalization("item.null.spadeHeadStone.name", "en_GB", "Stone Spade Head");
	LanguageRegistry.instance().addStringLocalization("item.null.spadeHeadIron.name", "en_GB", "Iron Spade Head");
	LanguageRegistry.instance().addStringLocalization("item.null.spadeHeadGold.name", "en_GB", "Golden Spade Head");
	LanguageRegistry.instance().addStringLocalization("item.null.spadeHeadDiamond.name", "en_GB", "Diamond Spade Head");


	//Crafting
	/*GameRegistry.addRecipe(new ItemStack(Output Item, # of), "AAA", "AAA", "AAA", 'A', ItemA);*/
	GameRegistry.addRecipe(new ItemStack(itemToolMeta, 1, 0), " A ", " A ", " A ", 'A', Item.stick);
	GameRegistry.addRecipe(new ItemStack(itemToolMeta, 1, 1), " A ", "A A", "AAA", 'A', Block.planks);
	GameRegistry.addRecipe(new ItemStack(StickyGoo, 3), "CSC", "STS", "CSC", 'C', Block.web, 'S', Item.slimeBall, 'T', Item.silk);
	GameRegistry.addRecipe(new ItemStack(pistonRod, 1), "IRI", "RTR", "IRI", 'I', Item.ingotIron, 'T', ToolShaftRedstone, 'R', Item.redstone);
	GameRegistry.addRecipe(new ItemStack(pistonBaseComp, 1), "CRC", "RIR",  "CRC", 'C', Block.cobblestone, 'R', Item.redstone, 'I', Item.ingotIron);
	GameRegistry.addRecipe(new ItemStack(pistonHead, 1 ), "IWI", "WWW", "IWI", 'I', Item.ingotIron, 'W', Block.planks);
	GameRegistry.addShapelessRecipe(new ItemStack(pistonHeadSticky, 1), pistonHead, StickyGoo);
	GameRegistry.addRecipe(new ItemStack(ToolShaftRedstone, 1), "RRR", "RSR", "RRR", 'R', Item.redstone, 'S', new ItemStack(itemToolMeta, 1, 0));
	GameRegistry.addRecipe(new ItemStack(poweredLight, 1), " R ", "RGR", " R ", 'R', Item.redstone, 'G', Item.lightStoneDust);
	GameRegistry.addRecipe(new ItemStack(doorFrameReenforced, 1), "III", "IFI", "III", 'I', Item.ingotIron, 'F', doorFrame);
	GameRegistry.addRecipe(new ItemStack(doorFrame, 1), new Object[] {"#", "$", '#', doorFrameTop, '$', doorFrameBottom});

	///Heads
	////Spade
	GameRegistry.addRecipe(new ItemStack(itemToolMeta, 1, 2), " A ", "AAA", "AAA", 'A', Block.planks);
	GameRegistry.addRecipe(new ItemStack(itemToolMeta, 1, 3), " A ", "AAA", "AAA", 'A', Block.cobblestone);
	GameRegistry.addRecipe(new ItemStack(itemToolMeta, 1, 4), " A ", "AAA", "AAA", 'A', Item.ingotIron);
	GameRegistry.addRecipe(new ItemStack(itemToolMeta, 1, 5), " A ", "AAA", "AAA", 'A', Item.ingotGold);
	GameRegistry.addRecipe(new ItemStack(itemToolMeta, 1, 6), " A ", "AAA", "AAA", 'A', Item.diamond);
	////Pickaxe
	GameRegistry.addRecipe(new ItemStack(itemToolMeta, 1, 7), " A ", "A A", "   ", 'A', Block.planks, 'B', Item.stick);
	GameRegistry.addRecipe(new ItemStack(itemToolMeta, 1, , " A ", "A A", "   ", 'A', Block.cobblestone, 'B', Item.stick);
	GameRegistry.addRecipe(new ItemStack(itemToolMeta, 1, 9), " A ", "A A", "   ", 'A', Item.ingotIron, 'B', Item.stick);
	GameRegistry.addRecipe(new ItemStack(itemToolMeta, 1, 10), " A ", "A A", "   ", 'A', Item.ingotGold, 'B', Item.stick);
	GameRegistry.addRecipe(new ItemStack(itemToolMeta, 1, 11), " A ", "A A", "   ", 'A', Item.diamond, 'B', Item.stick);
	////Axe
	GameRegistry.addRecipe(new ItemStack(itemToolMeta, 1, 12), "AAB", "A B", " AB", 'A', Block.planks, 'B', Item.stick);
	GameRegistry.addRecipe(new ItemStack(itemToolMeta, 1, 13), "AAB", "A B", " AB", 'A', Block.cobblestone, 'B', Item.stick);
	GameRegistry.addRecipe(new ItemStack(itemToolMeta, 1, 14), "AAB", "A B", " AB", 'A', Item.ingotIron, 'B', Item.stick);
	GameRegistry.addRecipe(new ItemStack(itemToolMeta, 1, 15), "AAB", "A B", " AB", 'A', Item.ingotGold, 'B', Item.stick);
	GameRegistry.addRecipe(new ItemStack(itemToolMeta, 1, 16), "AAB", "A B", " AB", 'A', Item.diamond, 'B', Item.stick);
	////Hoe
	GameRegistry.addRecipe(new ItemStack(itemToolMeta, 1, 17), "AAB", "  B", "   ", 'A', Block.planks, 'B', Item.stick);
	GameRegistry.addRecipe(new ItemStack(itemToolMeta, 1, 18), "AAB", "  B", "   ", 'A', Block.cobblestone, 'B', Item.stick);
	GameRegistry.addRecipe(new ItemStack(itemToolMeta, 1, 19), "AAB", "  B", "   ", 'A', Item.ingotIron, 'B', Item.stick);
	GameRegistry.addRecipe(new ItemStack(itemToolMeta, 1, 20), "AAB", "  B", "   ", 'A', Item.ingotGold, 'B', Item.stick);
	GameRegistry.addRecipe(new ItemStack(itemToolMeta, 1, 21), "AAB", "  B", "   ", 'A', Item.diamond, 'B', Item.stick);
	///Sword
	////Hilt
	GameRegistry.addRecipe(new ItemStack(itemToolMeta, 1, 27), "A A", "BBB", "A A", 'A', Item.stick, 'B', Block.planks);
	GameRegistry.addRecipe(new ItemStack(itemToolMeta, 1, 28), "A A", "BBB", "A A", 'A', Block.cobblestone, 'B', Block.planks);
	GameRegistry.addRecipe(new ItemStack(itemToolMeta, 1, 29), "A A", "BBB", "A A", 'A', Item.ingotIron, 'B', Block.planks);
	GameRegistry.addRecipe(new ItemStack(itemToolMeta, 1, 30), "A A", "BBB", "A A", 'A', Item.ingotGold, 'B', Block.planks);
	GameRegistry.addRecipe(new ItemStack(itemToolMeta, 1, 31), "A A", "BBB", "A A", 'A', Item.diamond, 'B', Block.planks);
	////Blade
	GameRegistry.addRecipe(new ItemStack(itemToolMeta, 1, 22), " A ", "ABA", "BAB", 'A', Item.stick, 'B', Block.planks);
	GameRegistry.addRecipe(new ItemStack(itemToolMeta, 1, 23), " A ", "ABA", "BAB", 'A', Block.cobblestone, 'B', Block.planks);
	GameRegistry.addRecipe(new ItemStack(itemToolMeta, 1, 24), " A ", "ABA", "BAB", 'A', Item.ingotIron, 'B', Item.ingotIron);
	GameRegistry.addRecipe(new ItemStack(itemToolMeta, 1, 25), " A ", "ABA", "BAB", 'A', Item.ingotGold, 'B', Item.ingotIron);
	GameRegistry.addRecipe(new ItemStack(itemToolMeta, 1, 26), " A ", "ABA", "BAB", 'A', Item.diamond, 'B', Item.ingotIron);

	//Crafting-Vanilla
	GameRegistry.addRecipe(new ItemStack(Item.shovelWood, 1),new Object[] {"A", "B", "C", 'A', new ItemStack(itemToolMeta, 1, 2),'B', new ItemStack(itemToolMeta, 1, 0), 'C', new ItemStack(itemToolMeta, 1, 1) });
	GameRegistry.addRecipe(new ItemStack(Item.shovelStone, 1),new Object[] {"A", "B", "C", 'A', new ItemStack(itemToolMeta, 1, 3),'B', new ItemStack(itemToolMeta, 1, 0), 'C', new ItemStack(itemToolMeta, 1, 1) });
	GameRegistry.addRecipe(new ItemStack(Item.shovelIron, 1),new Object[] {"A", "B", "C", 'A', new ItemStack(itemToolMeta, 1, 4),'B', new ItemStack(itemToolMeta, 1, 0), 'C', new ItemStack(itemToolMeta, 1, 1) });
	GameRegistry.addRecipe(new ItemStack(Item.shovelGold, 1),new Object[] {"A", "B", "C", 'A', new ItemStack(itemToolMeta, 1, 5),'B', new ItemStack(itemToolMeta, 1, 0), 'C', new ItemStack(itemToolMeta, 1, 1) });
	GameRegistry.addRecipe(new ItemStack(Item.shovelDiamond, 1),new Object[] {"A", "B", "C", 'A', new ItemStack(itemToolMeta, 1, 6),'B', new ItemStack(itemToolMeta, 1, 0), 'C', new ItemStack(itemToolMeta, 1, 1) });
	GameRegistry.addRecipe(new ItemStack(Item.pickaxeWood, 1),new Object[] {"A", "B", "B",  'A', new ItemStack(itemToolMeta, 1, 7),'B', new ItemStack(itemToolMeta, 1, 0)});
	GameRegistry.addRecipe(new ItemStack(Item.pickaxeStone, 1),new Object[] {"A", "B", "B",  'A', new ItemStack(itemToolMeta, 1, ,'B', new ItemStack(itemToolMeta, 1, 0)});
	GameRegistry.addRecipe(new ItemStack(Item.pickaxeIron, 1),new Object[] {"A", "B", "B",  'A', new ItemStack(itemToolMeta, 1, 9),'B', new ItemStack(itemToolMeta, 1, 0)});
	GameRegistry.addRecipe(new ItemStack(Item.pickaxeGold, 1),new Object[] {"A", "B", "B",  'A', new ItemStack(itemToolMeta, 1, 10),'B', new ItemStack(itemToolMeta, 1, 0)});
	GameRegistry.addRecipe(new ItemStack(Item.pickaxeDiamond, 1),new Object[] {"A", "B", "B",  'A', new ItemStack(itemToolMeta, 1, 11),'B', new ItemStack(itemToolMeta, 1, 0)});
	GameRegistry.addRecipe(new ItemStack(Item.axeWood, 1),new Object[] {"A", "B", "B",  'A', new ItemStack(itemToolMeta, 1, 12),'B', new ItemStack(itemToolMeta, 1, 0)});
	GameRegistry.addRecipe(new ItemStack(Item.axeStone, 1),new Object[] {"A", "B", "B",  'A', new ItemStack(itemToolMeta, 1, 13),'B', new ItemStack(itemToolMeta, 1, 0)});
	GameRegistry.addRecipe(new ItemStack(Item.axeIron, 1),new Object[] {"A", "B", "B",  'A', new ItemStack(itemToolMeta, 1, 14),'B', new ItemStack(itemToolMeta, 1, 0)});
	GameRegistry.addRecipe(new ItemStack(Item.axeGold, 1),new Object[] {"A", "B", "B",  'A', new ItemStack(itemToolMeta, 1, 15),'B', new ItemStack(itemToolMeta, 1, 0)});
	GameRegistry.addRecipe(new ItemStack(Item.axeDiamond, 1),new Object[] {"A", "B", "B",  'A', new ItemStack(itemToolMeta, 1, 16),'B', new ItemStack(itemToolMeta, 1, 0)});
	GameRegistry.addRecipe(new ItemStack(Item.hoeWood, 1),new Object[] {"A", "B", "B",  'A', new ItemStack(itemToolMeta, 1, 17),'B', new ItemStack(itemToolMeta, 1, 0)});
	GameRegistry.addRecipe(new ItemStack(Item.hoeStone, 1),new Object[] {"A", "B", "B",  'A', new ItemStack(itemToolMeta, 1, 17),'B', new ItemStack(itemToolMeta, 1, 0)});
	GameRegistry.addRecipe(new ItemStack(Item.hoeIron, 1),new Object[] {"A", "B", "B",  'A', new ItemStack(itemToolMeta, 1, 17),'B', new ItemStack(itemToolMeta, 1, 0)});
	GameRegistry.addRecipe(new ItemStack(Item.hoeGold, 1),new Object[] {"A", "B", "B",  'A', new ItemStack(itemToolMeta, 1, 17),'B', new ItemStack(itemToolMeta, 1, 0)});
	GameRegistry.addRecipe(new ItemStack(Item.hoeDiamond, 1),new Object[] {"A", "B", "B",  'A', new ItemStack(itemToolMeta, 1, 17),'B', new ItemStack(itemToolMeta, 1, 0)});
	GameRegistry.addRecipe(new ItemStack(Item.swordWood, 1),new Object[] {"A", "B", "C", 'A', new ItemStack(itemToolMeta, 1, 22),'B', new ItemStack(itemToolMeta, 1, 27), 'C', new ItemStack(itemToolMeta, 1, 0)});
	GameRegistry.addRecipe(new ItemStack(Item.swordStone, 1),new Object[] {"A", "B", "C", 'A', new ItemStack(itemToolMeta, 1, 23),'B', new ItemStack(itemToolMeta, 1, 28), 'C', new ItemStack(itemToolMeta, 1, 0)});
	GameRegistry.addRecipe(new ItemStack(Item.swordIron, 1),new Object[] {"A", "B", "C", 'A', new ItemStack(itemToolMeta, 1, 24),'B', new ItemStack(itemToolMeta, 1, 29), 'C', new ItemStack(itemToolMeta, 1, 0)});
	GameRegistry.addRecipe(new ItemStack(Item.swordGold, 1),new Object[] {"A", "B", "C", 'A', new ItemStack(itemToolMeta, 1, 25),'B', new ItemStack(itemToolMeta, 1, 30), 'C', new ItemStack(itemToolMeta, 1, 0)});
	GameRegistry.addRecipe(new ItemStack(Item.swordDiamond, 1),new Object[] {"A", "B", "C", 'A', new ItemStack(itemToolMeta, 1, 26),'B', new ItemStack(itemToolMeta, 1, 31), 'C', new ItemStack(itemToolMeta, 1, 0)});
	GameRegistry.addRecipe(new ItemStack(Block.pistonBase, 1), " H ", " R ", " B ", 'H', pistonHead, 'R', pistonRod, 'B', pistonBaseComp);
	GameRegistry.addRecipe(new ItemStack(Block.pistonStickyBase, 1), " H ", " R ", " B ", 'H', pistonHeadSticky, 'R', pistonRod, 'B', pistonBaseComp);
	GameRegistry.addShapelessRecipe(new ItemStack(Block.pistonStickyBase, 1),StickyGoo, Block.pistonBase);


	//Smelting


	//Gui

}
static {
	StickyGoo = (new blankItem(StickyGooID)).setCreativeTab(tabComplicationCraft).setUnlocalizedName("StickyGoo");
	pistonRod = (new blankItem(pistonRodID)).setCreativeTab(tabComplicationCraftRedstone).setUnlocalizedName("pistonRod");
	pistonBaseComp = (new blankBlock(pistonBaseCompID, Material.piston, tabComplicationCraftRedstone)).setUnlocalizedName("pistonBaseComp");
	pistonHead = (new blankItem(pistonHeadID)).setCreativeTab(tabComplicationCraftRedstone).setUnlocalizedName("pistonHead");
	pistonHeadSticky = (new blankItem(pistonHeadStickyID)).setCreativeTab(tabComplicationCraftRedstone).setUnlocalizedName("pistonHeadSticky");
	ToolShaftRedstone = (new blankItem(ToolShaftRedstoneID)).setCreativeTab(tabComplicationCraftRedstone).setUnlocalizedName("ToolShaftRedstone");
	poweredLight = (new blankItem(poweredLightID)).setCreativeTab(tabComplicationCraftRedstone).setUnlocalizedName("poweredLight");
	doorFrame = (new rareItem(doorFrameID)).setCreativeTab(tabComplicationCraftDoors).setUnlocalizedName("doorFrame");
	doorKnob = (new rareItem(doorKnobID)).setCreativeTab(tabComplicationCraftDoors).setUnlocalizedName("doorKnob");
	doorLock = (new rareItem(doorLockID)).setCreativeTab(tabComplicationCraftDoors).setUnlocalizedName("doorLock");
	doorLockKnob = (new rareItem(doorLockKnobID)).setCreativeTab(tabComplicationCraftDoors).setUnlocalizedName("doorLockKnob");
	stoneBase = (new rareItem(stoneBaseID)).setCreativeTab(tabComplicationCraftRedstone).setUnlocalizedName("stoneBase");
	doorFrameReenforced = (new rareItem(doorFrameReenforcedID)).setCreativeTab(tabComplicationCraftDoors).setUnlocalizedName("doorFrameReenforced");
	emptyDoor = (new rareItem(emptyDoorID)).setCreativeTab(tabComplicationCraftDoors).setUnlocalizedName("emptyDoor");	
	doorHinge = (new rareItem(doorHingeID)).setCreativeTab(tabComplicationCraftDoors).setUnlocalizedName("doorHinge");	
	doorFrameTop = (new rareItem(doorFrameTopID)).setCreativeTab(tabComplicationCraftDoors).setUnlocalizedName("doorFrameTop");
	doorFrameBottom = (new rareItem(doorFrameBottomID)).setCreativeTab(tabComplicationCraftDoors).setUnlocalizedName("doorFrameBottom");

	itemToolMeta = new ItemToolMeta(ToolPeiceIds).setCreativeTab(tabComplicationCraftTools);


}

}

 

cookiecraft:

package dudesmods.cookiecraft;

import net.minecraft.block.Block;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.EnumArmorMaterial;
import net.minecraft.item.Item;
import net.minecraft.item.ItemArmor;
import net.minecraft.item.ItemFood;
import net.minecraft.item.ItemStack;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.Init;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.network.NetworkMod;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;

@Mod(modid = "cookiecraft", name = "Cookie Craft", version = "3.0.0")
@NetworkMod(clientSideRequired = true, serverSideRequired = false, versionBounds = "[1.5.2]")

public class mod_CookieCraft {

public static CreativeTabs tabCookieCraft = new tabCookieCraft("tabCookieCraft");

public static ItemArmor appron;
public static Item dough;
public static ItemFood jaffa;
public static ItemFood oreo;
public static ItemFood doughnut;
public static ItemFood cookieGold;
public static Item peanutSeeds;
public static ItemFood cookiePeanutButter;
public static Item cup;
public static Item chocolate;
public static Item cupOChocolate;
public static Item chocolateHot;
public static ItemFood MandM;
public static Item marshmallow;
public static Item grahmCracker;	
public static Item smore;
public static ItemFood smoreCooked;
public static ItemFood cookiePoison;
public static Item vanillaChips;
public static ItemFood oreoChocolate;
public static ItemFood cookieVanilla; 
public static ItemFood cookieSugar;

private static final int SHIFTED_INDEX_FIXER = 256;

public static int appronID = 2100;
public static int doughID = 2101 - SHIFTED_INDEX_FIXER;
public static int jaffaID = 2102 - SHIFTED_INDEX_FIXER;
public static int oreoID = 2103 - SHIFTED_INDEX_FIXER;
public static int doughnutID = 2104 - SHIFTED_INDEX_FIXER;
public static int cookieGoldID = 2105 - SHIFTED_INDEX_FIXER;
public static int peanutSeedsID = 2106 - SHIFTED_INDEX_FIXER;
public static int cookiePeanutButterID = 2107 - SHIFTED_INDEX_FIXER;
public static int cupID = 2108 - SHIFTED_INDEX_FIXER;
public static int chocolateID = 2109 - SHIFTED_INDEX_FIXER;
public static int cupOChocolateID = 2110 - SHIFTED_INDEX_FIXER;
public static int chocolateHotID = 2111 - SHIFTED_INDEX_FIXER;
public static int MandMID = 2112 - SHIFTED_INDEX_FIXER;
public static int marshmallowID = 2113 - SHIFTED_INDEX_FIXER;
public static int grahmCrackerID = 2114 - SHIFTED_INDEX_FIXER;
public static int smoreID = 2115 - SHIFTED_INDEX_FIXER;
public static int smoreCookedID = 2116 - SHIFTED_INDEX_FIXER;
public static int cookiePoisonID = 2117 - SHIFTED_INDEX_FIXER;
public static int vanillaChipsID = 2118 - SHIFTED_INDEX_FIXER;
public static int oreoChocolateID = 2119 - SHIFTED_INDEX_FIXER;
public static int cookieVanillaID = 2120 - SHIFTED_INDEX_FIXER;
public static int cookieSugarID = 2121 - SHIFTED_INDEX_FIXER;

@Init
public void myNewLoad(FMLInitializationEvent event){
	//CoCo = 1
	GameRegistry.addRecipe(new ItemStack(appron, 1), "S S", "SSS", "SSS", 'S', Item.silk);
	GameRegistry.addRecipe(new ItemStack(dough, 16), new Object[]{"SMW", 'S', Item.sugar, 'M', Item.bucketMilk, 'W', Item.wheat});
	GameRegistry.addRecipe(new ItemStack(jaffa, 1), new Object[]{"C", "R", "D", 'D', dough, 'R', new ItemStack(Item.dyePowder, 1, 1), 'C', new ItemStack(Item.dyePowder, 1, 3)});
	GameRegistry.addRecipe(new ItemStack(oreo, 4), new Object[]{"C", "M", "C", 'C', new ItemStack(Item.dyePowder, 1, 1), 'M', Item.bucketMilk});
	GameRegistry.addRecipe(new ItemStack(doughnut, 2), " D ", "D D", " D ", 'D', dough);
	GameRegistry.addRecipe(new ItemStack(cookieGold, 1), "GGG", "GDG", "GGG", 'G', Item.ingotGold, 'D', dough);
	GameRegistry.addShapelessRecipe(new ItemStack(peanutSeeds, 4), Item.seeds, new ItemStack(Item.dyePowder, 1, 1));
	GameRegistry.addRecipe(new ItemStack(cookiePeanutButter), new Object[]{"DPD", 'D', dough, 'P', peanutSeeds});
	GameRegistry.addRecipe(new ItemStack(chocolate, , new Object[]{"C", "M", "S", 'C', new ItemStack(Item.dyePowder, 1, 1), 'M', Item.bucketMilk, 'S', Item.sugar});
	GameRegistry.addRecipe(new ItemStack(cupOChocolate, 1), new Object[]{"C", "M", "P", 'C', chocolate, 'M', Item.bucketMilk, 'P', cup});
	GameRegistry.addSmelting(cupOChocolate.itemID, new ItemStack(chocolateHot, 1), 3.0F);
	GameRegistry.addRecipe(new ItemStack(MandM, 12), " R ", "RCR", " R ", 'R', new ItemStack(Item.dyePowder, 1, 3), 'C', new ItemStack(Item.dyePowder, 1, 1));
	GameRegistry.addRecipe(new ItemStack(marshmallow, , " S ", "MSM", " S ", 'S', Item.sugar, 'M', Item.bucketMilk);
	GameRegistry.addRecipe(new ItemStack(grahmCracker, 4), new Object[]{"D", "S", "D", 'D', dough, 'S', Item.sugar});
	GameRegistry.addRecipe(new ItemStack(smore, 4), " G ", "MSC", " G ", 'G', grahmCracker, 'M', marshmallow, 'S', Item.sugar, 'C', chocolate);
	GameRegistry.addSmelting(smore.itemID, new ItemStack(smoreCooked, 1), 3.0F);
	GameRegistry.addRecipe(new ItemStack(cookiePoison, 1), "DDD", "DTD", "DGD", 'D', dough, 'T', Block.tnt, 'G', Item.gunpowder);
	GameRegistry.addShapelessRecipe(new ItemStack(vanillaChips, 1), new ItemStack(Item.dyePowder, 1, 15), new ItemStack(Item.dyePowder, 1, 1));
	GameRegistry.addShapelessRecipe(new ItemStack(oreoChocolate, 1), oreo, new ItemStack(Item.dyePowder, 1, 1));
	GameRegistry.addShapelessRecipe(new ItemStack(cookieVanilla, 4), vanillaChips, dough);
	GameRegistry.addShapelessRecipe(new ItemStack(cookieSugar, 4), Item.sugar, dough);


	LanguageRegistry.addName(appron, "Appron");
	LanguageRegistry.addName(dough, "Cookie Dough");
	LanguageRegistry.addName(jaffa, "Jaffa Cake");
	LanguageRegistry.addName(oreo, "Oreo");
	LanguageRegistry.addName(doughnut, "Ring Doughnut");
	LanguageRegistry.addName(cookieGold, "Golden Cookie");
	LanguageRegistry.addName(peanutSeeds, "Peanuts");
	LanguageRegistry.addName(cookiePeanutButter, "Peanut Butter Cookie");
	LanguageRegistry.addName(cup, "Empty Glass");
	LanguageRegistry.addName(chocolate, "Chocolate");
	LanguageRegistry.addName(cupOChocolate, "Chocolate Milk");
	LanguageRegistry.addName(chocolateHot, "Hot Chocolate");
	LanguageRegistry.addName(MandM, "M&M");
	LanguageRegistry.addName(marshmallow, "Marshmallow");
	LanguageRegistry.addName(grahmCracker, "Grahm Cracker");
	LanguageRegistry.addName(smore, "Uncooked Smore");
	LanguageRegistry.addName(smoreCooked, "Roasted Smore");
	LanguageRegistry.addName(cookiePoison, "Poisoned Cookie");
	LanguageRegistry.addName(vanillaChips, "Vanilla Chips");
	LanguageRegistry.addName(oreoChocolate, "Chocolate Stuffed Oreo");
	LanguageRegistry.addName(cookieVanilla, "Vanilla Cookie");
	LanguageRegistry.addName(cookieSugar, "Sugar Cookie");

	LanguageRegistry.instance().addStringLocalization("itemGroup.tabCookieCraft", "Cookie Craft");

}

static {
	appron = (ItemArmor) new CookieCraftArmour(appronID, EnumArmorMaterial.CLOTH, 0, 1).setUnlocalizedName("appron").setCreativeTab(tabCookieCraft);
	dough = new blankItem(doughID).setUnlocalizedName("dough").setCreativeTab(tabCookieCraft);
	jaffa = (ItemFood) new ItemFood(jaffaID, 2, 0.1F, false).setUnlocalizedName("jaffa").setCreativeTab(tabCookieCraft);
	oreo = (ItemFood) new ItemFood(oreoID, 2, 0.1F, false).setUnlocalizedName("oreo").setCreativeTab(tabCookieCraft);
	doughnut = (ItemFood) new ItemFood(doughnutID, 2, 0.1F, false).setUnlocalizedName("doughnut").setCreativeTab(tabCookieCraft);
	cookieGold = (ItemFood) new ItemFood(cookieGoldID, 2, 0.1F, false).setUnlocalizedName("cookieGold").setCreativeTab(tabCookieCraft);
	peanutSeeds = new blankItem(peanutSeedsID).setUnlocalizedName("peanutSeeds").setCreativeTab(tabCookieCraft);
	cookiePeanutButter = (ItemFood) new ItemFood(cookiePeanutButterID, 2, 0.1F, false).setUnlocalizedName("cookiePeanutButter").setCreativeTab(tabCookieCraft);
	cup = new blankItem(cupID).setUnlocalizedName("cup").setCreativeTab(tabCookieCraft);
	chocolate = new blankItem(chocolateID).setUnlocalizedName("chocolate").setCreativeTab(tabCookieCraft);
	cupOChocolate = new blankItem(cupOChocolateID).setUnlocalizedName("cupOChocolate").setCreativeTab(tabCookieCraft);
	chocolateHot = new blankItem(chocolateHotID).setUnlocalizedName("chocolateHot").setCreativeTab(tabCookieCraft);
	MandM = (ItemFood) new ItemFood(MandMID, 2, 0.1F, false).setUnlocalizedName("MandM").setCreativeTab(tabCookieCraft);
	marshmallow = new blankItem(marshmallowID).setUnlocalizedName("marshmallow").setCreativeTab(tabCookieCraft);
	grahmCracker = new blankItem(grahmCrackerID).setUnlocalizedName("grahmCracker").setCreativeTab(tabCookieCraft);
	smore = new blankItem(smoreID).setUnlocalizedName("smore").setCreativeTab(tabCookieCraft);
	smoreCooked = (ItemFood) new ItemFood(smoreCookedID, 2, 0.1F, false).setUnlocalizedName("smoreCooked").setCreativeTab(tabCookieCraft);
	cookiePoison = (ItemFood) new ItemFood(cookiePoisonID, 2, 0.1F, false).setUnlocalizedName("cookiePoison").setCreativeTab(tabCookieCraft);
	vanillaChips = new blankItem(vanillaChipsID).setUnlocalizedName("vanillaChips").setCreativeTab(tabCookieCraft);
	oreoChocolate = (ItemFood) new ItemFood(oreoChocolateID, 2, 0.1F, false).setUnlocalizedName("oreoChocolate").setCreativeTab(tabCookieCraft);
	cookieVanilla = (ItemFood) new ItemFood(cookieVanillaID, 2, 0.1F, false).setUnlocalizedName("cookieVanilla").setCreativeTab(tabCookieCraft);
	cookieSugar = (ItemFood) new ItemFood(cookieSugarID, 2, 0.1F, false).setUnlocalizedName("cookieSugar").setCreativeTab(tabCookieCraft);


}

}

 

 

Legend of Zelda Mod[updated September 20th to 3.1.1]

Extra Achievements(Minecraft 1.8!)[updated April 3rd to 2.3.0]

Fancy Cheeses[updated May 8th to 0.5.0]

Link to comment
Share on other sites

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.



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • rp.crazyheal.xyz mods  
    • I'm developing a dimension, but it's kinda resource intensive so some times during player teleporting it lags behind making the player phase down into the void, so im trying to implement some kind of pregeneration to force the game loading a small set of chunks in the are the player will teleport to. Some of the things i've tried like using ServerLevel and ServerChunkCache methods like getChunk() dont actually trigger chunk generation if the chunk isn't already on persistent storage (already generated) or placing tickets, but that doesn't work either. Ideally i should be able to check when the task has ended too. I've peeked around some pregen engines, but they're too complex for my current understanding of the system of which I have just a basic understanding (how ServerLevel ,ServerChunkCache  and ChunkMap work) of. Any tips or other classes I should be looking into to understand how to do this correctly?
    • https://mclo.gs/4UC49Ao
    • Way back in the Forge 1.17 days, work started for adding JPMS (Java Platform Module Support) to ModLauncher and ForgeModLoader. This has been used internally by Forge and some libraries for a while now, but mods (those with mods.toml specifically) have not been able to take advantage of it. As of Forge 1.21.1 and 1.21.3, this is now possible!   What is JPMS and what does it mean for modders? JPMS is the Java Platform Module System, introduced in Java 9. It allows you to define modules, which are collections of packages and resources that can be exported or hidden from other modules. This allows for much more fine-tuned control over visibility, cleaner syntax for service declarations and support for sealed types across packages. For example, you might have a mod with a module called `com.example.mod` that exports `com.example.mod.api` and `com.example.mod.impl` to other mods, but hides `com.example.mod.internal` from them. This would allow you to have a clean API for other mods to use, while keeping your internal implementation details hidden from IDE hints, helping prevent accidental usage of internals that might break without prior notice. This is particularly useful if you'd like to use public records with module-private constructors or partially module-private record components, as you can create a sealed interface that only your record implements, having the interface be exported and the record hidden. It's also nice for declaring and using services, as you'll get compile-time errors from the Java compiler for typos and the like, rather than deferring to runtime errors. In more advanced cases, you can also have public methods that are only accessible to specific other modules -- handy if you want internal interactions between multiple of your own mods.   How do I bypass it? We understand there may be drama in implementing a system that prevents mods from accessing each other's internals when necessary (like when a mod is abandoned or you need to fix a compat issue) -- after all, we are already modding a game that doesn't have explicit support for Java mods yet. We have already thought of this and are offering APIs from day one to selectively bypass module restrictions. Let me be clear: Forge mods are not required to use JPMS. If you don't want to use it, you don't have to. The default behaviour is to have fully open, fully exported automatic modules. In Java, you can use the `Add-Opens` and `Add-Exports` manifest attributes to selectively bypass module restrictions of other mods at launch time, and we've added explicit support for these when loading your Forge mods. At compile-time, you can use existing solutions such as the extra-java-module-info Gradle plugin to deal with non-modular dependencies and add extra opens and exports to other modules. Here's an example on how to make the internal package `com.example.examplemod.internal` open to your mod in your build.gradle: tasks.named('jar', Jar) { manifest { attributes([ 'Add-Opens' : 'com.example.examplemod/com.example.examplemod.internal' 'Specification-Title' : mod_id, 'Specification-Vendor' : mod_authors // (...) ]) } } With the above in your mod's jar manifest, you can now reflectively access the classes inside that internal package. Multiple entries are separated with a space, as per Java's official spec. You can also use Add-Exports to directly call without reflection, however you'd need to use the Gradle plugin mentioned earlier to be able to compile. The syntax for Add-Exports is the same as Add-Opens, and instructions for the compile-time step with the Gradle plugin are detailed later in this post. Remember to prefer the opens and exports keywords inside module-info.java for sources you control. The Add-Opens/Add-Exports attributes are only intended for forcing open other mods.   What else is new with module support? Previously, the runtime module name was always forced to the first mod ID in your `mods.toml` file and all packages were forced fully open and exported. Module names are now distinguished from mod IDs, meaning the module name in your module-info.java can be different from the mod ID in your `mods.toml`. This allows you to have a more descriptive module name that doesn't have to be the same as your mod ID, however we strongly recommend including your mod ID as part of your module name to aid troubleshooting. The `Automatic-Module-Name` manifest attribute is now also honoured, allowing you to specify a module name for your mod without needing to create a `module-info.java` file. This is particularly useful for mods that don't care about JPMS features but want to have a more descriptive module name and easier integration with other mods that do use JPMS.   How do I use it? The first step is to create a `module-info.java` file in your mod's source directory. This file should be in the same package as your main mod class, and should look something like this: open module com.example.examplemod { requires net.minecraftforge.eventbus; requires net.minecraftforge.fmlcore; requires net.minecraftforge.forge; requires net.minecraftforge.javafmlmod; requires net.minecraftforge.mergetool.api; requires org.slf4j; requires logging; } For now, we're leaving the whole module open to reflection, which is a good starting point. When we know we want to close something off, we can remove the open modifier from the module and open or export individual packages instead. Remember that you need to be open to Forge (module name net.minecraftforge.forge), otherwise it can't call your mod's constructor. Next is fixing modules in Gradle. While Forge and Java support modules properly, Gradle does not put automatic modules on the module path by default, meaning that the logging module (from com.mojang:logging) is not found. To fix this, add the Gradle plugin and add a compile-time module definition for that Mojang library: plugins { // (...) id 'org.gradlex.extra-java-module-info' version "1.9" } // (...) extraJavaModuleInfo { failOnMissingModuleInfo = false automaticModule("com.mojang:logging", "logging") } The automatic module override specified in your build.gradle should match the runtime one to avoid errors. You can do the same for any library or mod dependency that is missing either a module-info or explicit Automatic-Module-Name, however be aware that you may need to update your mod once said library adds one. That's all you need to get started with module support in your mods. You can learn more about modules and how to use them at dev.java.
    • Faire la mise à jour grâce à ce lien m'a aider personnellement, merci à @Paint_Ninja. https://www.amd.com/en/support 
  • Topics

×
×
  • Create New...

Important Information

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