@Mod(modid="PorkkanaMod", name="Porkkana Mod", version="0.4b")
@NetworkMod(clientSideRequired=true)
public class PorkkanaBase {
public static Item gemSapphire;
public static Item gemRuby;
public static Item gemTopaz;
public static Item gemAmethyst;
public static Item pickaxeRuby;
public static Item pickaxeTopaz;
public static Item pickaxeSapphire;
public static Item pickaxeAmethyst;
public static Item pickaxeEmerald;
public static Block blockRuby;
public static Block blockTopaz;
public static Block blockSapphire;
public static Block blockAmethyst;
public static Block oreRuby;
public static Block oreTopaz;
public static Block oreSapphire;
public static Block oreAmethyst;
@Instance(value="PorkkanaMod")
public static PorkkanaBase instance;
@SidedProxy(clientSide="porkkanas.porkkanamod.client.ClientProxy", serverSide="porkkanas.porkkanamod.CommonProxy")
public static CommonProxy proxy;
private Object porkkanamod;
@EventHandler
public void PreInit(FMLPreInitializationEvent event)
{
gemSapphire = new PorkkanaMaterials(4746).setMaxStackSize(64).setUnlocalizedName("gemSapphire").setTextureName("porkkanamod:gemsapphire");
gemRuby = new PorkkanaMaterials(4744).setMaxStackSize(64).setUnlocalizedName("gemRuby").setTextureName("porkkanamod:gemruby");
gemTopaz = new PorkkanaMaterials(4745).setMaxStackSize(64).setUnlocalizedName("gemTopaz").setTextureName("porkkanamod:gemtopaz");
gemAmethyst = new PorkkanaMaterials(4747).setMaxStackSize(64).setUnlocalizedName("gemAmethyst").setTextureName("porkkanamod:gemamethyst");
pickaxeRuby = new RubyPickaxe(4748, GemTool).setUnlocalizedName("pickaxeRuby");
pickaxeTopaz = new TopazPickaxe(4749, GemTool).setUnlocalizedName("pickaxeTopaz");
pickaxeSapphire = new SapphirePickaxe(4750, GemTool).setUnlocalizedName("pickaxeSapphire");
pickaxeAmethyst = new AmethystPickaxe(4751, GemTool).setUnlocalizedName("pickaxeAmethyst");
pickaxeEmerald = new EmeraldPickaxe(4752, GemTool).setUnlocalizedName("pickaxeEmerald");
blockRuby = new PorkkanaBlock(422, Material.rock).setHardness(5.0F).setStepSound(Block.soundStoneFootstep).setUnlocalizedName("blockRuby").setTextureName("porkkanamod:blockruby").setCreativeTab(CreativeTabs.tabBlock);
blockTopaz = new PorkkanaBlock(423, Material.rock).setHardness(5.0F).setStepSound(Block.soundStoneFootstep).setUnlocalizedName("blockTopaz").setTextureName("porkkanamod:blocktopaz").setCreativeTab(CreativeTabs.tabBlock);
blockSapphire = new PorkkanaBlock(424, Material.rock).setHardness(5.0F).setStepSound(Block.soundStoneFootstep).setUnlocalizedName("blockSapphire").setTextureName("porkkanamod:blocksapphire").setCreativeTab(CreativeTabs.tabBlock);
blockAmethyst = new PorkkanaBlock(425, Material.rock).setHardness(5.0F).setStepSound(Block.soundStoneFootstep).setUnlocalizedName("blockAmethyst").setTextureName("porkkanamod:blockamethyst").setCreativeTab(CreativeTabs.tabBlock);
oreRuby = new oreRuby(426, Material.rock).setHardness(3.0F).setStepSound(Block.soundStoneFootstep).setUnlocalizedName("oreRuby").setTextureName("porkkanamod:oreruby").setCreativeTab(CreativeTabs.tabBlock);
oreTopaz = new oreTopaz(427, Material.rock).setHardness(3.0F).setStepSound(Block.soundStoneFootstep).setUnlocalizedName("oreTopaz").setTextureName("porkkanamod:oretopaz").setCreativeTab(CreativeTabs.tabBlock);
oreSapphire = new oreSapphire(428, Material.rock).setHardness(3.0F).setStepSound(Block.soundStoneFootstep).setUnlocalizedName("oreSapphire").setTextureName("porkkanamod:oresapphire").setCreativeTab(CreativeTabs.tabBlock);
oreAmethyst = new oreAmethyst(429, Material.rock).setHardness(3.0F).setStepSound(Block.soundStoneFootstep).setUnlocalizedName("oreAmethyst").setTextureName("porkkanamod:oreamethyst").setCreativeTab(CreativeTabs.tabBlock);
Hey syn if I want to add worldgen to new ores I've made do i add the...
(new WorldGenMinable(Modtest.Tinore.blockID, 4)).generate(world, random, Xcoord, Ycoord, Zcoord);
under the worldgen.class or what do i add where do i add it what?
texture name: pickaxeruby unlocalized name: pickaxeRuby and i changed the codes start to pickaxeRuby = new pickaxeRuby and the RubyPickaxe.java is renamed to pickaxeRuby and still not working. and do you mean that i need to change texturename to pickaxeRuby or unlocalized name to pickaxeruby ?
Hey syn if I want to add worldgen to new ores I've made do i add the...
(new WorldGenMinable(Modtest.Tinore.blockID, 4)).generate(world, random, Xcoord, Ycoord, Zcoord);
under the worldgen.class or what do i add where do i add it what?
you want to put this under it, like this lets say I want amethyst ore to spawn and amethyst blocks as well
package Syn.Tutorial;
import java.util.Random;
import net.minecraft.world.World;
import net.minecraft.world.chunk.IChunkProvider;
import net.minecraft.world.gen.feature.WorldGenMinable;
import cpw.mods.fml.common.IWorldGenerator;
import cpw.mods.fml.common.IWorldGenerator;
public class WorldGeneratorSyn implements IWorldGenerator {
@Override
public void generate(Random random, int chunkX, int chunkZ, World world,
IChunkProvider chunkGenerator, IChunkProvider chunkProvider) {
// TODO Auto-generated method stub
switch(world.provider.dimensionId){
//case -1: generateNether(world, random,chunkX*16,chunkZ*16);
case -1 : generateSurface(world, random,chunkX*16,chunkZ*16);
}
}
private void generateSurface(World world, Random random, int BlockX, int BlockZ) {
for(int i =0; i<10;i++){
int Xcoord = BlockX + random.nextInt(16);
int Zcoord = BlockZ + random.nextInt(16);
int Ycoord = random.nextInt(16);
(new WorldGenMinable(ModTutorial.AmethystOre.blockID, 52)).generate(world, random, Xcoord, Ycoord, Zcoord);
}
for(int i =0; i<10;i++){
int Xcoord = BlockX + random.nextInt(16);
int Zcoord = BlockZ + random.nextInt(16);
int Ycoord = random.nextInt(16);
(new WorldGenMinable(ModTutorial.amethystblock.blockID, 52)).generate(world, random, Xcoord, Ycoord, Zcoord);
}}}
the mod folder is called PorkkanaMod and it's in PorkkanaMod\forge\mcp\src\minecraft\assets\porkkanamod\textures\items. and i can say that the tools doesn't have texture but the gems have
hi so i've been wanting to send my mod to my friend and so i folowed your video to do it but it didn't work this is what i get wen i run reobfuscate_srg
:
== MCP 8.09 (data: 8.11, client: 1.6.4, server: 1.6.4) ==
"scalac" is not found on the PATH. Scala files will not be recompiled
# found ff, ff patches, srgs, name csvs, doc csvs, param csvs, astyle, astyle co
nfig, rg, ss
> Creating Retroguard maping files
> Creating Retroguard config files
== Reobfuscating client ==
> Cleaning reobf
> Generating md5s
> Packing jar
> Reobfuscating jar
> Extracting modified classes
- Done in 11.96 seconds
!! Can not find server md5s !!
Press any key to continue . . .
First run recompile via mcp, then run reobfuscate, if you need more specific help contact me via skype at Superdude0696
actually no. do you know where i can get the mcp folder with the forge folder and stuff inside of it already? i have all the programs installed. that folder is probably the problem.
Could you make a tutorial on how to make an item spawn lightning? I mean the lightning during a thunderstorm, no typo. I found some piece of code, but I would still need someone to explain it.
So I tried running my client to look at the item in episode one. The first run, but I keep getting this error: Error: Could not find or load main class net.minecraft.launchwrapper.Launch
This is what I have
package CoreCraft; //Package directory
/*
* Basic importing
*/
import net.minecraft.block.Block;
import net.minecraft.item.EnumToolMaterial;
import net.minecraft.item.Item;
import net.minecraft.item.ItemFood;
import net.minecraft.item.ItemStack;
import net.minecraftforge.common.EnumHelper;
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;
/*
* Basic needed forge stuff
*/
@Mod(modid="CoreCraft",name="CoreCraft",version="v1")
@NetworkMod(clientSideRequired=true,serverSideRequired=false)
public class CoreCraft {
/*
* ToolMaterial
*/
//Telling forge that we are creating these
//items
public static Item fusion;
//tools
//Declaring Init
@Init
public void load(FMLInitializationEvent event){
// define items
fusion = new Synitems(2000).setUnlocalizedName("amethyst");
// define blocks
public CoreItems(int par1) {
super(par1); //Returns super constructor: par1 is ID
setCreativeTab(CreativeTabs.tabMaterials); }//Tells the game what creative mode tab it goes in
public void registerIcons(IconRegister reg) { // Make sure to import IconRegister!
if (itemID == CoreCraft.fusion.itemID) {
this.itemIcon = reg.registerIcon("fusion"); // You can also replace blockID and blockIcon with itemID and itemIcon
}
}
}
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
what are your textures named? because the setUnlocalizedName has to be the same as the texture and the textures are Lower Upper case specific try that
http://i.imgur.com/jymbw8u.png?1?1454
Just one more block...
(new WorldGenMinable(Modtest.Tinore.blockID, 4)).generate(world, random, Xcoord, Ycoord, Zcoord);
under the worldgen.class or what do i add where do i add it what?
well where do you have it linked to?
try changing your unlocalizedname to pickaxeruby
you want to put this under it, like this lets say I want amethyst ore to spawn and amethyst blocks as well
package Syn.Tutorial; import java.util.Random; import net.minecraft.world.World; import net.minecraft.world.chunk.IChunkProvider; import net.minecraft.world.gen.feature.WorldGenMinable; import cpw.mods.fml.common.IWorldGenerator; import cpw.mods.fml.common.IWorldGenerator; public class WorldGeneratorSyn implements IWorldGenerator { @Override public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) { // TODO Auto-generated method stub switch(world.provider.dimensionId){ //case -1: generateNether(world, random,chunkX*16,chunkZ*16); case -1 : generateSurface(world, random,chunkX*16,chunkZ*16); } } private void generateSurface(World world, Random random, int BlockX, int BlockZ) { for(int i =0; i<10;i++){ int Xcoord = BlockX + random.nextInt(16); int Zcoord = BlockZ + random.nextInt(16); int Ycoord = random.nextInt(16); (new WorldGenMinable(ModTutorial.AmethystOre.blockID, 52)).generate(world, random, Xcoord, Ycoord, Zcoord); } for(int i =0; i<10;i++){ int Xcoord = BlockX + random.nextInt(16); int Zcoord = BlockZ + random.nextInt(16); int Ycoord = random.nextInt(16); (new WorldGenMinable(ModTutorial.amethystblock.blockID, 52)).generate(world, random, Xcoord, Ycoord, Zcoord); }}}like that
:/ well where did you put the texture?
where did you put the gem textures?
C:\Users\Nathan5541\Desktop\mcp811\forge\mcp\eclipse
Just one more block...
-
View User Profile
-
View Posts
-
Send Message
Curse Premium-
View User Profile
-
View Posts
-
Send Message
Curse PremiumFirst run recompile via mcp, then run reobfuscate, if you need more specific help contact me via skype at Superdude0696
May be able to do a video on it, I promised mobs though, and that is a really long process
have you figured out whats going on yet?
Just one more block...
Hmm
actually no. do you know where i can get the mcp folder with the forge folder and stuff inside of it already? i have all the programs installed. that folder is probably the problem.
Just one more block...
VeryZak
Mine says:
can not find client bins, try recompiling!!!
can not find server
When I try to finish to publish my mod
Umm it's like some kind of dye I can't check right now though sorry, I'm not at home I'm away for the holidays
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumHere:
so its Item.dyePowder,1 ,4
If I helped you, please click the green like button!
Check out my modding tutorials here, or in my website here!
Also, check out my mod, Spindle!
well what do you mean? do you mean like when you right click the block it will strike lightning there?
This is what I have
package CoreCraft; //Package directory
/*
* Basic importing
*/
import net.minecraft.block.Block;
import net.minecraft.item.EnumToolMaterial;
import net.minecraft.item.Item;
import net.minecraft.item.ItemFood;
import net.minecraft.item.ItemStack;
import net.minecraftforge.common.EnumHelper;
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;
/*
* Basic needed forge stuff
*/
@Mod(modid="CoreCraft",name="CoreCraft",version="v1")
@NetworkMod(clientSideRequired=true,serverSideRequired=false)
public class CoreCraft {
/*
* ToolMaterial
*/
//Telling forge that we are creating these
//items
public static Item fusion;
//tools
//Declaring Init
@Init
public void load(FMLInitializationEvent event){
// define items
fusion = new Synitems(2000).setUnlocalizedName("amethyst");
// define blocks
//adding names
//items
LanguageRegistry.addName(fusion, "Amethyst");
//blocks
//crafting
}
}
----------------------------------------------------------------------------------------
package CoreCraft;
import net.minecraft.item.Item;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.relauncher.*;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.creativetab.CreativeTabs;
public class CoreItems extends Item {
public CoreItems(int par1) {
super(par1); //Returns super constructor: par1 is ID
setCreativeTab(CreativeTabs.tabMaterials); }//Tells the game what creative mode tab it goes in
public void registerIcons(IconRegister reg) { // Make sure to import IconRegister!
if (itemID == CoreCraft.fusion.itemID) {
this.itemIcon = reg.registerIcon("fusion"); // You can also replace blockID and blockIcon with itemID and itemIcon
}
}
}