Jump to content

Recommended Posts

Posted

Okay, so, I made some custom TNT, and I can't figure out why, when I light it, it doesn't show up. I had originally thought "Oh, it's because I don't have coding for a model" but using the coding I understand of model coding, I just get errors like "remove argument to match coding" or that I need to create a constructor for the model or things like that...I've been going in loops and finally reverted back to my original coding which gives me no errors but still doesn't load the model or anything.

 

Main Coding:

package craftygirls.main;

import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.EnumCreatureType;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.Item.ToolMaterial;
import net.minecraft.item.ItemArmor.ArmorMaterial;
import net.minecraft.item.ItemStack;
import net.minecraft.stats.Achievement;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.biome.BiomeGenBase.SpawnListEntry;
import net.minecraftforge.common.AchievementPage;
import net.minecraftforge.common.BiomeDictionary;
import net.minecraftforge.common.util.EnumHelper;
import net.minecraftforge.event.world.WorldEvent;
import net.minecraftforge.oredict.OreDictionary;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.Mod.Instance;
import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.registry.EntityRegistry;
import cpw.mods.fml.common.registry.GameRegistry;
import craftygirls.achievements.CraftyGirlsPickupEvent;
import craftygirls.blocks.BaseCraftyGirlsBlock;
import craftygirls.blocks.BlockFreeTNT;
import craftygirls.blocks.CraftyGirlsOre;
import craftygirls.entity.EntityMrFree;
import craftygirls.entity.EntityNeola;
import craftygirls.entity.EntityTTSnim;
import craftygirls.entity.EntityTomboy;
import craftygirls.items.ItemCGAxe;
import craftygirls.items.ItemCGHoe;
import craftygirls.items.ItemCGPickaxe;
import craftygirls.items.ItemCGShovel;
import craftygirls.items.ItemCGSword;
import craftygirls.main.ArmorCG;
import craftygirls.main.CommonProxyClass;
import static net.minecraftforge.common.BiomeDictionary.Type;

@Mod(modid = "craftygirls", name = "The Crafty Girls Core Mod", version = "Alpha v0.4")
public class CraftyGirlsMain {

@Instance("craftygirls")
public static CraftyGirlsMain instance;

//Proxies
@SidedProxy(clientSide="craftygirls.main.ClientProxyClass", serverSide="craftygirls.main.CommonProxyClass")
public static CommonProxyClass proxy;

/*private static final Class[][] paramTypes = new Class<?>[][] {{EnumCreatureType.class, Class.class, int.class, Material.class, boolean.class, boolean.class}};
public static final EnumCreatureType EnumNeola = EnumHelper.addEnum(paramTypes, EnumCreatureType.class, "TypeNeola", EntityNeola.class, 40, Material.air, true, true);
public static final EnumCreatureType EnumTomBoy = EnumHelper.addEnum(paramTypes, EnumCreatureType.class, "TypeTomBoy", EntityTomboy.class, 40, Material.air, true, true);
public static final EnumCreatureType EnumTTSnim = EnumHelper.addEnum(paramTypes, EnumCreatureType.class, "TypeTTSnim", EntityTTSnim.class, 40, Material.air, true, true);
*///Cookies for Tomboy. Flowers for Alice, and Diamonds for Stef

//Achievements
public static Achievement StefIngotAchieve;
public static Achievement MaryIngotAchieve;
public static Achievement AliceIngotAchieve;
public static Achievement FreeIngotAchieve;
public static Achievement MarySwordAchieve;
public static Achievement StefHoeAchieve;
public static Achievement AliceBlanketAchieve;

//Stef
public static Block StefOre;
public static Block StefBlock;
public static Block StefBrick;
public static Item StefIngot;
public static ToolMaterial StefMaterial = EnumHelper.addToolMaterial("StefMat", 4, 2341, 12.0F, 4.5F, 15);
public static Item StefShovel;
public static Item StefPickaxe;
public static Item StefAxe;
public static Item StefHoe;
public static Item StefSword;

//Mary
public static Block MaryOre;
public static Block MaryBlock;
public static Block MaryBrick;
public static Item MaryIngot;
public static ToolMaterial MaryMaterial = EnumHelper.addToolMaterial("MaryMat", 4, 2341, 12.0F, 4.5F, 15);
public static Item MaryShovel;
public static Item MaryPickaxe;
public static Item MaryAxe;
public static Item MaryHoe;
public static Item MarySword;

//Alice
public static Block AliceOre;
public static Block AliceBlock;
public static Block AliceBrick;
public static Item AliceIngot;
public static ToolMaterial AliceMaterial = EnumHelper.addToolMaterial("AliceMat", 4, 2341, 12.0F, 4.5F, 15);
public static Item AliceShovel;
public static Item AlicePickaxe;
public static Item AliceAxe;
public static Item AliceHoe;
public static Item AliceSword;
public static Item AliceBlanket;
public static Item AlicePowerFlower;

//Mr. Free
public static Block FreeOre;
public static Block FreeBlock;
public static Block FreeBrick;
public static Item FreeIngot;
public static Block FreeTNT;

//CG Armor
public static ArmorMaterial CraftyGirlsArmorMaterial = EnumHelper.addArmorMaterial("CraftyGirlsArmor", 50, new int[]{5, 12, 9, 5}, 15);
public static Item CGHelmet;
public static Item CGChestplate;
public static Item CGLeggings;
public static Item CGBoots;

public static CreativeTabs CraftyGirlsCoreTabs = new CreativeTabs("CraftyGirlsCoreTabs") {
	public Item getTabIconItem() {
		return CraftyGirlsMain.StefIngot;
	}
};

@EventHandler
public void preInit(FMLPreInitializationEvent e){

	//Stef
	StefBlock = new BaseCraftyGirlsBlock().setBlockName("ttsnimblock").setHardness(5.0F).setResistance(5.0F).setCreativeTab(CraftyGirlsCoreTabs).setBlockTextureName("craftygirls:ttsnimblock");
	GameRegistry.registerBlock(StefBlock, "ttsnimblock");
	StefBlock.setHarvestLevel("pickaxe", 3);

	StefOre = new CraftyGirlsOre().setBlockName("ttsnimore").setHardness(5.0F).setResistance(5.0F).setCreativeTab(CraftyGirlsCoreTabs).setBlockTextureName("craftygirls:ttsnimore");
	GameRegistry.registerBlock(StefOre, "ttsnimore");
	StefOre.setHarvestLevel("pickaxe", 3);

	StefBrick = new BaseCraftyGirlsBlock().setBlockName("ttsnimbrick").setHardness(5.0F).setResistance(5.0F).setCreativeTab(CraftyGirlsCoreTabs).setBlockTextureName("craftygirls:ttsnimbrick");
	GameRegistry.registerBlock(StefBrick, "ttsnimbrick");
	StefBrick.setHarvestLevel("pickaxe", 3);

	StefIngot = new Item().setUnlocalizedName("ttsnimingot").setCreativeTab(CraftyGirlsCoreTabs).setTextureName("craftygirls:ttsnimingot");
	GameRegistry.registerItem(StefIngot, "ttsnimingot");

	StefShovel = (new ItemCGShovel(StefMaterial).setUnlocalizedName("TTSnimShovel").setCreativeTab(CraftyGirlsCoreTabs).setTextureName("craftygirls:ttsnim_shovel"));
	GameRegistry.registerItem(StefShovel, "ttsnimshovel");

	StefPickaxe = (new ItemCGPickaxe(StefMaterial).setUnlocalizedName("TTSnimPickaxe").setCreativeTab(CraftyGirlsCoreTabs).setTextureName("craftygirls:ttsnim_pickaxe"));
	GameRegistry.registerItem(StefPickaxe, "ttsnimpickaxe");

	StefAxe = (new ItemCGAxe(StefMaterial).setUnlocalizedName("TTSnimAxe").setCreativeTab(CraftyGirlsCoreTabs).setTextureName("craftygirls:ttsnim_axe"));
	GameRegistry.registerItem(StefAxe, "ttsnimaxe");

	StefHoe = (new ItemCGHoe(StefMaterial).setUnlocalizedName("TTSnimHoe").setCreativeTab(CraftyGirlsCoreTabs).setTextureName("craftygirls:ttsnim_hoe"));
	GameRegistry.registerItem(StefHoe, "ttsnimhoe");

	StefSword = (new ItemCGSword(StefMaterial).setUnlocalizedName("TTSnimSword").setCreativeTab(CraftyGirlsCoreTabs).setTextureName("craftygirls:ttsnim_sword"));
	GameRegistry.registerItem(StefSword, "ttsnimsword");		

	//Mary
	MaryBlock = new BaseCraftyGirlsBlock().setBlockName("tomboyblock").setHardness(5.0F).setResistance(5.0F).setCreativeTab(CraftyGirlsCoreTabs).setBlockTextureName("craftygirls:tomboyblock");
	GameRegistry.registerBlock(MaryBlock, "tomboyblock");
	MaryBlock.setHarvestLevel("pickaxe", 3);

	MaryOre = new CraftyGirlsOre().setBlockName("tomboyore").setHardness(5.0F).setResistance(5.0F).setCreativeTab(CraftyGirlsCoreTabs).setBlockTextureName("craftygirls:tomboyore");
	GameRegistry.registerBlock(MaryOre, "tomboyore");
	MaryOre.setHarvestLevel("pickaxe", 3);

	MaryBrick = new BaseCraftyGirlsBlock().setBlockName("tomboybrick").setHardness(5.0F).setResistance(5.0F).setCreativeTab(CraftyGirlsCoreTabs).setBlockTextureName("craftygirls:tomboybrick");
	GameRegistry.registerBlock(MaryBrick, "tomboybrick");
	MaryBrick.setHarvestLevel("pickaxe", 3);

	MaryIngot = new Item().setUnlocalizedName("tomboyingot").setCreativeTab(CraftyGirlsCoreTabs).setTextureName("craftygirls:tomboyingot");
	GameRegistry.registerItem(MaryIngot, "tomboyingot");

	MaryShovel = (new ItemCGShovel(MaryMaterial).setUnlocalizedName("TomboyShovel").setCreativeTab(CraftyGirlsCoreTabs).setTextureName("craftygirls:tomboy_shovel"));
	GameRegistry.registerItem(MaryShovel, "tomboyshovel");

	MaryPickaxe = (new ItemCGPickaxe(MaryMaterial).setUnlocalizedName("TomboyPickaxe").setCreativeTab(CraftyGirlsCoreTabs).setTextureName("craftygirls:tomboy_pickaxe"));
	GameRegistry.registerItem(MaryPickaxe, "tomboypickaxe");

	MaryAxe = (new ItemCGAxe(MaryMaterial).setUnlocalizedName("TomboyAxe").setCreativeTab(CraftyGirlsCoreTabs).setTextureName("craftygirls:tomboy_axe"));
	GameRegistry.registerItem(MaryAxe, "tomboyaxe");

	MaryHoe = (new ItemCGHoe(MaryMaterial).setUnlocalizedName("TomboyHoe").setCreativeTab(CraftyGirlsCoreTabs).setTextureName("craftygirls:tomboy_hoe"));
	GameRegistry.registerItem(MaryHoe, "tomboyhoe");

	MarySword = (new ItemCGSword(MaryMaterial).setUnlocalizedName("TomboySword").setCreativeTab(CraftyGirlsCoreTabs).setTextureName("craftygirls:tomboy_sword"));
	GameRegistry.registerItem(MarySword, "tomboysword");		

	//Alice
	AliceBlock = new BaseCraftyGirlsBlock().setBlockName("neolablock").setHardness(5.0F).setResistance(5.0F).setCreativeTab(CraftyGirlsCoreTabs).setBlockTextureName("craftygirls:neolablock");
	GameRegistry.registerBlock(AliceBlock, "neolablock");
	AliceBlock.setHarvestLevel("pickaxe", 3);

	AliceOre = new CraftyGirlsOre().setBlockName("neolaore").setHardness(5.0F).setResistance(5.0F).setCreativeTab(CraftyGirlsCoreTabs).setBlockTextureName("craftygirls:neolaore");
	GameRegistry.registerBlock(AliceOre, "neolaore");
	AliceOre.setHarvestLevel("pickaxe", 3);

	AliceBrick = new BaseCraftyGirlsBlock().setBlockName("neolabrick").setHardness(5.0F).setResistance(5.0F).setCreativeTab(CraftyGirlsCoreTabs).setBlockTextureName("craftygirls:neolabrick");
	GameRegistry.registerBlock(AliceBrick, "neolabrick");
	AliceBrick.setHarvestLevel("pickaxe", 3);

	AliceIngot = new Item().setUnlocalizedName("neolaingot").setCreativeTab(CraftyGirlsCoreTabs).setTextureName("craftygirls:neolaingot");
	GameRegistry.registerItem(AliceIngot, "neolaingot");

	AliceShovel = (new ItemCGShovel(AliceMaterial).setUnlocalizedName("NeolaShovel").setCreativeTab(CraftyGirlsCoreTabs).setTextureName("craftygirls:neola_shovel"));
	GameRegistry.registerItem(AliceShovel, "neolashovel");

	AlicePickaxe = (new ItemCGPickaxe(AliceMaterial).setUnlocalizedName("NeolaPickaxe").setCreativeTab(CraftyGirlsCoreTabs).setTextureName("craftygirls:neola_pickaxe"));
	GameRegistry.registerItem(AlicePickaxe, "neolapickaxe");

	AliceAxe = (new ItemCGAxe(AliceMaterial).setUnlocalizedName("NeolaAxe").setCreativeTab(CraftyGirlsCoreTabs).setTextureName("craftygirls:neola_axe"));
	GameRegistry.registerItem(AliceAxe, "vaxe");

	AliceHoe = (new ItemCGHoe(AliceMaterial).setUnlocalizedName("NeolaHoe").setCreativeTab(CraftyGirlsCoreTabs).setTextureName("craftygirls:neola_hoe"));
	GameRegistry.registerItem(AliceHoe, "neolahoe");

	AliceSword = (new ItemCGSword(AliceMaterial).setUnlocalizedName("NeolaSword").setCreativeTab(CraftyGirlsCoreTabs).setTextureName("craftygirls:neola_sword"));
	GameRegistry.registerItem(AliceSword, "neolasword");

	AliceBlanket = new Item().setUnlocalizedName("neolablanket").setCreativeTab(CraftyGirlsCoreTabs).setTextureName("craftygirls:neolablanket");
	GameRegistry.registerItem(AliceBlanket, "neolablanket");

	AlicePowerFlower = new ItemCGSword(AliceMaterial).setUnlocalizedName("NeolaPowerFlower").setCreativeTab(CraftyGirlsCoreTabs).setTextureName("craftygirls:neolaflower");
	GameRegistry.registerItem(AlicePowerFlower, "neolaflower");

	//Mr Free
	FreeBlock = new BaseCraftyGirlsBlock().setBlockName("freeblock").setHardness(5.0F).setResistance(5.0F).setCreativeTab(CraftyGirlsCoreTabs).setBlockTextureName("craftygirls:mrfreeblock");
	GameRegistry.registerBlock(FreeBlock, "freeblock");
	FreeBlock.setHarvestLevel("pickaxe", 3);

	FreeOre = new CraftyGirlsOre().setBlockName("freeore").setHardness(5.0F).setResistance(5.0F).setCreativeTab(CraftyGirlsCoreTabs).setBlockTextureName("craftygirls:mrfreeore");
	GameRegistry.registerBlock(FreeOre, "freeore");
	FreeOre.setHarvestLevel("pickaxe", 3);

	FreeBrick = new BaseCraftyGirlsBlock().setBlockName("freebrick").setHardness(5.0F).setResistance(5.0F).setCreativeTab(CraftyGirlsCoreTabs).setBlockTextureName("craftygirls:mrfreebrick");
	GameRegistry.registerBlock(FreeBrick, "freebrick");
	FreeBrick.setHarvestLevel("pickaxe", 3);

	FreeIngot = new Item().setUnlocalizedName("freeingot").setCreativeTab(CraftyGirlsCoreTabs).setTextureName("craftygirls:mrfreeingot");
	GameRegistry.registerItem(FreeIngot, "freeingot");

	FreeTNT = new BlockFreeTNT().setBlockName("freetnt").setHardness(5.0F).setResistance(5.0F).setCreativeTab(CraftyGirlsCoreTabs).setBlockTextureName("craftygirls:freetnt");
	GameRegistry.registerBlock(FreeTNT, "freetnt");

	//CG Armor
	CGHelmet = new ArmorCG(CraftyGirlsArmorMaterial,4,0).setUnlocalizedName("craftygirls_helmet").setCreativeTab(CraftyGirlsCoreTabs).setTextureName("craftygirls:craftygirls_helmet");
	GameRegistry.registerItem(CGHelmet, "craftygirlshelmet");

	CGChestplate = new ArmorCG(CraftyGirlsArmorMaterial,4,1).setUnlocalizedName("craftygirls_chestplate").setCreativeTab(CraftyGirlsCoreTabs).setTextureName("craftygirls:craftygirls_chestplate");
	GameRegistry.registerItem(CGChestplate, "craftygirlschestplate");

	CGLeggings = new ArmorCG(CraftyGirlsArmorMaterial,4,2).setUnlocalizedName("craftygirls_leggings").setCreativeTab(CraftyGirlsCoreTabs).setTextureName("craftygirls:craftygirls_leggings");
	GameRegistry.registerItem(CGLeggings, "craftygirlsleggings");

	CGBoots = new ArmorCG(CraftyGirlsArmorMaterial,4,3).setUnlocalizedName("craftygirls_boots").setCreativeTab(CraftyGirlsCoreTabs).setTextureName("craftygirls:craftygirls_boots");
	GameRegistry.registerItem(CGBoots, "craftygirlsboots");
}

@EventHandler
public void Init(FMLInitializationEvent e) {

	short entityID = 0;
	proxy.registerEntityWithEgg(EntityNeola.class, "Neola", entityID++, this, 128, 1, true, 0x492d00, 0x029820);
	proxy.registerEntityWithEgg(EntityTomboy.class, "TomBoy", entityID++, this, 128, 1, true, 0x496fbd, 0x03f63b);
	proxy.registerEntityWithEgg(EntityTTSnim.class, "TTSnim", entityID++, this, 128, 1, true, 0x8e69cd, 0xfee02b);
	proxy.registerEntityWithEgg(EntityMrFree.class, "MrFree", entityID++, this, 128, 1, true, 0x378d46, 0xdadada);
	proxy.registerRenderThings();	

	EntityRegistry.addSpawn(EntityNeola.class, 100, 1, 3, EnumCreatureType.creature, BiomeGenBase.forest);
	EntityRegistry.addSpawn(EntityTomboy.class, 100, 1, 3, EnumCreatureType.creature, BiomeGenBase.jungle);
	EntityRegistry.addSpawn(EntityTTSnim.class, 100, 1, 3, EnumCreatureType.creature, BiomeGenBase.plains);
	EntityRegistry.addSpawn(EntityMrFree.class, 100, 1, 3, EnumCreatureType.creature, BiomeGenBase.swampland);

	GameRegistry.addShapelessRecipe(new ItemStack(CraftyGirlsMain.MaryIngot, 9), new Object[] {new ItemStack(CraftyGirlsMain.MaryBlock)});
	GameRegistry.addShapelessRecipe(new ItemStack(CraftyGirlsMain.AliceIngot, 9), new Object[] {new ItemStack(CraftyGirlsMain.AliceBlock)});
	GameRegistry.addShapelessRecipe(new ItemStack(CraftyGirlsMain.StefIngot, 9), new Object[] {new ItemStack(CraftyGirlsMain.StefBlock)});
	GameRegistry.addShapedRecipe(new ItemStack(CraftyGirlsMain.MaryBlock), new Object[] {"TTT", "TTT", "TTT", 'T',CraftyGirlsMain.MaryIngot});
	GameRegistry.addShapedRecipe(new ItemStack(CraftyGirlsMain.AliceBlock), new Object[] {"TTT", "TTT", "TTT", 'T',CraftyGirlsMain.AliceIngot});
	GameRegistry.addShapedRecipe(new ItemStack(CraftyGirlsMain.StefBlock), new Object[] {"TTT", "TTT", "TTT", 'T',CraftyGirlsMain.StefIngot});
	GameRegistry.addShapedRecipe(new ItemStack(CraftyGirlsMain.MaryBrick, 4), new Object[] {"TT", "TT", 'T',CraftyGirlsMain.MaryBlock});
	GameRegistry.addShapedRecipe(new ItemStack(CraftyGirlsMain.AliceBrick, 4), new Object[] {"TT", "TT", 'T',CraftyGirlsMain.AliceBlock});
	GameRegistry.addShapedRecipe(new ItemStack(CraftyGirlsMain.StefBrick, 4), new Object[] {"TT", "TT", 'T',CraftyGirlsMain.StefBlock});
	GameRegistry.addShapedRecipe(new ItemStack(CraftyGirlsMain.MarySword), new Object[] {"T", "T", "S", 'T',CraftyGirlsMain.MaryIngot,'S',Items.stick});
	GameRegistry.addShapedRecipe(new ItemStack(CraftyGirlsMain.StefHoe), new Object[] {"TT", " S", " S", 'T',CraftyGirlsMain.StefIngot, 'S',Items.stick});
	GameRegistry.addShapedRecipe(new ItemStack(CraftyGirlsMain.CGHelmet), new Object[] {"TTT", "T T", 'T',CraftyGirlsMain.StefIngot});
	GameRegistry.addShapedRecipe(new ItemStack(CraftyGirlsMain.CGChestplate), new Object[] {"T T", "TTT", "TTT", 'T',CraftyGirlsMain.MaryIngot});
	GameRegistry.addShapedRecipe(new ItemStack(CraftyGirlsMain.CGLeggings), new Object[] {"T T", "T T", 'T',CraftyGirlsMain.AliceIngot});
	GameRegistry.addShapedRecipe(new ItemStack(CraftyGirlsMain.CGBoots), new Object[] {"TTT", "T T", 'T',CraftyGirlsMain.FreeIngot});

	GameRegistry.addSmelting(new ItemStack(CraftyGirlsMain.MaryOre), new ItemStack(CraftyGirlsMain.MaryIngot), 10);
	GameRegistry.addSmelting(new ItemStack(CraftyGirlsMain.StefOre), new ItemStack(CraftyGirlsMain.StefIngot), 10);
	GameRegistry.addSmelting(new ItemStack(CraftyGirlsMain.AliceOre), new ItemStack(CraftyGirlsMain.AliceIngot), 10);
	GameRegistry.addSmelting(new ItemStack(CraftyGirlsMain.FreeOre), new ItemStack(CraftyGirlsMain.FreeIngot), 10);

	GameRegistry.registerWorldGenerator(new CraftyGirlsOreGeneration(), 1);

	FMLCommonHandler.instance().bus().register(new CraftyGirlsPickupEvent());
	//Achievement
	StefIngotAchieve = new Achievement("achievement.ttsnimingot", "ach_ttsnimingot", -3, 0, new ItemStack(CraftyGirlsMain.StefIngot),(Achievement)null).registerStat().initIndependentStat();
	MaryIngotAchieve = new Achievement("achievement.tomboyingot", "ach_tomboyingot", -1, 0, new ItemStack(CraftyGirlsMain.MaryIngot),(Achievement)null).registerStat().initIndependentStat();
	AliceIngotAchieve = new Achievement("achievement.neolaingot", "ach_neolaingot", 1, 0, new ItemStack(CraftyGirlsMain.AliceIngot),(Achievement)null).registerStat().initIndependentStat();
	FreeIngotAchieve = new Achievement("achievement.freeingot", "ach_freeingot", 3, 0, new ItemStack(CraftyGirlsMain.FreeIngot),(Achievement)null).registerStat().initIndependentStat();
	MarySwordAchieve = new Achievement("achievement.tomboysword", "ach_tomboysword", -1, -2, new ItemStack(CraftyGirlsMain.MarySword),(MaryIngotAchieve)).registerStat().setSpecial();
	StefHoeAchieve = new Achievement("achievement.ttsnimhoe", "ach_ttsnimhoe", -3, 2, new ItemStack(CraftyGirlsMain.StefHoe),(StefIngotAchieve)).registerStat().setSpecial();
	AliceBlanketAchieve = new Achievement("achievement.neolablanket", "ach_neolablanket", 1, 2, new ItemStack(CraftyGirlsMain.AliceBlanket),(AliceIngotAchieve)).registerStat().setSpecial();

	AchievementPage.registerAchievementPage(new AchievementPage("Crafty Girls", new Achievement[] {StefIngotAchieve, MaryIngotAchieve, AliceIngotAchieve, FreeIngotAchieve, MarySwordAchieve, StefHoeAchieve, AliceBlanketAchieve}));

	OreDictionary.registerOre("ttsnimingot", StefIngot);
	OreDictionary.registerOre("tomboyingot", MaryIngot);
	OreDictionary.registerOre("neolaingot", AliceIngot);
	OreDictionary.registerOre("mrfreeingot", FreeIngot);
}

public void postInit(FMLPostInitializationEvent e) {

}
}

 

Client Proxy Coding:

package craftygirls.main;

import net.minecraft.client.model.ModelBox;
import net.minecraftforge.common.MinecraftForge;
import cpw.mods.fml.client.registry.RenderingRegistry;
import cpw.mods.fml.common.registry.EntityRegistry;
import craftygirls.entity.EntityFreeTNTPrimed;
import craftygirls.entity.EntityMrFree;
import craftygirls.entity.EntityNeola;
import craftygirls.entity.EntityTTSnim;
import craftygirls.entity.EntityTomboy;
import craftygirls.entity.ModelCG;
import craftygirls.entity.ModelFreeTNT;
import craftygirls.entity.ModelMrFree;
import craftygirls.entity.RenderFreeTNTPrimed;
import craftygirls.entity.RenderMrFree;
import craftygirls.entity.RenderNeola;
import craftygirls.entity.RenderTTSnim;
import craftygirls.entity.RenderTomboy;
import craftygirls.main.CommonProxyClass;

public class ClientProxyClass extends CommonProxyClass {
@Override
    public void registerRenderThings()
    {
            RenderingRegistry.registerEntityRenderingHandler(EntityNeola.class, new RenderNeola(new ModelCG(0, 0, 0, 0), 0.5F));
            RenderingRegistry.registerEntityRenderingHandler(EntityTomboy.class, new RenderTomboy(new ModelCG(0, 0, 0, 0), 0.5F));
            RenderingRegistry.registerEntityRenderingHandler(EntityTTSnim.class, new RenderTTSnim(new ModelCG(0, 0, 0, 0), 0.5F));
    		RenderingRegistry.registerEntityRenderingHandler(EntityMrFree.class, new RenderMrFree(new ModelMrFree(), 0.5F));
    		RenderingRegistry.registerEntityRenderingHandler(EntityFreeTNTPrimed.class, new RenderFreeTNTPrimed(new ModelFreeTNT(0, 0, 0, 0)));

    }
   	
    /*@Override
    public void registerSound() {
            MinecraftForge.EVENT_BUS.register(new YourSoundEvent());//register the sound event handling class
    }*/
}

 

Entity Coding:

package craftygirls.entity;

import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.World;

public class EntityFreeTNTPrimed extends Entity
{
    /**
     * How long the fuse is
     */
    public int fuse;
    private EntityLivingBase tntPlacedBy;
    private static final String __OBFID = "CL_00001681";

    public EntityFreeTNTPrimed(World par1World)
    {
        super(par1World);
        this.preventEntitySpawning = true;
        this.setSize(0.98F, 0.98F);
        this.yOffset = this.height / 2.0F;
    }

    public EntityFreeTNTPrimed(World par1World, double par2, double par4, double par6, EntityLivingBase par8EntityLivingBase)
    {
        this(par1World);
        this.setPosition(par2, par4, par6);
        float f = (float)(Math.random() * Math.PI * 2.0D);
        this.motionX = (double)(-((float)Math.sin((double)f)) * 0.02F);
        this.motionY = 0.20000000298023224D;
        this.motionZ = (double)(-((float)Math.cos((double)f)) * 0.02F);
        this.fuse = 80;
        this.prevPosX = par2;
        this.prevPosY = par4;
        this.prevPosZ = par6;
        this.tntPlacedBy = par8EntityLivingBase;
    }

    protected void entityInit() {}

    /**
     * returns if this entity triggers Block.onEntityWalking on the blocks they walk on. used for spiders and wolves to
     * prevent them from trampling crops
     */
    protected boolean canTriggerWalking()
    {
        return false;
    }

    /**
     * Returns true if other Entities should be prevented from moving through this Entity.
     */
    public boolean canBeCollidedWith()
    {
        return !this.isDead;
    }

    /**
     * Called to update the entity's position/logic.
     */
    public void onUpdate()
    {
        this.prevPosX = this.posX;
        this.prevPosY = this.posY;
        this.prevPosZ = this.posZ;
        this.motionY -= 0.03999999910593033D;
        this.moveEntity(this.motionX, this.motionY, this.motionZ);
        this.motionX *= 0.9800000190734863D;
        this.motionY *= 0.9800000190734863D;
        this.motionZ *= 0.9800000190734863D;

        if (this.onGround)
        {
            this.motionX *= 0.699999988079071D;
            this.motionZ *= 0.699999988079071D;
            this.motionY *= -0.5D;
        }

        if (this.fuse-- <= 0)
        {
            this.setDead();

            if (!this.worldObj.isRemote)
            {
                this.explode();
            }
        }
        else
        {
            this.worldObj.spawnParticle("smoke", this.posX, this.posY + 0.5D, this.posZ, 0.0D, 0.0D, 0.0D);
        }
    }

    private void explode()
    {
        float f = 8.0F;
        this.worldObj.createExplosion(this, this.posX, this.posY, this.posZ, f, true);
    }

    /**
     * (abstract) Protected helper method to write subclass entity data to NBT.
     */
    protected void writeEntityToNBT(NBTTagCompound par1NBTTagCompound)
    {
        par1NBTTagCompound.setByte("Fuse", (byte)this.fuse);
    }

    /**
     * (abstract) Protected helper method to read subclass entity data from NBT.
     */
    protected void readEntityFromNBT(NBTTagCompound par1NBTTagCompound)
    {
        this.fuse = par1NBTTagCompound.getByte("Fuse");
    }

    @SideOnly(Side.CLIENT)
    public float getShadowSize()
    {
        return 0.0F;
    }

    /**
     * returns null or the entityliving it was placed or ignited by
     */
    public EntityLivingBase getTntPlacedBy()
    {
        return this.tntPlacedBy;
    }
}

 

Render Coding:

package craftygirls.entity;

import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import craftygirls.main.CraftyGirlsMain;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelBox;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.client.renderer.entity.Render;
import net.minecraft.client.renderer.texture.TextureMap;
import net.minecraft.entity.Entity;
import net.minecraft.entity.item.EntityTNTPrimed;
import net.minecraft.init.Blocks;
import net.minecraft.util.ResourceLocation;

import org.lwjgl.opengl.GL11;

@SideOnly(Side.CLIENT)
public class RenderFreeTNTPrimed extends Render
{
    private RenderBlocks blockRenderer = new RenderBlocks();
    private static final String __OBFID = "CL_00001030";

    public RenderFreeTNTPrimed(ModelBase par1ModelBase)
    {
        this.shadowSize = 0.5F;
    }

/**
     * Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then
     * handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic
     * (Render<T extends Entity) and this method has signature public void doRender(T entity, double d, double d1,
     * double d2, float f, float f1). But JAD is pre 1.5 so doesn't do that.
     */
    public void doRender(EntityTNTPrimed par1EntityTNTPrimed, double par2, double par4, double par6, float par8, float par9)
    {
        GL11.glPushMatrix();
        GL11.glTranslatef((float)par2, (float)par4, (float)par6);
        float f2;

        if ((float)par1EntityTNTPrimed.fuse - par9 + 1.0F < 10.0F)
        {
            f2 = 1.0F - ((float)par1EntityTNTPrimed.fuse - par9 + 1.0F) / 10.0F;

            if (f2 < 0.0F)
            {
                f2 = 0.0F;
            }

            if (f2 > 1.0F)
            {
                f2 = 1.0F;
            }

            f2 *= f2;
            f2 *= f2;
            float f3 = 1.0F + f2 * 0.3F;
            GL11.glScalef(f3, f3, f3);
        }

        f2 = (1.0F - ((float)par1EntityTNTPrimed.fuse - par9 + 1.0F) / 100.0F) * 0.8F;
        this.bindEntityTexture(par1EntityTNTPrimed);
        this.blockRenderer.renderBlockAsItem(CraftyGirlsMain.FreeTNT, 0, par1EntityTNTPrimed.getBrightness(par9));

        if (par1EntityTNTPrimed.fuse / 5 % 2 == 0)
        {
            GL11.glDisable(GL11.GL_TEXTURE_2D);
            GL11.glDisable(GL11.GL_LIGHTING);
            GL11.glEnable(GL11.GL_BLEND);
            GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_DST_ALPHA);
            GL11.glColor4f(1.0F, 1.0F, 1.0F, f2);
            this.blockRenderer.renderBlockAsItem(CraftyGirlsMain.FreeTNT, 0, 1.0F);
            GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
            GL11.glDisable(GL11.GL_BLEND);
            GL11.glEnable(GL11.GL_LIGHTING);
            GL11.glEnable(GL11.GL_TEXTURE_2D);
        }

        GL11.glPopMatrix();
    }

    /**
     * Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture.
     */
    protected ResourceLocation getEntityTexture(EntityTNTPrimed par1EntityTNTPrimed)
    {
        return TextureMap.locationBlocksTexture;
    }

    /**
     * Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture.
     */
    protected ResourceLocation getEntityTexture(Entity par1Entity)
    {
        return this.getEntityTexture((EntityTNTPrimed)par1Entity);
    }

    /**
     * Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then
     * handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic
     * (Render<T extends Entity) and this method has signature public void doRender(T entity, double d, double d1,
     * double d2, float f, float f1). But JAD is pre 1.5 so doesn't do that.
     */
    public void doRender(Entity par1Entity, double par2, double par4, double par6, float par8, float par9)
    {
        this.doRender((EntityTNTPrimed)par1Entity, par2, par4, par6, par8, par9);
    }
}

 

Model Coding:

package craftygirls.entity;

import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;

public class ModelFreeTNT extends ModelBase
{
  //fields
    ModelRenderer Shape1;
  
  public ModelFreeTNT(float par1, float par2, int par3, int par4)
  {	    
      Shape1 = new ModelRenderer(this, 0, 0);
      Shape1.addBox(0F, 0F, 0F, 16, 16, 16);
      Shape1.setRotationPoint(0F, 0F, 0F);
  }
  
  public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5)
  {
    setRotationAngles(f, f1, f2, f3, f4, f5, entity);
    Shape1.render(f5);
  }
  
  private void setRotation(ModelRenderer model, float x, float y, float z)
  {
    model.rotateAngleX = x;
    model.rotateAngleY = y;
    model.rotateAngleZ = z;
  }
  
  public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity)
  {
    super.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
  }
}

Posted

Yes, I have. I tried changing all of the "EntityTNTPrimed" instances to be "EntityFreeTNTPrimed", but it hasn't done anything. Since it didn't seem to effect anything, I changed it back. It does seem to be getting the coding for the texture from EntityTNTPrimed, but EntityTNTPrimed has no coding for a texture. I've tried even changing the code that tells it to render to use a custom texture and it's still doing nothing. It's more like it's acting like the model is non-existant, because the TNT just disappears. It's not a missing texture or anything, because then I'd get a black/red block...instead, I'm getting literally nothing. There's no smoke particles, no model, no texture, no flashing, nothing. I hit it with flint and steel and it becomes nothing until it explodes.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.