
King_Arthur_III
Members-
Posts
19 -
Joined
-
Last visited
Converted
-
Gender
Undisclosed
-
Personal Text
I am new!
King_Arthur_III's Achievements

Tree Puncher (2/8)
0
Reputation
-
So I now the code looks like this, and it works better than before, with a few exceptions. The good part is that the fireball shoots in a much less random direction. However, much of the time it seems to get very buggy once it goes relatively far. Also, it shoots much faster than normal, which is not necessarily bad, but strange. @Override public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { if(par3EntityPlayer.capabilities.isCreativeMode||par3EntityPlayer.inventory.consumeInventoryItem(Items.redstone)) { par2World.playSoundAtEntity(par3EntityPlayer, "fireball", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F)); if (!par2World.isRemote){ //Minecraft minecraft = Minecraft.getMinecraft(); //EntityPlayerSP player = minecraft.thePlayer; //par2World.spawnEntityInWorld(new EntityLargeFireball(par2World, par3EntityPlayer, vec3.xCoord, vec3.yCoord, vec3.zCoord)); Vec3 vec3 = par3EntityPlayer.getLookVec(); EntityLargeFireball entitylargefireball = new EntityLargeFireball(par2World, par3EntityPlayer, vec3.xCoord, vec3.yCoord, vec3.zCoord); entitylargefireball.accelerationX = vec3.xCoord; entitylargefireball.accelerationY = vec3.yCoord; entitylargefireball.accelerationZ = vec3.zCoord; par2World.spawnEntityInWorld(entitylargefireball); } } return par1ItemStack; }
-
Thanks for the answer, I tried to find what would I could use but I figured out that they are accelerationX, accelerationY, and accelerationZ, so it doesn't sound like it has anything to do with pitch, yaw, and roll. Also, I don't think roll would be one of them because Minecraft only has pitch and yaw.
-
I am trying to make a sword that shoots a large fireball when right clicked in the direction that the player is pointing. But the fireball takes three parameters at the end that I don't know what they do. When I make them 10, 10, 10, the fireball always goes in a set direction no matter which way I am pointing. It seems like these parameters would be coordinates or something, but I don't know how to have them change depending on where the mouse is pointing. ? = mystery parameter @Override public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World,EntityPlayer par3EntityPlayer) { if(par3EntityPlayer.capabilities.isCreativeMode||par3EntityPlayer.inventory.consumeInventoryItem(Items.redstone)) { par2World.playSoundAtEntity(par3EntityPlayer, "fireball", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F)); if (!par2World.isRemote) { par2World.spawnEntityInWorld(new EntityLargeFireball(par2World, par3EntityPlayer, ?, ?, ?)); } } return par1ItemStack; }
-
I am trying to make my first entity ( 1.8 ) but when I run the client I get this message: "java.lang.IllegalArgumentException: Can not set static com.kingarthur.elementalswords.ClientProxy field com.kingarthur.elementalswords.ClientProxy.modInstance to com.kingarthur.elementalswords.Main" This is the relevant code in my client proxy: public class ClientProxy extends CommonProxy { @Instance(Main.MODID) public static ClientProxy modInstance; @Override public void preInit(FMLPreInitializationEvent e) { super.preInit(e); } @Override public void init(FMLInitializationEvent e) { super.init(e); ModEntities.mainRegistry(); ItemRenderRegister.registerItemRenderer(); } And this is the code in my ModEntities file: public class ModEntities { public static void mainRegistry() { registerEntity(); } public static void registerEntity() { createEntity(EntityFireGuardian.class, "Guardian of Fire", 0xF20505, 0xD8DE31); } public static void createEntity(Class entityClass, String entityName, int solidColor, int spotColor) { int randomId = EntityRegistry.findGlobalUniqueEntityId(); EntityRegistry.registerGlobalEntityID(entityClass, entityName, randomId); EntityRegistry.registerModEntity(entityClass, entityName, randomId, ClientProxy.modInstance, 80, 3, true); createEgg(randomId, solidColor, spotColor); } private static void createEgg(int randomId, int solidColor, int spotColor) { EntityList.entityEggs.put(Integer.valueOf(randomId), new EntityList.EntityEggInfo( randomId, solidColor, spotColor)); } }
-
This is my current folder structure. Minecraft (project) src/main/java package package package src/main/resources package package package So my question is, how do I separate the packages, or do I just leave them as they are?
-
So I can have projects inside of the Minecraft project?
-
I was about to make my second mod, but then I wondered if there was some standard way of organizing mods, or if I should just keep all the packages for all my mods in the same source folder. Anyone know what I should do?
-
I have made my first item, but there is no way to obtain it except through creative mode. How do I make mobs drop it?
-
When I try to start my world, I get this error: Forge Mod Loader detected missing blocks/items. There are 1 missing blocks and items in this save. If you continue the missing blocks/items will get removed. A world backup will automatically created in your saves directory. Missing Blocks/Items: tutorial:tutorial_item. Any idea where this error might be coming from?
-
When I attempt to run my very simple mod, I get this crash report: "java.lang.IllegalArgumentException: Can not set static com.arti.artismod.ArtisMod field com.arti.artismod.ArtisMod.instance to com.example.examplemod.ExampleMod" The code: package com.arti.artismod; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.Mod.EventHandler; import net.minecraftforge.fml.common.Mod.Instance; import net.minecraftforge.fml.common.event.FMLInitializationEvent; import net.minecraftforge.fml.common.event.FMLPostInitializationEvent; import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; @Mod(modid = ArtisMod.MODID, name = ArtisMod.MODNAME, version = ArtisMod.VERSION) public class ArtisMod { public static final String MODID = "tutorial"; public static final String MODNAME = "Tutorial Mod"; public static final String VERSION = "1.0.0"; @Instance public static ArtisMod instance = new ArtisMod(); @EventHandler public void preInit(FMLPreInitializationEvent e) { } @EventHandler public void init(FMLInitializationEvent e) { } @EventHandler public void postInit(FMLPostInitializationEvent e) { } }