I got an error when trying to spawn in my mob using your spawn egg tut
Error
Loading: net.java.games.input.DirectAndRawInputEnvironmentPlugin
java.lang.NullPointerException
at net.minecraft.src.ItemTweekEgg.onItemUse(ItemTweekEgg.java:25)
at net.minecraft.src.ItemStack.useItem(ItemStack.java:114)
at net.minecraft.src.PlayerControllerCreative.onPlayerRightClick(PlayerControllerCreative.java:82)
at net.minecraft.client.Minecraft.clickMouse(Minecraft.java:1411)
at net.minecraft.client.Minecraft.runTick(Minecraft.java:1834)
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:870)
at net.minecraft.client.Minecraft.run(Minecraft.java:801)
at java.lang.Thread.run(Unknown Source)
Spawnegg
package net.minecraft.src;
public class ItemTweekEgg extends Item
{
public ItemTweekEgg(int i)
{
super(i);
maxStackSize = 1;
}
public String Version()
{
return "3.14159265";
}
private World worldObj;
public boolean onItemUse (ItemStack itemstack, EntityPlayer entityplayer, World world, int i ,int j, int k, int l){
if(!world.isRemote)
{
ModLoader.getMinecraftInstance().thePlayer.addChatMessage("A Wild Tweekers Appears!");
EntityLiving entityliving = (EntityLiving)EntityList.createEntityByName("Tweeker13", entityplayer.worldObj);
entityliving.setLocationAndAngles(i, j + 1, k, 0F, 0F);
entityplayer.worldObj.spawnEntityInWorld(entityliving);
entityplayer.swingItem();
}
return true;
}
}
Mod_KyaniteMod.java
package net.minecraft.src;
import java.util.List;
import java.util.Map;
import java.util.Random;
import net.minecraft.client.Minecraft;
public class mod_KyaniteMod extends BaseMod
{
//BaseItems
public static final Block KyaniteoreBlock = (new BlockKyaniteore(151, 0)).setHardness(50F).setResistance(51F).setBlockName("Kyanite Ore");
public static final Block KyaniteBlock = (new BlockKyanite(152, 0)).setHardness(50F).setResistance(51F).setBlockName("Kyanite Block");
public static final Block Xrayblock = (new Xrayblock(153, 0)).setHardness(4F).setResistance(4F).setBlockName("X-Ray Block");
public static final Block Glass2 = (new Glass2(154, 0)).setHardness(4F).setResistance(4F).setBlockName("Glass 2.0");
public static final Item Kyanite = (new ItemKyanite(2110)).setItemName("Kyanite");
public static final Item RKyanite = (new ItemKyanite(2300)).setItemName("RKyanite");
public static final Item ObsidianRod = (new ItemObsidianRod(2301)).setItemName("Obsidian Rod");
//Tools
public static final Item Kpickaxe;
public static final Item Kaxe;
public static final Item Kshovel;
public static final Item Khoe;
public static final Item Ksword;
//Reinforced Tools
public static final Item RKpickaxe;
public static final Item RKaxe;
public static final Item RKshovel;
public static final Item RKhoe;
public static final Item RKsword;
//Armor
public static final Item KBody;
public static final Item KHelmet;
public static final Item KPants;
public static final Item KBoots;
//Reinforced Armor
public static final Item RKBody;
public static final Item RKHelmet;
public static final Item RKPants;
public static final Item RKBoots;
//SpawnEggs
public static final Item TweekEgg = (new ItemTweekEgg(2500)).setItemName("Tweek Spawner");
//Food
public static final Item Taco = (new ItemFood(1231, 20, 1.0F, true)).setPotionEffect(Potion.regeneration.id, 120, 0, 1F).setItemName("Taco");
public static final Item Cum = (new ItemFood(1250, 10, 1.0F, true)).setPotionEffect(Potion.invisibility.id, 500, 0, 1F).setItemName("Cum");
//Achievement
public static final Achievement IwouldntEatThat = new Achievement(4560, "I wouldn't", 5, 7, mod_KyaniteMod.Cum, null).registerAchievement();
protected Random randomGenerator;
public mod_KyaniteMod()
{
}
public void load()
{
//Pedo Bear
ModLoader.registerEntityID(PedoBear.class, "PedoBear", ModLoader.getUniqueEntityId());
ModLoader.addSpawn(PedoBear.class, 5, 10, 11, EnumCreatureType.monster);
//Ndragon798
ModLoader.registerEntityID(Ndragon798.class, "Ndragon798", ModLoader.getUniqueEntityId());
ModLoader.addSpawn(Ndragon798.class, 3, 1, 1, EnumCreatureType.monster);
//Tweek
ModLoader.registerEntityID(Tweek.class, "Tweekers13", ModLoader.getUniqueEntityId());
ModLoader.addSpawn(Tweek.class, 3, 1, 1, EnumCreatureType.monster);
TweekEgg.iconIndex = ModLoader.addOverride("/gui/items.png", "/Mod/SpawnEggs/TweekEgg.png");
ModLoader.addName(TweekEgg, "TweekEgg");
ModLoader.addRecipe(new ItemStack(TweekEgg, 1), new Object[]
{
"ZZZ", "ZZZ","ZZZ" , 'Z', Kyanite,
});
//Base Items
ModLoader.registerBlock(KyaniteoreBlock);
KyaniteoreBlock.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/Mod/BaseItems/Kyaniteore.png");
ModLoader.addName(KyaniteoreBlock, "Kyanite Ore");
Kyanite.iconIndex = ModLoader.addOverride("/gui/items.png", "/Mod/BaseItems/Kyanite.png");
ModLoader.addName(Kyanite, "Kyanite");
ModLoader.registerBlock(KyaniteBlock);
KyaniteBlock.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/Mod/BaseItems/KyaniteBlock.png");
ModLoader.addName(KyaniteBlock, "Kyanite Block");
ModLoader.addRecipe(new ItemStack(KyaniteBlock, 1), new Object[]
{
"ZZZ", "ZZZ", "ZZZ", 'Z', Kyanite,
});
ModLoader.registerBlock(Xrayblock);
Xrayblock.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/Mod/BaseItems/Xrayblock.png");
ModLoader.addName(Xrayblock, "X-ray Block");
ModLoader.addRecipe(new ItemStack(Xrayblock, 1), new Object[]
{
"ZZZ", "Z*Z", "ZZZ", 'Z', Block.glass, '*' , Kyanite
});
ModLoader.registerBlock(Glass2);
Glass2.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/Mod/BaseItems/Glass2.png");
ModLoader.addName(Glass2, "Glass 2.0");
ModLoader.addRecipe(new ItemStack(Glass2, 1), new Object[]
{
"ZZZ", "ZZZ", "ZZZ", 'Z', Block.glass,
});
RKyanite.iconIndex = ModLoader.addOverride("/gui/items.png", "/Mod/BaseItems/RKyanite.png");
ModLoader.addName(RKyanite, "Renforced Kyanite");
ModLoader.addSmelting(mod_KyaniteMod.Kyanite.shiftedIndex, new ItemStack(mod_KyaniteMod.RKyanite, 1));
ObsidianRod.iconIndex = ModLoader.addOverride("/gui/items.png", "/Mod/BaseItems/ObsidianRod.png");
ModLoader.addName(ObsidianRod, "Obsidian Rod");
ModLoader.addRecipe(new ItemStack(ObsidianRod, 1), new Object[]
{
" Z ", " Z ", 'Z', Block.obsidian,
});
//Tools
Kpickaxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/Mod/Tools/Kyanite_Pickaxe.png");
Kaxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/Mod/Tools/Kyanite_Axe.png");
Kshovel.iconIndex = ModLoader.addOverride("/gui/items.png", "/Mod/Tools/Kyanite_Shovel.png");
Khoe.iconIndex = ModLoader.addOverride("/gui/items.png", "/Mod/Tools/Kyanite_Hoe.png");
Ksword.iconIndex = ModLoader.addOverride("/gui/items.png", "/Mod/Tools/Kyanite_Sword.png");
ModLoader.addName(Kpickaxe, "Kyanite Pickaxe");
ModLoader.addName(Kaxe, "Kyanite Axe");
ModLoader.addName(Kshovel, "Kyanite Shovel");
ModLoader.addName(Khoe, "Kyanite Hoe");
ModLoader.addName(Ksword, "Kyanite Sword");
ModLoader.addRecipe(new ItemStack(Kpickaxe, 1), new Object[]
{
"ZZZ", " Y ", " Y ", 'Z', Kyanite, 'Y', Item.stick
});
ModLoader.addRecipe(new ItemStack(Kaxe, 1), new Object[]
{
"ZZ", "ZY", " Y", 'Z', Kyanite, 'Y', Item.stick
});
ModLoader.addRecipe(new ItemStack(Kshovel, 1), new Object[]
{
"Z", "Y", "Y", 'Z', Kyanite, 'Y', Item.stick
});
ModLoader.addRecipe(new ItemStack(Khoe, 1), new Object[]
{
"ZZ", " Y", " Y", 'Z', Kyanite, 'Y', Item.stick
});
ModLoader.addRecipe(new ItemStack(Ksword, 1), new Object[]
{
"Z", "Z", "Y", 'Z', Kyanite, 'Y', Item.stick
});
//RTools
RKpickaxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/Mod/Tools/RKyanite/RKyanite_Pickaxe.png");
RKaxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/Mod/Tools/RKyanite/RKyanite_Axe.png");
RKshovel.iconIndex = ModLoader.addOverride("/gui/items.png", "/Mod/Tools/RKyanite/RKyanite_Shovel.png");
RKhoe.iconIndex = ModLoader.addOverride("/gui/items.png", "/Mod/Tools/RKyanite/RKyanite_Hoe.png");
RKsword.iconIndex = ModLoader.addOverride("/gui/items.png", "/Mod/Tools/RKyanite/RKyanite_Sword.png");
ModLoader.addName(RKpickaxe, "Reinforced Kyanite Pickaxe");
ModLoader.addName(RKaxe, "Reinforced Kyanite Axe");
ModLoader.addName(RKshovel, "Reinforced Kyanite Shovel");
ModLoader.addName(RKhoe, "Reinforced Kyanite Hoe");
ModLoader.addName(RKsword, "Reinforced Kyanite Sword");
ModLoader.addRecipe(new ItemStack(RKpickaxe, 1), new Object[]
{
"ZZZ", " Y ", " Y ", 'Z', RKyanite, 'Y', ObsidianRod
});
ModLoader.addRecipe(new ItemStack(RKaxe, 1), new Object[]
{
"ZZ", "ZY", " Y", 'Z', RKyanite, 'Y', ObsidianRod
});
ModLoader.addRecipe(new ItemStack(RKshovel, 1), new Object[]
{
"Z", "Y", "Y", 'Z', RKyanite, 'Y', ObsidianRod
});
ModLoader.addRecipe(new ItemStack(RKhoe, 1), new Object[]
{
"ZZ", " Y", " Y", 'Z', RKyanite, 'Y', ObsidianRod
});
ModLoader.addRecipe(new ItemStack(RKsword, 1), new Object[]
{
"Z", "Z", "Y", 'Z', RKyanite, 'Y', ObsidianRod
});
KBody.iconIndex = ModLoader.addOverride("/gui/items.png", "/Mod/Armor/K_C.png");
ModLoader.addName(KBody, "Kyanite ChestPlate");
ModLoader.addRecipe(new ItemStack(KBody, 1), new Object[]
{
"* *", " * ", "* *", '*', Kyanite
});
KHelmet.iconIndex = ModLoader.addOverride("/gui/items.png", "/Mod/Armor/K_H.png");
ModLoader.addName(KHelmet, "Kyanite Helmet");
ModLoader.addRecipe(new ItemStack(KHelmet, 1), new Object[]
{
"***", "* *", " ", '*', Kyanite
});
KPants.iconIndex = ModLoader.addOverride("/gui/items.png", "/Mod/Armor/K_P.png");
ModLoader.addName(KPants, "Kyanite Pants");
ModLoader.addRecipe(new ItemStack(KPants, 1), new Object[]
{
"***", "* *", "* *", '*', Kyanite
});
KBoots.iconIndex = ModLoader.addOverride("/gui/items.png", "/Mod/Armor/K_B.png");
ModLoader.addName(KBoots, "Kyanite Boots");
ModLoader.addRecipe(new ItemStack(KBoots, 1), new Object[]
{
" ", "* *", "* *", '*', Kyanite
});
ModLoader.addArmor("kyanite");
RKBody.iconIndex = ModLoader.addOverride("/gui/items.png", "/Mod/Armor/RKyanite/RK_C.png");
ModLoader.addName(RKBody, "Reinforced Kyanite ChestPlate");
ModLoader.addRecipe(new ItemStack(RKBody, 1), new Object[]
{
"* *", " * ", "* *", '*', RKyanite
});
RKHelmet.iconIndex = ModLoader.addOverride("/gui/items.png", "/Mod/Armor/RKyanite/RK_H.png");
ModLoader.addName(RKHelmet, "Reinforced Kyanite Helmet");
ModLoader.addRecipe(new ItemStack(RKHelmet, 1), new Object[]
{
"***", "* *", " ", '*', RKyanite
});
RKPants.iconIndex = ModLoader.addOverride("/gui/items.png", "/Mod/Armor/RKyanite/RK_P.png");
ModLoader.addName(RKPants, "Reinforced Kyanite Pants");
ModLoader.addRecipe(new ItemStack(RKPants, 1), new Object[]
{
"***", "* *", "* *", '*', RKyanite
});
RKBoots.iconIndex = ModLoader.addOverride("/gui/items.png", "/Mod/Armor/RKyanite/RK_B.png");
ModLoader.addName(RKBoots, "Reinforced Kyanite Boots");
ModLoader.addRecipe(new ItemStack(RKBoots, 1), new Object[]
{
" ", "* *", "* *", '*', RKyanite
});
ModLoader.addArmor("rkyanite");
ModLoader.addName(Taco, "Taco");
Taco.iconIndex = ModLoader.addOverride("/gui/items.png", "/Mod/Food/Taco.png");
ModLoader.addRecipe(new ItemStack(Taco, 1), new Object[]
{
"&#&", "&X&", "&&&", 'X', Item.beefCooked, '&', Item.bread, '#', Block.leaves
});
ModLoader.addName(Cum, "Cum");
Cum.iconIndex = ModLoader.addOverride("/gui/items.png", "/Mod/Food/Cum.png");
ModLoader.setInGameHook(this, true, false);
ModLoader.setInGUIHook(this, true, false);
{
ModLoader.addAchievementDesc(IwouldntEatThat, "I wouldn't", "It's Everywhere");
}
}
public void generateSurface(World world, Random random, int i, int j)
{
randomGenerator = random;
for (int k = 0; k < 1; k++)
{
int l = i + randomGenerator.nextInt(10);
int i1 = random.nextInt(10);
int j1 = j + randomGenerator.nextInt(10);
(new WorldGenMinable(KyaniteoreBlock.blockID, 8)).generate(world, random, l, i1, j1);
}
}
public String getVersion()
{
return "3.14159265";
}
public void addRenderer(Map map)
{
map.put(PedoBear.class, new RenderBiped(new ModelBiped(), 0.5F));
map.put(Ndragon798.class, new RenderBiped(new ModelBiped(), 0.5F));
map.put(Tweek.class, new RenderBiped(new ModelBiped(), 0.5F));
}
static
{
Kpickaxe = (new KyanitemodPickaxe(1002, EnumToolKyanite.Kyanite)).setItemName("Kyanite axe");
Kaxe = (new KyanitemodAxe(1002, EnumToolKyanite.Kyanite)).setItemName("Kyanite axe");
Kshovel = (new KyanitemodSpade(1003, EnumToolKyanite.Kyanite)).setItemName("Kyanite shovel");
Khoe = (new KyanitemodHoe(1004, EnumToolKyanite.Kyanite)).setItemName("Kyanite hoe");
Ksword = (new KyanitemodSword(1005, EnumToolKyanite.Kyanite)).setItemName("Kyanite sword");
KBody = (new KyaniteModArmor(2108, EnumArmorKyanite.Kyanite, 5, 1)).setItemName("Kyanite Chestplate");
KHelmet = (new KyaniteModArmor(2109, EnumArmorKyanite.Kyanite, 5, 0)).setItemName("Kyanite Helmet");
KPants = (new KyaniteModArmor(2111, EnumArmorKyanite.Kyanite, 5, 2)).setItemName("Kyanite Pants");
KBoots = (new KyaniteModArmor(2112, EnumArmorKyanite.Kyanite, 5, 3)).setItemName("Kyanite Boots");
RKpickaxe = (new KyanitemodPickaxe(1049, EnumToolKyanite.RKyanite)).setItemName("Reinforced Kyanite Pickaxe");
RKaxe = (new KyanitemodAxe(1051, EnumToolKyanite.RKyanite)).setItemName("Reinforced Kyanite axe");
RKshovel = (new KyanitemodSpade(1052, EnumToolKyanite.RKyanite)).setItemName("Reinforced Kyanite shovel");
RKhoe = (new KyanitemodHoe(1053, EnumToolKyanite.RKyanite)).setItemName("Reinforced Kyanite hoe");
RKsword = (new KyanitemodSword(1050, EnumToolKyanite.RKyanite)).setItemName("Reinforced Kyanite sword");
RKBody = (new KyaniteModArmor(2198, EnumArmorKyanite.RKyanite, 5, 1)).setItemName("Reinforced Kyanite Chestplate");
RKHelmet = (new KyaniteModArmor(2199, EnumArmorKyanite.RKyanite, 5, 0)).setItemName("Reinforced Kyanite Helmet");
RKPants = (new KyaniteModArmor(2191, EnumArmorKyanite.RKyanite, 5, 2)).setItemName("Reinforced Kyanite Pants");
RKBoots = (new KyaniteModArmor(2192, EnumArmorKyanite.RKyanite, 5, 3)).setItemName("Reinforced Kyanite Boots");
}
public boolean onTickInGame(float f, Minecraft minecraft)
{
if(minecraft.currentScreen == null)
{
creativeInventory = null;
}
return true;
}
public boolean onTickInGUI(float f, Minecraft minecraft, GuiScreen guiscreen)
{
if((guiscreen instanceof GuiContainerCreative) && !(creativeInventory instanceof GuiContainerCreative) && !minecraft.theWorld.isRemote)
{
Container container = ((GuiContainer)guiscreen).inventorySlots;
List list = ((ContainerCreative)container).itemList;
int i = 0;
list.add(new ItemStack(KyaniteBlock, 1, i));
list.add(new ItemStack(KyaniteoreBlock, 1, i));
list.add(new ItemStack(Xrayblock, 1, i));
list.add(new ItemStack(Glass2, 1, i));
}
creativeInventory = guiscreen;
return true;
}
private static GuiScreen creativeInventory;
//Achievement
public void onItemPickup(EntityPlayer entityplayer, ItemStack itemstack)
{
if(itemstack.itemID == mod_KyaniteMod.Cum.shiftedIndex)
{
entityplayer.addStat(IwouldntEatThat, 1);
}
}
}
i want to make a kamehameha wave mod, and possibly some other stuff like the dodon beam, spirt cannon, etc (DBZ), how can i make an item that shoots out something (a beam) and causes damage like tnt? how can i customize the beam? thanks
Hmm.....weren't you working on the GUI tutorial?
I don't see any notes that says you are working on GUI tutorial, which was once there.
I was really looking forward for it.
I need some help.
When i try to make a multi-textured block all the sides beside the top one become purple.
and in the entity file in your mob tut, i get some errors because its an older version, then how to fix the errors? tell me if u need more info.
I need some help.
When i try to make a multi-textured block all the sides beside the top one become purple.
and in the entity file in your mob tut, i get some errors because its an older version, then how to fix the errors? tell me if u need more info.
I think a really cool tutorial would be how to make a new type of chest. I have a mod and people REALLY want me to add stone chests but I'm not too sure how to add that yet. It would be awesome if you could make that tutorial
Hi Institution I really like your tutorial on the Dimension Coding but I've been having some trouble I got everything but everytime I try to enter I crash is there anyway to fix it?
Hey, I am working on a new dimension, and i cant figure out how to make custom trees. would you possibly be able to update that tutorial? or would you maybe know where a current tutorial is? thanks!
[REQUEST]
Custom Chest with bigger or smaller space for items.
Custom Chest that needs a "Key" to Open!
How to add effects (etc. Enchantments and Potion Effects) and "pumpkinblur"(Helmet) for armor and tools/swords
How to make custom effects ^______________^
How to make a Sky Dimension. Cus i dont know where to edit the code from your dimension tut to make it like The Aether or so :S
Hi Institution I really like your tutorial on the Dimension Coding but I've been having some trouble I got everything but everytime I try to enter I crash is there anyway to fix it?
Hello dynas did you register your dimension in your load() ?
I need help. I did all the MCP setup and Java/Eclipse stuff, but when I open Eclipse none of the class files are there. Not even the Server and Client folder are there. Did I setup MCP wrong? Or is it because Eclipse updated to Juno?
Error
I don't see any notes that says you are working on GUI tutorial, which was once there.
I was really looking forward for it.
When i try to make a multi-textured block all the sides beside the top one become purple.
and in the entity file in your mob tut, i get some errors because its an older version, then how to fix the errors? tell me if u need more info.
TheInstitution! Check ur Pm's!
Guys, I just released my biggest mod yet, go give it some love. Also, you need to initialize a variable that extends your texture: http://www.minecraftforum.net/topic/1374373-125-the-forbidden-forest-floating-islands-wizard-fortresses/
But back to the problem at hand how do you make a biome absolutely FLAT, I plan on using this to place buildings for a gangster mod.
I dont got any clues on how to do so
Custom Chest with bigger or smaller space for items.
Custom Chest that needs a "Key" to Open!
How to add effects (etc. Enchantments and Potion Effects) and "pumpkinblur"(Helmet) for armor and tools/swords
How to make custom effects ^______________^
How to make a Sky Dimension. Cus i dont know where to edit the code from your dimension tut to make it like The Aether or so :S
Please Help me out!
Hello dynas did you register your dimension in your load() ?
http://www.minecraftsao.org/
Check it out!
You for the most part need forge for that