Jump to content

Parad0x

Members
  • Posts

    7
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

Parad0x's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Aha, that did the trick. The files are all there and the code runs, crafting works etc. I must have accidentally added that from some old tutorial. Thanks a lot!
  2. This makes a jar only with a META-INF folder, with a MANIFEST.MF containing "Manifest-Version: 1.0"
  3. After messing around a bit, adding some things, and trying to build it again, it now appears, that CommonProxy.class does not exist in the jar. Furthermore, assets\generic\textures only contains "entity" but should contain entity and "items"
  4. Eclipse run loads the mod and shows the prints gradlew runClient does say that it loads the mod, it appears in the menu > mods etc., but doesn't show the prints
  5. The files are located in src\main\java\tutorial\generic I'm using 1.7 because I already have a server running that, that has some other mods, and I'd like it to be compatible without updating it (aka starting over).
  6. Hey! I'm new to forge modding, and this is probably just me being an idiot, but whenever I build my mod (either gradlew build or gradlew runClient), my recipes do not register. It works in eclipse run, not gradlew build. I messed around with a bunch of things, but I still couldn't get it to work. Anyways, it looks something along the lines of this now: Generic.java package tutorial.generic; //Imports snipped @Mod(modid=Generic.MODID, name=Generic.MODNAME, version=Generic.MODVER) //Tell forge "Oh hey, there's a new mod here to load." public class Generic //Start the class Declaration { //Set the ID of the mod (Should be lower case). public static final String MODID = "generic"; //Set the "Name" of the mod. public static final String MODNAME = "somename"; //Set the version of the mod. public static final String MODVER = "0.0.1"; @Instance(value = Generic.MODID) //Tell Forge what instance to use. public static Generic instance; @SidedProxy(clientSide = "tutorial.generic.ClientProxy", serverSide = "tutorial.generic.ServerProxy") public static CommonProxy proxy; static GenEventHandler events = new GenEventHandler(); @EventHandler public void preInit(FMLPreInitializationEvent event) { proxy.preInit(event); FMLCommonHandler.instance().bus().register(events); MinecraftForge.EVENT_BUS.register(events); GenericEntity.mainRegistry(); GameRegistry.addShapelessRecipe(new ItemStack(GenericItem.genericItem), new Object[] {Blocks.dirt}); GameRegistry.addRecipe(new ItemStack(GenericItem.genericItem)," B"," A ","A ",'A',Items.stick, 'B', Items.redstone); } @EventHandler public void init(FMLInitializationEvent event) { proxy.init(event); } @EventHandler public void load(FMLInitializationEvent event) { } @EventHandler public void postInit(FMLPostInitializationEvent event) { proxy.postInit(event); } } GenericItem.java package tutorial.generic; //Imports snipped public class GenericItem extends Item { public static Item genericItem; @SideOnly(Side.CLIENT) public EnumRarity getRarity(ItemStack par1ItemStack) { return EnumRarity.epic; } public GenericItem(){ setMaxStackSize(1); setCreativeTab(CreativeTabs.tabCombat); setUnlocalizedName("genericItem"); setTextureName(Generic.MODID + ":genericTexture"); setMaxDamage(400); setFull3D(); } @EventHandler public static final void init() { genericItem = new GenericItem() .setMaxStackSize(1) .setCreativeTab(CreativeTabs.tabCombat) .setUnlocalizedName("genericItem") .setTextureName(Generic.MODID + ":genericTexture") .setMaxDamage(400) .setFull3D(); GameRegistry.registerItem(genericItem, "genericItem"); } CommonProxy.java package tutorial.generic; //Imports snipped public class CommonProxy { public void preInit(FMLPreInitializationEvent e) { GenericItem.init(); } public void init(FMLInitializationEvent e) { } public void postInit(FMLPostInitializationEvent e) { } } build.gradle buildscript { repositories { mavenCentral() maven { name = "forge" url = "http://files.minecraftforge.net/maven" } maven { name = "sonatype" url = "https://oss.sonatype.org/content/repositories/snapshots/" } } dependencies { classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT' } } apply plugin: 'forge' version = "1.0" group= "tutorial.generic.modid" // http://maven.apache.org/guides/mini/guide-naming-conventions.html archivesBaseName = "modid" sourceSets { main { java { srcDirs = ["$projectDir/src/java"] } resources { srcDirs = ["$projectDir/src/resources"] } } } minecraft { version = "1.7.10-10.13.4.1558-1.7.10" runDir = "eclipse" } dependencies { // you may put jars on which you depend on in ./libs // or you may define them like so.. //compile "some.group:artifact:version:classifier" //compile "some.group:artifact:version" // real examples //compile 'com.mod-buildcraft:buildcraft:6.0.8:dev' // adds buildcraft to the dev env //compile 'com.googlecode.efficient-java-matrix-library:ejml:0.24' // adds ejml to the dev env // for more info... // http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html // http://www.gradle.org/docs/current/userguide/dependency_management.html } processResources { // this will ensure that this task is redone when the versions change. inputs.property "version", project.version inputs.property "mcversion", project.minecraft.version // replace stuff in mcmod.info, nothing else from(sourceSets.main.resources.srcDirs) { include 'mcmod.info' // replace version and mcversion expand 'version':project.version, 'mcversion':project.minecraft.version } // copy everything else, thats not the mcmod.info from(sourceSets.main.resources.srcDirs) { exclude 'mcmod.info' } }
×
×
  • Create New...

Important Information

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