java.lang.Error: Unresolved compilation problem:
Illegal modifier for the variable Pokeball; only final is permitted
at net.minecraft.src.mod_Pokemon.<init>(mod_Pokemon.java:28)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at net.minecraft.src.ModLoader.addMod(ModLoader.java:287)
at net.minecraft.src.ModLoader.readFromClassPath(ModLoader.java:1279)
at net.minecraft.src.ModLoader.init(ModLoader.java:849)
at net.minecraft.src.ModLoader.addAllRenderers(ModLoader.java:157)
at net.minecraft.src.RenderManager.<init>(RenderManager.java:104)
at net.minecraft.src.RenderManager.<clinit>(RenderManager.java:12)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:424)
at net.minecraft.client.Minecraft.run(Minecraft.java:786)
at java.lang.Thread.run(Unknown Source)
--- END ERROR REPORT d2142b8d ----------
Class:
package net.minecraft.src;
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) braces deadcode
import java.util.*;
public class mod_Pokemon extends BaseMod
{
{
//oran berry
public static final Item OranBerry = new ItemFood(5002, 4, 1F, false).setItemName("anynamehere");
OranBerry.iconIndex = ModLoader.addOverride("/gui/items.png", "/gui/items/oranBerry.png");
ModLoader.addName(OranBerry, "oranBerry ");
//pokedex
public static final Item Pokedex = new Itempokedex(5001).setItemName("Pokedex");
Pokedex.iconIndex = ModLoader.addOverride("/gui/items.png", "/gui/items/pokedex.png");
ModLoader.addName(Pokedex, "pokedex");
ModLoader.addRecipe(new ItemStack(Pokedex, 1), new Object [] {"#", Character.valueOf('#'), Block.dirt});
//pokeball
public static final Item Pokeball = new ItemPokeball(5000).setItemName("pokeball");
Pokeball.iconIndex = ModLoader.addOverride("/gui/items.png", "/gui/items/pokeball.png");
ModLoader.addName(Pokeball, "pokeball");
ModLoader.addRecipe(new ItemStack(Pokeball, 1), new Object [] {"#", Character.valueOf('#'), Block.dirt});
//mobs
ModLoader.registerEntityID(EntityAron.class, "Aron", ModLoader.getUniqueEntityId()); // without this code , your mob wont spawn !
ModLoader.addSpawn(EntityAron.class, 10, 10, 10, EnumCreatureType.monster, new BiomeGenBase[]
{
BiomeGenBase.extremeHillsEdge,
BiomeGenBase.taigaHills,
});
ModLoader.registerEntityID(EntityLairon.class, "Lairon", ModLoader.getUniqueEntityId()); // without this code , your mob wont spawn !
ModLoader.addSpawn(EntityAron.class, 10, 10, 10, EnumCreatureType.monster, new BiomeGenBase[]
{
BiomeGenBase.extremeHillsEdge,
BiomeGenBase.taigaHills,
});
ModLoader.registerEntityID(EntityAggron.class, "Aggron", ModLoader.getUniqueEntityId()); // without this code , your mob wont spawn !
ModLoader.addSpawn(EntityAron.class, 10, 10, 10, EnumCreatureType.monster, new BiomeGenBase[]
{
BiomeGenBase.extremeHillsEdge,
BiomeGenBase.taigaHills,
});
ModLoader.registerEntityID(EntityWailmer.class, "wailmer", ModLoader.getUniqueEntityId()); // without this code , your mob wont spawn !
ModLoader.addSpawn(EntityWailmer.class, 10, 10, 10, EnumCreatureType.waterCreature, new BiomeGenBase[]
{
BiomeGenBase.ocean,
});
ModLoader.registerEntityID(EntityWailord.class, "wailord", ModLoader.getUniqueEntityId()); // without this code , your mob wont spawn !
ModLoader.addSpawn(EntityWailord.class, 10, 10, 10, EnumCreatureType.waterCreature, new BiomeGenBase[]
{
BiomeGenBase.ocean,
});
ModLoader.registerEntityID(EntityTailow.class, "taillow", ModLoader.getUniqueEntityId()); // without this code , your mob wont spawn !
ModLoader.addSpawn(EntityTailow.class, 10, 10, 10, EnumCreatureType.creature, new BiomeGenBase[]
{
BiomeGenBase.river,
BiomeGenBase.sky,
BiomeGenBase.extremeHills,
BiomeGenBase.plains,
BiomeGenBase.forestHills,
BiomeGenBase.jungleHills,
});
ModLoader.registerEntityID(EntitySwellow.class, "swellow", ModLoader.getUniqueEntityId()); // without this code , your mob wont spawn !
ModLoader.addSpawn(EntitySwellow.class, 10, 10, 10, EnumCreatureType.creature, new BiomeGenBase[]
{
BiomeGenBase.river,
BiomeGenBase.sky,
BiomeGenBase.extremeHills,
BiomeGenBase.plains,
BiomeGenBase.forestHills,
BiomeGenBase.jungleHills,
});
ModLoader.registerEntityID(EntitySlugma.class, "Slugma", ModLoader.getUniqueEntityId()); // without this code , your mob wont spawn !
ModLoader.addSpawn(EntitySlugma.class, 10, 10, 10, EnumCreatureType.creature, new BiomeGenBase[]
{
BiomeGenBase.hell,
});
ModLoader.registerEntityID(EntityMagcargo.class, "magcargo", ModLoader.getUniqueEntityId()); // without this code , your mob wont spawn !
ModLoader.addSpawn(EntityMagcargo.class, 10, 10, 10, EnumCreatureType.creature, new BiomeGenBase[]
{
BiomeGenBase.hell,
});
ModLoader.registerEntityID(EntityOnix.class, "onix", ModLoader.getUniqueEntityId()); // without this code , your mob wont spawn !
ModLoader.addSpawn(EntityOnix.class, 5, 5, 5, EnumCreatureType.creature, new BiomeGenBase[]
{
BiomeGenBase.extremeHills,
BiomeGenBase.plains,
BiomeGenBase.desert,
BiomeGenBase.forest,
BiomeGenBase.taiga,
BiomeGenBase.swampland,
});
ModLoader.registerEntityID(EntitySteelix.class, "steelix", ModLoader.getUniqueEntityId()); // without this code , your mob wont spawn !
ModLoader.addSpawn(EntitySteelix.class, 5, 5, 5, EnumCreatureType.creature, new BiomeGenBase[]
{
BiomeGenBase.extremeHills,
BiomeGenBase.plains,
BiomeGenBase.desert,
BiomeGenBase.forest,
BiomeGenBase.taiga,
BiomeGenBase.swampland,
});
ModLoader.registerEntityID(EntityWingul.class, "Wingul", ModLoader.getUniqueEntityId()); // without this code , your mob wont spawn !
ModLoader.addSpawn(EntityWingul.class, 10, 10, 10, EnumCreatureType.creature, new BiomeGenBase[]
{
BiomeGenBase.ocean,
BiomeGenBase.beach,
BiomeGenBase.river,
});
ModLoader.registerEntityID(EntityPelliper.class, "Pelliper", ModLoader.getUniqueEntityId()); // without this code , your mob wont spawn !
ModLoader.addSpawn(EntityPelliper.class, 10, 10, 10, EnumCreatureType.creature, new BiomeGenBase[]
{
BiomeGenBase.ocean,
BiomeGenBase.beach,
BiomeGenBase.river,
});
ModLoader.registerEntityID(EntityLotad.class, "Lotad", ModLoader.getUniqueEntityId()); // without this code , your mob wont spawn !
ModLoader.addSpawn(EntityLotad.class, 10, 10, 10, EnumCreatureType.creature, new BiomeGenBase[]
{
BiomeGenBase.swampland,
});
ModLoader.registerEntityID(EntityLudicolo.class, "Ludicolo", ModLoader.getUniqueEntityId()); // without this code , your mob wont spawn !
ModLoader.addSpawn(EntityLudicolo.class, 10, 10, 10, EnumCreatureType.creature, new BiomeGenBase[]
{
BiomeGenBase.swampland,
});
ModLoader.registerEntityID(EntityLombre.class, "Lombre", ModLoader.getUniqueEntityId()); // without this code , your mob wont spawn !
ModLoader.addSpawn(EntityLombre.class, 10, 10, 10, EnumCreatureType.creature, new BiomeGenBase[]
{
BiomeGenBase.swampland,
});
ModLoader.registerEntityID(EntitySeedot.class, "Seedot", ModLoader.getUniqueEntityId()); // without this code , your mob wont spawn !
ModLoader.addSpawn(EntitySeedot.class, 10, 10, 10, EnumCreatureType.creature, new BiomeGenBase[]
{
BiomeGenBase.jungle,
BiomeGenBase.forest,
});
ModLoader.registerEntityID(EntityNuzleaf.class, "Nuzleaf", ModLoader.getUniqueEntityId()); // without this code , your mob wont spawn !
ModLoader.addSpawn(EntityNuzleaf.class, 10, 10, 10, EnumCreatureType.creature, new BiomeGenBase[]
{
BiomeGenBase.jungle,
BiomeGenBase.forest,
});
ModLoader.registerEntityID(EntityShiftry.class, "Shiftry", ModLoader.getUniqueEntityId()); // without this code , your mob wont spawn !
ModLoader.addSpawn(EntityShiftry.class, 10, 10, 10, EnumCreatureType.creature, new BiomeGenBase[]
{
BiomeGenBase.jungle,
BiomeGenBase.forest,
});
}
// RENDERERS
public void AddRenderer(Map map)
{
map.put(EntityAron.class, new RenderAron(new ModelAron(), 0.5F)); // this one just assign the mob to your game and make it readable, just like RenderManager , the 0.5f is the shadow size of the mob you can make it bigger like 0.8f or smaller like 0.2f
map.put(EntityLairon.class, new RenderLairon(new ModelLarion(), 0.5F)); // this one just assign the mob to your game and make it readable, just like RenderManager , the 0.5f is the shadow size of the mob you can make it bigger like 0.8f or smaller like 0.2f
map.put(EntityAggron.class, new RenderAggron(new ModelAggron(), 0.7F)); // this one just assign the mob to your game and make it readable, just like RenderManager , the 0.5f is the shadow size of the mob you can make it bigger like 0.8f or smaller like 0.2f
map.put(EntityWailmer.class, new RenderWailmer(new ModelWailmer(), 0.5F)); // this one just assign the mob to your game and make it readable, just like RenderManager , the 0.5f is the shadow size of the mob you can make it bigger like 0.8f or smaller like 0.2f
map.put(EntityWailord.class, new RenderWaillord(new ModelWailord(), 0.5F)); // this one just assign the mob to your game and make it readable, just like RenderManager , the 0.5f is the shadow size of the mob you can make it bigger like 0.8f or smaller like 0.2f
map.put(EntityTailow.class, new RenderTailow(new ModelTaillow(), 0.5F)); // this one just assign the mob to your game and make it readable, just like RenderManager , the 0.5f is the shadow size of the mob you can make it bigger like 0.8f or smaller like 0.2f
map.put(EntitySwellow.class, new RenderSwellow(new ModelSwellow(), 0.5F)); // this one just assign the mob to your game and make it readable, just like RenderManager , the 0.5f is the shadow size of the mob you can make it bigger like 0.8f or smaller like 0.2f
map.put(EntitySlugma.class, new RenderSlugma(new ModelSlugma(), 0.2F)); // this one just assign the mob to your game and make it readable, just like RenderManager , the 0.5f is the shadow size of the mob you can make it bigger like 0.8f or smaller like 0.2f
map.put(EntityMagcargo.class, new RenderMagcargo(new ModelMagcargo(), 0.2F)); // this one just assign the mob to your game and make it readable, just like RenderManager , the 0.5f is the shadow size of the mob you can make it bigger like 0.8f or smaller like 0.2f
map.put(EntityOnix.class, new RenderOnix(new Modelonix(), 0.7F)); // this one just assign the mob to your game and make it readable, just like RenderManager , the 0.5f is the shadow size of the mob you can make it bigger like 0.8f or smaller like 0.2f
map.put(EntitySteelix.class, new RenderSteelix(new ModelSteelix(), 0.7F)); // this one just assign the mob to your game and make it readable, just like RenderManager , the 0.5f is the shadow size of the mob you can make it bigger like 0.8f or smaller like 0.2f
map.put(EntityWingul.class, new RenderWingul(new ModelWingul(), 0.5F)); // this one just assign the mob to your game and make it readable, just like RenderManager , the 0.5f is the shadow size of the mob you can make it bigger like 0.8f or smaller like 0.2f
map.put(EntityPelliper.class, new RenderPelliper(new ModelPelliper(), 0.5F)); // this one just assign the mob to your game and make it readable, just like RenderManager , the 0.5f is the shadow size of the mob you can make it bigger like 0.8f or smaller like 0.2f
map.put(EntityLotad.class, new RenderLotad(new ModelLotad(), 0.5F)); // this one just assign the mob to your game and make it readable, just like RenderManager , the 0.5f is the shadow size of the mob you can make it bigger like 0.8f or smaller like 0.2f
map.put(EntityLudicolo.class, new RenderLudicolo(new ModelLudicolo(), 0.5F)); // this one just assign the mob to your game and make it readable, just like RenderManager , the 0.5f is the shadow size of the mob you can make it bigger like 0.8f or smaller like 0.2f
map.put(EntitySeedot.class, new RenderSeedot(new ModelSeedot(), 0.5F)); // this one just assign the mob to your game and make it readable, just like RenderManager , the 0.5f is the shadow size of the mob you can make it bigger like 0.8f or smaller like 0.2f
map.put(EntityNuzleaf.class, new RenderNuzleaf(new ModelNuzleaf(), 0.5F)); // this one just assign the mob to your game and make it readable, just like RenderManager , the 0.5f is the shadow size of the mob you can make it bigger like 0.8f or smaller like 0.2f
map.put(EntityShiftry.class, new RenderShiftry(new ModelShiftry(), 0.5F)); // this one just assign the mob to your game and make it readable, just like RenderManager , the 0.5f is the shadow size of the mob you can make it bigger like 0.8f or smaller like 0.2f
}
public String Version()
{
return "|Legnaks pokemon mod"; // Put here anything you like after that it will show up in the modloader logs.
}
@Override
public String getVersion() {
// TODO Auto-generated method stub
return "1.2.5";
}
@Override
public void load() {
}
}
Not to be rude but: did you look at the tutorials? like half that stuff needs to be in the load() method, which you have empty.
I feel that this is a very simple question. But how would I stop mobs from spawning or existing by deleting or editing as least as possible. Or if I can do it by adding files that would be best. Thank you
EDIT: I think I figured it out. All I had to do was edit BiomeGenBase.java
Thanks for the easy to understand tutorials TechGuy543! I debated on if I should wait til the API comes out or start now. I figured if I start now at least I will understand some heh. Again, thanks for the tutorials!
Hey tech help! I cant make my tools enchant, idk whats the problem but um heres my ObsidianEnumToolMaterial
package net.minecraft.src;
public enum ObsidianEnumToolMaterial
{
OBSIDIAN(5, 2000, 12F, 7, 30);
/**
* The level of material this tool can harvest (3 = DIAMOND, 2 = IRON, 1 = STONE, 0 = IRON/GOLD)
*/
private final int harvestLevel;
/**
* The number of uses this material allows. (wood = 59, stone = 131, iron = 250, diamond = 1561, gold = 32)
*/
private final int maxUses;
/**
* The strength of this tool material against blocks which it is effective against.
*/
private final float efficiencyOnProperMaterial;
/** Damage versus entities. */
private final int damageVsEntity;
/** Defines the natural enchantability factor of the material. */
private final int enchantability;
private ObsidianEnumToolMaterial(int par3, int par4, float par5, int par6, int par7)
{
harvestLevel = par3;
maxUses = par4;
efficiencyOnProperMaterial = par5;
damageVsEntity = par6;
enchantability = par7;
}
/**
* The number of uses this material allows. (wood = 59, stone = 131, iron = 250, diamond = 1561, gold = 32)
*/
public int getMaxUses()
{
return maxUses;
}
/**
* The strength of this tool material against blocks which it is effective against.
*/
public float getEfficiencyOnProperMaterial()
{
return efficiencyOnProperMaterial;
}
/**
* Damage versus entities.
*/
public int getDamageVsEntity()
{
return damageVsEntity;
}
/**
* The level of material this tool can harvest (3 = DIAMOND, 2 = IRON, 1 = STONE, 0 = IRON/GOLD)
*/
public int getHarvestLevel()
{
return harvestLevel;
}
/**
* Return the natural enchantability factor of the material.
*/
public int getEnchantability()
{
return enchantability;
}
}
heres my sword
package net.minecraft.src;
public class ObsidianItemSword extends Item
{
private int weaponDamage;
private final ObsidianEnumToolMaterial toolMaterial;
public ObsidianItemSword(int par1, ObsidianEnumToolMaterial par2EnumToolMaterial)
{
super(par1);
toolMaterial = par2EnumToolMaterial;
maxStackSize = 1;
setMaxDamage(par2EnumToolMaterial.getMaxUses());
weaponDamage = 5 + par2EnumToolMaterial.getDamageVsEntity();
}
/**
* Returns the strength of the stack against a given block. 1.0F base, (Quality+1)*2 if correct blocktype, 1.5F if
* sword
*/
public float getStrVsBlock(ItemStack par1ItemStack, Block par2Block)
{
return par2Block.blockID != Block.web.blockID ? 1.5F : 15F;
}
/**
* Current implementations of this method in child classes do not use the entry argument beside ev. They just raise
* the damage on the stack.
*/
public boolean hitEntity(ItemStack par1ItemStack, EntityLiving par2EntityLiving, EntityLiving par3EntityLiving)
{
par1ItemStack.damageItem(1, par3EntityLiving);
return true;
}
public boolean onBlockDestroyed(ItemStack par1ItemStack, int par2, int par3, int par4, int par5, EntityLiving par6EntityLiving)
{
par1ItemStack.damageItem(2, par6EntityLiving);
return true;
}
/**
* Returns the damage against a given entity.
*/
public int getDamageVsEntity(Entity par1Entity)
{
return weaponDamage;
}
/**
* Returns True is the item is renderer in full 3D when hold.
*/
public boolean isFull3D()
{
return true;
}
/**
* returns the action that specifies what animation to play when the items is being used
*/
public EnumAction getItemUseAction(ItemStack par1ItemStack)
{
return EnumAction.block;
}
/**
* How long it takes to use or consume an item
*/
public int getMaxItemUseDuration(ItemStack par1ItemStack)
{
return 0x11940;
}
/**
* Called whenever this item is equipped and the right mouse button is pressed. Args: itemStack, world, entityPlayer
*/
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer)
{
par3EntityPlayer.setItemInUse(par1ItemStack, getMaxItemUseDuration(par1ItemStack));
return par1ItemStack;
}
/**
* Returns if the item (tool) can harvest results from the block type.
*/
public boolean canHarvestBlock(Block par1Block)
{
return par1Block.blockID == Block.web.blockID;
}
/**
* Return the enchantability factor of the item, most of the time is based on material.
*/
public int getItemEnchantability()
{
return toolMaterial.getEnchantability();
}
}
And here is what one guy did post he said to edit class file but since i dont want to mess up anything , can i make my own
EnumEnchantmentType class? if so plz help
I'm not sure, I haven't really done anything like it.
hey me again iv been stuck at this for 5 days now XD. getting frustrated.
anny way i havea pice of code:
//Laad het texture.
public String getTextureFile()
{
//Locatie van de textrue.
return mod_SteamPowerCore.SPbpng;
}
//Normale texture.
public int getBlockTextureFromSideAndMetadata(int side, int meta)
{
//return side == 1 ? 0 : (side == 0 ? 0 : (side == 3 ? 3 : 1));
if(meta == 0) return side == 1 ? 0 : (side == 0 ? 0 : (side == 3 ? 3 : 1));
if(meta == 1) return side == 1 ? 16 : (side == 0 ? 16 : (side == 3 ? 19 : 17));
return blockIndexInTexture;
}
//Voor de Texture van elke kant.
public int getBlockTexture(IBlockAccess world, int x, int y, int z, int side)
{
int var6 = world.getBlockMetadata(x, y, z);
return side == 1 ? 0 : (side == 0 ? 0 : (side != var6 ? 1 : (this.isActive ? 2 : 3)));
//return side == 1 ? 16 : (side == 0 ? 16 : (side != var6 ? 17 : (this.isActive ? 18 : 19)));
}
i know this part; getBlockTextureFromSideAndMetadata
handles the hand held item texture this part works perfect with there damage.
this part: getBlockTexture
handles the placed texture .. and iv try every posebilety i know to make it work
but i can get it to switch or use an integer in order to get hte right texture when i place it with a damage value ..
it only brings back the taxe i set there now ... when i evfen change it 1 bit it wont work lol ...
i tryd with integers .. but even than it wont work :S .. i dont know how to get the right texture at the right damage
here is the full class file:
package net.minecraft.src.SteamPower.Blocks;
import java.util.Random;
import net.minecraft.src.*;
import net.minecraft.src.SteamPower.*;
import net.minecraft.src.SteamPower.Blocks.*;
import net.minecraft.src.SteamPower.Items.*;
import net.minecraft.src.SteamPower.Setup.*;
import net.minecraft.src.forge.*;
public class spBlockHeater extends BlockContainer implements ITextureProvider //implements is nodig voor de texture.
{
private Random heaterRand = new Random();
private final boolean isActive;
private static boolean keepHeaterInventory = false;
//public int IDamage = 0;
public spBlockHeater(int par1, boolean par2)
{
super(par1, Material.rock);
this.isActive = par2;
setHardness(3.0F);
setStepSound(soundStoneFootstep);
if (this.isActive) setLightValue(1F);
setRequiresSelfNotify();
}
/*
public int getIDamage(ItemStack is)
{
int IDmg = is.getItemDamage();
switch (IDmg)
{
case 0: return IDamage + 0;
case 1: return IDamage +1;
default:
return (Integer) null;
}
}
*/
//This will get the block that you mine.
public int idDropped(int bnum1, Random random)
{
return spHeatCore.SteamHeaterOff.blockID;
}
//This will get its Damage value.
protected int damageDropped(int dmg)
{
return dmg;
}
//How many of this block will be return'd
public int quantityDropped(Random random)
{
return 1;
}
//Als Block word toegevoegd
public void onBlockAdded(World par1World, int par2, int par3, int par4)
{
super.onBlockAdded(par1World, par2, par3, par4);
this.setDefaultDirection(par1World, par2, par3, par4);
}
//Block richting.
private void setDefaultDirection(World par1World, int par2, int par3, int par4)
{
if (!par1World.isRemote)
{
int var5 = par1World.getBlockId(par2, par3, par4 - 1);
int var6 = par1World.getBlockId(par2, par3, par4 + 1);
int var7 = par1World.getBlockId(par2 - 1, par3, par4);
int var8 = par1World.getBlockId(par2 + 1, par3, par4);
byte var9 = 3;
if (Block.opaqueCubeLookup[var5] && !Block.opaqueCubeLookup[var6])
{
var9 = 3;
}
if (Block.opaqueCubeLookup[var6] && !Block.opaqueCubeLookup[var5])
{
var9 = 2;
}
if (Block.opaqueCubeLookup[var7] && !Block.opaqueCubeLookup[var8])
{
var9 = 5;
}
if (Block.opaqueCubeLookup[var8] && !Block.opaqueCubeLookup[var7])
{
var9 = 4;
}
par1World.setBlockMetadataWithNotify(par2, par3, par4, var9);
}
}
//Laad het texture.
public String getTextureFile()
{
//Locatie van de textrue.
return mod_SteamPowerCore.SPbpng;
}
//Normale texture.
public int getBlockTextureFromSideAndMetadata(int side, int meta)
{
//return side == 1 ? 0 : (side == 0 ? 0 : (side == 3 ? 3 : 1));
if(meta == 0) return side == 1 ? 0 : (side == 0 ? 0 : (side == 3 ? 3 : 1));
if(meta == 1) return side == 1 ? 16 : (side == 0 ? 16 : (side == 3 ? 19 : 17));
return blockIndexInTexture;
}
//Voor de Texture van elke kant.
public int getBlockTexture(IBlockAccess world, int x, int y, int z, int side)
{
int var6 = world.getBlockMetadata(x, y, z);
return side == 1 ? 0 : (side == 0 ? 0 : (side != var6 ? 1 : (this.isActive ? 2 : 3)));
//return side == 1 ? 16 : (side == 0 ? 16 : (side != var6 ? 17 : (this.isActive ? 18 : 19)));
}
//Is nodig voor het vuur die aan de voorkant er uit komt.
public void randomDisplayTick(World world, int x, int y, int z, Random random)
{
if (this.isActive)
{
int var6 = world.getBlockMetadata(x, y, z);
float var7 = (float)x + 0.5F;
float var8 = (float)y + 0.0F + random.nextFloat() * 6.0F / 16.0F;
float var9 = (float)z + 0.5F;
float var10 = 0.3F;
float var11 = random.nextFloat() * 0.6F - 0.3F;
if (var6 == 4)
{
world.spawnParticle("smoke", (double)(var7 - var10), (double)var8, (double)(var9 + var11), -0.04D, 0.03D, 0.0D);
world.spawnParticle("flame", (double)(var7 - var10), (double)var8, (double)(var9 + var11), -0.04D, 0.03D, 0.0D);
}
else if (var6 == 5)
{
world.spawnParticle("smoke", (double)(var7 + var10), (double)var8, (double)(var9 + var11), 0.04D, 0.03D, 0.0D);
world.spawnParticle("flame", (double)(var7 + var10), (double)var8, (double)(var9 + var11), 0.04D, 0.03D, 0.0D);
}
else if (var6 == 2)
{
world.spawnParticle("smoke", (double)(var7 + var11), (double)var8, (double)(var9 - var10), 0.0D, 0.03D, -0.04D);
world.spawnParticle("flame", (double)(var7 + var11), (double)var8, (double)(var9 - var10), 0.0D, 0.03D, -0.04D);
}
else if (var6 == 3)
{
world.spawnParticle("smoke", (double)(var7 + var11), (double)var8, (double)(var9 + var10), 0.0D, 0.03D, 0.04D);
world.spawnParticle("flame", (double)(var7 + var11), (double)var8, (double)(var9 + var10), 0.0D, 0.03D, 0.04D);
}
}
}
public int getGui(World world, int een, int twee, int drie, EntityPlayer var5)
{
switch (world.getBlockMetadata(een, twee, drie))
{
case 0:
return mod_SteamPowerCore.GUIHeater;
case 1:
return mod_SteamPowerCore.GUISuperHeater;
default:
return 0;
}
}
//Wanneer je er op clickt van welke kant dan ook.
public boolean blockActivated(World var1, int var2, int var3, int var4, EntityPlayer var5)
{
if (var5.isSneaking())
{
return false;
}
else
{
Integer var6 = this.getGui(var1, var2, var3, var4, var5);
if (var6 == null)
{
return false;
}
else
{
mod_SteamPowerCore.showGui(var5, var6.intValue(), var1.getBlockTileEntity(var2, var3, var4));
return true;
}
}
}
//Welk block ID het moet hebben met aan of uit.
public static void updateHeaterState(boolean par0, World par1World, int par2, int par3, int par4)
{
int var5 = par1World.getBlockMetadata(par2, par3, par4);
TileEntity var6 = par1World.getBlockTileEntity(par2, par3, par4);
keepHeaterInventory = true;
if (par0)
{
par1World.setBlockWithNotify(par2, par3, par4, spHeatCore.SteamHeaterOn.blockID);
}
else
{
par1World.setBlockWithNotify(par2, par3, par4, spHeatCore.SteamHeaterOff.blockID);
}
keepHeaterInventory = false;
par1World.setBlockMetadataWithNotify(par2, par3, par4, var5);
if (var6 != null)
{
var6.validate();
par1World.setBlockTileEntity(par2, par3, par4, var6);
}
}
//Tile entity word gebruikt voor de kook tijden.
public TileEntity getBlockEntity()
{
return new spTileEntityHeater();
}
/**
* Called when the block is placed in the world.
*/
public void onBlockPlacedBy(World par1World, int par2, int par3, int par4, EntityLiving par5EntityLiving)
{
int var6 = MathHelper.floor_double((double)(par5EntityLiving.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3;
if (var6 == 0)
{
par1World.setBlockMetadataWithNotify(par2, par3, par4, 2);
}
if (var6 == 1)
{
par1World.setBlockMetadataWithNotify(par2, par3, par4, 5);
}
if (var6 == 2)
{
par1World.setBlockMetadataWithNotify(par2, par3, par4, 3);
}
if (var6 == 3)
{
par1World.setBlockMetadataWithNotify(par2, par3, par4, 4);
}
}
/**
* Called whenever the block is removed.
*/
public void onBlockRemoval(World par1World, int par2, int par3, int par4)
{
if (!keepHeaterInventory)
{
spTileEntityHeater var5 = (spTileEntityHeater)par1World.getBlockTileEntity(par2, par3, par4);
if (var5 != null)
{
for (int var6 = 0; var6 < var5.getSizeInventory(); ++var6)
{
ItemStack var7 = var5.getStackInSlot(var6);
if (var7 != null)
{
float var8 = this.heaterRand.nextFloat() * 0.8F + 0.1F;
float var9 = this.heaterRand.nextFloat() * 0.8F + 0.1F;
float var10 = this.heaterRand.nextFloat() * 0.8F + 0.1F;
while (var7.stackSize > 0)
{
int var11 = this.heaterRand.nextInt(21) + 10;
if (var11 > var7.stackSize)
{
var11 = var7.stackSize;
}
var7.stackSize -= var11;
EntityItem var12 = new EntityItem(par1World, (double)((float)par2 + var8), (double)((float)par3 + var9), (double)((float)par4 + var10), new ItemStack(var7.itemID, var11, var7.getItemDamage()));
if (var7.hasTagCompound())
{
var12.item.setTagCompound((NBTTagCompound)var7.getTagCompound().copy());
}
float var13 = 0.05F;
var12.motionX = (double)((float)this.heaterRand.nextGaussian() * var13);
var12.motionY = (double)((float)this.heaterRand.nextGaussian() * var13 + 0.2F);
var12.motionZ = (double)((float)this.heaterRand.nextGaussian() * var13);
par1World.spawnEntityInWorld(var12);
}
}
}
}
}
super.onBlockRemoval(par1World, par2, par3, par4);
}
}
hope you can help lol becose iv been stuck at this for 5 days .. and tryd every thing new ..
I'm using eclipse, and it doesn't show any errors. When I run minecraft, I get:
java.lang.NullPointerException
at net.minecraft.src.CraftingManager.addRecipe(CraftingManager.java:398)
at net.minecraft.src.ModLoader.addRecipe(ModLoader.java:412)
at net.minecraft.src.mod_DiamondDust.load(mod_DiamondDust.java:122)
at net.minecraft.src.ModLoader.init(ModLoader.java:856)
at net.minecraft.src.ModLoader.addAllRenderers(ModLoader.java:157)
at net.minecraft.src.RenderManager.<init>(RenderManager.java:85)
at net.minecraft.src.RenderManager.<clinit>(RenderManager.java:12)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:424)
at net.minecraft.client.Minecraft.run(Minecraft.java:786)
at java.lang.Thread.run(Thread.java:680)
Any help?
Are the public static final lines for your ChainLink items before the recipes? NullPointerExceptions are caused by trying to use something which hasn't yet been intiated.
Rollback Post to RevisionRollBack
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
package net.minecraft.src;
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) braces deadcode
import java.util.*;
public class mod_Pokemon extends BaseMod
{
public void load() {
public static final Item OranBerry = new ItemFood(5002, 4, 1F, false).setItemName("anynamehere");
public static final Item Pokedex = new Itempokedex(5001).setItemName("Pokedex");
public static final Item Pokeball = new ItemPokeball(5000).setItemName("pokeball");
//oran berry
OranBerry.iconIndex = ModLoader.addOverride("/gui/items.png", "/gui/items/oranBerry.png");
ModLoader.addName(OranBerry, "oranBerry ");
//pokedex
Pokedex.iconIndex = ModLoader.addOverride("/gui/items.png", "/gui/items/pokedex.png");
ModLoader.addName(Pokedex, "pokedex");
ModLoader.addRecipe(new ItemStack(Pokedex, 1), new Object [] {"#", Character.valueOf('#'), Block.dirt});
//pokeball
Pokeball.iconIndex = ModLoader.addOverride("/gui/items.png", "/gui/items/pokeball.png");
ModLoader.addName(Pokeball, "pokeball");
ModLoader.addRecipe(new ItemStack(Pokeball, 1), new Object [] {"#", Character.valueOf('#'), Block.dirt});
//mobs
ModLoader.registerEntityID(EntityAron.class, "Aron", ModLoader.getUniqueEntityId()); // without this code , your mob wont spawn !
ModLoader.addSpawn(EntityAron.class, 10, 10, 10, EnumCreatureType.monster, new BiomeGenBase[]
{
BiomeGenBase.extremeHillsEdge,
BiomeGenBase.taigaHills,
});
ModLoader.registerEntityID(EntityLairon.class, "Lairon", ModLoader.getUniqueEntityId()); // without this code , your mob wont spawn !
ModLoader.addSpawn(EntityAron.class, 10, 10, 10, EnumCreatureType.monster, new BiomeGenBase[]
{
BiomeGenBase.extremeHillsEdge,
BiomeGenBase.taigaHills,
});
ModLoader.registerEntityID(EntityAggron.class, "Aggron", ModLoader.getUniqueEntityId()); // without this code , your mob wont spawn !
ModLoader.addSpawn(EntityAron.class, 10, 10, 10, EnumCreatureType.monster, new BiomeGenBase[]
{
BiomeGenBase.extremeHillsEdge,
BiomeGenBase.taigaHills,
});
ModLoader.registerEntityID(EntityWailmer.class, "wailmer", ModLoader.getUniqueEntityId()); // without this code , your mob wont spawn !
ModLoader.addSpawn(EntityWailmer.class, 10, 10, 10, EnumCreatureType.waterCreature, new BiomeGenBase[]
{
BiomeGenBase.ocean,
});
ModLoader.registerEntityID(EntityWailord.class, "wailord", ModLoader.getUniqueEntityId()); // without this code , your mob wont spawn !
ModLoader.addSpawn(EntityWailord.class, 10, 10, 10, EnumCreatureType.waterCreature, new BiomeGenBase[]
{
BiomeGenBase.ocean,
});
ModLoader.registerEntityID(EntityTailow.class, "taillow", ModLoader.getUniqueEntityId()); // without this code , your mob wont spawn !
ModLoader.addSpawn(EntityTailow.class, 10, 10, 10, EnumCreatureType.creature, new BiomeGenBase[]
{
BiomeGenBase.river,
BiomeGenBase.sky,
BiomeGenBase.extremeHills,
BiomeGenBase.plains,
BiomeGenBase.forestHills,
BiomeGenBase.jungleHills,
});
ModLoader.registerEntityID(EntitySwellow.class, "swellow", ModLoader.getUniqueEntityId()); // without this code , your mob wont spawn !
ModLoader.addSpawn(EntitySwellow.class, 10, 10, 10, EnumCreatureType.creature, new BiomeGenBase[]
{
BiomeGenBase.river,
BiomeGenBase.sky,
BiomeGenBase.extremeHills,
BiomeGenBase.plains,
BiomeGenBase.forestHills,
BiomeGenBase.jungleHills,
});
ModLoader.registerEntityID(EntitySlugma.class, "Slugma", ModLoader.getUniqueEntityId()); // without this code , your mob wont spawn !
ModLoader.addSpawn(EntitySlugma.class, 10, 10, 10, EnumCreatureType.creature, new BiomeGenBase[]
{
BiomeGenBase.hell,
});
ModLoader.registerEntityID(EntityMagcargo.class, "magcargo", ModLoader.getUniqueEntityId()); // without this code , your mob wont spawn !
ModLoader.addSpawn(EntityMagcargo.class, 10, 10, 10, EnumCreatureType.creature, new BiomeGenBase[]
{
BiomeGenBase.hell,
});
ModLoader.registerEntityID(EntityOnix.class, "onix", ModLoader.getUniqueEntityId()); // without this code , your mob wont spawn !
ModLoader.addSpawn(EntityOnix.class, 5, 5, 5, EnumCreatureType.creature, new BiomeGenBase[]
{
BiomeGenBase.extremeHills,
BiomeGenBase.plains,
BiomeGenBase.desert,
BiomeGenBase.forest,
BiomeGenBase.taiga,
BiomeGenBase.swampland,
});
ModLoader.registerEntityID(EntitySteelix.class, "steelix", ModLoader.getUniqueEntityId()); // without this code , your mob wont spawn !
ModLoader.addSpawn(EntitySteelix.class, 5, 5, 5, EnumCreatureType.creature, new BiomeGenBase[]
{
BiomeGenBase.extremeHills,
BiomeGenBase.plains,
BiomeGenBase.desert,
BiomeGenBase.forest,
BiomeGenBase.taiga,
BiomeGenBase.swampland,
});
ModLoader.registerEntityID(EntityWingul.class, "Wingul", ModLoader.getUniqueEntityId()); // without this code , your mob wont spawn !
ModLoader.addSpawn(EntityWingul.class, 10, 10, 10, EnumCreatureType.creature, new BiomeGenBase[]
{
BiomeGenBase.ocean,
BiomeGenBase.beach,
BiomeGenBase.river,
});
ModLoader.registerEntityID(EntityPelliper.class, "Pelliper", ModLoader.getUniqueEntityId()); // without this code , your mob wont spawn !
ModLoader.addSpawn(EntityPelliper.class, 10, 10, 10, EnumCreatureType.creature, new BiomeGenBase[]
{
BiomeGenBase.ocean,
BiomeGenBase.beach,
BiomeGenBase.river,
});
ModLoader.registerEntityID(EntityLotad.class, "Lotad", ModLoader.getUniqueEntityId()); // without this code , your mob wont spawn !
ModLoader.addSpawn(EntityLotad.class, 10, 10, 10, EnumCreatureType.creature, new BiomeGenBase[]
{
BiomeGenBase.swampland,
});
ModLoader.registerEntityID(EntityLudicolo.class, "Ludicolo", ModLoader.getUniqueEntityId()); // without this code , your mob wont spawn !
ModLoader.addSpawn(EntityLudicolo.class, 10, 10, 10, EnumCreatureType.creature, new BiomeGenBase[]
{
BiomeGenBase.swampland,
});
ModLoader.registerEntityID(EntityLombre.class, "Lombre", ModLoader.getUniqueEntityId()); // without this code , your mob wont spawn !
ModLoader.addSpawn(EntityLombre.class, 10, 10, 10, EnumCreatureType.creature, new BiomeGenBase[]
{
BiomeGenBase.swampland,
});
ModLoader.registerEntityID(EntitySeedot.class, "Seedot", ModLoader.getUniqueEntityId()); // without this code , your mob wont spawn !
ModLoader.addSpawn(EntitySeedot.class, 10, 10, 10, EnumCreatureType.creature, new BiomeGenBase[]
{
BiomeGenBase.jungle,
BiomeGenBase.forest,
});
ModLoader.registerEntityID(EntityNuzleaf.class, "Nuzleaf", ModLoader.getUniqueEntityId()); // without this code , your mob wont spawn !
ModLoader.addSpawn(EntityNuzleaf.class, 10, 10, 10, EnumCreatureType.creature, new BiomeGenBase[]
{
BiomeGenBase.jungle,
BiomeGenBase.forest,
});
ModLoader.registerEntityID(EntityShiftry.class, "Shiftry", ModLoader.getUniqueEntityId()); // without this code , your mob wont spawn !
ModLoader.addSpawn(EntityShiftry.class, 10, 10, 10, EnumCreatureType.creature, new BiomeGenBase[]
{
BiomeGenBase.jungle,
BiomeGenBase.forest,
});
}
// RENDERERS
public void AddRenderer(Map map)
{
map.put(EntityAron.class, new RenderAron(new ModelAron(), 0.5F)); // this one just assign the mob to your game and make it readable, just like RenderManager , the 0.5f is the shadow size of the mob you can make it bigger like 0.8f or smaller like 0.2f
map.put(EntityLairon.class, new RenderLairon(new ModelLarion(), 0.5F)); // this one just assign the mob to your game and make it readable, just like RenderManager , the 0.5f is the shadow size of the mob you can make it bigger like 0.8f or smaller like 0.2f
map.put(EntityAggron.class, new RenderAggron(new ModelAggron(), 0.7F)); // this one just assign the mob to your game and make it readable, just like RenderManager , the 0.5f is the shadow size of the mob you can make it bigger like 0.8f or smaller like 0.2f
map.put(EntityWailmer.class, new RenderWailmer(new ModelWailmer(), 0.5F)); // this one just assign the mob to your game and make it readable, just like RenderManager , the 0.5f is the shadow size of the mob you can make it bigger like 0.8f or smaller like 0.2f
map.put(EntityWailord.class, new RenderWaillord(new ModelWailord(), 0.5F)); // this one just assign the mob to your game and make it readable, just like RenderManager , the 0.5f is the shadow size of the mob you can make it bigger like 0.8f or smaller like 0.2f
map.put(EntityTailow.class, new RenderTailow(new ModelTaillow(), 0.5F)); // this one just assign the mob to your game and make it readable, just like RenderManager , the 0.5f is the shadow size of the mob you can make it bigger like 0.8f or smaller like 0.2f
map.put(EntitySwellow.class, new RenderSwellow(new ModelSwellow(), 0.5F)); // this one just assign the mob to your game and make it readable, just like RenderManager , the 0.5f is the shadow size of the mob you can make it bigger like 0.8f or smaller like 0.2f
map.put(EntitySlugma.class, new RenderSlugma(new ModelSlugma(), 0.2F)); // this one just assign the mob to your game and make it readable, just like RenderManager , the 0.5f is the shadow size of the mob you can make it bigger like 0.8f or smaller like 0.2f
map.put(EntityMagcargo.class, new RenderMagcargo(new ModelMagcargo(), 0.2F)); // this one just assign the mob to your game and make it readable, just like RenderManager , the 0.5f is the shadow size of the mob you can make it bigger like 0.8f or smaller like 0.2f
map.put(EntityOnix.class, new RenderOnix(new Modelonix(), 0.7F)); // this one just assign the mob to your game and make it readable, just like RenderManager , the 0.5f is the shadow size of the mob you can make it bigger like 0.8f or smaller like 0.2f
map.put(EntitySteelix.class, new RenderSteelix(new ModelSteelix(), 0.7F)); // this one just assign the mob to your game and make it readable, just like RenderManager , the 0.5f is the shadow size of the mob you can make it bigger like 0.8f or smaller like 0.2f
map.put(EntityWingul.class, new RenderWingul(new ModelWingul(), 0.5F)); // this one just assign the mob to your game and make it readable, just like RenderManager , the 0.5f is the shadow size of the mob you can make it bigger like 0.8f or smaller like 0.2f
map.put(EntityPelliper.class, new RenderPelliper(new ModelPelliper(), 0.5F)); // this one just assign the mob to your game and make it readable, just like RenderManager , the 0.5f is the shadow size of the mob you can make it bigger like 0.8f or smaller like 0.2f
map.put(EntityLotad.class, new RenderLotad(new ModelLotad(), 0.5F)); // this one just assign the mob to your game and make it readable, just like RenderManager , the 0.5f is the shadow size of the mob you can make it bigger like 0.8f or smaller like 0.2f
map.put(EntityLudicolo.class, new RenderLudicolo(new ModelLudicolo(), 0.5F)); // this one just assign the mob to your game and make it readable, just like RenderManager , the 0.5f is the shadow size of the mob you can make it bigger like 0.8f or smaller like 0.2f
map.put(EntitySeedot.class, new RenderSeedot(new ModelSeedot(), 0.5F)); // this one just assign the mob to your game and make it readable, just like RenderManager , the 0.5f is the shadow size of the mob you can make it bigger like 0.8f or smaller like 0.2f
map.put(EntityNuzleaf.class, new RenderNuzleaf(new ModelNuzleaf(), 0.5F)); // this one just assign the mob to your game and make it readable, just like RenderManager , the 0.5f is the shadow size of the mob you can make it bigger like 0.8f or smaller like 0.2f
map.put(EntityShiftry.class, new RenderShiftry(new ModelShiftry(), 0.5F)); // this one just assign the mob to your game and make it readable, just like RenderManager , the 0.5f is the shadow size of the mob you can make it bigger like 0.8f or smaller like 0.2f
}
public String Version()
{
return "|Legnaks pokemon mod"; // Put here anything you like after that it will show up in the modloader logs.
}
public String getVersion() {
// TODO Auto-generated method stub
return "1.2.5";
}
}
error report:
Exception in thread "Minecraft main thread" java.lang.ExceptionInInitializerError
at net.minecraft.client.Minecraft.startGame(Minecraft.java:424)
at net.minecraft.client.Minecraft.run(Minecraft.java:786)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.RuntimeException: java.lang.Error: Unresolved compilation problems:
Illegal modifier for parameter OranBerry; only final is permitted
Illegal modifier for parameter Pokedex; only final is permitted
Illegal modifier for parameter Pokeball; only final is permitted
at net.minecraft.src.ModLoader.init(ModLoader.java:891)
at net.minecraft.src.ModLoader.addAllRenderers(ModLoader.java:157)
at net.minecraft.src.RenderManager.<init>(RenderManager.java:104)
at net.minecraft.src.RenderManager.<clinit>(RenderManager.java:12)
... 3 more
Caused by: java.lang.Error: Unresolved compilation problems:
Illegal modifier for parameter OranBerry; only final is permitted
Illegal modifier for parameter Pokedex; only final is permitted
Illegal modifier for parameter Pokeball; only final is permitted
at net.minecraft.src.mod_Pokemon.load(mod_Pokemon.java:15)
at net.minecraft.src.ModLoader.init(ModLoader.java:856)
package net.minecraft.src;
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) braces deadcode
import java.util.*;
public class mod_Pokemon extends BaseMod
{
public void load() {
public static final Item OranBerry = new ItemFood(5002, 4, 1F, false).setItemName("anynamehere");
public static final Item Pokedex = new Itempokedex(5001).setItemName("Pokedex");
public static final Item Pokeball = new ItemPokeball(5000).setItemName("pokeball");
//oran berry
OranBerry.iconIndex = ModLoader.addOverride("/gui/items.png", "/gui/items/oranBerry.png");
ModLoader.addName(OranBerry, "oranBerry ");
//pokedex
Pokedex.iconIndex = ModLoader.addOverride("/gui/items.png", "/gui/items/pokedex.png");
ModLoader.addName(Pokedex, "pokedex");
ModLoader.addRecipe(new ItemStack(Pokedex, 1), new Object [] {"#", Character.valueOf('#'), Block.dirt});
//pokeball
Pokeball.iconIndex = ModLoader.addOverride("/gui/items.png", "/gui/items/pokeball.png");
ModLoader.addName(Pokeball, "pokeball");
ModLoader.addRecipe(new ItemStack(Pokeball, 1), new Object [] {"#", Character.valueOf('#'), Block.dirt});
//mobs
ModLoader.registerEntityID(EntityAron.class, "Aron", ModLoader.getUniqueEntityId()); // without this code , your mob wont spawn !
ModLoader.addSpawn(EntityAron.class, 10, 10, 10, EnumCreatureType.monster, new BiomeGenBase[]
{
BiomeGenBase.extremeHillsEdge,
BiomeGenBase.taigaHills,
});
ModLoader.registerEntityID(EntityLairon.class, "Lairon", ModLoader.getUniqueEntityId()); // without this code , your mob wont spawn !
ModLoader.addSpawn(EntityAron.class, 10, 10, 10, EnumCreatureType.monster, new BiomeGenBase[]
{
BiomeGenBase.extremeHillsEdge,
BiomeGenBase.taigaHills,
});
ModLoader.registerEntityID(EntityAggron.class, "Aggron", ModLoader.getUniqueEntityId()); // without this code , your mob wont spawn !
ModLoader.addSpawn(EntityAron.class, 10, 10, 10, EnumCreatureType.monster, new BiomeGenBase[]
{
BiomeGenBase.extremeHillsEdge,
BiomeGenBase.taigaHills,
});
ModLoader.registerEntityID(EntityWailmer.class, "wailmer", ModLoader.getUniqueEntityId()); // without this code , your mob wont spawn !
ModLoader.addSpawn(EntityWailmer.class, 10, 10, 10, EnumCreatureType.waterCreature, new BiomeGenBase[]
{
BiomeGenBase.ocean,
});
ModLoader.registerEntityID(EntityWailord.class, "wailord", ModLoader.getUniqueEntityId()); // without this code , your mob wont spawn !
ModLoader.addSpawn(EntityWailord.class, 10, 10, 10, EnumCreatureType.waterCreature, new BiomeGenBase[]
{
BiomeGenBase.ocean,
});
ModLoader.registerEntityID(EntityTailow.class, "taillow", ModLoader.getUniqueEntityId()); // without this code , your mob wont spawn !
ModLoader.addSpawn(EntityTailow.class, 10, 10, 10, EnumCreatureType.creature, new BiomeGenBase[]
{
BiomeGenBase.river,
BiomeGenBase.sky,
BiomeGenBase.extremeHills,
BiomeGenBase.plains,
BiomeGenBase.forestHills,
BiomeGenBase.jungleHills,
});
ModLoader.registerEntityID(EntitySwellow.class, "swellow", ModLoader.getUniqueEntityId()); // without this code , your mob wont spawn !
ModLoader.addSpawn(EntitySwellow.class, 10, 10, 10, EnumCreatureType.creature, new BiomeGenBase[]
{
BiomeGenBase.river,
BiomeGenBase.sky,
BiomeGenBase.extremeHills,
BiomeGenBase.plains,
BiomeGenBase.forestHills,
BiomeGenBase.jungleHills,
});
ModLoader.registerEntityID(EntitySlugma.class, "Slugma", ModLoader.getUniqueEntityId()); // without this code , your mob wont spawn !
ModLoader.addSpawn(EntitySlugma.class, 10, 10, 10, EnumCreatureType.creature, new BiomeGenBase[]
{
BiomeGenBase.hell,
});
ModLoader.registerEntityID(EntityMagcargo.class, "magcargo", ModLoader.getUniqueEntityId()); // without this code , your mob wont spawn !
ModLoader.addSpawn(EntityMagcargo.class, 10, 10, 10, EnumCreatureType.creature, new BiomeGenBase[]
{
BiomeGenBase.hell,
});
ModLoader.registerEntityID(EntityOnix.class, "onix", ModLoader.getUniqueEntityId()); // without this code , your mob wont spawn !
ModLoader.addSpawn(EntityOnix.class, 5, 5, 5, EnumCreatureType.creature, new BiomeGenBase[]
{
BiomeGenBase.extremeHills,
BiomeGenBase.plains,
BiomeGenBase.desert,
BiomeGenBase.forest,
BiomeGenBase.taiga,
BiomeGenBase.swampland,
});
ModLoader.registerEntityID(EntitySteelix.class, "steelix", ModLoader.getUniqueEntityId()); // without this code , your mob wont spawn !
ModLoader.addSpawn(EntitySteelix.class, 5, 5, 5, EnumCreatureType.creature, new BiomeGenBase[]
{
BiomeGenBase.extremeHills,
BiomeGenBase.plains,
BiomeGenBase.desert,
BiomeGenBase.forest,
BiomeGenBase.taiga,
BiomeGenBase.swampland,
});
ModLoader.registerEntityID(EntityWingul.class, "Wingul", ModLoader.getUniqueEntityId()); // without this code , your mob wont spawn !
ModLoader.addSpawn(EntityWingul.class, 10, 10, 10, EnumCreatureType.creature, new BiomeGenBase[]
{
BiomeGenBase.ocean,
BiomeGenBase.beach,
BiomeGenBase.river,
});
ModLoader.registerEntityID(EntityPelliper.class, "Pelliper", ModLoader.getUniqueEntityId()); // without this code , your mob wont spawn !
ModLoader.addSpawn(EntityPelliper.class, 10, 10, 10, EnumCreatureType.creature, new BiomeGenBase[]
{
BiomeGenBase.ocean,
BiomeGenBase.beach,
BiomeGenBase.river,
});
ModLoader.registerEntityID(EntityLotad.class, "Lotad", ModLoader.getUniqueEntityId()); // without this code , your mob wont spawn !
ModLoader.addSpawn(EntityLotad.class, 10, 10, 10, EnumCreatureType.creature, new BiomeGenBase[]
{
BiomeGenBase.swampland,
});
ModLoader.registerEntityID(EntityLudicolo.class, "Ludicolo", ModLoader.getUniqueEntityId()); // without this code , your mob wont spawn !
ModLoader.addSpawn(EntityLudicolo.class, 10, 10, 10, EnumCreatureType.creature, new BiomeGenBase[]
{
BiomeGenBase.swampland,
});
ModLoader.registerEntityID(EntityLombre.class, "Lombre", ModLoader.getUniqueEntityId()); // without this code , your mob wont spawn !
ModLoader.addSpawn(EntityLombre.class, 10, 10, 10, EnumCreatureType.creature, new BiomeGenBase[]
{
BiomeGenBase.swampland,
});
ModLoader.registerEntityID(EntitySeedot.class, "Seedot", ModLoader.getUniqueEntityId()); // without this code , your mob wont spawn !
ModLoader.addSpawn(EntitySeedot.class, 10, 10, 10, EnumCreatureType.creature, new BiomeGenBase[]
{
BiomeGenBase.jungle,
BiomeGenBase.forest,
});
ModLoader.registerEntityID(EntityNuzleaf.class, "Nuzleaf", ModLoader.getUniqueEntityId()); // without this code , your mob wont spawn !
ModLoader.addSpawn(EntityNuzleaf.class, 10, 10, 10, EnumCreatureType.creature, new BiomeGenBase[]
{
BiomeGenBase.jungle,
BiomeGenBase.forest,
});
ModLoader.registerEntityID(EntityShiftry.class, "Shiftry", ModLoader.getUniqueEntityId()); // without this code , your mob wont spawn !
ModLoader.addSpawn(EntityShiftry.class, 10, 10, 10, EnumCreatureType.creature, new BiomeGenBase[]
{
BiomeGenBase.jungle,
BiomeGenBase.forest,
});
}
// RENDERERS
public void AddRenderer(Map map)
{
map.put(EntityAron.class, new RenderAron(new ModelAron(), 0.5F)); // this one just assign the mob to your game and make it readable, just like RenderManager , the 0.5f is the shadow size of the mob you can make it bigger like 0.8f or smaller like 0.2f
map.put(EntityLairon.class, new RenderLairon(new ModelLarion(), 0.5F)); // this one just assign the mob to your game and make it readable, just like RenderManager , the 0.5f is the shadow size of the mob you can make it bigger like 0.8f or smaller like 0.2f
map.put(EntityAggron.class, new RenderAggron(new ModelAggron(), 0.7F)); // this one just assign the mob to your game and make it readable, just like RenderManager , the 0.5f is the shadow size of the mob you can make it bigger like 0.8f or smaller like 0.2f
map.put(EntityWailmer.class, new RenderWailmer(new ModelWailmer(), 0.5F)); // this one just assign the mob to your game and make it readable, just like RenderManager , the 0.5f is the shadow size of the mob you can make it bigger like 0.8f or smaller like 0.2f
map.put(EntityWailord.class, new RenderWaillord(new ModelWailord(), 0.5F)); // this one just assign the mob to your game and make it readable, just like RenderManager , the 0.5f is the shadow size of the mob you can make it bigger like 0.8f or smaller like 0.2f
map.put(EntityTailow.class, new RenderTailow(new ModelTaillow(), 0.5F)); // this one just assign the mob to your game and make it readable, just like RenderManager , the 0.5f is the shadow size of the mob you can make it bigger like 0.8f or smaller like 0.2f
map.put(EntitySwellow.class, new RenderSwellow(new ModelSwellow(), 0.5F)); // this one just assign the mob to your game and make it readable, just like RenderManager , the 0.5f is the shadow size of the mob you can make it bigger like 0.8f or smaller like 0.2f
map.put(EntitySlugma.class, new RenderSlugma(new ModelSlugma(), 0.2F)); // this one just assign the mob to your game and make it readable, just like RenderManager , the 0.5f is the shadow size of the mob you can make it bigger like 0.8f or smaller like 0.2f
map.put(EntityMagcargo.class, new RenderMagcargo(new ModelMagcargo(), 0.2F)); // this one just assign the mob to your game and make it readable, just like RenderManager , the 0.5f is the shadow size of the mob you can make it bigger like 0.8f or smaller like 0.2f
map.put(EntityOnix.class, new RenderOnix(new Modelonix(), 0.7F)); // this one just assign the mob to your game and make it readable, just like RenderManager , the 0.5f is the shadow size of the mob you can make it bigger like 0.8f or smaller like 0.2f
map.put(EntitySteelix.class, new RenderSteelix(new ModelSteelix(), 0.7F)); // this one just assign the mob to your game and make it readable, just like RenderManager , the 0.5f is the shadow size of the mob you can make it bigger like 0.8f or smaller like 0.2f
map.put(EntityWingul.class, new RenderWingul(new ModelWingul(), 0.5F)); // this one just assign the mob to your game and make it readable, just like RenderManager , the 0.5f is the shadow size of the mob you can make it bigger like 0.8f or smaller like 0.2f
map.put(EntityPelliper.class, new RenderPelliper(new ModelPelliper(), 0.5F)); // this one just assign the mob to your game and make it readable, just like RenderManager , the 0.5f is the shadow size of the mob you can make it bigger like 0.8f or smaller like 0.2f
map.put(EntityLotad.class, new RenderLotad(new ModelLotad(), 0.5F)); // this one just assign the mob to your game and make it readable, just like RenderManager , the 0.5f is the shadow size of the mob you can make it bigger like 0.8f or smaller like 0.2f
map.put(EntityLudicolo.class, new RenderLudicolo(new ModelLudicolo(), 0.5F)); // this one just assign the mob to your game and make it readable, just like RenderManager , the 0.5f is the shadow size of the mob you can make it bigger like 0.8f or smaller like 0.2f
map.put(EntitySeedot.class, new RenderSeedot(new ModelSeedot(), 0.5F)); // this one just assign the mob to your game and make it readable, just like RenderManager , the 0.5f is the shadow size of the mob you can make it bigger like 0.8f or smaller like 0.2f
map.put(EntityNuzleaf.class, new RenderNuzleaf(new ModelNuzleaf(), 0.5F)); // this one just assign the mob to your game and make it readable, just like RenderManager , the 0.5f is the shadow size of the mob you can make it bigger like 0.8f or smaller like 0.2f
map.put(EntityShiftry.class, new RenderShiftry(new ModelShiftry(), 0.5F)); // this one just assign the mob to your game and make it readable, just like RenderManager , the 0.5f is the shadow size of the mob you can make it bigger like 0.8f or smaller like 0.2f
}
public String Version()
{
return "|Legnaks pokemon mod"; // Put here anything you like after that it will show up in the modloader logs.
}
public String getVersion() {
// TODO Auto-generated method stub
return "1.2.5";
}
}
error report:
Exception in thread "Minecraft main thread" java.lang.ExceptionInInitializerError
at net.minecraft.client.Minecraft.startGame(Minecraft.java:424)
at net.minecraft.client.Minecraft.run(Minecraft.java:786)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.RuntimeException: java.lang.Error: Unresolved compilation problems:
Illegal modifier for parameter OranBerry; only final is permitted
Illegal modifier for parameter Pokedex; only final is permitted
Illegal modifier for parameter Pokeball; only final is permitted
at net.minecraft.src.ModLoader.init(ModLoader.java:891)
at net.minecraft.src.ModLoader.addAllRenderers(ModLoader.java:157)
at net.minecraft.src.RenderManager.<init>(RenderManager.java:104)
at net.minecraft.src.RenderManager.<clinit>(RenderManager.java:12)
... 3 more
Caused by: java.lang.Error: Unresolved compilation problems:
Illegal modifier for parameter OranBerry; only final is permitted
Illegal modifier for parameter Pokedex; only final is permitted
Illegal modifier for parameter Pokeball; only final is permitted
at net.minecraft.src.mod_Pokemon.load(mod_Pokemon.java:15)
at net.minecraft.src.ModLoader.init(ModLoader.java:856)
The public static final lines must be outside of the load() method.
Uhmm, I don't really get it. Do I press new on eclipse? Then what? Sorry if I'm kinda slow.
You press the new class button. It is sort of a green circle with a white 'c' in it.
Rollback Post to RevisionRollBack
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
Oh. I get it. But I have two Errors and 2 Warnings.
Errors
Description Resource Path Location Type
Project 'Server' is missing required library: 'jars/minecraft_server.jar' Server Build path Build Path Problem
The project cannot be built until build path errors are resolved Server Unknown Java Problem
Warnings
Description Resource Path Location Type
Build path specifies execution environment JavaSE-1.6. client Build path JRE System Library Problem
There are no JREs installed in the workspace that are
strictly compatible with this environment.
Description Resource Path Location Type
Dead code TileEntityMobSpawner.java /Client/src/net/minecraft/src line 102 Java Problem
Oh. I get it. But I have two Errors and 2 Warnings.
Errors
Description Resource Path Location Type
Project 'Server' is missing required library: 'jars/minecraft_server.jar' Server Build path Build Path Problem
The project cannot be built until build path errors are resolved Server Unknown Java Problem
Warnings
Description Resource Path Location Type
Build path specifies execution environment JavaSE-1.6. client Build path JRE System Library Problem
There are no JREs installed in the workspace that are
strictly compatible with this environment.
Description Resource Path Location Type
Dead code TileEntityMobSpawner.java /Client/src/net/minecraft/src line 102 Java Problem
Any errors relating to the server aren't to worry about. The dead code in TileEntityMobSpawner doesn't matter. Did you install the 1.6 JRE and JDK?
Rollback Post to RevisionRollBack
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
Okay, I figured it out by changing it in the settings and such by choosing jre 1.7 and not jre 1.6. there's warnings anymore except for dead code and server warnings. Thanks by the way.Would there be a problem if the user of my mod has only 1.6 jre and not 1.7?
Hey I just wanted to give you a heads up on the Potion Food Effect.
The 0 in
.setPotionEffect(Potion.hunger.id, 30, 0, 0.8F)
will increases how fast your food bar will decay, at least with this example. So setting it to a 10 will make it go down rather quickly and I'm assuming 0 is the default.
Sorry if this was posted before just the OP still says you are unsure of what it does.
making new inventory slots in the actual inventory GUI (for gauntlets, shields, arm/headbands)
EDIT: infact if u dont mind a messy OP here is the link to the mod description/request thread:
http://www.minecraftforum.net/topic/1050357-wip-warriorcultures-looking-for-coders/
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumNot to be rude but: did you look at the tutorials? like half that stuff needs to be in the load() method, which you have empty.
I fixed the load method being empty but it still doesn't solve my problem.
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumSo, what does your code look like now?
EDIT: I think I figured it out. All I had to do was edit BiomeGenBase.java
Ideas
Everything needs to be inside of the class braces. You have everything out of them.
I'm not sure, I haven't really done anything like it.
Mod Development
Are the public static final lines for your ChainLink items before the recipes? NullPointerExceptions are caused by trying to use something which hasn't yet been intiated.
together they are powerful beyond imagination."
Class:
Exception in thread "Minecraft main thread" java.lang.ExceptionInInitializerError
at net.minecraft.client.Minecraft.startGame(Minecraft.java:424)
at net.minecraft.client.Minecraft.run(Minecraft.java:786)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.RuntimeException: java.lang.Error: Unresolved compilation problems:
Illegal modifier for parameter OranBerry; only final is permitted
Illegal modifier for parameter Pokedex; only final is permitted
Illegal modifier for parameter Pokeball; only final is permitted
at net.minecraft.src.ModLoader.init(ModLoader.java:891)
at net.minecraft.src.ModLoader.addAllRenderers(ModLoader.java:157)
at net.minecraft.src.RenderManager.<init>(RenderManager.java:104)
at net.minecraft.src.RenderManager.<clinit>(RenderManager.java:12)
... 3 more
Caused by: java.lang.Error: Unresolved compilation problems:
Illegal modifier for parameter OranBerry; only final is permitted
Illegal modifier for parameter Pokedex; only final is permitted
Illegal modifier for parameter Pokeball; only final is permitted
at net.minecraft.src.mod_Pokemon.load(mod_Pokemon.java:15)
at net.minecraft.src.ModLoader.init(ModLoader.java:856)
The public static final lines must be outside of the load() method.
You press the new class button. It is sort of a green circle with a white 'c' in it.
together they are powerful beyond imagination."
Uhmm, under the Block.java and then Block?
Errors
Description Resource Path Location Type
Project 'Server' is missing required library: 'jars/minecraft_server.jar' Server Build path Build Path Problem
The project cannot be built until build path errors are resolved Server Unknown Java Problem
Warnings
Description Resource Path Location Type
Build path specifies execution environment JavaSE-1.6. client Build path JRE System Library Problem
There are no JREs installed in the workspace that are
strictly compatible with this environment.
Description Resource Path Location Type
Dead code TileEntityMobSpawner.java /Client/src/net/minecraft/src line 102 Java Problem
Any errors relating to the server aren't to worry about. The dead code in TileEntityMobSpawner doesn't matter. Did you install the 1.6 JRE and JDK?
together they are powerful beyond imagination."
In my Java folder in Program files, there are two folders. One is jre7 and the other jdk1.7.0_04.
The 0 in
will increases how fast your food bar will decay, at least with this example. So setting it to a 10 will make it go down rather quickly and I'm assuming 0 is the default.
Sorry if this was posted before just the OP still says you are unsure of what it does.
package net.minecraft.src; public class mod_Redstoneblock extends BaseMod { public static final Block redstoneBlock = new BlockRedstoneBlock(201, 0).setHardness(5.0F).setResistance(2.0F).setBlockName("redstoneBlock"); public void load() { ModLoader.registerBlock(redstoneBlock); redstoneBlock.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/Redstone/Block.png"); ModLoader.addName(redstoneBlock, "Redstone Block"); } ModLoader.addRecipe(new ItemStack(Redstoneblock, 1), new Object [] {"UUU", "UUU", "UUU", Character.valueOf('U'), Item.redstone }); public String getVersion() { return "1.2.5"; } }It says that the dot after ModLoader (Recipe part) is wront, Also the ")" after (Redstoneblock, 1 ")" is wrong