Jump to content

[1.7.10] RegisterEntityRenderingHandler won't work


Gruntx

Recommended Posts

I want to create a mob, but the renderer in the Clientproxy is just underlined and *poof* I'm hopeless dumb.

Spoiler

 

public class ClientProxy extends CommonProxy {
@Override
public void registerRenderers() {
RenderingRegistry.registerEntityRenderingHandler(CrawMaw.class, new CrawMawRender(new CrawMawModel(), 0.5F));

}

}

 

 

 

How could I make it work?

Main:

Spoiler

@Mod(modid = Reference.MODID, name = Reference.NAME, version = Reference.VERSION)

public class Main {

public static Item BGRing;
public static Item GGRing;
public static Item JarOfDirt;
public static Item DragonscaleIngot;
public static Item TargaryenIngot;
public static Item StarkIngot;
public static Item LannisterIngot;
public static Item ExoticFoodB;
public static Item ExoticFoodR;
public static Item RuneRed;
public static Item RuneGreen;
public static Item RuneBlue;
public static Item DonutBlueberry;
public static Item DonutCaramel;
public static Item DonutChocolate;
public static Item DonutNormal;
public static Item DonutRainbow;
public static Item DonutStrawberry;
public static Item AurumIngot;
public static Item GRing;
public static Item SRing;
public static Item HardenedLeaf;
public static Item BeeAstronaut;
public static Item BeeWhite;
public static Item BeeBlue;
public static Item BeeBrown;
public static Item BeeCyan;
public static Item BeeGhost;
public static Item BeeGold;
public static Item BeeGreen;
public static Item BeeGrey;
public static Item BeeLime;
public static Item BeeMagenta;
public static Item BeeMagic;
public static Item BeeOrange;
public static Item BeePink;
public static Item BeePurple;
public static Item BeeRed;
public static Item BeeSeagreen;
public static Item BeeSilver;
public static Item BeeTurquoise;
public static Item BeeYellow;
public static Item BronzeIngot;
public static Item CopperIngot;
public static Item SteelIngot;
public static Item BrokenAlaharSword;

public static Item GlassBow;
public static Item StarkSword;
public static Item StarkPickaxe;
public static Item StarkAxe;
public static Item StarkShovel;
public static Item StarkHoe;
public static Item LeafSword;
public static Item AurumSword;
public static Item DaedricSword;
public static Item ValaharSword;
public static Item RalaharSword;
public static Item KalaharSword;
public static Item BronzeSword;
public static Item TargaryenSword;
public static Item LannisterSword;
public static Item GlassSword;
public static Item LanruinHammer;
public static Item EastorianSword;
public static Item GruntyxSword;
public static Item FireBow;
public static Item CopperSword;
public static Item SteelSword;
public static Item EmeraldSword;
public static Item Arakh;
public static Item DiscRainsofCastamere;

public static Item StarkHelmet;
public static Item StarkChestplate;
public static Item StarkLeggings;
public static Item StarkBoots;
public static Item DragonscaleHelmet;
public static Item DragonscaleChestplate;
public static Item DragonscaleLeggings;
public static Item DragonscaleBoots;

public static Block TargaryenOre;
public static Block StarkOre;
public static Block LannisterOre;
public static Block CopperOre;
public static Block DragonscaleOre;
public static Block TinOre;
public static Block MohakOre;

public static final ItemArmor.ArmorMaterial StarkArmorMaterial = EnumHelper.addArmorMaterial("StarkArmorMaterial", 650, new int[]{3,7,5,3}, 15);
public static final ItemArmor.ArmorMaterial DragonscaleArmorMaterial = EnumHelper.addArmorMaterial("DragonscaleArmorMaterial", 1000, new int[]{4,7,5,3}, 15);

public static final Item.ToolMaterial ArakhToolMaterial = EnumHelper.addToolMaterial("ArakhToolMaterial", 2, 500, 6.0F, 2.0F, 15);
public static final Item.ToolMaterial EmeraldToolMaterial = EnumHelper.addToolMaterial("EmeraldToolMaterial", 2, 900, 6.0F, 3.5F, 15);
public static final Item.ToolMaterial BronzeToolMaterial = EnumHelper.addToolMaterial("BronzeToolMaterial", 2, 850, 6.0F, 2.0F, 15);
public static final Item.ToolMaterial SteelToolMaterial = EnumHelper.addToolMaterial("SteelToolMaterial", 2, 850, 7.0F, 2.0F, 15);
public static final Item.ToolMaterial TinToolMaterial = EnumHelper.addToolMaterial("TinToolMaterial", 2, 300, 5.0F, 0.5F, 15);
public static final Item.ToolMaterial CopperToolMaterial = EnumHelper.addToolMaterial("CopperToolMaterial", 2, 300, 4.0F, 0.5F, 15);
public static final Item.ToolMaterial DaedricToolMaterial = EnumHelper.addToolMaterial("DaedricToolMaterial", 2, 850, 8.0F, 5.0F, 15);
public static final Item.ToolMaterial KalaharToolMaterial = EnumHelper.addToolMaterial("KalaharToolMaterial", 2, 700, 8.0F, 4.0F, 15);
public static final Item.ToolMaterial RalaharToolMaterial = EnumHelper.addToolMaterial("RalaharToolMaterial", 2, 700, 8.0F, 4.0F, 15);
public static final Item.ToolMaterial ValaharToolMaterial = EnumHelper.addToolMaterial("ValaharToolMaterial", 2, 700, 8.0F, 4.0F, 15);
public static final Item.ToolMaterial TargaryenToolMaterial = EnumHelper.addToolMaterial("TargaryenToolMaterial", 2, 500, 6.0F, 3.0F, 15);
public static final Item.ToolMaterial LannisterToolMaterial = EnumHelper.addToolMaterial("LannisterToolMaterial", 2, 500, 6.0F, 3.0F, 15);
public static final Item.ToolMaterial StarkToolMaterial = EnumHelper.addToolMaterial("StarkToolMaterial", 2, 500, 6.0F, 3.0F, 15);
public static final Item.ToolMaterial LeafToolMaterial = EnumHelper.addToolMaterial("LeafToolMaterial", 2, 450, 5.0F, 2.5F, 15);
public static final Item.ToolMaterial AurumToolMaterial = EnumHelper.addToolMaterial("AurumToolMaterial", 2, 650, 7.0F, 3.5F, 15);


@SidedProxy(clientSide="com.gruntx.gruntmod.proxies.ClientProxy", serverSide="com.gruntx.gruntmod.proxies.CommonProxy")
public static CommonProxy proxy;
public static ClientProxy cproxy;

@Instance(Reference.MODID)
public static Main instance;

@Mod.EventHandler
public void preInit(FMLPreInitializationEvent event){
//Item/Block Init and registering
//Config handling
GameRegistry.registerWorldGenerator(this.eventWorldGen, 0);

BGRing = new BGRing().setUnlocalizedName("BGRing").setTextureName("grunt:Ring2").setCreativeTab(tabGruntMod);
GGRing = new GGRing().setUnlocalizedName("GGRing").setTextureName("grunt:Ring1").setCreativeTab(tabGruntMod);
JarOfDirt = new JarOfDirt().setUnlocalizedName("JarOfDirt").setTextureName("grunt:Jar_of_dirt").setCreativeTab(tabGruntMod);
DragonscaleIngot = new DragonscaleIngot().setUnlocalizedName("DragonSIngot").setTextureName("grunt:Dragonscale_ingot").setCreativeTab(tabGruntMod);
TargaryenIngot = new TargaryenIngot().setUnlocalizedName("TargaryenIngot").setTextureName("grunt:Targaryen_ingot").setCreativeTab(tabGruntMod);
StarkIngot = new StarkIngot().setUnlocalizedName("StarkIngot").setTextureName("grunt:Stark_ingot").setCreativeTab(tabGruntMod);
LannisterIngot = new LannisterIngot().setUnlocalizedName("LannisterIngot").setTextureName("grunt:Lannister_ingot").setCreativeTab(tabGruntMod);
ExoticFoodB = new ItemFood(4, 1.0F, false).setUnlocalizedName("ExoticFoodB").setTextureName("grunt:Exotic_food2").setCreativeTab(tabGruntMod);
ExoticFoodR = new ItemFood(4, 1.0F, false).setUnlocalizedName("ExoticFoodR").setTextureName("grunt:Exotic_food").setCreativeTab(tabGruntMod);
RuneRed = new RuneRed().setUnlocalizedName("RuneRed").setTextureName("grunt:Rune_red").setCreativeTab(tabGruntMod);
RuneGreen = new RuneGreen().setUnlocalizedName("RuneGreen").setTextureName("grunt:Rune_green").setCreativeTab(tabGruntMod);
RuneBlue = new RuneBlue().setUnlocalizedName("RuneBlue").setTextureName("grunt:Rune_blue").setCreativeTab(tabGruntMod);
DonutBlueberry = new ItemFood(5, 1.0F, false).setUnlocalizedName("DonutBlueberry").setTextureName("grunt:Donut_blueberry").setCreativeTab(tabGruntMod);
DonutCaramel = new ItemFood(5, 1.0F, false).setUnlocalizedName("DonutCaramel").setTextureName("grunt:Donut_caramel").setCreativeTab(tabGruntMod);
DonutChocolate = new ItemFood(5, 1.0F, false).setUnlocalizedName("DonutChocolate").setTextureName("grunt:Donut_chocolate").setCreativeTab(tabGruntMod);
DonutNormal = new ItemFood(5, 1.0F, false).setUnlocalizedName("DonutNormal").setTextureName("grunt:Donut_normal").setCreativeTab(tabGruntMod);
DonutRainbow = new ItemFood(5, 1.0F, false).setUnlocalizedName("DonutRainbow").setTextureName("grunt:Donut_rainbow").setCreativeTab(tabGruntMod);
DonutStrawberry = new ItemFood(5, 1.0F, false).setUnlocalizedName("DonutStrawberry").setTextureName("grunt:Donut_strawberry").setCreativeTab(tabGruntMod);
AurumIngot = new AurumIngot().setUnlocalizedName("AurumIngot").setTextureName("grunt:Aurum_ingot").setCreativeTab(tabGruntMod);
GRing = new GRing().setUnlocalizedName("GRing").setTextureName("grunt:Ring4").setCreativeTab(tabGruntMod);
SRing = new SRing().setUnlocalizedName("SRing").setTextureName("grunt:Ring3").setCreativeTab(tabGruntMod);
HardenedLeaf = new HardenedLeaf().setUnlocalizedName("HardenedLeaf").setTextureName("grunt:Hardened_leaf").setCreativeTab(tabGruntMod);
BeeAstronaut = new Bee().setUnlocalizedName("BeeAstronaut").setTextureName("grunt:Bee_astronaut").setCreativeTab(tabGruntMod);
BeeWhite = new Bee().setUnlocalizedName("BeeWhite").setTextureName("grunt:Bee_white").setCreativeTab(tabGruntMod);
BeeBlue = new Bee().setUnlocalizedName("BeeBlue").setTextureName("grunt:Bee_blue").setCreativeTab(tabGruntMod);
BeeBrown = new Bee().setUnlocalizedName("BeeBrown").setTextureName("grunt:Bee_brown").setCreativeTab(tabGruntMod);
BeeCyan = new Bee().setUnlocalizedName("BeeCyan").setTextureName("grunt:Bee_cyan").setCreativeTab(tabGruntMod);
BeeGhost = new Bee().setUnlocalizedName("BeeGhost").setTextureName("grunt:Bee_ghost").setCreativeTab(tabGruntMod);
BeeGold = new Bee().setUnlocalizedName("BeeGold").setTextureName("grunt:Bee_gold").setCreativeTab(tabGruntMod);
BeeGreen = new Bee().setUnlocalizedName("BeeGreen").setTextureName("grunt:Bee_green").setCreativeTab(tabGruntMod);
BeeGrey = new Bee().setUnlocalizedName("BeeGrey").setTextureName("grunt:Bee_grey").setCreativeTab(tabGruntMod);
BeeLime = new Bee().setUnlocalizedName("BeeLime").setTextureName("grunt:Bee_lime").setCreativeTab(tabGruntMod);
BeeMagenta = new Bee().setUnlocalizedName("BeeMagenta").setTextureName("grunt:Bee_magenta").setCreativeTab(tabGruntMod);
BeeMagic = new Bee().setUnlocalizedName("BeeMagic").setTextureName("grunt:Bee_magic").setCreativeTab(tabGruntMod);
BeeOrange = new Bee().setUnlocalizedName("BeeOrange").setTextureName("grunt:Bee_orange").setCreativeTab(tabGruntMod);
BeePink = new Bee().setUnlocalizedName("BeePink").setTextureName("grunt:Bee_pink").setCreativeTab(tabGruntMod);
BeePurple = new Bee().setUnlocalizedName("BeePurple").setTextureName("grunt:Bee_purple").setCreativeTab(tabGruntMod);
BeeRed = new Bee().setUnlocalizedName("BeeRed").setTextureName("grunt:Bee_red").setCreativeTab(tabGruntMod);
BeeSeagreen = new Bee().setUnlocalizedName("BeeSeagreen").setTextureName("grunt:Bee_seagreen").setCreativeTab(tabGruntMod);
BeeSilver = new Bee().setUnlocalizedName("BeeSilver").setTextureName("grunt:Bee_silver").setCreativeTab(tabGruntMod);
BeeTurquoise = new Bee().setUnlocalizedName("BeeTurquoise").setTextureName("grunt:Bee_turquoise").setCreativeTab(tabGruntMod);
BeeYellow = new Bee().setUnlocalizedName("BeeYellow").setTextureName("grunt:Bee_yellow").setCreativeTab(tabGruntMod);
SteelIngot = new SteelIngot().setUnlocalizedName("SteelIngot").setTextureName("grunt:Steel_ingot").setCreativeTab(tabGruntMod);
BrokenAlaharSword = new BrokenAlaharSword().setUnlocalizedName("BrokenAlaharSword").setTextureName("grunt:Broken_Alahar_sword").setCreativeTab(tabGruntMod);

StarkSword = new StarkSword(StarkToolMaterial).setUnlocalizedName("StarkSword").setTextureName("grunt:Stark_sword").setCreativeTab(tabGruntMod);
StarkPickaxe = new StarkPickaxe(StarkToolMaterial).setUnlocalizedName("StarkPickaxe").setTextureName("grunt:Stark_pickaxe").setCreativeTab(tabGruntMod);
StarkAxe = new StarkAxe(StarkToolMaterial).setUnlocalizedName("StarkAxe").setTextureName("grunt:Stark_axe").setCreativeTab(tabGruntMod);
StarkShovel = new StarkShovel(StarkToolMaterial).setUnlocalizedName("StarkShovel").setTextureName("grunt:Stark_shovel").setCreativeTab(tabGruntMod);
StarkHoe = new StarkHoe(StarkToolMaterial).setUnlocalizedName("StarkHoe").setTextureName("grunt:Stark_hoe").setCreativeTab(tabGruntMod);
LeafSword = new LeafSword(LeafToolMaterial).setUnlocalizedName("LeafSword").setTextureName("grunt:Leaf_sword").setCreativeTab(tabGruntMod);
AurumSword = new AurumSword(AurumToolMaterial).setUnlocalizedName("AurumSword").setTextureName("grunt:Aurum_sword").setCreativeTab(tabGruntMod);
ValaharSword = new ValaharSword(ValaharToolMaterial).setUnlocalizedName("ValaharSword").setTextureName("grunt:Valahar_sword").setCreativeTab(tabGruntMod);
RalaharSword = new RalaharSword(RalaharToolMaterial).setUnlocalizedName("RalaharSword").setTextureName("grunt:Ralahar_sword").setCreativeTab(tabGruntMod);
KalaharSword = new KalaharSword(KalaharToolMaterial).setUnlocalizedName("KalaharSword").setTextureName("grunt:Kalahar_sword").setCreativeTab(tabGruntMod);
TargaryenSword = new TargaryenSword(TargaryenToolMaterial).setUnlocalizedName("TargaryenSword").setTextureName("grunt:Targaryen_sword").setCreativeTab(tabGruntMod);
LannisterSword = new LannisterSword(LannisterToolMaterial).setUnlocalizedName("LannisterSword").setTextureName("grunt:Lannister_sword").setCreativeTab(tabGruntMod);
DaedricSword = new DaedricSword(DaedricToolMaterial).setUnlocalizedName("DaedricSword").setTextureName("grunt:Daedric_sword").setCreativeTab(tabGruntMod);
CopperSword = new CopperSword(CopperToolMaterial).setUnlocalizedName("CopperSword").setTextureName("grunt:Copper_sword").setCreativeTab(tabGruntMod);
SteelSword = new SteelSword(SteelToolMaterial).setUnlocalizedName("SteelSword").setTextureName("grunt:Steel_sword").setCreativeTab(tabGruntMod);
BronzeSword = new BronzeSword(BronzeToolMaterial).setUnlocalizedName("BronzeSword").setTextureName("grunt:Bronze_sword").setCreativeTab(tabGruntMod);
EmeraldSword = new EmeraldSword(EmeraldToolMaterial).setUnlocalizedName("EmeraldSword").setTextureName("grunt:Emerald_sword").setCreativeTab(tabGruntMod);
Arakh = new Arakh(ArakhToolMaterial).setUnlocalizedName("Arakh").setTextureName("grunt:Arakh").setCreativeTab(tabGruntMod);

StarkHelmet = new StarkHelmet(StarkArmorMaterial, 0, 0).setUnlocalizedName("StarkHelmet").setTextureName("grunt:Stark_helmet").setCreativeTab(tabGruntMod);
StarkChestplate = new StarkChestplate(StarkArmorMaterial, 0, 1).setUnlocalizedName("StarkChestplate").setTextureName("grunt:Stark_chestplate").setCreativeTab(tabGruntMod);
StarkLeggings = new StarkLeggings(StarkArmorMaterial, 0, 2).setUnlocalizedName("StarkLeggings").setTextureName("grunt:Stark_leggings").setCreativeTab(tabGruntMod);
StarkBoots = new StarkBoots(DragonscaleArmorMaterial, 0, 3).setUnlocalizedName("StarkBoots").setTextureName("grunt:Stark_boots").setCreativeTab(tabGruntMod);
DragonscaleHelmet = new DragonscaleHelmet(DragonscaleArmorMaterial, 0, 0).setUnlocalizedName("DragonscaleHelmet").setTextureName("grunt:Dragonscale_helmet").setCreativeTab(tabGruntMod);
DragonscaleChestplate = new DragonscaleChestplate(DragonscaleArmorMaterial, 0, 1).setUnlocalizedName("DragonscaleChestplate").setTextureName("grunt:Dragonscale_chestplate").setCreativeTab(tabGruntMod);
DragonscaleLeggings = new DragonscaleLeggings(DragonscaleArmorMaterial, 0, 2).setUnlocalizedName("DragonscaleLeggings").setTextureName("grunt:Dragonscale_leggings").setCreativeTab(tabGruntMod);
DragonscaleBoots = new DragonscaleBoots(DragonscaleArmorMaterial, 0, 3).setUnlocalizedName("DragonscaleBoots").setTextureName("grunt:Dragonscale_boots").setCreativeTab(tabGruntMod);

GlassBow = new GlassBow().setUnlocalizedName("GlassBow").setCreativeTab(tabGruntMod);

TargaryenOre = new TargaryenOre(Material.ground).setBlockName("Targaryen_ore").setBlockTextureName("grunt:Targaryen_ore").setCreativeTab(tabGruntMod);
StarkOre = new StarkOre(Material.ground).setBlockName("Stark_ore").setBlockTextureName("grunt:Stark_ore").setCreativeTab(tabGruntMod);
LannisterOre = new LannisterOre(Material.ground).setBlockName("Lannister_ore").setBlockTextureName("grunt:Lannister_ore").setCreativeTab(tabGruntMod);
DragonscaleOre = new DragonscaleOre(Material.ground).setBlockName("Dragonscale_ore").setBlockTextureName("grunt:Dragonscale_ore").setCreativeTab(tabGruntMod);


GameRegistry.registerItem(BGRing, BGRing.getUnlocalizedName().substring(5));
GameRegistry.registerItem(GGRing, GGRing.getUnlocalizedName().substring(5));
GameRegistry.registerItem(GRing, GRing.getUnlocalizedName().substring(5));
GameRegistry.registerItem(SRing, SRing.getUnlocalizedName().substring(5));
GameRegistry.registerItem(JarOfDirt, JarOfDirt.getUnlocalizedName().substring(5));
GameRegistry.registerItem(DragonscaleIngot, DragonscaleIngot.getUnlocalizedName().substring(5));
GameRegistry.registerItem(AurumIngot, AurumIngot.getUnlocalizedName ().substring(5));
GameRegistry.registerItem(LannisterIngot, LannisterIngot.getUnlocalizedName().substring(5));
GameRegistry.registerItem(StarkIngot, StarkIngot.getUnlocalizedName().substring(5));
GameRegistry.registerItem(TargaryenIngot, TargaryenIngot.getUnlocalizedName().substring(5));
GameRegistry.registerItem(ExoticFoodB, ExoticFoodB.getUnlocalizedName ().substring(5));
GameRegistry.registerItem(ExoticFoodR, ExoticFoodR.getUnlocalizedName ().substring(5));
GameRegistry.registerItem(RuneRed, RuneRed.getUnlocalizedName ().substring(5));
GameRegistry.registerItem(RuneGreen, RuneGreen.getUnlocalizedName ().substring(5));
GameRegistry.registerItem(RuneBlue, RuneBlue.getUnlocalizedName ().substring(5));
GameRegistry.registerItem(DonutBlueberry, DonutBlueberry.getUnlocalizedName ().substring(5));
GameRegistry.registerItem(DonutCaramel, DonutCaramel.getUnlocalizedName ().substring(5));
GameRegistry.registerItem(DonutChocolate, DonutChocolate.getUnlocalizedName ().substring(5));
GameRegistry.registerItem(DonutNormal, DonutNormal.getUnlocalizedName ().substring(5));
GameRegistry.registerItem(DonutRainbow, DonutRainbow.getUnlocalizedName ().substring(5));
GameRegistry.registerItem(DonutStrawberry, DonutStrawberry.getUnlocalizedName ().substring(5));
GameRegistry.registerItem(HardenedLeaf, HardenedLeaf.getUnlocalizedName ().substring(5));
GameRegistry.registerItem(BeeAstronaut, BeeAstronaut.getUnlocalizedName().substring(5));
GameRegistry.registerItem(BeeBlue, BeeBlue.getUnlocalizedName().substring(5));
GameRegistry.registerItem(BeeBrown, BeeBrown.getUnlocalizedName().substring(5));
GameRegistry.registerItem(BeeCyan, BeeCyan.getUnlocalizedName().substring(5));
GameRegistry.registerItem(BeeGhost, BeeGhost.getUnlocalizedName().substring(5));
GameRegistry.registerItem(BeeGold, BeeGold.getUnlocalizedName().substring(5));
GameRegistry.registerItem(BeeGreen, BeeGreen.getUnlocalizedName().substring(5));
GameRegistry.registerItem(BeeGrey, BeeGrey.getUnlocalizedName().substring(5));
GameRegistry.registerItem(BeeLime, BeeLime.getUnlocalizedName().substring(5));
GameRegistry.registerItem(BeeMagenta, BeeMagenta.getUnlocalizedName().substring(5));
GameRegistry.registerItem(BeeMagic, BeeMagic.getUnlocalizedName().substring(5));
GameRegistry.registerItem(BeeOrange, BeeOrange.getUnlocalizedName().substring(5));
GameRegistry.registerItem(BeePink, BeePink.getUnlocalizedName().substring(5));
GameRegistry.registerItem(BeePurple, BeePurple.getUnlocalizedName().substring(5));
GameRegistry.registerItem(BeeRed, BeeRed.getUnlocalizedName().substring(5));
GameRegistry.registerItem(BeeSeagreen, BeeSeagreen.getUnlocalizedName().substring(5));
GameRegistry.registerItem(BeeSilver, BeeSilver.getUnlocalizedName().substring(5));
GameRegistry.registerItem(BeeTurquoise, BeeTurquoise.getUnlocalizedName().substring(5));
GameRegistry.registerItem(BeeYellow, BeeYellow.getUnlocalizedName().substring(5));
GameRegistry.registerItem(BeeWhite, BeeWhite.getUnlocalizedName().substring(5));
GameRegistry.registerItem(SteelIngot, SteelIngot.getUnlocalizedName().substring(5));
GameRegistry.registerItem(BrokenAlaharSword, BrokenAlaharSword.getUnlocalizedName().substring(5));

GameRegistry.registerItem(GlassBow, GlassBow.getUnlocalizedName ().substring(5));
GameRegistry.registerItem(AurumSword, AurumSword.getUnlocalizedName ().substring(5));
GameRegistry.registerItem(LeafSword, LeafSword.getUnlocalizedName ().substring(5));
GameRegistry.registerItem(StarkSword, StarkSword.getUnlocalizedName ().substring(5));
GameRegistry.registerItem(StarkPickaxe, StarkPickaxe.getUnlocalizedName ().substring(5));
GameRegistry.registerItem(StarkAxe, StarkAxe.getUnlocalizedName ().substring(5));
GameRegistry.registerItem(StarkShovel, StarkShovel.getUnlocalizedName ().substring(5));
GameRegistry.registerItem(StarkHoe, StarkHoe.getUnlocalizedName ().substring(5));
GameRegistry.registerItem(ValaharSword, ValaharSword.getUnlocalizedName ().substring(5));
GameRegistry.registerItem(RalaharSword, RalaharSword.getUnlocalizedName ().substring(5));
GameRegistry.registerItem(KalaharSword, KalaharSword.getUnlocalizedName ().substring(5));
GameRegistry.registerItem(LannisterSword, LannisterSword.getUnlocalizedName ().substring(5));
GameRegistry.registerItem(TargaryenSword, TargaryenSword.getUnlocalizedName ().substring(5));
GameRegistry.registerItem(DaedricSword, DaedricSword.getUnlocalizedName ().substring(5));
GameRegistry.registerItem(CopperSword, CopperSword.getUnlocalizedName ().substring(5));
GameRegistry.registerItem(BronzeSword, BronzeSword.getUnlocalizedName ().substring(5));
GameRegistry.registerItem(SteelSword, SteelSword.getUnlocalizedName ().substring(5));
GameRegistry.registerItem(EmeraldSword, EmeraldSword.getUnlocalizedName ().substring(5));
GameRegistry.registerItem(Arakh, Arakh.getUnlocalizedName ().substring(5));

GameRegistry.registerItem(StarkHelmet, StarkHelmet.getUnlocalizedName ().substring(5));
GameRegistry.registerItem(StarkChestplate, StarkChestplate.getUnlocalizedName ().substring(5));
GameRegistry.registerItem(StarkLeggings, StarkLeggings.getUnlocalizedName ().substring(5));
GameRegistry.registerItem(StarkBoots, StarkBoots.getUnlocalizedName ().substring(5));
GameRegistry.registerItem(DragonscaleHelmet, DragonscaleHelmet.getUnlocalizedName ().substring(5));
GameRegistry.registerItem(DragonscaleChestplate, DragonscaleChestplate.getUnlocalizedName ().substring(5));
GameRegistry.registerItem(DragonscaleLeggings, DragonscaleLeggings.getUnlocalizedName ().substring(5));
GameRegistry.registerItem(DragonscaleBoots, DragonscaleBoots.getUnlocalizedName ().substring(5));

GameRegistry.registerBlock(TargaryenOre, TargaryenOre.getUnlocalizedName().substring(5));
System.out.println(TargaryenOre.getUnlocalizedName().substring(5));
GameRegistry.registerBlock(StarkOre, StarkOre.getUnlocalizedName().substring(5));
System.out.println(StarkOre.getUnlocalizedName().substring(5));
GameRegistry.registerBlock(LannisterOre, LannisterOre.getUnlocalizedName().substring(5));
System.out.println(LannisterOre.getUnlocalizedName().substring(5));
GameRegistry.registerBlock(DragonscaleOre, DragonscaleOre.getUnlocalizedName().substring(5));
System.out.println(DragonscaleOre.getUnlocalizedName().substring(5));

registerEntity(CrawMaw.class, "CrawMaw");

}
public static void registerEntity(Class entityClass, String name)
{
int entityID = EntityRegistry.findGlobalUniqueEntityId();
long seed = name.hashCode();
Random rand = new Random(seed);
int primaryColor = rand.nextInt() * 16777215;
int secondaryColor = rand.nextInt() * 16777215;

EntityRegistry.registerGlobalEntityID(entityClass, name, entityID);
EntityRegistry.registerModEntity(entityClass, name, entityID, instance, 64, 1, true);
EntityList.entityEggs.put(Integer.valueOf(entityID), new EntityList.EntityEggInfo(entityID, primaryColor, secondaryColor));
}

@Mod.EventHandler
public void Init(FMLInitializationEvent event){
proxy.registerRenderers();
//Proxy, TileEntity, entity, GUI and Packet Registering
GameRegistry.addRecipe(new ItemStack(JarOfDirt), new Object[]{"WWW",
"GDG",
"GGG", 'W', Blocks.planks, 'G', Blocks.glass, 'D', Blocks.dirt});
GameRegistry.addRecipe(new ItemStack(StarkSword), new Object[]{"I",
"I",
"S", 'I', StarkIngot, 'S', Items.stick});
GameRegistry.addRecipe(new ItemStack(StarkPickaxe), new Object[]{"III",
" S ",
" S ", 'I', StarkIngot, 'S', Items.stick});
GameRegistry.addRecipe(new ItemStack(StarkAxe), new Object[]{"II",
"IS",
" S", 'I', StarkIngot, 'S', Items.stick});
GameRegistry.addRecipe(new ItemStack(StarkShovel), new Object[]{"I",
"S",
"S", 'I', StarkIngot, 'S', Items.stick});
GameRegistry.addRecipe(new ItemStack(StarkHoe), new Object[]{"II",
" S",
" S", 'I', StarkIngot, 'S', Items.stick});
GameRegistry.addRecipe(new ItemStack(StarkHelmet), new Object[]{"III",
"I I", 'I', StarkIngot});
GameRegistry.addRecipe(new ItemStack(StarkChestplate), new Object[]{"I I",
"III",
"III", 'I', StarkIngot});
GameRegistry.addRecipe(new ItemStack(StarkLeggings), new Object[]{"III",
"I I",
"I I", 'I', StarkIngot});
GameRegistry.addRecipe(new ItemStack(StarkBoots), new Object[]{"I I",
"I I", 'I', StarkIngot});
GameRegistry.addRecipe(new ItemStack(DragonscaleHelmet), new Object[]{"III",
"I I", 'I', DragonscaleIngot});
GameRegistry.addRecipe(new ItemStack(DragonscaleChestplate), new Object[]{"I I",
"III",
"III", 'I', DragonscaleIngot});
GameRegistry.addRecipe(new ItemStack(DragonscaleLeggings), new Object[]{"III",
"I I",
"I I", 'I', DragonscaleIngot});
GameRegistry.addRecipe(new ItemStack(DragonscaleBoots), new Object[]{"I I",
"I I", 'I', DragonscaleIngot});
GameRegistry.addShapelessRecipe(new ItemStack(SteelIngot, 1), new Object[] { Items.iron_ingot, new ItemStack(Items.coal, 1)});
GameRegistry.addRecipe(new ItemStack(TargaryenSword), new Object[]{"I",
"I",
"S", 'I', TargaryenIngot, 'S', Items.stick});
GameRegistry.addRecipe(new ItemStack(LannisterSword), new Object[]{"I",
"I",
"S", 'I', LannisterIngot, 'S', Items.stick});
GameRegistry.addRecipe(new ItemStack(SteelSword), new Object[]{"I",
"I",
"S", 'I', SteelIngot, 'S', Items.stick});
GameRegistry.addRecipe(new ItemStack(EmeraldSword), new Object[]{"E",
"E",
"S", 'E', Items.emerald, 'S', Items.stick});
GameRegistry.addRecipe(new ItemStack(RalaharSword), new Object[]{"R",
"R",
"S", 'R', RuneBlue, 'S', BrokenAlaharSword});
GameRegistry.addRecipe(new ItemStack(KalaharSword), new Object[]{"R",
"R",
"S", 'R', RuneRed, 'S', BrokenAlaharSword});
GameRegistry.addRecipe(new ItemStack(ValaharSword), new Object[]{"R",
"R",
"S", 'R', RuneGreen, 'S', BrokenAlaharSword});
GameRegistry.addRecipe(new ItemStack(Arakh), new Object[]{"I ",
"III",
" I", 'I', Items.iron_ingot});
GameRegistry.addRecipe(new ItemStack(Arakh), new Object[]{" I",
"III",
"I ", 'I', Items.iron_ingot});

GameRegistry.addSmelting(TargaryenOre, new ItemStack(TargaryenIngot), 5.0F);
GameRegistry.addSmelting(StarkOre, new ItemStack(StarkIngot), 5.0F);
GameRegistry.addSmelting(LannisterOre, new ItemStack(LannisterIngot), 5.0F);
GameRegistry.addSmelting(Blocks.leaves, new ItemStack(HardenedLeaf), 5.0F);
GameRegistry.addSmelting(DragonscaleOre, new ItemStack(DragonscaleIngot), 6.0F);

}
@Mod.EventHandler
public void postInit(FMLPostInitializationEvent event){

}

public static CreativeTabs tabGruntMod = new CreativeTabs("tabGruntMod"){
@Override
public Item getTabIconItem(){
return new ItemStack(JarOfDirt).getItem();
}
};

GruntWorldGen eventWorldGen = new GruntWorldGen();
}

2

Mob class:

Spoiler

public class CrawMaw {

public static int mobid = 0;
public Object instance;

public void load() {
}

public void generateNether(World world, Random random, int chunkX, int chunkZ) {
}

public void generateSurface(World world, Random random, int chunkX, int chunkZ) {
}

public int addFuel(ItemStack fuel) {
return 0;
}

public void serverLoad(FMLServerStartingEvent event) {
}

public void preInit(FMLPreInitializationEvent event) {
int entityID = EntityRegistry.findGlobalUniqueEntityId();
mobid = entityID;
EntityRegistry.registerGlobalEntityID(CrawMaw.EntityCrawMaw.class, "CrawMaw", entityID);
EntityRegistry.registerModEntity(CrawMaw.EntityCrawMaw.class, "CrawMaw", entityID, instance, 64, 1, true);
EntityList.entityEggs.put(Integer.valueOf(entityID), new EntityList.EntityEggInfo(entityID, (102 << 16) + (102 << 8) + 102, (255 << 16)
+ (0 << 8) + 0));
EntityRegistry.addSpawn(CrawMaw.EntityCrawMaw.class, 15, 3, 20, EnumCreatureType.monster, new BiomeGenBase[]{
BiomeGenBase.ocean, BiomeGenBase.plains, BiomeGenBase.desert, BiomeGenBase.extremeHills, BiomeGenBase.forest, BiomeGenBase.taiga,
BiomeGenBase.swampland, BiomeGenBase.river, BiomeGenBase.frozenOcean, BiomeGenBase.frozenRiver, BiomeGenBase.icePlains,
BiomeGenBase.iceMountains, BiomeGenBase.mushroomIsland, BiomeGenBase.mushroomIslandShore, BiomeGenBase.beach,
BiomeGenBase.desertHills, BiomeGenBase.forestHills, BiomeGenBase.taigaHills, BiomeGenBase.extremeHillsEdge, BiomeGenBase.jungle,
BiomeGenBase.jungleHills, BiomeGenBase.jungleEdge, BiomeGenBase.deepOcean, BiomeGenBase.stoneBeach, BiomeGenBase.coldBeach,
BiomeGenBase.birchForest, BiomeGenBase.birchForestHills, BiomeGenBase.roofedForest, BiomeGenBase.coldTaiga,
BiomeGenBase.coldTaigaHills, BiomeGenBase.megaTaiga, BiomeGenBase.megaTaigaHills, BiomeGenBase.extremeHillsPlus,
BiomeGenBase.savanna, BiomeGenBase.savannaPlateau, BiomeGenBase.mesa, BiomeGenBase.mesaPlateau_F, BiomeGenBase.mesaPlateau});

DungeonHooks.addDungeonMob("CrawMaw", 180);

}

/*
* public Entity spawnEntity(int var1, World var2, double var3, double var5,
* double var7) { if(var1==mobid) return new
* CrawMaw.EntitycustomMob1(var2); else return null; }
*/

public static class EntityCrawMaw extends EntityMob {
World world = null;

public EntityCrawMaw(World var1) {
super(var1);
world = var1;
experienceValue = 5;
this.isImmuneToFire = false;
addRandomArmor();
this.tasks.addTask(0, new EntityAISwimming(this));
this.tasks.addTask(6, new EntityAIWander(this, 1.0D));
this.tasks.addTask(8, new EntityAILookIdle(this));
this.tasks.addTask(1, new EntityAIWander(this, 0.8D));
this.tasks.addTask(1, new EntityAILookIdle(this));
this.tasks.addTask(1, new EntityAISwimming(this));
this.tasks.addTask(1, new EntityAIAvoidEntity(this, EntitySnowman.class, 10, 1.2D, 1.2D));
this.targetTasks.addTask(1, new EntityAINearestAttackableTarget(this, EntityPlayer.class, 2, true));
this.targetTasks.addTask(2, new EntityAIHurtByTarget(this, false));
this.tasks.addTask(1, new EntityAIRestrictSun(this));

}

protected void applyEntityAttributes() {
super.applyEntityAttributes();
this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.44999999999999996D);
this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(50D);
if (this.getEntityAttribute(SharedMonsterAttributes.attackDamage) != null)
this.getEntityAttribute(SharedMonsterAttributes.attackDamage).setBaseValue(4D);
}

protected void addRandomArmor() {

}

protected void dropRareDrop(int par1) {
this.dropItem(Items.iron_ingot, 1);
}

public boolean isAIEnabled() {
return true;
}

@Override
protected Item getDropItem() {
return new ItemStack(Items.coal).getItem();
}

/**
* Returns the sound this mob makes while it's alive.
*/
protected String getLivingSound() {
return "grunt:sounds/Craw-Maw_living";
}

/**
* Returns the sound this mob makes when it is hurt.
*/
protected String getHurtSound() {
return "grunt:sounds/Craw-Maw_hurt";
}

/**
* Returns the sound this mob makes on death.
*/
protected String getDeathSound() {
return "grunt:sounds/Craw-Maw_death";
}

public void onStruckByLightning(EntityLightningBolt entityLightningBolt) {
super.onStruckByLightning(entityLightningBolt);
int i = (int) this.posX;
int j = (int) this.posY;
int k = (int) this.posZ;
Entity entity = this;

}

protected void fall(float l) {
super.fall(l);
int i = (int) this.posX;
int j = (int) this.posY;
int k = (int) this.posZ;
super.fall(l);
Entity entity = this;

}

public void onDeath(DamageSource dsource) {
super.onDeath(dsource);
int i = (int) this.posX;
int j = (int) this.posY;
int k = (int) this.posZ;
Entity entity = this;

}

public void onKillEntity(EntityLiving entityLiving) {
super.onKillEntity(entityLiving);
int i = (int) this.posX;
int j = (int) this.posY;
int k = (int) this.posZ;
Entity entity = this;

}

public boolean interact(EntityPlayer entity) {
super.interact(entity);
int i = (int) this.posX;
int j = (int) this.posY;
int k = (int) this.posZ;

return true;
}

public String getEntityName() {
return "CrawMaw";
}

}

}

 

Mob render class:

Spoiler

public class CrawMawRender {
private static final ResourceLocation textureLocation = new ResourceLocation(Reference.MODID + ":" + "textures/entity/Craw-Maw.png");

public CrawMawRender(CrawMawModel model, float shadowSize) {
super();
}

protected ResourceLocation getEntityTexture(Entity par1Entity)
{
return textureLocation;
}

}

 

Mob model class:

Spoiler

public class CrawMawModel {
public static class ModelCrawMaw extends ModelBase {
// fields
ModelRenderer head;
ModelRenderer body;
ModelRenderer leg1;
ModelRenderer leg2;
ModelRenderer leg3;
ModelRenderer leg4;
ModelRenderer leg5;
ModelRenderer leg6;
ModelRenderer spike1;
ModelRenderer spike2;
ModelRenderer spike3;
ModelRenderer spike4;

public ModelCrawMaw() {
textureWidth = 64;
textureHeight = 32;

head = new ModelRenderer(this, 0, 0);
head.addBox(-6F, 8F, -4F, 12, 8, 4);
head.setRotationPoint(0F, 4F, -8F);
head.setTextureSize(64, 32);
head.mirror = true;
setRotation(head, 0F, 0F, 0F);
body = new ModelRenderer(this, 32, 10);
body.addBox(-6F, -10F, -15F, 12, 18, 4);
body.setRotationPoint(0F, 5F, 2F);
body.setTextureSize(64, 32);
body.mirror = true;
setRotation(body, 1.570796F, 0F, 0F);
leg1 = new ModelRenderer(this, 0, 16);
leg1.addBox(-3F, 8F, -2F, 4, 4, 4);
leg1.setRotationPoint(-3F, 12F, 7F);
leg1.setTextureSize(64, 32);
leg1.mirror = true;
setRotation(leg1, 0F, 0F, 0F);
leg2 = new ModelRenderer(this, 0, 16);
leg2.addBox(-1F, 8F, -2F, 4, 4, 4);
leg2.setRotationPoint(3F, 12F, 7F);
leg2.setTextureSize(64, 32);
leg2.mirror = true;
setRotation(leg2, 0F, 0F, 0F);
leg3 = new ModelRenderer(this, 0, 16);
leg3.addBox(-3F, 8F, -3F, 4, 4, 4);
leg3.setRotationPoint(-3F, 12F, -5F);
leg3.setTextureSize(64, 32);
leg3.mirror = true;
setRotation(leg3, 0F, 0F, 0F);
leg4 = new ModelRenderer(this, 0, 16);
leg4.addBox(-1F, 8F, -3F, 4, 4, 4);
leg4.setRotationPoint(3F, 12F, -5F);
leg4.setTextureSize(64, 32);
leg4.mirror = true;
setRotation(leg4, 0F, 0F, 0F);
leg5 = new ModelRenderer(this, 0, 16);
leg5.addBox(2F, 20F, 0.5F, 4, 4, 4);
leg5.setRotationPoint(0F, 0F, -2F);
leg5.setTextureSize(64, 32);
leg5.mirror = true;
setRotation(leg5, 0F, 0F, 0F);
leg6 = new ModelRenderer(this, 0, 16);
leg6.addBox(-6F, 20F, -1.5F, 4, 4, 4);
leg6.setRotationPoint(0F, 0F, 0F);
leg6.setTextureSize(64, 32);
leg6.mirror = true;
setRotation(leg6, 0F, 0F, 0F);
spike1 = new ModelRenderer(this, 9, 29);
spike1.addBox(-1F, 15F, -6.6F, 2, 1, 2);
spike1.setRotationPoint(0F, 0F, 0F);
spike1.setTextureSize(64, 32);
spike1.mirror = true;
setRotation(spike1, 0F, 0F, 0F);
spike2 = new ModelRenderer(this, 9, 26);
spike2.addBox(-1F, 15F, -2.6F, 2, 1, 2);
spike2.setRotationPoint(0F, 0F, 0F);
spike2.setTextureSize(64, 32);
spike2.mirror = true;
setRotation(spike2, 0F, 0F, 0F);
spike3 = new ModelRenderer(this, 0, 29);
spike3.addBox(-1F, 0F, 1.6F, 2, 1, 2);
spike3.setRotationPoint(0F, 15F, 0F);
spike3.setTextureSize(64, 32);
spike3.mirror = true;
setRotation(spike3, 0F, 0F, 0F);
spike4 = new ModelRenderer(this, 0, 26);
spike4.addBox(-1F, 15F, 5.6F, 2, 1, 2);
spike4.setRotationPoint(0F, 0F, 0F);
spike4.setTextureSize(64, 32);
spike4.mirror = true;
setRotation(spike4, 0F, 0F, 0F);
}

public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
super.render(entity, f, f1, f2, f3, f4, f5);
setRotationAngles(f, f1, f2, f3, f4, f5, entity);
head.render(f5);
body.render(f5);
leg1.render(f5);
leg2.render(f5);
leg3.render(f5);
leg4.render(f5);
leg5.render(f5);
leg6.render(f5);
spike1.render(f5);
spike2.render(f5);
spike3.render(f5);
spike4.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);
}

}

}

 

 

Edited by Gruntx
Link to comment
Share on other sites

  • Guest locked this topic
Guest
This topic is now closed to further replies.


×
×
  • Create New...

Important Information

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