Hello,
After 2 days of hard works triying to solve my render problem, i found this post, and now it's works, Thank you !
Well, in fact i have another problem now:
My render works well in Creative but in Survival when i shoot i see the arrow(or the bullet for my mod) rotate to 180 degrees and face me but the trajectory still working. Don't really matter but still annoying.
If someone know how to fix it.
Sorry for typing error, English is not my native language.
Thanks for help !
I'm happy it worked for you xD
That's very strange your render works fine in Creative but not in Survival. If you post your code I'll take a look at it. Please post each class in it's own [ SPOILER ] and [ CODE ] tag section (remove the spaces) and include the following:
1. Class that spawns your Entity (probably an Item)
2. Entity class
3. Render class
4. Entity and Render registration code, just for completeness
I've changed my code since my last post but now the bullet have strange behavior in both mode (Still rotate in Survival but in Creative the bullet seems to do an arc of a circle to his target).
Anyway,i will put an empty texture on bullet thats it (entity hit the target even if the render doesnt).
Here's still my code:
Ok, well my advice to you would be first to extend EntityThrowable and just call the super methods where needed, rather than copying them all over to your class.
Second, you are using '21.0F' as the velocity when you spawn your bullet; that seems pretty high and may adversely affect the animations. Have you tried using 2.0F or 3.0F instead? If so, do you still get the same strange rendering behavior with the lower velocities?
Third, it looks like you are using the render arrow code, but keep in mind that is for a long thin projectile with the head at a specific orientation related to the icon texture; is your bullet icon in the exact same orientation as the arrow icon? Is your bullet the same length? Perhaps you could try using a different render base such as RenderSnowball and see how that looks.
In fact i want my gun with the same stats in real life:
I mesure ticks number in onUpdate, multiply 50ms and i shoot the target 100 meters away (100 cubes) I compare with the real life stat.
That's why my bullet are really fast. I will try your hints but if it doesn't works i will not display bullets, it doesn t really matter.
followed all of your instructions, and it doesn't seem to be working. i'm using render snowball btw. were there any changes from 1.6.2 to 1.6.4 because i saw this tutorial was made for 1.6.2 and i'm using 1.6.4
my previous problem was that my client proxy and common proxy had some issues. but those are all worked out now.
anyways, i'm now using my own render file that extends render snowball. i haven't changed anything yet in the render file, but when i right click in game to spawn my entity from my item, the game crashes. i looked through the crash report and found that the problem traces to this line of code in render snowball:
now obviously it has something to do with render snowball wanting to grab my item icon but that isn't working. my item renders the icon fine in my inventory and everything. i don't know what the problem is.
here is all my code that has to do with this problem:
Main mod file:
package mtndewey.ninjamod;
import java.net.Proxy;
import java.util.Map;
import java.util.Random;
import org.lwjgl.input.Keyboard;
import cpw.mods.fml.client.registry.KeyBindingRegistry;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.Mod.Init;
import cpw.mods.fml.common.Mod.Instance;
import cpw.mods.fml.common.Mod.PreInit;
import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.network.NetworkMod;
import cpw.mods.fml.common.registry.EntityRegistry;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;
import mtndewey.ninjamod.items.ItemKatana;
import mtndewey.ninjamod.items.ItemCommonArmor;
import mtndewey.ninjamod.items.ItemAwesomeArmor;
import net.minecraft.block.Block;
import net.minecraft.client.renderer.entity.RenderSnowball;
import net.minecraft.client.settings.KeyBinding;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.projectile.EntitySnowball;
import net.minecraft.item.EnumArmorMaterial;
import net.minecraft.item.EnumToolMaterial;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.world.World;
import net.minecraft.world.chunk.IChunkProvider;
import net.minecraftforge.client.EnumHelperClient;
import net.minecraftforge.common.Configuration;
import net.minecraftforge.common.MinecraftForge;
import mtndewey.ninjamod.items.*;
import mtndewey.ninjamod.blocks.*;
import mtndewey.ninjamod.client.EntityNinjaStar;
import mtndewey.ninjamod.client.EventHandlerClient;
import mtndewey.ninjamod.client.CommonProxy;
import mtndewey.ninjamod.client.WorldGenClient;
import mtndewey.ninjamod.client.WorldGenSmallDojo;
import mtndewey.ninjamod.client.tabNinja;
import mtndewey.ninjamod.items.ninjamoditems;
import mtndewey.ninjamod.*;
//Forge Declaration
@Mod(modid="ninjamod",name="Ninja Mod",version="v3.6")
@NetworkMod(clientSideRequired=true,serverSideRequired=true)
public class ninjamod {
@Instance(value = "ninjamod")
public static ninjamod instance;
//Proxy & Forge
@SidedProxy(clientSide = "mtndewey.ninjamod.client.ClientProxy", serverSide = "mtndewey.ninjamod.client.ServerProxy")
public static CommonProxy proxy;
public static final String modid = "ninjamod";
private static int modEntityID = 0;
//Armor
public static Item ninjaChestAwesome;
public static Item ninjaLegsAwesome;
public static Item ninjaHelmAwesome;
public static Item ninjaBootsAwesome;
public static Item ninjaChest;
public static Item ninjaLegs;
public static Item ninjaHelm;
public static Item ninjaBoots;
//Creative Tab
public static CreativeTabs tabNinja = new tabNinja(CreativeTabs.getNextID(), "Ninja Mod");
//Materials
public static final EnumToolMaterial LEGENDARY = EnumHelperClient.addToolMaterial ("legendary", 0, 1700, 10.0F, 6.0F, 20);
public static final EnumArmorMaterial AWESOME = EnumHelperClient.addArmorMaterial("awesome", 20 , new int[]{3, 7, 6, 2}, 30);
public static final EnumArmorMaterial COMMON = EnumHelperClient.addArmorMaterial("common", 11, new int[]{3, 5, 4, 2}, 30);
@PreInit
public void PreInit(FMLPreInitializationEvent event){
//Proxy
proxy.registerRenderers();
proxy.registerServerTickHandler();
}
@Init
public void load(FMLInitializationEvent event) throws Exception {
//Method Addition
new ninjamodblocks();
new ninjamoditems();
new ninjamodrecipes();
//Armor
ninjaChestAwesome = new ItemAwesomeArmor(7905, this.AWESOME, proxy.addArmor("ninjaChestAwesome"), 1).setUnlocalizedName("ninjamod:chestNinjaAwesome").setCreativeTab(ninjamod.tabNinja);
ninjaLegsAwesome = new ItemAwesomeArmor(7906, this.AWESOME, proxy.addArmor("ninjaLegsAwesome"), 2).setUnlocalizedName("ninjamod:legsNinjaAwesome").setCreativeTab(ninjamod.tabNinja);
ninjaHelmAwesome = new ItemAwesomeArmor(7904, this.AWESOME, proxy.addArmor("ninjaHelmAwesome"), 0).setUnlocalizedName("ninjamod:helmNinjaAwesome").setCreativeTab(ninjamod.tabNinja);
ninjaBootsAwesome = new ItemAwesomeArmor(7907, this.AWESOME, proxy.addArmor("ninjaBootsAwesome"), 3).setUnlocalizedName("ninjamod:bootsNinjaAwesome").setCreativeTab(ninjamod.tabNinja);
ninjaChest = new ItemCommonArmor(7909, this.COMMON, proxy.addArmor("ninjaChest"), 1).setUnlocalizedName("ninjamod:chestNinja").setCreativeTab(ninjamod.tabNinja);
ninjaLegs = new ItemCommonArmor(7910, this.COMMON, proxy.addArmor("ninjaLegs"), 2).setUnlocalizedName("ninjamod:legsNinja").setCreativeTab(ninjamod.tabNinja);
ninjaHelm = new ItemCommonArmor(7908, this.COMMON, proxy.addArmor("ninjaHelm"), 0).setUnlocalizedName("ninjamod:helmNinja").setCreativeTab(ninjamod.tabNinja);
ninjaBoots = new ItemCommonArmor(7911, this.COMMON, proxy.addArmor("ninjaBoots"), 3).setUnlocalizedName("ninjamod:bootsNinja").setCreativeTab(ninjamod.tabNinja);
//Armor Recipes
GameRegistry.addShapelessRecipe(new ItemStack(ninjamod.ninjaChest), Item.plateLeather, Item.dyePowder, ninjamoditems.ingotSteel);
GameRegistry.addShapelessRecipe(new ItemStack(ninjamod.ninjaLegs), Item.legsLeather, Item.dyePowder, ninjamoditems.ingotSteel);
GameRegistry.addShapelessRecipe(new ItemStack(ninjamod.ninjaBoots), Item.bootsLeather, Item.dyePowder, ninjamoditems.ingotSteel);
GameRegistry.addShapelessRecipe(new ItemStack(ninjamod.ninjaHelm), Item.helmetLeather, Item.dyePowder, ninjamoditems.ingotSteel);
GameRegistry.addRecipe(new ItemStack(ninjamod.ninjaChestAwesome), "PCP", " I ", 'I', Item.diamond, 'C', ninjamod.ninjaChest, 'P', Block.glass);
GameRegistry.addRecipe(new ItemStack(ninjamod.ninjaLegsAwesome), "PLP" , " D ", 'L', ninjamod.ninjaLegs, 'P', Block.pistonBase, 'D', Item.diamond);
GameRegistry.addRecipe(new ItemStack(ninjamod.ninjaBootsAwesome), "FBF", " D ", 'B', ninjamod.ninjaBoots, 'F', Item.feather, 'D', Item.diamond);
GameRegistry.addRecipe(new ItemStack(ninjamod.ninjaHelmAwesome), "SHS", " G ", 'S', Item.diamond, 'G', Block.glass, 'H', ninjamod.ninjaHelm);
//Armor Names
LanguageRegistry.addName(ninjamod.ninjaChestAwesome, EnumChatFormatting.YELLOW + "The Strength");
LanguageRegistry.addName(ninjamod.ninjaBootsAwesome, EnumChatFormatting.YELLOW + "The Stamina");
LanguageRegistry.addName(ninjamod.ninjaLegsAwesome, EnumChatFormatting.YELLOW + "The Speed");
LanguageRegistry.addName(ninjamod.ninjaHelmAwesome, EnumChatFormatting.YELLOW + "The Sight");
LanguageRegistry.addName(ninjamod.ninjaLegs, "Common Ninja Leggings");
LanguageRegistry.addName(ninjamod.ninjaHelm, "Common Ninja Cowl");
LanguageRegistry.addName(ninjamod.ninjaBoots, "Common Ninja Boots");
LanguageRegistry.addName(ninjamod.ninjaChest, "Common Ninja Robe");
//WorldGen
GameRegistry.registerWorldGenerator(new WorldGenClient());
//Ninja Star
EntityRegistry.registerModEntity(EntityNinjaStar.class, "Ninja Star", ++modEntityID, this, 64, 10, true);
//Event Handler
MinecraftForge.EVENT_BUS.register(new EventHandlerClient());
}
@EventHandler
public void PostInit(){
//Stub Method
}
}
client proxy:
package mtndewey.ninjamod.client;
import mtndewey.ninjamod.items.ninjamoditems;
import net.minecraft.client.renderer.entity.RenderSnowball;
import net.minecraft.item.Item;
import net.minecraft.src.ModLoader;
import cpw.mods.fml.client.registry.RenderingRegistry;
import cpw.mods.fml.common.registry.EntityRegistry;
public class ClientProxy extends CommonProxy {
@Override
public void registerRenderers() {
RenderingRegistry.registerEntityRenderingHandler(EntityNinjaStar.class, new RenderNinjaStar(ninjamoditems.ninjaStar));
}
@Override
public int addArmor(String armor){
return RenderingRegistry.addNewArmourRendererPrefix(armor);
}
}
my previous problem was that my client proxy and common proxy had some issues. but those are all worked out now.
anyways, i'm now using my own render file that extends render snowball. i haven't changed anything yet in the render file, but when i right click in game to spawn my entity from my item, the game crashes. i looked through the crash report and found that the problem traces to this line of code in render snowball:
now obviously it has something to do with render snowball wanting to grab my item icon but that isn't working. my item renders the icon fine in my inventory and everything. i don't know what the problem is.
here is all my code that has to do with this problem:
and that's about it. like i said in the previous post, if there were any changes between 1.6.2 and 1.6.4 let me know.
btw nice tutorial. it's just about the only one i could seem to find on the internet
Thanks. No, not much changed between those two versions that I can think of.
Could you post the entire crash report, as well as your NinjaModItems class? Do you get the same crash when using RenderSnowball instead of your custom render class?
On a side note, you should really follow Java naming conventions. Not only does it make your code easier to follow, it also helps to avoid some kinds of errors.
You can also press 'ctrl-shift-o' in Eclipse to remove unnecessary imports (like in your ItemNinjaStar class).
it does the same thing with rendersnowball. and thanks for the removing useless import advice. all my classes are now useless import free! and i looked at the naming convention link, i don't see a difference between my code and those guidlines. maybe you could help me on that a little more?
ninjamoditems:
package mtndewey.ninjamod.items;
import mtndewey.ninjamod.Registry;
import mtndewey.ninjamod.ninjamod;
import net.minecraft.item.EnumToolMaterial;
import net.minecraft.item.Item;
import net.minecraft.util.EnumChatFormatting;
public class ninjamoditems {
public static Item fireKatana;
public static Item waterKatana;
public static Item earthKatana;
public static Item airKatana;
public static Item ninjaStar;
public static Item katana;
public static Item legendaryKatana;
public static Item ingotSteel;
public static Item rawCarbon;
public static Item climbingSpikes;
public ninjamoditems(){
//Katanas
katana = new ItemKatana(7894, EnumToolMaterial.IRON);
legendaryKatana = new ItemKatana(7895, ninjamod.LEGENDARY);
fireKatana = new ItemFireKatana(7896, EnumToolMaterial.EMERALD);
waterKatana = new ItemWaterKatana(7897, EnumToolMaterial.EMERALD);
earthKatana = new ItemEarthKatana(7898, EnumToolMaterial.EMERALD);
airKatana = new ItemAirKatana(7899, EnumToolMaterial.EMERALD);
//Items
climbingSpikes = new ItemClimbingSpikes(7900);
ingotSteel = new ItemSteelIngot(7901);
ninjaStar = new ItemNinjaStar(7902);
rawCarbon = new ItemRawCarbon(7903);
//Registry
Registry.RegisterBasicItem(katana, "Katana", "ninjamod:katana");
Registry.RegisterBasicItem(legendaryKatana, EnumChatFormatting.YELLOW + "Legendary Katana", "ninjamod:katanaLegendary");
Registry.RegisterBasicItem(fireKatana, EnumChatFormatting.DARK_RED + "Fire Katana", "ninjamod:katanaFire");
Registry.RegisterBasicItem(waterKatana, EnumChatFormatting.DARK_BLUE + "Water Katana", "ninjamod:katanaWater");
Registry.RegisterBasicItem(earthKatana, EnumChatFormatting.DARK_GREEN + "Earth Katana", "ninjamod:katanaEarth");
Registry.RegisterBasicItem(airKatana, EnumChatFormatting.BOLD + "Air Katana", "ninjamod:katanaAir");
Registry.RegisterBasicItem(ingotSteel, "Steel Ingot", "ninjamod:ingotSteel");
Registry.RegisterBasicItem(ninjaStar, "Ninja Star", "ninjamod:ninjaStar");
Registry.RegisterBasicItem(rawCarbon, "Raw Carbon", "ninjamod:rawCarbon");
Registry.RegisterBasicItem(climbingSpikes, "Climbing Spikes", "ninjamod:climbingSpikes");
}
}
And the crash report:
Jan 31, 2014 7:51:44 PM net.minecraft.launchwrapper.LogWrapper log
INFO: Loading tweak class name cpw.mods.fml.common.launcher.FMLTweaker
Jan 31, 2014 7:51:44 PM net.minecraft.launchwrapper.LogWrapper log
INFO: Using primary tweak class name cpw.mods.fml.common.launcher.FMLTweaker
Jan 31, 2014 7:51:44 PM net.minecraft.launchwrapper.LogWrapper log
INFO: Calling tweak class cpw.mods.fml.common.launcher.FMLTweaker
2014-01-31 19:51:44 [INFO] [ForgeModLoader] Forge Mod Loader version 6.4.49.965 for Minecraft 1.6.4 loading
2014-01-31 19:51:44 [INFO] [ForgeModLoader] Java is Java HotSpot(TM) 64-Bit Server VM, version 1.7.0_51, running on Windows 8:amd64:6.2, installed at C:\Program Files\Java\jre7
2014-01-31 19:51:44 [INFO] [ForgeModLoader] Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation
2014-01-31 19:51:44 [INFO] [ForgeModLoader] Loading tweak class name cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker
2014-01-31 19:51:44 [INFO] [ForgeModLoader] Loading tweak class name cpw.mods.fml.common.launcher.FMLDeobfTweaker
2014-01-31 19:51:44 [INFO] [ForgeModLoader] Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker
2014-01-31 19:51:44 [INFO] [ForgeModLoader] Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker
2014-01-31 19:51:44 [INFO] [ForgeModLoader] Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper
2014-01-31 19:51:44 [INFO] [STDOUT] Loaded 40 rules from AccessTransformer config file fml_at.cfg
2014-01-31 19:51:44 [SEVERE] [ForgeModLoader] The binary patch set is missing. Either you are in a development environment, or things are not going to work!
2014-01-31 19:51:45 [INFO] [ForgeModLoader] Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper
2014-01-31 19:51:45 [INFO] [STDOUT] Loaded 110 rules from AccessTransformer config file forge_at.cfg
2014-01-31 19:51:45 [INFO] [ForgeModLoader] Calling tweak class cpw.mods.fml.common.launcher.FMLDeobfTweaker
2014-01-31 19:51:45 [INFO] [ForgeModLoader] Launching wrapped minecraft {net.minecraft.client.main.Main}
2014-01-31 19:51:46 [INFO] [Minecraft-Client] Setting user: Player0
2014-01-31 19:51:47 [INFO] [Minecraft-Client] LWJGL Version: 2.9.0
2014-01-31 19:51:48 [INFO] [Minecraft-Client] Reloading ResourceManager: Default
2014-01-31 19:51:48 [INFO] [MinecraftForge] Attempting early MinecraftForge initialization
2014-01-31 19:51:48 [INFO] [STDOUT] MinecraftForge v9.11.1.965 Initialized
2014-01-31 19:51:48 [INFO] [ForgeModLoader] MinecraftForge v9.11.1.965 Initialized
2014-01-31 19:51:49 [INFO] [STDOUT] Replaced 111 ore recipies
2014-01-31 19:51:49 [INFO] [MinecraftForge] Completed early MinecraftForge initialization
2014-01-31 19:51:49 [INFO] [ForgeModLoader] Reading custom logging properties from C:\Users\Jonathan\Documents\modding\Mc 1.6.4\ninjamod\ninjamod\jars\config\logging.properties
2014-01-31 19:51:49 [OFF] [ForgeModLoader] Logging level for ForgeModLoader logging is set to ALL
2014-01-31 19:51:49 [INFO] [ForgeModLoader] Searching C:\Users\Jonathan\Documents\modding\Mc 1.6.4\ninjamod\ninjamod\jars\mods for mods
2014-01-31 19:51:52 [INFO] [ForgeModLoader] Forge Mod Loader has identified 4 mods to load
2014-01-31 19:51:52 [INFO] [mcp] Activating mod mcp
2014-01-31 19:51:52 [INFO] [FML] Activating mod FML
2014-01-31 19:51:52 [INFO] [Forge] Activating mod Forge
2014-01-31 19:51:52 [INFO] [ninjamod] Activating mod ninjamod
2014-01-31 19:51:52 [WARNING] [Forge Mod Loader] Mod Forge Mod Loader is missing a pack.mcmeta file, things may not work well
2014-01-31 19:51:52 [WARNING] [Minecraft Forge] Mod Minecraft Forge is missing a pack.mcmeta file, things may not work well
2014-01-31 19:51:52 [WARNING] [Ninja Mod] Mod Ninja Mod is missing a pack.mcmeta file, things may not work well
2014-01-31 19:51:52 [INFO] [Minecraft-Client] Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Ninja Mod
2014-01-31 19:51:52 [INFO] [ForgeModLoader] Registering Forge Packet Handler
2014-01-31 19:51:52 [INFO] [ForgeModLoader] Succeeded registering Forge Packet Handler
2014-01-31 19:51:52 [SEVERE] [ninjamod] The mod ninjamod appears to have an invalid event annotation EventHandler. This annotation can only apply to methods with recognized event arguments - it will not be called
2014-01-31 19:51:52 [INFO] [ForgeModLoader] Configured a dormant chunk cache size of 0
2014-01-31 19:51:53 [INFO] [ForgeModLoader] Forge Mod Loader has successfully loaded 4 mods
2014-01-31 19:51:53 [WARNING] [Forge Mod Loader] Mod Forge Mod Loader is missing a pack.mcmeta file, things may not work well
2014-01-31 19:51:53 [WARNING] [Minecraft Forge] Mod Minecraft Forge is missing a pack.mcmeta file, things may not work well
2014-01-31 19:51:53 [WARNING] [Ninja Mod] Mod Ninja Mod is missing a pack.mcmeta file, things may not work well
2014-01-31 19:51:53 [INFO] [Minecraft-Client] Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Ninja Mod
2014-01-31 19:51:54 [INFO] [STDOUT]
2014-01-31 19:51:54 [INFO] [STDOUT] Starting up SoundSystem...
2014-01-31 19:51:54 [INFO] [STDOUT] Initializing LWJGL OpenAL
2014-01-31 19:51:54 [INFO] [STDOUT] (The LWJGL binding of OpenAL. For more information, see http://www.lwjgl.org)
2014-01-31 19:51:54 [INFO] [STDOUT] OpenAL initialized.
2014-01-31 19:51:54 [INFO] [STDOUT]
2014-01-31 19:51:58 [INFO] [Minecraft-Server] Starting integrated minecraft server version 1.6.4
2014-01-31 19:51:58 [INFO] [Minecraft-Server] Generating keypair
2014-01-31 19:51:58 [INFO] [ForgeModLoader] Loading dimension 0 (New World) (net.minecraft.server.integrated.IntegratedServer@4c5191b7)
2014-01-31 19:51:58 [INFO] [ForgeModLoader] Loading dimension 1 (New World) (net.minecraft.server.integrated.IntegratedServer@4c5191b7)
2014-01-31 19:51:58 [INFO] [ForgeModLoader] Loading dimension -1 (New World) (net.minecraft.server.integrated.IntegratedServer@4c5191b7)
2014-01-31 19:51:58 [INFO] [Minecraft-Server] Preparing start region for level 0
2014-01-31 19:51:59 [INFO] [Minecraft-Server] Preparing spawn area: 72%
2014-01-31 19:52:00 [SEVERE] [Minecraft-Client] Realms: Server not available!
2014-01-31 19:52:00 [INFO] [STDOUT] loading single player
2014-01-31 19:52:00 [INFO] [Minecraft-Server] Player0[/127.0.0.1:0] logged in with entity id 33 at (-678.1838325744934, 4.0, -1394.674594224321)
2014-01-31 19:52:00 [INFO] [Minecraft-Server] Player0 joined the game
2014-01-31 19:52:00 [INFO] [STDOUT] Setting up custom skins
2014-01-31 19:52:03 [INFO] [Minecraft-Server] Stopping server
2014-01-31 19:52:03 [INFO] [Minecraft-Server] Saving players
2014-01-31 19:52:03 [INFO] [Minecraft-Server] Player0 left the game
2014-01-31 19:52:03 [INFO] [Minecraft-Server] Saving worlds
2014-01-31 19:52:03 [INFO] [Minecraft-Server] Saving chunks for level 'New World'/Overworld
2014-01-31 19:52:03 [INFO] [Minecraft-Server] Saving chunks for level 'New World'/Nether
2014-01-31 19:52:03 [INFO] [Minecraft-Server] Saving chunks for level 'New World'/The End
2014-01-31 19:52:03 [INFO] [ForgeModLoader] Unloading dimension 0
2014-01-31 19:52:03 [INFO] [ForgeModLoader] Unloading dimension -1
2014-01-31 19:52:03 [INFO] [ForgeModLoader] Unloading dimension 1
2014-01-31 19:52:03 [INFO] [STDERR] net.minecraft.util.ReportedException: Rendering entity in world
2014-01-31 19:52:03 [INFO] [STDERR] at net.minecraft.client.renderer.entity.RenderManager.renderEntityWithPosYaw(RenderManager.java:339)
2014-01-31 19:52:03 [INFO] [STDERR] at net.minecraft.client.renderer.entity.RenderManager.renderEntity(RenderManager.java:281)
2014-01-31 19:52:03 [INFO] [STDERR] at net.minecraft.client.renderer.RenderGlobal.renderEntities(RenderGlobal.java:524)
2014-01-31 19:52:03 [INFO] [STDERR] at net.minecraft.client.renderer.EntityRenderer.renderWorld(EntityRenderer.java:1160)
2014-01-31 19:52:03 [INFO] [STDERR] at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1006)
2014-01-31 19:52:03 [INFO] [STDERR] at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:946)
2014-01-31 19:52:03 [INFO] [STDERR] at net.minecraft.client.Minecraft.run(Minecraft.java:838)
2014-01-31 19:52:03 [INFO] [STDERR] at net.minecraft.client.main.Main.main(Main.java:93)
2014-01-31 19:52:03 [INFO] [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2014-01-31 19:52:03 [INFO] [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
2014-01-31 19:52:03 [INFO] [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
2014-01-31 19:52:03 [INFO] [STDERR] at java.lang.reflect.Method.invoke(Unknown Source)
2014-01-31 19:52:03 [INFO] [STDERR] at net.minecraft.launchwrapper.Launch.launch(Launch.java:131)
2014-01-31 19:52:03 [INFO] [STDERR] at net.minecraft.launchwrapper.Launch.main(Launch.java:27)
2014-01-31 19:52:03 [INFO] [STDERR] Caused by: java.lang.NullPointerException
2014-01-31 19:52:03 [INFO] [STDERR] at mtndewey.ninjamod.client.RenderNinjaStar.doRender(RenderNinjaStar.java:45)
2014-01-31 19:52:03 [INFO] [STDERR] at net.minecraft.client.renderer.entity.RenderManager.renderEntityWithPosYaw(RenderManager.java:312)
2014-01-31 19:52:03 [INFO] [STDERR] ... 13 more
2014-01-31 19:52:03 [INFO] [STDOUT] ---- Minecraft Crash Report ----
2014-01-31 19:52:03 [INFO] [STDOUT] // Shall we play a game?
2014-01-31 19:52:03 [INFO] [STDOUT]
2014-01-31 19:52:03 [INFO] [STDOUT] Time: 1/31/14 7:52 PM
2014-01-31 19:52:03 [INFO] [STDOUT] Description: Rendering entity in world
2014-01-31 19:52:03 [INFO] [STDOUT]
2014-01-31 19:52:03 [INFO] [STDOUT] java.lang.NullPointerException
2014-01-31 19:52:03 [INFO] [STDOUT] at mtndewey.ninjamod.client.RenderNinjaStar.doRender(RenderNinjaStar.java:45)
2014-01-31 19:52:03 [INFO] [STDOUT] at net.minecraft.client.renderer.entity.RenderManager.renderEntityWithPosYaw(RenderManager.java:312)
2014-01-31 19:52:03 [INFO] [STDOUT] at net.minecraft.client.renderer.entity.RenderManager.renderEntity(RenderManager.java:281)
2014-01-31 19:52:03 [INFO] [STDOUT] at net.minecraft.client.renderer.RenderGlobal.renderEntities(RenderGlobal.java:524)
2014-01-31 19:52:03 [INFO] [STDOUT] at net.minecraft.client.renderer.EntityRenderer.renderWorld(EntityRenderer.java:1160)
2014-01-31 19:52:03 [INFO] [STDOUT] at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1006)
2014-01-31 19:52:03 [INFO] [STDOUT] at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:946)
2014-01-31 19:52:03 [INFO] [STDOUT] at net.minecraft.client.Minecraft.run(Minecraft.java:838)
2014-01-31 19:52:03 [INFO] [STDOUT] at net.minecraft.client.main.Main.main(Main.java:93)
2014-01-31 19:52:03 [INFO] [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2014-01-31 19:52:03 [INFO] [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
2014-01-31 19:52:03 [INFO] [STDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
2014-01-31 19:52:03 [INFO] [STDOUT] at java.lang.reflect.Method.invoke(Unknown Source)
2014-01-31 19:52:03 [INFO] [STDOUT] at net.minecraft.launchwrapper.Launch.launch(Launch.java:131)
2014-01-31 19:52:03 [INFO] [STDOUT] at net.minecraft.launchwrapper.Launch.main(Launch.java:27)
2014-01-31 19:52:03 [INFO] [STDOUT]
2014-01-31 19:52:03 [INFO] [STDOUT]
2014-01-31 19:52:03 [INFO] [STDOUT] A detailed walkthrough of the error, its code path and all known details is as follows:
2014-01-31 19:52:03 [INFO] [STDOUT] ---------------------------------------------------------------------------------------
2014-01-31 19:52:03 [INFO] [STDOUT]
2014-01-31 19:52:03 [INFO] [STDOUT] -- Head --
2014-01-31 19:52:03 [INFO] [STDOUT] Stacktrace:
2014-01-31 19:52:03 [INFO] [STDOUT] at mtndewey.ninjamod.client.RenderNinjaStar.doRender(RenderNinjaStar.java:45)
2014-01-31 19:52:03 [INFO] [STDOUT]
2014-01-31 19:52:03 [INFO] [STDOUT] -- Entity being rendered --
2014-01-31 19:52:03 [INFO] [STDOUT] Details:
2014-01-31 19:52:03 [INFO] [STDOUT] Entity Type: ninjamod.Ninja Star (mtndewey.ninjamod.client.EntityNinjaStar)
2014-01-31 19:52:03 [INFO] [STDOUT] Entity ID: 812
2014-01-31 19:52:03 [INFO] [STDOUT] Entity Name: entity.ninjamod.Ninja Star.name
2014-01-31 19:52:03 [INFO] [STDOUT] Entity's Exact location: -678.34, 5.50, -1394.69
2014-01-31 19:52:03 [INFO] [STDOUT] Entity's Block location: World: (-679,5,-1395), Chunk: (at 9,0,13 in -43,-88; contains blocks -688,0,-1408 to -673,255,-1393), Region: (-2,-3; contains chunks -64,-96 to -33,-65, blocks -1024,0,-1536 to -513,255,-1025)
2014-01-31 19:52:03 [INFO] [STDOUT] Entity's Momentum: 0.09, 0.05, 1.48
2014-01-31 19:52:03 [INFO] [STDOUT]
2014-01-31 19:52:03 [INFO] [STDOUT] -- Renderer details --
2014-01-31 19:52:03 [INFO] [STDOUT] Details:
2014-01-31 19:52:03 [INFO] [STDOUT] Assigned renderer: mtndewey.ninjamod.client.RenderNinjaStar@73dc78db
2014-01-31 19:52:03 [INFO] [STDOUT] Location: -0.16,-0.12,-0.01 - World: (-1,-1,-1), Chunk: (at 15,-1,15 in -1,-1; contains blocks -16,0,-16 to -1,255,-1), Region: (-1,-1; contains chunks -32,-32 to -1,-1, blocks -512,0,-512 to -1,255,-1)
2014-01-31 19:52:03 [INFO] [STDOUT] Rotation: 3.6084688
2014-01-31 19:52:03 [INFO] [STDOUT] Delta: 0.28200638
2014-01-31 19:52:03 [INFO] [STDOUT] Stacktrace:
2014-01-31 19:52:03 [INFO] [STDOUT] at net.minecraft.client.renderer.entity.RenderManager.renderEntityWithPosYaw(RenderManager.java:312)
2014-01-31 19:52:03 [INFO] [STDOUT] at net.minecraft.client.renderer.entity.RenderManager.renderEntity(RenderManager.java:281)
2014-01-31 19:52:03 [INFO] [STDOUT] at net.minecraft.client.renderer.RenderGlobal.renderEntities(RenderGlobal.java:524)
2014-01-31 19:52:03 [INFO] [STDOUT] at net.minecraft.client.renderer.EntityRenderer.renderWorld(EntityRenderer.java:1160)
2014-01-31 19:52:03 [INFO] [STDOUT]
2014-01-31 19:52:03 [INFO] [STDOUT] -- Affected level --
2014-01-31 19:52:03 [INFO] [STDOUT] Details:
2014-01-31 19:52:03 [INFO] [STDOUT] Level name: MpServer
2014-01-31 19:52:03 [INFO] [STDOUT] All players: 1 total; [EntityClientPlayerMP['Player0'/33, l='MpServer', x=-678.18, y=5.62, z=-1394.67]]
2014-01-31 19:52:03 [INFO] [STDOUT] Chunk stats: MultiplayerChunkCache: 210
2014-01-31 19:52:03 [INFO] [STDOUT] Level seed: 0
2014-01-31 19:52:03 [INFO] [STDOUT] Level generator: ID 01 - flat, ver 0. Features enabled: false
2014-01-31 19:52:03 [INFO] [STDOUT] Level generator options:
2014-01-31 19:52:03 [INFO] [STDOUT] Level spawn location: World: (-669,4,-1387), Chunk: (at 3,0,5 in -42,-87; contains blocks -672,0,-1392 to -657,255,-1377), Region: (-2,-3; contains chunks -64,-96 to -33,-65, blocks -1024,0,-1536 to -513,255,-1025)
2014-01-31 19:52:03 [INFO] [STDOUT] Level time: 1428 game time, 1428 day time
2014-01-31 19:52:03 [INFO] [STDOUT] Level dimension: 0
2014-01-31 19:52:03 [INFO] [STDOUT] Level storage version: 0x00000 - Unknown?
2014-01-31 19:52:03 [INFO] [STDOUT] Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false)
2014-01-31 19:52:03 [INFO] [STDOUT] Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: false
2014-01-31 19:52:03 [INFO] [STDOUT] Forced entities: 8 total; [EntitySlime['Slime'/21, l='MpServer', x=-732.06, y=4.00, z=-1428.09], EntitySlime['Slime'/20, l='MpServer', x=-732.26, y=4.00, z=-1454.00], EntitySlime['Slime'/23, l='MpServer', x=-703.15, y=4.00, z=-1349.64], EntityNinjaStar['entity.ninjamod.Ninja Star.name'/812, l='MpServer', x=-678.34, y=5.50, z=-1394.69], EntitySlime['Slime'/24, l='MpServer', x=-681.72, y=4.00, z=-1443.59], EntitySlime['Slime'/27, l='MpServer', x=-638.47, y=4.81, z=-1368.37], EntitySlime['Slime'/26, l='MpServer', x=-645.88, y=4.96, z=-1462.69], EntityClientPlayerMP['Player0'/33, l='MpServer', x=-678.18, y=5.62, z=-1394.67]]
2014-01-31 19:52:03 [INFO] [STDOUT] Retry entities: 0 total; []
2014-01-31 19:52:03 [INFO] [STDOUT] Server brand: fml,forge
2014-01-31 19:52:03 [INFO] [STDOUT] Server type: Integrated singleplayer server
2014-01-31 19:52:03 [INFO] [STDOUT] Stacktrace:
2014-01-31 19:52:03 [INFO] [STDOUT] at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:440)
2014-01-31 19:52:03 [INFO] [STDOUT] at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:2312)
2014-01-31 19:52:03 [INFO] [STDOUT] at net.minecraft.client.Minecraft.run(Minecraft.java:856)
2014-01-31 19:52:03 [INFO] [STDOUT] at net.minecraft.client.main.Main.main(Main.java:93)
2014-01-31 19:52:03 [INFO] [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2014-01-31 19:52:03 [INFO] [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
2014-01-31 19:52:03 [INFO] [STDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
2014-01-31 19:52:03 [INFO] [STDOUT] at java.lang.reflect.Method.invoke(Unknown Source)
2014-01-31 19:52:03 [INFO] [STDOUT] at net.minecraft.launchwrapper.Launch.launch(Launch.java:131)
2014-01-31 19:52:03 [INFO] [STDOUT] at net.minecraft.launchwrapper.Launch.main(Launch.java:27)
2014-01-31 19:52:03 [INFO] [STDOUT]
2014-01-31 19:52:03 [INFO] [STDOUT] -- System Details --
2014-01-31 19:52:03 [INFO] [STDOUT] Details:
2014-01-31 19:52:03 [INFO] [STDOUT] Minecraft Version: 1.6.4
2014-01-31 19:52:03 [INFO] [STDOUT] Operating System: Windows 8 (amd64) version 6.2
2014-01-31 19:52:03 [INFO] [STDOUT] Java Version: 1.7.0_51, Oracle Corporation
2014-01-31 19:52:03 [INFO] [STDOUT] Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
2014-01-31 19:52:03 [INFO] [STDOUT] Memory: 743275184 bytes (708 MB) / 1037959168 bytes (989 MB) up to 1037959168 bytes (989 MB)
2014-01-31 19:52:03 [INFO] [STDOUT] JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
2014-01-31 19:52:03 [INFO] [STDOUT] AABB Pool Size: 21635 (1211560 bytes; 1 MB) allocated, 144 (8064 bytes; 0 MB) used
2014-01-31 19:52:03 [INFO] [STDOUT] Suspicious classes: FML and Forge are installed
2014-01-31 19:52:03 [INFO] [STDOUT] IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
2014-01-31 19:52:03 [INFO] [STDOUT] FML: MCP v8.11 FML v6.4.49.965 Minecraft Forge 9.11.1.965 4 mods loaded, 4 mods active
2014-01-31 19:52:03 [INFO] [STDOUT] mcp{8.09} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
2014-01-31 19:52:03 [INFO] [STDOUT] FML{6.4.49.965} [Forge Mod Loader] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
2014-01-31 19:52:03 [INFO] [STDOUT] Forge{9.11.1.965} [Minecraft Forge] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
2014-01-31 19:52:03 [INFO] [STDOUT] ninjamod{v3.6} [Ninja Mod] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
2014-01-31 19:52:03 [INFO] [STDOUT] Launched Version: 1.6
2014-01-31 19:52:03 [INFO] [STDOUT] LWJGL: 2.9.0
2014-01-31 19:52:03 [INFO] [STDOUT] OpenGL: Intel(R) HD Graphics 4600 GL version 4.2.0 - Build 10.18.10.3277, Intel
2014-01-31 19:52:03 [INFO] [STDOUT] Is Modded: Definitely; Client brand changed to 'fml,forge'
2014-01-31 19:52:03 [INFO] [STDOUT] Type: Client (map_client.txt)
2014-01-31 19:52:03 [INFO] [STDOUT] Resource Pack: Default
2014-01-31 19:52:03 [INFO] [STDOUT] Current Language: English (US)
2014-01-31 19:52:03 [INFO] [STDOUT] Profiler Position: N/A (disabled)
2014-01-31 19:52:03 [INFO] [STDOUT] Vec3 Pool Size: 277 (15512 bytes; 0 MB) allocated, 53 (2968 bytes; 0 MB) used
2014-01-31 19:52:03 [INFO] [STDOUT] #@!@# Game crashed! Crash report saved to: #@!@# C:\Users\Jonathan\Documents\modding\Mc 1.6.4\ninjamod\ninjamod\jars\.\crash-reports\crash-2014-01-31_19.52.03-client.txt
AL lib: (EE) alc_cleanup: 1 device not closed
it does the same thing with rendersnowball. and thanks for the removing useless import advice. all my classes are now useless import free! and i looked at the naming convention link, i don't see a difference between my code and those guidlines. maybe you could help me on that a little more?
Sure Class names should always be uppercase: NinjaModItems, and method names are written just like field names, the first letter lowercase and then each word with uppercase: public void preInit(...) instead of public void PreInit.
I need to see your BaseModItem and Registry classes, too, to find out why there is a null pointer exception happening in the render code, and if you could do me a favor and just use RenderSnowball for now and post a crash report using that instead of your custom render class, that would be very helpful.
LOL!!! Hahaha, oh man. Can't believe it took this long, but thanks for your patience. So the problem is you are registering the render class before your Item is declared, so of course it is null.
Just put 'proxy.registerRenderers()' AFTER all your items and such are registered, and you should be fine.
Or rather, put your item and block initialization into the pre-init method before you register the renderers:
@PreInit
public void PreInit(FMLPreInitializationEvent event){
new ninjamodblocks();
new ninjamoditems();
//Proxy
proxy.registerRenderers();
proxy.registerServerTickHandler();
}
YES!! Thanks alot man do you know how to make a model for the entity in techne and then using that instead of the normal icon, and also being able to pick them up like arrows?
YES!! Thanks alot man do you know how to make a model for the entity in techne and then using that instead of the normal icon, and also being able to pick them up like arrows?
No problem For Techne, I've never personally used it, but I hear it's pretty simple. Once you have a model, you will need to make a custom render class and call the model's render methods, making sure that the rotation and such is correct.
As for picking them up like arrows, take a look at the EntityArrow class. You will need to save the tile x/y/z that it hits, stop it's motion when it impacts and don't set it to dead; alternatively (and much easier) is to spawn an EntityItem at the impact position if it is a block. It won't look all cool sticking into the ground that way, but it will probably save you both time and frustration.
ok so i made a model in techne and it looks great in game but i want it to be facing sideways, but it only does when i'm facing a certain way. also, i've been trying to play around with the spawning a new entity at the impact position but i cant get it to work. can you help me out?
ok so i made a model in techne and it looks great in game but i want it to be facing sideways, but it only does when i'm facing a certain way. also, i've been trying to play around with the spawning a new entity at the impact position but i cant get it to work. can you help me out?
For the rendering, sorry but you're on your own. OpenGL and I are not good friends
For spawning an entity at the impact position, that's simple. Using your custom throwable entity's onImpact method, you have a MovingObjectPosition as well as the entity's own position coordinates (posX, posY, posZ). Create whatever new entity you want using one of those two coordinate sets and spawn it just like you did the projectile.
when i try to use spawnEntityInWorld (what i used for onrightclick) it gets an error saying i can't make a static reference with a non static method. am i doing something wrong?
when i try to use spawnEntityInWorld (what i used for onrightclick) it gets an error saying i can't make a static reference with a non static method. am i doing something wrong?
Yes. You cannot make a static reference to a non-static method I recommend throwing that error statement into Google and seeing if you can't find an explanation. Or post your code and I can tell you which part is at fault.
protected void onImpact(MovingObjectPosition movObjPos)
{
if (movObjPos.entityHit != null)
{
byte starDamage = 4;
movObjPos.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), (float)starDamage);
int i = movObjPos.blockX;
int j = movObjPos.blockY;
int k = movObjPos.blockZ;
switch (movObjPos.sideHit)
{
case 0:
--j;
break;
case 1:
++j;
break;
case 2:
--k;
break;
case 3:
++k;
break;
case 4:
--i;
break;
case 5:
++i;
}
}
if (!World.isRemote)
{
World.spawnEntityInWorld(new EntityNinjaStar(World, EntityPlayer));
}
The error is at the world.isremote and world.spawnentityinworld
if (!World.isRemote)
{
World.spawnEntityInWorld(new EntityNinjaStar(World, EntityPlayer));
}
Of course, that's why Java naming conventions are so important. Understand that a capital 'W' on 'world' means that you are referencing the World class, rather than a field within your ninja star class. That is what is known as a 'static reference'. You need to use the world object field of your entity, which is non-static, to use the non-static method spawnEntityInWorld.
Please google static as well as following all of the tutorials on Oracle's Java tutorial website, for your own benefit. In the meantime, just change 'World' to 'worldObj' and it should work fine.
I'm happy it worked for you xD
That's very strange your render works fine in Creative but not in Survival. If you post your code I'll take a look at it. Please post each class in it's own [ SPOILER ] and [ CODE ] tag section (remove the spaces) and include the following:
1. Class that spawns your Entity (probably an Item)
2. Entity class
3. Render class
4. Entity and Render registration code, just for completeness
Anyway,i will put an empty texture on bullet thats it (entity hit the target even if the render doesnt).
Here's still my code:
Second, you are using '21.0F' as the velocity when you spawn your bullet; that seems pretty high and may adversely affect the animations. Have you tried using 2.0F or 3.0F instead? If so, do you still get the same strange rendering behavior with the lower velocities?
Third, it looks like you are using the render arrow code, but keep in mind that is for a long thin projectile with the head at a specific orientation related to the icon texture; is your bullet icon in the exact same orientation as the arrow icon? Is your bullet the same length? Perhaps you could try using a different render base such as RenderSnowball and see how that looks.
I mesure ticks number in onUpdate, multiply 50ms and i shoot the target 100 meters away (100 cubes) I compare with the real life stat.
That's why my bullet are really fast. I will try your hints but if it doesn't works i will not display bullets, it doesn t really matter.
Thanks for help i will tell the results !
anyways, i'm now using my own render file that extends render snowball. i haven't changed anything yet in the render file, but when i right click in game to spawn my entity from my item, the game crashes. i looked through the crash report and found that the problem traces to this line of code in render snowball:
now obviously it has something to do with render snowball wanting to grab my item icon but that isn't working. my item renders the icon fine in my inventory and everything. i don't know what the problem is.
here is all my code that has to do with this problem:
Main mod file:
client proxy:
my item class:
my entity class:
my render class
and that's about it. like i said in the previous post, if there were any changes between 1.6.2 and 1.6.4 let me know.
btw nice tutorial. it's just about the only one i could seem to find on the internet
Thanks. No, not much changed between those two versions that I can think of.
Could you post the entire crash report, as well as your NinjaModItems class? Do you get the same crash when using RenderSnowball instead of your custom render class?
On a side note, you should really follow Java naming conventions. Not only does it make your code easier to follow, it also helps to avoid some kinds of errors.
You can also press 'ctrl-shift-o' in Eclipse to remove unnecessary imports (like in your ItemNinjaStar class).
Sounds like a fun mod xD
ninjamoditems:
And the crash report:
Sure Class names should always be uppercase: NinjaModItems, and method names are written just like field names, the first letter lowercase and then each word with uppercase: public void preInit(...) instead of public void PreInit.
I need to see your BaseModItem and Registry classes, too, to find out why there is a null pointer exception happening in the render code, and if you could do me a favor and just use RenderSnowball for now and post a crash report using that instead of your custom render class, that would be very helpful.
anyways, heres the stuff you asked for:
Registry:
BaseModItem:
Crash Report w/ RenderSnowball in use:
Just put 'proxy.registerRenderers()' AFTER all your items and such are registered, and you should be fine.
Or rather, put your item and block initialization into the pre-init method before you register the renderers:
No problem For Techne, I've never personally used it, but I hear it's pretty simple. Once you have a model, you will need to make a custom render class and call the model's render methods, making sure that the rotation and such is correct.
As for picking them up like arrows, take a look at the EntityArrow class. You will need to save the tile x/y/z that it hits, stop it's motion when it impacts and don't set it to dead; alternatively (and much easier) is to spawn an EntityItem at the impact position if it is a block. It won't look all cool sticking into the ground that way, but it will probably save you both time and frustration.
For the rendering, sorry but you're on your own. OpenGL and I are not good friends
For spawning an entity at the impact position, that's simple. Using your custom throwable entity's onImpact method, you have a MovingObjectPosition as well as the entity's own position coordinates (posX, posY, posZ). Create whatever new entity you want using one of those two coordinate sets and spawn it just like you did the projectile.
Yes. You cannot make a static reference to a non-static method I recommend throwing that error statement into Google and seeing if you can't find an explanation. Or post your code and I can tell you which part is at fault.
The error is at the world.isremote and world.spawnentityinworld
Of course, that's why Java naming conventions are so important. Understand that a capital 'W' on 'world' means that you are referencing the World class, rather than a field within your ninja star class. That is what is known as a 'static reference'. You need to use the world object field of your entity, which is non-static, to use the non-static method spawnEntityInWorld.
Please google static as well as following all of the tutorials on Oracle's Java tutorial website, for your own benefit. In the meantime, just change 'World' to 'worldObj' and it should work fine.