As you most probably know, 1.3 is going to change ALOT so, do you know if these tutorials will work afterwards of wouldyou have to change them a bit?
They should still work. The Modding API is no longer going to be released in 1.3. But there is still the issue of single player-> LAN. I will have to do some quick testing once it is released. I hope that the tutorials and all the APIs still work.
Rollback Post to RevisionRollBack
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
hi dude. I have a question. How do you add a modded item to a recipe?
ModLoader.addRecipe(new ItemStack(ItemSample, 4), new Object[] { "XXX","XXX","XXX", Character.valueOf('X'), mod_sample.ItemSampleItem}); if you want a block do the same but change ItemSample, 4 to BlockSample, 4
Hello,
Thanks for Your tutorials, they are very helpful for me (Man without any modding skills)
At first, im sorry about my english, im not from english speaking country.
I have a question for You. Im making a mod with many new ores, mobs, biomes, achievments and more
But now im stuck at Enchanting my own items. You've said we cant ask you about enchanting, but i have found a way, which you can enchant your own items. Too bad its only possible with editing base game files.
In EnumEnchantType You can see, which items can get enchants for mining and which can for protection (pickaxe X armor).
If ill add my own items (in my case Copper Tools), it works, but only with editing that file.
Is there a way i can add my items in it without editing it? Im new to Java and Modding (3-4 days) and ive tried "extending" it, but that didt work. If you know a way, please tell me
Thanks for your answer
AraXis
Not that I have found. I have tried several things as well but nothing works.
Rollback Post to RevisionRollBack
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
Only stuff about the server sources not being present, but thats simply because I'm not modding for smp, could it be because of mobs? I have mobs that only spawn in my custom biomes, but I can't imagine that code could mess them up. The only thing I could think of is that I'm using forge and maybe you have to use different methods with forge?
Only stuff about the server sources not being present, but thats simply because I'm not modding for smp, could it be because of mobs? I have mobs that only spawn in my custom biomes, but I can't imagine that code could mess them up. The only thing I could think of is that I'm using forge and maybe you have to use different methods with forge?
I'm using Forge as well, there are no changes needed. Did you remove what you added to BiomeGenBase and GenLayerBiome?
Rollback Post to RevisionRollBack
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
I don't know what the problem is for my mob. It makes no sense to me.
Error report:
Exception in thread "Minecraft main thread" java.lang.ExceptionInInitializerError
at net.minecraft.client.Minecraft.startGame(Minecraft.java:424)
at net.minecraft.client.Minecraft.run(Minecraft.java:786)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
at net.minecraft.src.ModelPenguin.<init>(ModelPenguin.java:90)
at net.minecraft.src.mod_Penguin.addRenderer(mod_Penguin.java:16)
at net.minecraft.src.ModLoader.addAllRenderers(ModLoader.java:163)
at net.minecraft.src.RenderManager.<init>(RenderManager.java:85)
at net.minecraft.src.RenderManager.<clinit>(RenderManager.java:12)
... 3 more
Here is the code for the mod_Name:
package net.minecraft.src;
import java.util.Map;
public class mod_Penguin extends BaseMod
{
public void load()
{
ModLoader.registerEntityID(EntityPenguin.class, "Penguin", ModLoader.getUniqueEntityId());
ModLoader.addSpawn(EntityPenguin.class, 15, 5, 7, EnumCreatureType.creature, new BiomeGenBase[]{
//Just to find mob
BiomeGenBase.jungle,
BiomeGenBase.jungleHills,
BiomeGenBase.taiga,
BiomeGenBase.forest,
BiomeGenBase.forestHills,
BiomeGenBase.beach,
//Final code for publish
BiomeGenBase.frozenOcean,
BiomeGenBase.frozenRiver,
BiomeGenBase.iceMountains,
BiomeGenBase.icePlains
});
}
public void addRenderer(Map map)
{
map.put(EntityPenguin.class, new RenderPenguin(new ModelPenguin(), 0.5F));
}
public String getVersion()
{
return "1.2.5";
}
}
I don't know what the problem is for my mob. It makes no sense to me.
Error report:
Exception in thread "Minecraft main thread" java.lang.ExceptionInInitializerError
at net.minecraft.client.Minecraft.startGame(Minecraft.java:424)
at net.minecraft.client.Minecraft.run(Minecraft.java:786)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
at net.minecraft.src.ModelPenguin.<init>(ModelPenguin.java:90)
at net.minecraft.src.mod_Penguin.addRenderer(mod_Penguin.java:16)
at net.minecraft.src.ModLoader.addAllRenderers(ModLoader.java:163)
at net.minecraft.src.RenderManager.<init>(RenderManager.java:85)
at net.minecraft.src.RenderManager.<clinit>(RenderManager.java:12)
... 3 more
Here is the code for the mod_Name:
package net.minecraft.src;
import java.util.Map;
public class mod_Penguin extends BaseMod
{
public void load()
{
ModLoader.registerEntityID(EntityPenguin.class, "Penguin", ModLoader.getUniqueEntityId());
ModLoader.addSpawn(EntityPenguin.class, 15, 5, 7, EnumCreatureType.creature, new BiomeGenBase[]{
//Just to find mob
BiomeGenBase.jungle,
BiomeGenBase.jungleHills,
BiomeGenBase.taiga,
BiomeGenBase.forest,
BiomeGenBase.forestHills,
BiomeGenBase.beach,
//Final code for publish
BiomeGenBase.frozenOcean,
BiomeGenBase.frozenRiver,
BiomeGenBase.iceMountains,
BiomeGenBase.icePlains
});
}
public void addRenderer(Map map)
{
map.put(EntityPenguin.class, new RenderPenguin(new ModelPenguin(), 0.5F));
}
public String getVersion()
{
return "1.2.5";
}
}
This is one of the reasons why I hate Techne. If you look at line 90 of your model class, you will see that it says
toe3.mirror;
But the "toe3" object is created on line 91. This is why you get the NullPointerException. Something is trying to use an object but it hasn't been created yet. There is a simple fix, just delete line 90. You don't need it.
Rollback Post to RevisionRollBack
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
I'm using Forge as well, there are no changes needed. Did you remove what you added to BiomeGenBase and GenLayerBiome?
Yes I did, I actually copied the BiomeGenBase and GenLayerBiome files from a newly decompiled mcp with forge so I know that I didn't mess with them at all. I could send you a link to the src of my entire mod if you like. I'm really stumped on why its not working though :/
Yes I did, I actually copied the BiomeGenBase and GenLayerBiome files from a newly decompiled mcp with forge so I know that I didn't mess with them at all. I could send you a link to the src of my entire mod if you like. I'm really stumped on why its not working though :/
Post or send me your entire mod_ class please.
Rollback Post to RevisionRollBack
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
@MLProp public static int RockCandyTorchID = 133;
@MLProp public static int RockCandyTorchRID = 128;
@MLProp public static int RockCandyTorchBID = 129;
@MLProp public static int RockCandyTorchGID = 130;
@MLProp public static int RockCandyTorchYID = 131;
@MLProp public static int RockCandyTorchPID = 132;
@MLProp public static int FrostingBlockID = 125;
@MLProp public static int ChocolateFrostingBlockID = 127;
@MLProp public static int CakeCenterID = 126;
@MLProp public static int CandyCaneBlockID = 152;
@MLProp public static int RedSugarStoneID = 153;
@MLProp public static int SugarStoneID = 154;
@MLProp public static int GrahamCrackerID = 156;
//Biomes
public static final BiomeGenBase CakeBiome = new BiomeGenCake(26).setBiomeName("Cake").setColor(0xfa9418);
public static final BiomeGenBase ChocolateCakeBiome = new BiomeGenChocolateCake(24).setBiomeName("ChocolateCake").setColor(0xfa9418);
public static final BiomeGenBase CandyCaneForestBiome = new BiomeGenCandyCaneForest(25).setBiomeName("CandyCaneForest").setColor(0xfa9418);
//Blocks
public static final Block RockCandyTorch = new RockCandyTorch(RockCandyTorchID, 10).setBlockName("RockCandyTorch").setHardness(0F).setResistance(0F).setLightValue(1F);
public static final Block RockCandyTorchR = new RockCandyTorch(RockCandyTorchRID, 8).setBlockName("RockCandyTorchR").setHardness(0F).setResistance(0F).setLightValue(1F);
public static final Block RockCandyTorchB = new RockCandyTorch(RockCandyTorchBID, 9).setBlockName("RockCandyTorchB").setHardness(0F).setResistance(0F).setLightValue(1F);
public static final Block RockCandyTorchG = new RockCandyTorch(RockCandyTorchGID, 6).setBlockName("RockCandyTorchG").setHardness(0F).setResistance(0F).setLightValue(1F);
public static final Block RockCandyTorchY = new RockCandyTorch(RockCandyTorchYID, 11).setBlockName("RockCandyTorchY").setHardness(0F).setResistance(0F).setLightValue(1F);
public static final Block RockCandyTorchP = new RockCandyTorch(RockCandyTorchPID, 7).setBlockName("RockCandyTorchP").setHardness(0F).setResistance(0F).setLightValue(1F);
public static final Block FrostingBlock = new FrostingBlock(FrostingBlockID, 12).setBlockName("FrostingBlock").setHardness(0.0F).setResistance(4F).setStepSound(Block.soundClothFootstep);
public static final Block ChocolateFrostingBlock = new ChocolateFrostingBlock(ChocolateFrostingBlockID, 13).setBlockName("ChocolateFrostingBlock").setHardness(0.0F).setResistance(4F).setStepSound(Block.soundClothFootstep);
public static final Block CakeCenter = new DessertBlock(CakeCenterID, 18, Material.unused).setStepSound(Block.soundClothFootstep).setBlockName("CakeCenter").setHardness(1F).setResistance(1F);
public static final Block CandyCaneBlock = new DessertBlock(CandyCaneBlockID, 0, Material.rock).setStepSound(Block.soundStoneFootstep).setBlockName("CandyCaneBlock").setHardness(1F).setResistance(4F);
public static final Block RedSugarStone = new DessertBlock(RedSugarStoneID, 33, Material.rock).setStepSound(Block.soundStoneFootstep).setBlockName("RedSugarStone").setHardness(1F).setResistance(4F);
public static final Block SugarStone = new DessertBlock(SugarStoneID, 32, Material.rock).setStepSound(Block.soundStoneFootstep).setBlockName("SugarStone").setHardness(1F).setResistance(4F);
public static final Block GrahamCracker = new GrahamCracker(GrahamCrackerID, 35).setHardness(1F).setBlockName("GrahamCrackerF").setStepSound(Block.soundClothFootstep);
//Gumdrops
public static final Block GumDropGreen = new GumDrop(147, 4).setStepSound(Block.soundClothFootstep).setBlockName("GumDropGreen").setHardness(1F).setResistance(4F).setLightOpacity(0);
public static final Block GumDropBlue = new GumDrop(148, 5).setStepSound(Block.soundClothFootstep).setBlockName("GumDropBlue").setHardness(1F).setResistance(4F).setLightOpacity(0);
public static final Block GumDropRed = new GumDrop(149, 2).setStepSound(Block.soundClothFootstep).setBlockName("GumDropRed").setHardness(1F).setResistance(4F).setLightOpacity(0);
public static final Block GumDropYellow = new GumDrop(150, 1).setStepSound(Block.soundClothFootstep).setBlockName("GumDropYellow").setHardness(1F).setResistance(4F).setLightOpacity(0);
public static final Block GumDropPurple = new GumDrop(151, 3).setStepSound(Block.soundClothFootstep).setBlockName("GumDropPurple").setHardness(1F).setResistance(4F).setLightOpacity(0);
//Plants
public static final Block Mint = new Mint(155, 31).setStepSound(Block.soundGrassFootstep).setBlockName("Mint").setHardness(0F).setResistance(4F);
//Items
public static final Item Sprinkles = new DessertItem(5010).setIconIndex(11).setItemName("Sprinkles");
public static final Item SundaeBowl = new DessertItem(5011).setIconIndex(0).setItemName("SundaeBowl");
public static final Item IceCreamScoops = new DessertItem(5012).setIconIndex(1).setItemName("IceCreamScoops");
public static final Item MCScoops = new DessertItem(5021).setIconIndex(2).setItemName("MCScoops");
public static final Item ChocolateIceCreamScoops = new DessertItem(5015).setIconIndex(3).setItemName("ChocolateIceCreamScoops");
public static final Item Frosting = new DessertItem(5009).setIconIndex(9).setItemName("Frosting");
public static final Item ChocolateFrosting = new DessertItem(5014).setIconIndex(8).setItemName("ChocolateFrosting");
public static final Item Cherry = new DessertItem(5019).setIconIndex(5).setItemName("Cherry");
public static final Item Cone = new DessertItem(5026).setIconIndex(4).setItemName("Cone");
public static final Item RedSugar = new DessertItem(5030).setIconIndex(29).setItemName("RedSugar");
public static final Item MintLeaves = new DessertItem(5031).setIconIndex(30).setItemName("MintLeaves");
public static final Item GummySpawner = new GummySpawner(5032).setIconIndex(31).setItemName("GummySpawner");
public static final Item SlushCup = new DessertItem(5034).setIconIndex(33).setItemName("SlushCup");
public static final Item GummySpawnerRed = new GummySpawnerRed(5036).setIconIndex(35).setItemName("GummySpawnerRed");
public static final Item ZombieSpawner = new ZombieSpawner(5037).setIconIndex(36).setItemName("ZombieSpawner");
public static final Item GrahamCrackerI = new DessertReed(5039, GrahamCracker).setIconIndex(38).setItemName("GrahamCracker");
//Foods
//Slushies
public static final Item PlainSlush = new SlushieBase(5033, 0).setIconIndex(32).setItemName("Slush");
public static final Item CherrySlush = new SlushieBase(5035, 4).setIconIndex(34).setItemName("CherrySlush");
//Sundaes
public static final Item Sundae = new SundaeBase(5013, 4).setIconIndex(12).setItemName("Sundae").setMaxStackSize(1);
public static final Item ChocolateSundae = new SundaeBase(5016, 4).setIconIndex(14).setItemName("ChocolateSundae").setMaxStackSize(1);
public static final Item MintChipSundae = new SundaeBase(5024, 4).setIconIndex(16).setItemName("MintChipSundae").setMaxStackSize(1);
public static final Item SprinkleSundae = new SundaeBase(5017, 6).setIconIndex(13).setItemName("SprinkleSundae").setMaxStackSize(1);
public static final Item SprinkleChocolateSundae = new SundaeBase(5018, 6).setIconIndex(15).setItemName("SprinkleChocolateSundae").setMaxStackSize(1);
public static final Item SprinkleMintChipSundae = new SundaeBase(5025, 6).setIconIndex(17).setItemName("SprinkleMintChipSundae").setMaxStackSize(1);
//Other
public static final Item VanillaCone = new ItemDessertFood(5027, 4, 1F, false).setIconIndex(26).setItemName("VanillaCone").setMaxStackSize(16);
public static final Item ChocolateCone = new ItemDessertFood(5028, 4, 1F, false).setIconIndex(27).setItemName("ChocolateCone").setMaxStackSize(16);
public static final Item MintChipCone = new ItemDessertFood(5029, 4, 1F, false).setIconIndex(28).setItemName("MintChipCone").setMaxStackSize(16);
public static final Item Chocolate = new ItemDessertFood(5008, 4, 1F, false).setIconIndex(25).setItemName("Chocolate").setMaxStackSize(16);
public static final Item RockCandy = new ItemDessertFood(5001, 4, 1F, false).setIconIndex(18).setItemName("RockCandy").setMaxStackSize(16);
public static final Item RedRockCandy = new ItemDessertFood(5002, 4, 1F, false).setIconIndex(19).setItemName("RedRockCandy").setMaxStackSize(16);
public static final Item BlueRockCandy = new ItemDessertFood(5003, 4, 1F, false).setIconIndex(23).setItemName("BlueRockCandy").setMaxStackSize(16);
public static final Item YellowRockCandy = new ItemDessertFood(5004, 4, 1F, false).setIconIndex(21).setItemName("YellowRockCandy").setMaxStackSize(16);
public static final Item GreenRockCandy = new ItemDessertFood(5005, 4, 1F, false).setIconIndex(22).setItemName("GreenRockCandy").setMaxStackSize(16);
public static final Item PurpleRockCandy = new ItemDessertFood(5006, 4, 1F, false).setIconIndex(20).setItemName("PurpleRockCandy").setMaxStackSize(16);
public static final Item Caramel = new ItemDessertFood(5007, 4, 1F, false).setIconIndex(24).setItemName("Caramel").setMaxStackSize(16);
public static final Block ChocolateCake = new ChocolateCake(143, 0).setHardness(0.5F).setStepSound(Block.soundClothFootstep).setBlockName("ChocolateCake").disableStats().setRequiresSelfNotify();
public static final Item ChocolateCakeI = new DessertReed(5020, ChocolateCake).setIconIndex(7).setMaxStackSize(1).setItemName("ChocolateCakeI");
public static final Item CandyCane = new ItemDessertFood(5022, 6, 1F, false).setIconIndex(6).setItemName("CandyCane").setMaxStackSize(16);
public static final Item GingerbreadMan = new ItemDessertFood(5023, 6, 1F, false).setIconIndex(10).setItemName("GingerbreadMan").setMaxStackSize(16);
public static final Item Marshmallow = new ItemDessertFood(5038, 6, 1F, false).setIconIndex(37).setItemName("Marshmallow").setMaxStackSize(16);
//Trees
//Cherry
public static final Block CherryLog = new CherryLog(134).setStepSound(Block.soundWoodFootstep).setHardness(1.0F).setResistance(2F).setBlockName("CherryLog");
public static final Block CherryPlanks = new CherryPlanks(137, 17).setStepSound(Block.soundWoodFootstep).setHardness(1.0F).setResistance(2F).setBlockName("CherryPlanks");
public static final Block CherryLeaves = new CherryLeaves(135, 34).setStepSound(Block.soundGrassFootstep).setHardness(0.2F).setLightOpacity(255).setBlockName("CherryLeaves").setRequiresSelfNotify();
public static final Block CherrySapling = new CherrySapling(136, 25).setHardness(0.0F).setStepSound(Block.soundGrassFootstep).setBlockName("CherrySapling").setRequiresSelfNotify();
public static final Block CherrySlab = new CherrySlab(138, 17).setStepSound(Block.soundWoodFootstep).setHardness(1.0F).setResistance(2F).setBlockName("CherrySlab");
public static final Block CherryStairs = new CherryStairs(139, CherryPlanks).setStepSound(Block.soundWoodFootstep).setHardness(1.0F).setResistance(2F).setBlockName("CherryStairs").setLightOpacity(0);
//CottonCandy
public static final Block CCStick = new CCStick(140).setStepSound(Block.soundWoodFootstep).setHardness(1.0F).setResistance(2F).setBlockName("CCStick");
public static final Block CottonCandy = new CottonCandy(141, 26).setStepSound(Block.soundClothFootstep).setHardness(0.2F).setLightOpacity(1).setBlockName("CottonCandy").setRequiresSelfNotify();
public static final Block CCSapling = new CCSapling(142, 19).setHardness(0.0F).setStepSound(Block.soundClothFootstep).setBlockName("CCSapling").setRequiresSelfNotify();
//Mint Chip
public static final Block ICCone = new ICCone(144).setStepSound(Block.soundWoodFootstep).setHardness(1.0F).setResistance(2F).setBlockName("ICCone");
public static final Block MintChip = new MintChip(145, 30).setStepSound(Block.soundClothFootstep).setHardness(0.2F).setLightOpacity(1).setBlockName("MintChip").setRequiresSelfNotify();
public static final Block MCSapling = new MCSapling(146, 29).setHardness(0.0F).setStepSound(Block.soundClothFootstep).setBlockName("MCSapling").setRequiresSelfNotify();
@MLProp public static int RockCandyTorchID = 133;
@MLProp public static int RockCandyTorchRID = 128;
@MLProp public static int RockCandyTorchBID = 129;
@MLProp public static int RockCandyTorchGID = 130;
@MLProp public static int RockCandyTorchYID = 131;
@MLProp public static int RockCandyTorchPID = 132;
@MLProp public static int FrostingBlockID = 125;
@MLProp public static int ChocolateFrostingBlockID = 127;
@MLProp public static int CakeCenterID = 126;
@MLProp public static int CandyCaneBlockID = 152;
@MLProp public static int RedSugarStoneID = 153;
@MLProp public static int SugarStoneID = 154;
@MLProp public static int GrahamCrackerID = 156;
//Biomes
public static final BiomeGenBase CakeBiome = new BiomeGenCake(26).setBiomeName("Cake").setColor(0xfa9418);
public static final BiomeGenBase ChocolateCakeBiome = new BiomeGenChocolateCake(24).setBiomeName("ChocolateCake").setColor(0xfa9418);
public static final BiomeGenBase CandyCaneForestBiome = new BiomeGenCandyCaneForest(25).setBiomeName("CandyCaneForest").setColor(0xfa9418);
//Blocks
public static final Block RockCandyTorch = new RockCandyTorch(RockCandyTorchID, 10).setBlockName("RockCandyTorch").setHardness(0F).setResistance(0F).setLightValue(1F);
public static final Block RockCandyTorchR = new RockCandyTorch(RockCandyTorchRID, 8).setBlockName("RockCandyTorchR").setHardness(0F).setResistance(0F).setLightValue(1F);
public static final Block RockCandyTorchB = new RockCandyTorch(RockCandyTorchBID, 9).setBlockName("RockCandyTorchB").setHardness(0F).setResistance(0F).setLightValue(1F);
public static final Block RockCandyTorchG = new RockCandyTorch(RockCandyTorchGID, 6).setBlockName("RockCandyTorchG").setHardness(0F).setResistance(0F).setLightValue(1F);
public static final Block RockCandyTorchY = new RockCandyTorch(RockCandyTorchYID, 11).setBlockName("RockCandyTorchY").setHardness(0F).setResistance(0F).setLightValue(1F);
public static final Block RockCandyTorchP = new RockCandyTorch(RockCandyTorchPID, 7).setBlockName("RockCandyTorchP").setHardness(0F).setResistance(0F).setLightValue(1F);
public static final Block FrostingBlock = new FrostingBlock(FrostingBlockID, 12).setBlockName("FrostingBlock").setHardness(0.0F).setResistance(4F).setStepSound(Block.soundClothFootstep);
public static final Block ChocolateFrostingBlock = new ChocolateFrostingBlock(ChocolateFrostingBlockID, 13).setBlockName("ChocolateFrostingBlock").setHardness(0.0F).setResistance(4F).setStepSound(Block.soundClothFootstep);
public static final Block CakeCenter = new DessertBlock(CakeCenterID, 18, Material.unused).setStepSound(Block.soundClothFootstep).setBlockName("CakeCenter").setHardness(1F).setResistance(1F);
public static final Block CandyCaneBlock = new DessertBlock(CandyCaneBlockID, 0, Material.rock).setStepSound(Block.soundStoneFootstep).setBlockName("CandyCaneBlock").setHardness(1F).setResistance(4F);
public static final Block RedSugarStone = new DessertBlock(RedSugarStoneID, 33, Material.rock).setStepSound(Block.soundStoneFootstep).setBlockName("RedSugarStone").setHardness(1F).setResistance(4F);
public static final Block SugarStone = new DessertBlock(SugarStoneID, 32, Material.rock).setStepSound(Block.soundStoneFootstep).setBlockName("SugarStone").setHardness(1F).setResistance(4F);
public static final Block GrahamCracker = new GrahamCracker(GrahamCrackerID, 35).setHardness(1F).setBlockName("GrahamCrackerF").setStepSound(Block.soundClothFootstep);
//Gumdrops
public static final Block GumDropGreen = new GumDrop(147, 4).setStepSound(Block.soundClothFootstep).setBlockName("GumDropGreen").setHardness(1F).setResistance(4F).setLightOpacity(0);
public static final Block GumDropBlue = new GumDrop(148, 5).setStepSound(Block.soundClothFootstep).setBlockName("GumDropBlue").setHardness(1F).setResistance(4F).setLightOpacity(0);
public static final Block GumDropRed = new GumDrop(149, 2).setStepSound(Block.soundClothFootstep).setBlockName("GumDropRed").setHardness(1F).setResistance(4F).setLightOpacity(0);
public static final Block GumDropYellow = new GumDrop(150, 1).setStepSound(Block.soundClothFootstep).setBlockName("GumDropYellow").setHardness(1F).setResistance(4F).setLightOpacity(0);
public static final Block GumDropPurple = new GumDrop(151, 3).setStepSound(Block.soundClothFootstep).setBlockName("GumDropPurple").setHardness(1F).setResistance(4F).setLightOpacity(0);
//Plants
public static final Block Mint = new Mint(155, 31).setStepSound(Block.soundGrassFootstep).setBlockName("Mint").setHardness(0F).setResistance(4F);
//Items
public static final Item Sprinkles = new DessertItem(5010).setIconIndex(11).setItemName("Sprinkles");
public static final Item SundaeBowl = new DessertItem(5011).setIconIndex(0).setItemName("SundaeBowl");
public static final Item IceCreamScoops = new DessertItem(5012).setIconIndex(1).setItemName("IceCreamScoops");
public static final Item MCScoops = new DessertItem(5021).setIconIndex(2).setItemName("MCScoops");
public static final Item ChocolateIceCreamScoops = new DessertItem(5015).setIconIndex(3).setItemName("ChocolateIceCreamScoops");
public static final Item Frosting = new DessertItem(5009).setIconIndex(9).setItemName("Frosting");
public static final Item ChocolateFrosting = new DessertItem(5014).setIconIndex(8).setItemName("ChocolateFrosting");
public static final Item Cherry = new DessertItem(5019).setIconIndex(5).setItemName("Cherry");
public static final Item Cone = new DessertItem(5026).setIconIndex(4).setItemName("Cone");
public static final Item RedSugar = new DessertItem(5030).setIconIndex(29).setItemName("RedSugar");
public static final Item MintLeaves = new DessertItem(5031).setIconIndex(30).setItemName("MintLeaves");
public static final Item GummySpawner = new GummySpawner(5032).setIconIndex(31).setItemName("GummySpawner");
public static final Item SlushCup = new DessertItem(5034).setIconIndex(33).setItemName("SlushCup");
public static final Item GummySpawnerRed = new GummySpawnerRed(5036).setIconIndex(35).setItemName("GummySpawnerRed");
public static final Item ZombieSpawner = new ZombieSpawner(5037).setIconIndex(36).setItemName("ZombieSpawner");
public static final Item GrahamCrackerI = new DessertReed(5039, GrahamCracker).setIconIndex(38).setItemName("GrahamCracker");
//Foods
//Slushies
public static final Item PlainSlush = new SlushieBase(5033, 0).setIconIndex(32).setItemName("Slush");
public static final Item CherrySlush = new SlushieBase(5035, 4).setIconIndex(34).setItemName("CherrySlush");
//Sundaes
public static final Item Sundae = new SundaeBase(5013, 4).setIconIndex(12).setItemName("Sundae").setMaxStackSize(1);
public static final Item ChocolateSundae = new SundaeBase(5016, 4).setIconIndex(14).setItemName("ChocolateSundae").setMaxStackSize(1);
public static final Item MintChipSundae = new SundaeBase(5024, 4).setIconIndex(16).setItemName("MintChipSundae").setMaxStackSize(1);
public static final Item SprinkleSundae = new SundaeBase(5017, 6).setIconIndex(13).setItemName("SprinkleSundae").setMaxStackSize(1);
public static final Item SprinkleChocolateSundae = new SundaeBase(5018, 6).setIconIndex(15).setItemName("SprinkleChocolateSundae").setMaxStackSize(1);
public static final Item SprinkleMintChipSundae = new SundaeBase(5025, 6).setIconIndex(17).setItemName("SprinkleMintChipSundae").setMaxStackSize(1);
//Other
public static final Item VanillaCone = new ItemDessertFood(5027, 4, 1F, false).setIconIndex(26).setItemName("VanillaCone").setMaxStackSize(16);
public static final Item ChocolateCone = new ItemDessertFood(5028, 4, 1F, false).setIconIndex(27).setItemName("ChocolateCone").setMaxStackSize(16);
public static final Item MintChipCone = new ItemDessertFood(5029, 4, 1F, false).setIconIndex(28).setItemName("MintChipCone").setMaxStackSize(16);
public static final Item Chocolate = new ItemDessertFood(5008, 4, 1F, false).setIconIndex(25).setItemName("Chocolate").setMaxStackSize(16);
public static final Item RockCandy = new ItemDessertFood(5001, 4, 1F, false).setIconIndex(18).setItemName("RockCandy").setMaxStackSize(16);
public static final Item RedRockCandy = new ItemDessertFood(5002, 4, 1F, false).setIconIndex(19).setItemName("RedRockCandy").setMaxStackSize(16);
public static final Item BlueRockCandy = new ItemDessertFood(5003, 4, 1F, false).setIconIndex(23).setItemName("BlueRockCandy").setMaxStackSize(16);
public static final Item YellowRockCandy = new ItemDessertFood(5004, 4, 1F, false).setIconIndex(21).setItemName("YellowRockCandy").setMaxStackSize(16);
public static final Item GreenRockCandy = new ItemDessertFood(5005, 4, 1F, false).setIconIndex(22).setItemName("GreenRockCandy").setMaxStackSize(16);
public static final Item PurpleRockCandy = new ItemDessertFood(5006, 4, 1F, false).setIconIndex(20).setItemName("PurpleRockCandy").setMaxStackSize(16);
public static final Item Caramel = new ItemDessertFood(5007, 4, 1F, false).setIconIndex(24).setItemName("Caramel").setMaxStackSize(16);
public static final Block ChocolateCake = new ChocolateCake(143, 0).setHardness(0.5F).setStepSound(Block.soundClothFootstep).setBlockName("ChocolateCake").disableStats().setRequiresSelfNotify();
public static final Item ChocolateCakeI = new DessertReed(5020, ChocolateCake).setIconIndex(7).setMaxStackSize(1).setItemName("ChocolateCakeI");
public static final Item CandyCane = new ItemDessertFood(5022, 6, 1F, false).setIconIndex(6).setItemName("CandyCane").setMaxStackSize(16);
public static final Item GingerbreadMan = new ItemDessertFood(5023, 6, 1F, false).setIconIndex(10).setItemName("GingerbreadMan").setMaxStackSize(16);
public static final Item Marshmallow = new ItemDessertFood(5038, 6, 1F, false).setIconIndex(37).setItemName("Marshmallow").setMaxStackSize(16);
//Trees
//Cherry
public static final Block CherryLog = new CherryLog(134).setStepSound(Block.soundWoodFootstep).setHardness(1.0F).setResistance(2F).setBlockName("CherryLog");
public static final Block CherryPlanks = new CherryPlanks(137, 17).setStepSound(Block.soundWoodFootstep).setHardness(1.0F).setResistance(2F).setBlockName("CherryPlanks");
public static final Block CherryLeaves = new CherryLeaves(135, 34).setStepSound(Block.soundGrassFootstep).setHardness(0.2F).setLightOpacity(255).setBlockName("CherryLeaves").setRequiresSelfNotify();
public static final Block CherrySapling = new CherrySapling(136, 25).setHardness(0.0F).setStepSound(Block.soundGrassFootstep).setBlockName("CherrySapling").setRequiresSelfNotify();
public static final Block CherrySlab = new CherrySlab(138, 17).setStepSound(Block.soundWoodFootstep).setHardness(1.0F).setResistance(2F).setBlockName("CherrySlab");
public static final Block CherryStairs = new CherryStairs(139, CherryPlanks).setStepSound(Block.soundWoodFootstep).setHardness(1.0F).setResistance(2F).setBlockName("CherryStairs").setLightOpacity(0);
//CottonCandy
public static final Block CCStick = new CCStick(140).setStepSound(Block.soundWoodFootstep).setHardness(1.0F).setResistance(2F).setBlockName("CCStick");
public static final Block CottonCandy = new CottonCandy(141, 26).setStepSound(Block.soundClothFootstep).setHardness(0.2F).setLightOpacity(1).setBlockName("CottonCandy").setRequiresSelfNotify();
public static final Block CCSapling = new CCSapling(142, 19).setHardness(0.0F).setStepSound(Block.soundClothFootstep).setBlockName("CCSapling").setRequiresSelfNotify();
//Mint Chip
public static final Block ICCone = new ICCone(144).setStepSound(Block.soundWoodFootstep).setHardness(1.0F).setResistance(2F).setBlockName("ICCone");
public static final Block MintChip = new MintChip(145, 30).setStepSound(Block.soundClothFootstep).setHardness(0.2F).setLightOpacity(1).setBlockName("MintChip").setRequiresSelfNotify();
public static final Block MCSapling = new MCSapling(146, 29).setHardness(0.0F).setStepSound(Block.soundClothFootstep).setBlockName("MCSapling").setRequiresSelfNotify();
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
If you wanted them to generate in more than one biome then you just add it into the if statement with an or operator.
if (biomegenbase instanceof ModUndeadBiomeGenGrave || biomegenbase instanceof BiomeGenForest)
Thanks. I have another issue now. Everytime I try to break a block my minecrashes with this error:
java.lang.NullPointerException
at net.minecraft.src.RenderItem.doRenderItem(RenderItem.java:101)
at net.minecraft.src.RenderItem.doRender(RenderItem.java:415)
at net.minecraft.src.RenderManager.renderEntityWithPosYaw(RenderManager.java:188)
at net.minecraft.src.RenderManager.renderEntity(RenderManager.java:175)
at net.minecraft.src.RenderGlobal.renderEntities(RenderGlobal.java:431)
at net.minecraft.src.EntityRenderer.renderWorld(EntityRenderer.java:1094)
at net.minecraft.src.EntityRenderer.updateCameraAndRender(EntityRenderer.java:907)
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:873)
at net.minecraft.client.Minecraft.run(Minecraft.java:750)
at java.lang.Thread.run(Unknown Source)
Thanks. I have another issue now. Everytime I try to break a block my minecrashes with this error:
java.lang.NullPointerException
at net.minecraft.src.RenderItem.doRenderItem(RenderItem.java:101)
at net.minecraft.src.RenderItem.doRender(RenderItem.java:415)
at net.minecraft.src.RenderManager.renderEntityWithPosYaw(RenderManager.java:188)
at net.minecraft.src.RenderManager.renderEntity(RenderManager.java:175)
at net.minecraft.src.RenderGlobal.renderEntities(RenderGlobal.java:431)
at net.minecraft.src.EntityRenderer.renderWorld(EntityRenderer.java:1094)
at net.minecraft.src.EntityRenderer.updateCameraAndRender(EntityRenderer.java:907)
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:873)
at net.minecraft.client.Minecraft.run(Minecraft.java:750)
at java.lang.Thread.run(Unknown Source)
Any ideas on this?
Post your block class please.
Rollback Post to RevisionRollBack
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
They should still work. The Modding API is no longer going to be released in 1.3. But there is still the issue of single player-> LAN. I will have to do some quick testing once it is released. I hope that the tutorials and all the APIs still work.
together they are powerful beyond imagination."
Not that I have found. I have tried several things as well but nothing works.
together they are powerful beyond imagination."
-
View User Profile
-
View Posts
-
Send Message
Curse Premium-
View User Profile
-
View Posts
-
Send Message
Curse PremiumOnly stuff about the server sources not being present, but thats simply because I'm not modding for smp, could it be because of mobs? I have mobs that only spawn in my custom biomes, but I can't imagine that code could mess them up. The only thing I could think of is that I'm using forge and maybe you have to use different methods with forge?
I'm using Forge as well, there are no changes needed. Did you remove what you added to BiomeGenBase and GenLayerBiome?
together they are powerful beyond imagination."
Error report:
at net.minecraft.client.Minecraft.startGame(Minecraft.java:424)
at net.minecraft.client.Minecraft.run(Minecraft.java:786)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
at net.minecraft.src.ModelPenguin.<init>(ModelPenguin.java:90)
at net.minecraft.src.mod_Penguin.addRenderer(mod_Penguin.java:16)
at net.minecraft.src.ModLoader.addAllRenderers(ModLoader.java:163)
at net.minecraft.src.RenderManager.<init>(RenderManager.java:85)
at net.minecraft.src.RenderManager.<clinit>(RenderManager.java:12)
... 3 more
package net.minecraft.src; import java.util.Map; public class mod_Penguin extends BaseMod { public void load() { ModLoader.registerEntityID(EntityPenguin.class, "Penguin", ModLoader.getUniqueEntityId()); ModLoader.addSpawn(EntityPenguin.class, 15, 5, 7, EnumCreatureType.creature, new BiomeGenBase[]{ //Just to find mob BiomeGenBase.jungle, BiomeGenBase.jungleHills, BiomeGenBase.taiga, BiomeGenBase.forest, BiomeGenBase.forestHills, BiomeGenBase.beach, //Final code for publish BiomeGenBase.frozenOcean, BiomeGenBase.frozenRiver, BiomeGenBase.iceMountains, BiomeGenBase.icePlains }); } public void addRenderer(Map map) { map.put(EntityPenguin.class, new RenderPenguin(new ModelPenguin(), 0.5F)); } public String getVersion() { return "1.2.5"; } }package net.minecraft.src; import org.lwjgl.opengl.GL11; public class RenderPenguin extends RenderLiving { protected ModelPenguin modelPenguinMain; protected float field_40296_d; public RenderPenguin(ModelPenguin par1ModelPenguin, float par2) { this(par1ModelPenguin, par2, 1.0F); modelPenguinMain = par1ModelPenguin; } public RenderPenguin(ModelPenguin par1ModelPenguin, float par2, float par3) { super(par1ModelPenguin, par2); modelPenguinMain = par1ModelPenguin; field_40296_d = par3; } }// Date: 7/2/2012 5:57:16 PM // Template version 1.1 // Java generated by Techne // Keep in mind that you still need to fill in some blanks // - ZeuX package net.minecraft.src; public class ModelPenguin extends ModelBase { //fields ModelRenderer head; ModelRenderer body; ModelRenderer rightarm; ModelRenderer leftarm; ModelRenderer rightleg; ModelRenderer leftleg; ModelRenderer Tail; ModelRenderer toe1; ModelRenderer toe2; ModelRenderer toe3; ModelRenderer toe4; ModelRenderer beakTop; ModelRenderer beakBottom; public ModelPenguin() { textureWidth = 64; textureHeight = 64; head = new ModelRenderer(this, 0, 0); head.addBox(-2F, -5F, -2F, 4, 4, 4); head.setRotationPoint(-1F, 11F, -1F); head.setTextureSize(64, 64); head.mirror = true; setRotation(head, 0F, 0F, 0F); body = new ModelRenderer(this, 16, 16); body.addBox(-4F, 0F, -2F, 4, 8, 2); body.setRotationPoint(1F, 10F, 0F); body.setTextureSize(64, 64); body.mirror = true; setRotation(body, 0F, 0F, 0F); rightarm = new ModelRenderer(this, 40, 16); rightarm.addBox(-1F, 0F, -1F, 1, 6, 2); rightarm.setRotationPoint(-3F, 10F, -1F); rightarm.setTextureSize(64, 64); rightarm.mirror = true; setRotation(rightarm, 0F, 0F, 0F); leftarm = new ModelRenderer(this, 40, 16); leftarm.addBox(0F, 0F, -1F, 1, 6, 2); leftarm.setRotationPoint(1F, 10F, -1F); leftarm.setTextureSize(64, 64); leftarm.mirror = true; setRotation(leftarm, 0F, 0F, 0F); rightleg = new ModelRenderer(this, 0, 16); rightleg.addBox(-1F, 0F, 0F, 1, 6, 1); rightleg.setRotationPoint(-2F, 18F, -2F); rightleg.setTextureSize(64, 64); rightleg.mirror = true; setRotation(rightleg, 0F, 0F, 0F); leftleg = new ModelRenderer(this, 0, 16); leftleg.addBox(0F, 0F, 0F, 1, 6, 1); leftleg.setRotationPoint(0F, 18F, -2F); leftleg.setTextureSize(64, 64); leftleg.mirror = true; setRotation(leftleg, 0F, 0F, 0F); Tail = new ModelRenderer(this, 0, 58); Tail.addBox(-2F, 0F, 0F, 4, 6, 0); Tail.setRotationPoint(-1F, 16F, 0F); Tail.setTextureSize(64, 64); Tail.mirror = true; setRotation(Tail, 0.1858931F, 0F, 0F); toe1 = new ModelRenderer(this, 58, 62); toe1.addBox(0F, 0F, 0F, 1, 0, 2); toe1.setRotationPoint(-2F, 24F, -2F); toe1.setTextureSize(64, 64); toe1.mirror = true; setRotation(toe1, 0F, -2.453788F, 0F); toe2 = new ModelRenderer(this, 58, 62); toe2.addBox(0F, 1F, -2F, 1, 0, 2); toe2.setRotationPoint(-3F, 23F, -2F); toe2.setTextureSize(64, 64); toe2.mirror = true; setRotation(toe2, 0F, -0.7063936F, 0F); toe3.mirror = true; toe3 = new ModelRenderer(this, 58, 62); toe3.addBox(0F, 0F, -2F, 1, 0, 2); toe3.setRotationPoint(0F, 24F, -1F); toe3.setTextureSize(64, 64); toe3.mirror = true; setRotation(toe3, 0F, 0.5112448F, 0F); toe3.mirror = false; toe4 = new ModelRenderer(this, 58, 62); toe4.addBox(-1F, 0F, -2F, 1, 0, 2); toe4.setRotationPoint(1F, 24F, -1F); toe4.setTextureSize(64, 64); toe4.mirror = true; setRotation(toe4, 0F, -0.4833219F, 0F); beakTop = new ModelRenderer(this, 0, 44); beakTop.addBox(-1F, -1F, -2F, 2, 1, 2); beakTop.setRotationPoint(-1F, 9F, -3F); beakTop.setTextureSize(64, 64); beakTop.mirror = true; setRotation(beakTop, 0F, 0F, 0F); beakBottom = new ModelRenderer(this, 0, 49); beakBottom.addBox(-1F, 0F, -2F, 2, 1, 2); beakBottom.setRotationPoint(-1F, 9F, -3F); beakBottom.setTextureSize(64, 64); beakBottom.mirror = true; setRotation(beakBottom, 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); head.render(f5); body.render(f5); rightarm.render(f5); leftarm.render(f5); rightleg.render(f5); leftleg.render(f5); Tail.render(f5); toe1.render(f5); toe2.render(f5); toe3.render(f5); toe4.render(f5); beakTop.render(f5); beakBottom.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) { super.setRotationAngles(f, f1, f2, f3, f4, f5); } } [/spoiler] Here is the Entity: [spoiler] package net.minecraft.src; import java.util.Random; public class EntityPenguin extends EntityMob { public EntityPenguin(World world) { super(world); texture = "/items/Penguin.png"; moveSpeed = 0.5F; isImmuneToFire = false; attackStrength = 4; //This line can only be here if the class extends EntityMob above ^^^. If it doesn't, just delete this whole line } public int getMaxHealth() { return 20; } protected String getLivingSound() { return "mob.villager.default"; } protected String getHurtSound() { return "mob.villager.defaulthurt"; } protected String getDeathSound() { return "mob.villager.defaultdeath"; } protected int getDropItemId() { return Item.fishRaw.shiftedIndex; } protected boolean canDespawn() { return false; } }This is one of the reasons why I hate Techne. If you look at line 90 of your model class, you will see that it says
But the "toe3" object is created on line 91. This is why you get the NullPointerException. Something is trying to use an object but it hasn't been created yet. There is a simple fix, just delete line 90. You don't need it.
together they are powerful beyond imagination."
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumYes I did, I actually copied the BiomeGenBase and GenLayerBiome files from a newly decompiled mcp with forge so I know that I didn't mess with them at all. I could send you a link to the src of my entire mod if you like. I'm really stumped on why its not working though :/
Post or send me your entire mod_ class please.
together they are powerful beyond imagination."
-
View User Profile
-
View Posts
-
Send Message
Curse Premiumpackage net.minecraft.src;
import java.util.Random;
import net.minecraft.src.forge.*;
import net.minecraft.client.Minecraft;
import java.util.List;
import java.util.Map;
public class mod_DessertCraft extends BaseMod
{
//Current Max Id's
//Item 5039
//Block 157
//Config
@MLProp public static int RockCandyTorchID = 133;
@MLProp public static int RockCandyTorchRID = 128;
@MLProp public static int RockCandyTorchBID = 129;
@MLProp public static int RockCandyTorchGID = 130;
@MLProp public static int RockCandyTorchYID = 131;
@MLProp public static int RockCandyTorchPID = 132;
@MLProp public static int FrostingBlockID = 125;
@MLProp public static int ChocolateFrostingBlockID = 127;
@MLProp public static int CakeCenterID = 126;
@MLProp public static int CandyCaneBlockID = 152;
@MLProp public static int RedSugarStoneID = 153;
@MLProp public static int SugarStoneID = 154;
@MLProp public static int GrahamCrackerID = 156;
//Biomes
public static final BiomeGenBase CakeBiome = new BiomeGenCake(26).setBiomeName("Cake").setColor(0xfa9418);
public static final BiomeGenBase ChocolateCakeBiome = new BiomeGenChocolateCake(24).setBiomeName("ChocolateCake").setColor(0xfa9418);
public static final BiomeGenBase CandyCaneForestBiome = new BiomeGenCandyCaneForest(25).setBiomeName("CandyCaneForest").setColor(0xfa9418);
//Blocks
public static final Block RockCandyTorch = new RockCandyTorch(RockCandyTorchID, 10).setBlockName("RockCandyTorch").setHardness(0F).setResistance(0F).setLightValue(1F);
public static final Block RockCandyTorchR = new RockCandyTorch(RockCandyTorchRID, 8).setBlockName("RockCandyTorchR").setHardness(0F).setResistance(0F).setLightValue(1F);
public static final Block RockCandyTorchB = new RockCandyTorch(RockCandyTorchBID, 9).setBlockName("RockCandyTorchB").setHardness(0F).setResistance(0F).setLightValue(1F);
public static final Block RockCandyTorchG = new RockCandyTorch(RockCandyTorchGID, 6).setBlockName("RockCandyTorchG").setHardness(0F).setResistance(0F).setLightValue(1F);
public static final Block RockCandyTorchY = new RockCandyTorch(RockCandyTorchYID, 11).setBlockName("RockCandyTorchY").setHardness(0F).setResistance(0F).setLightValue(1F);
public static final Block RockCandyTorchP = new RockCandyTorch(RockCandyTorchPID, 7).setBlockName("RockCandyTorchP").setHardness(0F).setResistance(0F).setLightValue(1F);
public static final Block FrostingBlock = new FrostingBlock(FrostingBlockID, 12).setBlockName("FrostingBlock").setHardness(0.0F).setResistance(4F).setStepSound(Block.soundClothFootstep);
public static final Block ChocolateFrostingBlock = new ChocolateFrostingBlock(ChocolateFrostingBlockID, 13).setBlockName("ChocolateFrostingBlock").setHardness(0.0F).setResistance(4F).setStepSound(Block.soundClothFootstep);
public static final Block CakeCenter = new DessertBlock(CakeCenterID, 18, Material.unused).setStepSound(Block.soundClothFootstep).setBlockName("CakeCenter").setHardness(1F).setResistance(1F);
public static final Block CandyCaneBlock = new DessertBlock(CandyCaneBlockID, 0, Material.rock).setStepSound(Block.soundStoneFootstep).setBlockName("CandyCaneBlock").setHardness(1F).setResistance(4F);
public static final Block RedSugarStone = new DessertBlock(RedSugarStoneID, 33, Material.rock).setStepSound(Block.soundStoneFootstep).setBlockName("RedSugarStone").setHardness(1F).setResistance(4F);
public static final Block SugarStone = new DessertBlock(SugarStoneID, 32, Material.rock).setStepSound(Block.soundStoneFootstep).setBlockName("SugarStone").setHardness(1F).setResistance(4F);
public static final Block GrahamCracker = new GrahamCracker(GrahamCrackerID, 35).setHardness(1F).setBlockName("GrahamCrackerF").setStepSound(Block.soundClothFootstep);
//Gumdrops
public static final Block GumDropGreen = new GumDrop(147, 4).setStepSound(Block.soundClothFootstep).setBlockName("GumDropGreen").setHardness(1F).setResistance(4F).setLightOpacity(0);
public static final Block GumDropBlue = new GumDrop(148, 5).setStepSound(Block.soundClothFootstep).setBlockName("GumDropBlue").setHardness(1F).setResistance(4F).setLightOpacity(0);
public static final Block GumDropRed = new GumDrop(149, 2).setStepSound(Block.soundClothFootstep).setBlockName("GumDropRed").setHardness(1F).setResistance(4F).setLightOpacity(0);
public static final Block GumDropYellow = new GumDrop(150, 1).setStepSound(Block.soundClothFootstep).setBlockName("GumDropYellow").setHardness(1F).setResistance(4F).setLightOpacity(0);
public static final Block GumDropPurple = new GumDrop(151, 3).setStepSound(Block.soundClothFootstep).setBlockName("GumDropPurple").setHardness(1F).setResistance(4F).setLightOpacity(0);
//Plants
public static final Block Mint = new Mint(155, 31).setStepSound(Block.soundGrassFootstep).setBlockName("Mint").setHardness(0F).setResistance(4F);
//Items
public static final Item Sprinkles = new DessertItem(5010).setIconIndex(11).setItemName("Sprinkles");
public static final Item SundaeBowl = new DessertItem(5011).setIconIndex(0).setItemName("SundaeBowl");
public static final Item IceCreamScoops = new DessertItem(5012).setIconIndex(1).setItemName("IceCreamScoops");
public static final Item MCScoops = new DessertItem(5021).setIconIndex(2).setItemName("MCScoops");
public static final Item ChocolateIceCreamScoops = new DessertItem(5015).setIconIndex(3).setItemName("ChocolateIceCreamScoops");
public static final Item Frosting = new DessertItem(5009).setIconIndex(9).setItemName("Frosting");
public static final Item ChocolateFrosting = new DessertItem(5014).setIconIndex(8).setItemName("ChocolateFrosting");
public static final Item Cherry = new DessertItem(5019).setIconIndex(5).setItemName("Cherry");
public static final Item Cone = new DessertItem(5026).setIconIndex(4).setItemName("Cone");
public static final Item RedSugar = new DessertItem(5030).setIconIndex(29).setItemName("RedSugar");
public static final Item MintLeaves = new DessertItem(5031).setIconIndex(30).setItemName("MintLeaves");
public static final Item GummySpawner = new GummySpawner(5032).setIconIndex(31).setItemName("GummySpawner");
public static final Item SlushCup = new DessertItem(5034).setIconIndex(33).setItemName("SlushCup");
public static final Item GummySpawnerRed = new GummySpawnerRed(5036).setIconIndex(35).setItemName("GummySpawnerRed");
public static final Item ZombieSpawner = new ZombieSpawner(5037).setIconIndex(36).setItemName("ZombieSpawner");
public static final Item GrahamCrackerI = new DessertReed(5039, GrahamCracker).setIconIndex(38).setItemName("GrahamCracker");
//Foods
//Slushies
public static final Item PlainSlush = new SlushieBase(5033, 0).setIconIndex(32).setItemName("Slush");
public static final Item CherrySlush = new SlushieBase(5035, 4).setIconIndex(34).setItemName("CherrySlush");
//Sundaes
public static final Item Sundae = new SundaeBase(5013, 4).setIconIndex(12).setItemName("Sundae").setMaxStackSize(1);
public static final Item ChocolateSundae = new SundaeBase(5016, 4).setIconIndex(14).setItemName("ChocolateSundae").setMaxStackSize(1);
public static final Item MintChipSundae = new SundaeBase(5024, 4).setIconIndex(16).setItemName("MintChipSundae").setMaxStackSize(1);
public static final Item SprinkleSundae = new SundaeBase(5017, 6).setIconIndex(13).setItemName("SprinkleSundae").setMaxStackSize(1);
public static final Item SprinkleChocolateSundae = new SundaeBase(5018, 6).setIconIndex(15).setItemName("SprinkleChocolateSundae").setMaxStackSize(1);
public static final Item SprinkleMintChipSundae = new SundaeBase(5025, 6).setIconIndex(17).setItemName("SprinkleMintChipSundae").setMaxStackSize(1);
//Other
public static final Item VanillaCone = new ItemDessertFood(5027, 4, 1F, false).setIconIndex(26).setItemName("VanillaCone").setMaxStackSize(16);
public static final Item ChocolateCone = new ItemDessertFood(5028, 4, 1F, false).setIconIndex(27).setItemName("ChocolateCone").setMaxStackSize(16);
public static final Item MintChipCone = new ItemDessertFood(5029, 4, 1F, false).setIconIndex(28).setItemName("MintChipCone").setMaxStackSize(16);
public static final Item Chocolate = new ItemDessertFood(5008, 4, 1F, false).setIconIndex(25).setItemName("Chocolate").setMaxStackSize(16);
public static final Item RockCandy = new ItemDessertFood(5001, 4, 1F, false).setIconIndex(18).setItemName("RockCandy").setMaxStackSize(16);
public static final Item RedRockCandy = new ItemDessertFood(5002, 4, 1F, false).setIconIndex(19).setItemName("RedRockCandy").setMaxStackSize(16);
public static final Item BlueRockCandy = new ItemDessertFood(5003, 4, 1F, false).setIconIndex(23).setItemName("BlueRockCandy").setMaxStackSize(16);
public static final Item YellowRockCandy = new ItemDessertFood(5004, 4, 1F, false).setIconIndex(21).setItemName("YellowRockCandy").setMaxStackSize(16);
public static final Item GreenRockCandy = new ItemDessertFood(5005, 4, 1F, false).setIconIndex(22).setItemName("GreenRockCandy").setMaxStackSize(16);
public static final Item PurpleRockCandy = new ItemDessertFood(5006, 4, 1F, false).setIconIndex(20).setItemName("PurpleRockCandy").setMaxStackSize(16);
public static final Item Caramel = new ItemDessertFood(5007, 4, 1F, false).setIconIndex(24).setItemName("Caramel").setMaxStackSize(16);
public static final Block ChocolateCake = new ChocolateCake(143, 0).setHardness(0.5F).setStepSound(Block.soundClothFootstep).setBlockName("ChocolateCake").disableStats().setRequiresSelfNotify();
public static final Item ChocolateCakeI = new DessertReed(5020, ChocolateCake).setIconIndex(7).setMaxStackSize(1).setItemName("ChocolateCakeI");
public static final Item CandyCane = new ItemDessertFood(5022, 6, 1F, false).setIconIndex(6).setItemName("CandyCane").setMaxStackSize(16);
public static final Item GingerbreadMan = new ItemDessertFood(5023, 6, 1F, false).setIconIndex(10).setItemName("GingerbreadMan").setMaxStackSize(16);
public static final Item Marshmallow = new ItemDessertFood(5038, 6, 1F, false).setIconIndex(37).setItemName("Marshmallow").setMaxStackSize(16);
//Trees
//Cherry
public static final Block CherryLog = new CherryLog(134).setStepSound(Block.soundWoodFootstep).setHardness(1.0F).setResistance(2F).setBlockName("CherryLog");
public static final Block CherryPlanks = new CherryPlanks(137, 17).setStepSound(Block.soundWoodFootstep).setHardness(1.0F).setResistance(2F).setBlockName("CherryPlanks");
public static final Block CherryLeaves = new CherryLeaves(135, 34).setStepSound(Block.soundGrassFootstep).setHardness(0.2F).setLightOpacity(255).setBlockName("CherryLeaves").setRequiresSelfNotify();
public static final Block CherrySapling = new CherrySapling(136, 25).setHardness(0.0F).setStepSound(Block.soundGrassFootstep).setBlockName("CherrySapling").setRequiresSelfNotify();
public static final Block CherrySlab = new CherrySlab(138, 17).setStepSound(Block.soundWoodFootstep).setHardness(1.0F).setResistance(2F).setBlockName("CherrySlab");
public static final Block CherryStairs = new CherryStairs(139, CherryPlanks).setStepSound(Block.soundWoodFootstep).setHardness(1.0F).setResistance(2F).setBlockName("CherryStairs").setLightOpacity(0);
//CottonCandy
public static final Block CCStick = new CCStick(140).setStepSound(Block.soundWoodFootstep).setHardness(1.0F).setResistance(2F).setBlockName("CCStick");
public static final Block CottonCandy = new CottonCandy(141, 26).setStepSound(Block.soundClothFootstep).setHardness(0.2F).setLightOpacity(1).setBlockName("CottonCandy").setRequiresSelfNotify();
public static final Block CCSapling = new CCSapling(142, 19).setHardness(0.0F).setStepSound(Block.soundClothFootstep).setBlockName("CCSapling").setRequiresSelfNotify();
//Mint Chip
public static final Block ICCone = new ICCone(144).setStepSound(Block.soundWoodFootstep).setHardness(1.0F).setResistance(2F).setBlockName("ICCone");
public static final Block MintChip = new MintChip(145, 30).setStepSound(Block.soundClothFootstep).setHardness(0.2F).setLightOpacity(1).setBlockName("MintChip").setRequiresSelfNotify();
public static final Block MCSapling = new MCSapling(146, 29).setHardness(0.0F).setStepSound(Block.soundClothFootstep).setBlockName("MCSapling").setRequiresSelfNotify();
public void load()
{
MinecraftForgeClient.preloadTexture("/DessertCraft/terrain.png");
MinecraftForgeClient.preloadTexture("/DessertCraft/items.png");
//Biomes
ModLoader.addBiome(CakeBiome);
ModLoader.addBiome(ChocolateCakeBiome);
ModLoader.addBiome(CandyCaneForestBiome);
//Blocks
ModLoader.registerBlock(RockCandyTorch);
ModLoader.addName(RockCandyTorch, "Rock Candy Torch");
ModLoader.registerBlock(RockCandyTorchR);
ModLoader.addName(RockCandyTorchR, "Red Rock Candy Torch");
ModLoader.registerBlock(RockCandyTorchB);
ModLoader.addName(RockCandyTorchB, "Blue Rock Candy Torch");
ModLoader.registerBlock(RockCandyTorchG);
ModLoader.addName(RockCandyTorchG, "Green Rock Candy Torch");
ModLoader.registerBlock(RockCandyTorchY);
ModLoader.addName(RockCandyTorchY, "Yellow Rock Candy Torch");
ModLoader.registerBlock(RockCandyTorchP);
ModLoader.addName(RockCandyTorchP, "Purple Rock Candy Torch");
ModLoader.registerBlock(CakeCenter);
ModLoader.addName(CakeCenter, "Cake");
ModLoader.registerBlock(FrostingBlock);
ModLoader.addName(FrostingBlock, "Frosting Block");
ModLoader.registerBlock(ChocolateFrostingBlock);
ModLoader.addName(ChocolateFrostingBlock, "Chocolate Frosting Block");
ModLoader.registerBlock(CandyCaneBlock);
ModLoader.addName(CandyCaneBlock, "Candy Cane Block");
ModLoader.registerBlock(SugarStone);
ModLoader.addName(SugarStone, "Sugar Stone");
ModLoader.registerBlock(RedSugarStone);
ModLoader.addName(RedSugarStone, "Red Sugar Stone");
ModLoader.registerBlock(Mint);
ModLoader.addName(Mint, "Mint");
ModLoader.registerBlock(GrahamCracker);
ModLoader.addName(GrahamCracker, "Graham Cracker");
//Gumdrops
ModLoader.registerBlock(GumDropGreen);
ModLoader.addName(GumDropGreen, "Green Gum Drop");
ModLoader.registerBlock(GumDropYellow);
ModLoader.addName(GumDropYellow, "Yellow Gum Drop");
ModLoader.registerBlock(GumDropBlue);
ModLoader.addName(GumDropBlue, "Blue Gum Drop");
ModLoader.registerBlock(GumDropRed);
ModLoader.addName(GumDropRed, "Red Gum Drop");
ModLoader.registerBlock(GumDropPurple);
ModLoader.addName(GumDropPurple, "Purple Gum Drop");
//Items
ModLoader.addName(Sprinkles, "Sprinkles");
ModLoader.addName(Cone, "Cone");
ModLoader.addName(Sundae, "Sundae");
ModLoader.addName(IceCreamScoops, "Ice Cream Scoops");
ModLoader.addName(SundaeBowl, "Sundae Bowl");
ModLoader.addName(Frosting, "Frosting");
ModLoader.addName(ChocolateFrosting, "Chocolate Frosting");
ModLoader.addName(Caramel, "Caramel");
ModLoader.addName(Chocolate, "Chocolate");
ModLoader.addName(RedRockCandy, "Red Rock Candy");
ModLoader.addName(GreenRockCandy, "Green Rock Candy");
ModLoader.addName(PurpleRockCandy, "Purple Rock Candy");
ModLoader.addName(YellowRockCandy, "Yellow Rock Candy");
ModLoader.addName(BlueRockCandy, "Blue Rock Candy");
ModLoader.addName(RockCandy, "Rock Candy");
ModLoader.addName(ChocolateIceCreamScoops, "Chocolate Ice Cream Scoops");
ModLoader.addName(ChocolateSundae, "Chocolate Sundae");
ModLoader.addName(SprinkleChocolateSundae, "Chocolate Sundae With Sprinkles");
ModLoader.addName(SprinkleSundae, "Sundae With Sprinkles");
ModLoader.addName(Cherry, "Cherry");
ModLoader.addName(ChocolateCakeI, "Chocolate Cake");
ModLoader.registerBlock(ChocolateCake);
ModLoader.addName(ChocolateCake, "Chocolate Cake");
ModLoader.addName(CandyCane, "Barber Pole");
ModLoader.addName(GingerbreadMan, "Gingerbread Man");
ModLoader.addName(MintChipSundae, "Mint Chip Sundae");
ModLoader.addName(SprinkleMintChipSundae, "Mint Chip Sundae With Sprinkles");
ModLoader.addName(MintChipCone, "Mint Chip Cone");
ModLoader.addName(ChocolateCone, "Chocolate Cone");
ModLoader.addName(VanillaCone, "Vanilla Cone");
ModLoader.addName(RedSugar, "Red Sugar");
ModLoader.addName(MintLeaves, "Mint Leaves");
ModLoader.addName(GummySpawner, "Gummy Spawner");
ModLoader.addName(PlainSlush, "Unflavored Slushie");
ModLoader.addName(SlushCup, "Cup");
ModLoader.addName(CherrySlush, "Cherry Slushie");
ModLoader.addName(GummySpawnerRed, "Red Gummy Spawner");
ModLoader.addName(ZombieSpawner, "Zombie Spawner");
ModLoader.addName(Marshmallow, "Marshmallow");
ModLoader.addName(GrahamCrackerI, "Graham Cracker");
//Trees
//Cherry
ModLoader.registerBlock(CherryLog);
ModLoader.addName(CherryLog, "Cherry Log");
ModLoader.registerBlock(CherryLeaves);
ModLoader.addName(CherryLeaves, "Cherry Leaves");
ModLoader.registerBlock(CherrySapling);
ModLoader.addName(CherrySapling, "Cherry Sapling");
ModLoader.registerBlock(CherryPlanks);
ModLoader.addName(CherryPlanks, "Cherry Planks");
ModLoader.registerBlock(CherrySlab);
ModLoader.addName(CherrySlab, "Cherry Slab");
ModLoader.registerBlock(CherryStairs);
ModLoader.addName(CherryStairs, "Cherry Stairs");
//CottonCandy
ModLoader.registerBlock(CottonCandy);
ModLoader.addName(CottonCandy, "Cotton Candy");
ModLoader.registerBlock(CCStick);
ModLoader.addName(CCStick, "Cotton Candy Stick");
ModLoader.registerBlock(CCSapling);
ModLoader.addName(CCSapling, "Cotton Candy Sapling");
//Mint Chip
ModLoader.registerBlock(MintChip);
ModLoader.addName(MintChip, "MintChip");
ModLoader.registerBlock(ICCone);
ModLoader.addName(ICCone, "Ice Cream Cone");
ModLoader.registerBlock(MCSapling);
ModLoader.addName(MCSapling, "Mint Chip Sapling");
ModLoader.addName(MCScoops, "Mint Chip Scoops");
//Entities
ModLoader.registerEntityID(EntityGingerbread.class, "Gingerbread Man", ModLoader.getUniqueEntityId());
ModLoader.addSpawn(EntityGingerbread.class, 5, 5, 5, EnumCreatureType.creature, new BiomeGenBase[]
{
mod_DessertCraft.CakeBiome,
mod_DessertCraft.ChocolateCakeBiome,
mod_DessertCraft.CandyCaneForestBiome
});
ModLoader.registerEntityID(EntityGummySquid.class, "GummySquid", ModLoader.getUniqueEntityId());
ModLoader.addSpawn(EntityGummySquid.class, 5, 5, 5, EnumCreatureType.waterCreature, new BiomeGenBase[]
{
mod_DessertCraft.CakeBiome,
mod_DessertCraft.ChocolateCakeBiome,
mod_DessertCraft.CandyCaneForestBiome
});
ModLoader.registerEntityID(EntityGummySquidRed.class, "GummySquidRed", ModLoader.getUniqueEntityId());
ModLoader.addSpawn(EntityGummySquidRed.class, 5, 5, 5, EnumCreatureType.waterCreature, new BiomeGenBase[]
{
mod_DessertCraft.CakeBiome,
mod_DessertCraft.ChocolateCakeBiome,
mod_DessertCraft.CandyCaneForestBiome
});
ModLoader.registerEntityID(EntityCandyZombie.class, "CandyZombie", ModLoader.getUniqueEntityId());
ModLoader.addSpawn(EntityCandyZombie.class, 5, 5, 5, EnumCreatureType.monster, new BiomeGenBase[]
{
mod_DessertCraft.CakeBiome,
mod_DessertCraft.ChocolateCakeBiome,
mod_DessertCraft.CandyCaneForestBiome
});
ModLoader.registerEntityID(EntityStayPuft.class, "StayPuft", ModLoader.getUniqueEntityId());
ModLoader.addSpawn(EntityStayPuft.class, 10, 10, 10, EnumCreatureType.monster, new BiomeGenBase[]
{
mod_DessertCraft.CakeBiome,
mod_DessertCraft.ChocolateCakeBiome,
mod_DessertCraft.CandyCaneForestBiome
});
//Recipes
ModLoader.addSmelting(Item.sugar.shiftedIndex, new ItemStack(Caramel, 1));
ModLoader.addRecipe(new ItemStack(RockCandy, 1), new Object [] {"#", "X", "%", '#', Item.sugar, 'X', Item.bucketWater, '%', Item.stick});
ModLoader.addRecipe(new ItemStack(RedRockCandy, 1), new Object [] {"X", "%", '%', RockCandy, 'X', new ItemStack(Item.dyePowder, 1, 1)});
ModLoader.addRecipe(new ItemStack(YellowRockCandy, 1), new Object [] {"X", "%", '%', RockCandy, 'X', new ItemStack(Item.dyePowder, 1, 11)});
ModLoader.addRecipe(new ItemStack(BlueRockCandy, 1), new Object [] {"X", "%", '%', RockCandy, 'X', new ItemStack(Item.dyePowder, 1, 4)});
ModLoader.addRecipe(new ItemStack(GreenRockCandy, 1), new Object [] {"X", "%", '%', RockCandy, 'X', new ItemStack(Item.dyePowder, 1, 2)});
ModLoader.addRecipe(new ItemStack(PurpleRockCandy, 1), new Object [] {"X", "%", '%', RockCandy, 'X', new ItemStack(Item.dyePowder, 1, 5)});
ModLoader.addRecipe(new ItemStack(Item.cake, 1), new Object [] {"XXX", "%%%", '%', CakeCenter, 'X', Frosting});
ModLoader.addRecipe(new ItemStack(RockCandyTorch, 1), new Object [] {"X", "%", '%', Item.coal, 'X', RockCandy});
ModLoader.addRecipe(new ItemStack(RockCandyTorchR, 1), new Object [] {"X", "%", '%', Item.coal, 'X', RedRockCandy});
ModLoader.addRecipe(new ItemStack(RockCandyTorchB, 1), new Object [] {"X", "%", '%', Item.coal, 'X', BlueRockCandy});
ModLoader.addRecipe(new ItemStack(RockCandyTorchG, 1), new Object [] {"X", "%", '%', Item.coal, 'X', GreenRockCandy});
ModLoader.addRecipe(new ItemStack(RockCandyTorchY, 1), new Object [] {"X", "%", '%', Item.coal, 'X', YellowRockCandy});
ModLoader.addRecipe(new ItemStack(RockCandyTorchP, 1), new Object [] {"X", "%", '%', Item.coal, 'X', PurpleRockCandy});
ModLoader.addRecipe(new ItemStack(Chocolate, 5), new Object [] {"$", "X", "%", '%', Item.bucketMilk, '$', Item.sugar, 'X', new ItemStack(Item.dyePowder, 1, 3)});
ModLoader.addRecipe(new ItemStack(SundaeBowl, 5), new Object [] {"%-%", "-%-", "-%-", '%', Block.glass});
ModLoader.addRecipe(new ItemStack(IceCreamScoops, 10), new Object [] {"%%%", "$$$", "###", '%', Item.snowball, '$', Item.sugar, '#', Item.bucketMilk});
ModLoader.addRecipe(new ItemStack(ChocolateIceCreamScoops, 10), new Object [] {"%%%", "[email protected]$", "###", '%', Item.snowball, '$', Item.sugar, '#', Item.bucketMilk, '@', Chocolate});
ModLoader.addRecipe(new ItemStack(Sundae, 1), new Object [] {"$$$", "-#-", '$', IceCreamScoops, '#', SundaeBowl});
ModLoader.addRecipe(new ItemStack(MintChipSundae, 1), new Object [] {"$$$", "-#-", '$', MCScoops, '#', SundaeBowl});
ModLoader.addRecipe(new ItemStack(ChocolateSundae, 1), new Object [] {"$$$", "-#-", '$', ChocolateIceCreamScoops, '#', SundaeBowl});
ModLoader.addRecipe(new ItemStack(SprinkleSundae, 1), new Object [] {"$", "#", '$', Sprinkles, '#', Sundae});
ModLoader.addRecipe(new ItemStack(SprinkleChocolateSundae, 1), new Object [] {"$", "#", '$', Sprinkles, '#', ChocolateSundae});
ModLoader.addRecipe(new ItemStack(SprinkleMintChipSundae, 1), new Object [] {"$", "#", '$', Sprinkles, '#', MintChipSundae});
ModLoader.addShapelessRecipe(new ItemStack(CherryPlanks, 4), new Object [] {CherryLog});
ModLoader.addShapelessRecipe(new ItemStack(Item.paper, 4), new Object [] {CCStick});
ModLoader.addShapelessRecipe(new ItemStack(Cone, 4), new Object [] {ICCone});
ModLoader.addRecipe(new ItemStack(Item.bowlEmpty, 4), new Object [] {"#-#", "-#-", '#', CherryPlanks});
ModLoader.addRecipe(new ItemStack(Block.workbench, 1), new Object [] {"##", "##", '#', CherryPlanks});
ModLoader.addRecipe(new ItemStack(Item.stick, 4), new Object [] {"#", "#", '#', CherryPlanks});
ModLoader.addRecipe(new ItemStack(Block.pressurePlatePlanks, 1), new Object [] {"##", '#', CherryPlanks});
ModLoader.addRecipe(new ItemStack(Item.boat, 1), new Object [] {"#-#", "###", '#', CherryPlanks});
ModLoader.addRecipe(new ItemStack(Item.doorWood, 1), new Object [] {"##", "##", "##", '#', CherryPlanks});
ModLoader.addRecipe(new ItemStack(Block.trapdoor, 2), new Object [] {"###", "###", '#', CherryPlanks});
ModLoader.addRecipe(new ItemStack(Block.chest, 1), new Object [] {"###", "#-#", "###", '#', CherryPlanks});
ModLoader.addRecipe(new ItemStack(CherryStairs, 4), new Object [] {"--#", "-##", "###", '#', CherryPlanks});
ModLoader.addRecipe(new ItemStack(Item.shovelWood, 1), new Object [] {"#", "-", "-", '#', CherryPlanks, '-', Item.stick});
ModLoader.addRecipe(new ItemStack(Item.axeWood, 1), new Object [] {"##", "#-", " -", '#', CherryPlanks, '-', Item.stick});
ModLoader.addRecipe(new ItemStack(Item.pickaxeWood, 1), new Object [] {"###", " - ", " - ", '#', CherryPlanks, '-', Item.stick});
ModLoader.addRecipe(new ItemStack(Item.swordWood, 1), new Object [] {"#", "#", "-", '#', CherryPlanks, '-', Item.stick});
ModLoader.addRecipe(new ItemStack(Item.hoeWood, 1), new Object [] {"##", " -", " -", '#', CherryPlanks, '-', Item.stick});
ModLoader.addRecipe(new ItemStack(Block.fenceGate, 1), new Object [] {"-#-", "-#-", '#', CherryPlanks, '-', Item.stick});
ModLoader.addRecipe(new ItemStack(Item.sign, 1), new Object [] {"###", "###", " - ", '#', CherryPlanks, '-', Item.stick});
ModLoader.addRecipe(new ItemStack(Item.bed, 1), new Object [] {"###", "---", '#', CherryPlanks, '-', Block.cloth});
ModLoader.addRecipe(new ItemStack(Block.music, 1), new Object [] {"###", "#-#", "###", '#', CherryPlanks, '-', Item.redstone});
ModLoader.addRecipe(new ItemStack(Block.jukebox, 1), new Object [] {"###", "#-#", "###", '#', CherryPlanks, '-', Item.diamond});
ModLoader.addRecipe(new ItemStack(Block.bookShelf, 1), new Object [] {"###", "---", "###", '#', CherryPlanks, '-', Item.book});
ModLoader.addRecipe(new ItemStack(Block.pistonBase, 1), new Object [] {"###", "-2-", "-3-", '#', CherryPlanks, '-', Block.cobblestone, '2', Item.ingotIron, '3', Item.redstone});
ModLoader.addRecipe(new ItemStack(ChocolateCakeI, 1), new Object [] {"%%%", "$-$", "#1#", '%', Item.bucketMilk, '$', Item.sugar, '#', Item.wheat, '-', Item.egg, '1', Chocolate});
ModLoader.addRecipe(new ItemStack(CherrySlab, 6), new Object [] {"###", '#', CherryPlanks});
ModLoader.addRecipe(new ItemStack(MintChipCone, 1), new Object [] {"$", "#", '$', MCScoops, '#', Cone});
ModLoader.addRecipe(new ItemStack(VanillaCone, 1), new Object [] {"$", "#", '$', IceCreamScoops, '#', Cone});
ModLoader.addRecipe(new ItemStack(ChocolateCone, 1), new Object [] {"$", "#", '$', ChocolateIceCreamScoops, '#', Cone});
ModLoader.addRecipe(new ItemStack(ChocolateCakeI, 1), new Object [] {"$$$", "###", '$', ChocolateFrosting, '#', CakeCenter});
ModLoader.addRecipe(new ItemStack(SugarStone, 1), new Object [] {"$$$", "$$$", "$$$", '$', Item.sugar});
ModLoader.addRecipe(new ItemStack(RedSugarStone, 1), new Object [] {"$$$", "$$$", "$$$", '$', RedSugar});
ModLoader.addShapelessRecipe(new ItemStack(Item.sugar, 9), new Object [] {SugarStone});
ModLoader.addShapelessRecipe(new ItemStack(RedSugar, 9), new Object [] {RedSugarStone});
ModLoader.addRecipe(new ItemStack(RedSugar, 1), new Object [] {"#", "$", '$', Item.sugar, '#', new ItemStack(Item.dyePowder, 1, 1)});
ModLoader.addRecipe(new ItemStack(CandyCaneBlock, 1), new Object [] {"#$#", "$!$", "#$#", '$', RedSugar, '#', Item.sugar, '!', MintLeaves});
ModLoader.addRecipe(new ItemStack(MCScoops, 10), new Object [] {"%!%", "[email protected]$", "###", '%', Item.snowball, '$', Item.sugar, '#', Item.bucketMilk, '@', Chocolate, '!', MintLeaves});
ModLoader.addRecipe(new ItemStack(GummySpawner, 1), new Object [] {"$", "#", "#", '#', CandyCane, '$', GumDropGreen});
ModLoader.addRecipe(new ItemStack(GummySpawnerRed, 1), new Object [] {"$", "#", "#", '#', CandyCane, '$', GumDropRed});
ModLoader.addRecipe(new ItemStack(CandyCane, 4), new Object [] {"#", "#", '#', CandyCaneBlock});
ModLoader.addRecipe(new ItemStack(SlushCup, 4), new Object[] {"#-#", "-#-", '#', Item.paper});
ModLoader.addRecipe(new ItemStack(Block.ice, 10), new Object[] {"---", "-#-", "---", '#', Item.bucketWater, '-', Item.snowball});
ModLoader.addRecipe(new ItemStack(PlainSlush, 1), new Object[] {"#", "-", '#', Block.ice, '-', SlushCup});
ModLoader.addRecipe(new ItemStack(CherrySlush, 1), new Object[] {"#", "-", '#', Cherry, '-', PlainSlush});
ModLoader.addRecipe(new ItemStack(ZombieSpawner, 1), new Object[] {"!", "#", "#", '#', CandyCane, '!', Item.rottenFlesh});
//Test Recipe
ModLoader.addShapelessRecipe(new ItemStack(PlainSlush, 1), new Object[] {Block.dirt});
//Creative Inventory
ModLoader.setInGameHook(this, true, false);
ModLoader.setInGUIHook(this, true, false);
}
//Tree Generation
public void generateSurface(World world, Random rand, int chunkx, int chunkz)
{
for (int l = 0; l<45; l++)
{
int il = chunkx + rand.nextInt(16);
int jl = rand.nextInt(64);
int kl = chunkz + rand.nextInt(16);
}
BiomeGenBase biome = world.getWorldChunkManager().getBiomeGenAt(chunkx, chunkz);
WorldGenCherryTree worldgencherrytree = new WorldGenCherryTree(false);
WorldGenCottonCandy worldgencottoncandy = new WorldGenCottonCandy(false);
WorldGenMintChip worldgenmintchip = new WorldGenMintChip(false);
WorldGenCandyCane worldgencandycane = new WorldGenCandyCane();
WorldGenGingerbreadHouse worldgenhouse = new WorldGenGingerbreadHouse();
if(biome instanceof BiomeGenHills || biome instanceof BiomeGenForest || biome instanceof BiomeGenPlains)
{
for(int x = 0; x < 1; x++)
{
int Xcoord = chunkx + rand.nextInt(16);
int Zcoord = chunkz + rand.nextInt(16);
int i = world.getHeightValue(Xcoord, Zcoord);
worldgencherrytree.generate(world, rand, Xcoord, i, Zcoord);
}
}
if(biome instanceof BiomeGenCandyCaneForest)
{
for(int x = 0; x < 1; x++)
{
int Xcoord = chunkx + rand.nextInt(16);
int Zcoord = chunkz + rand.nextInt(16);
int i = world.getHeightValue(Xcoord, Zcoord);
worldgenhouse.generate(world, rand, Xcoord, i, Zcoord);
}
}
if(biome instanceof BiomeGenCake || biome instanceof BiomeGenChocolateCake)
{
for(int x = 0; x < 1; x++)
{
int Xcoord = chunkx + rand.nextInt(16);
int Zcoord = chunkz + rand.nextInt(16);
int i = world.getHeightValue(Xcoord, Zcoord);
worldgencottoncandy.generate(world, rand, Xcoord, i, Zcoord);
}
for(int x = 0; x < 1; x++)
{
int Xcoord = chunkx + rand.nextInt(16);
int Zcoord = chunkz + rand.nextInt(16);
int i = world.getHeightValue(Xcoord, Zcoord);
worldgenmintchip.generate(world, rand, Xcoord, i, Zcoord);
}
}
if(biome instanceof BiomeGenCandyCaneForest)
{
for(int x = 0; x < 1; x++)
{
int Xcoord = chunkx + rand.nextInt(16);
int Zcoord = chunkz + rand.nextInt(16);
int i = world.getHeightValue(Xcoord, Zcoord);
worldgencandycane.generate(world, rand, Xcoord, i, Zcoord);
}
}
}
//Creative Inventory
public boolean onTickInGame(float f, Minecraft minecraft)
{
if(minecraft.currentScreen == null)
{
creativeInventory = null;
}
return true;
}
public boolean onTickInGUI(float f, Minecraft minecraft, GuiScreen guiscreen)
{
if((guiscreen instanceof GuiContainerCreative) && !(creativeInventory instanceof GuiContainerCreative) && !minecraft.theWorld.isRemote)
{
Container container = ((GuiContainer)guiscreen).inventorySlots;
List list = ((ContainerCreative)container).itemList;
int i = 0;
list.add(new ItemStack(RockCandyTorch, 1, i));
list.add(new ItemStack(RockCandyTorchR, 1, i));
list.add(new ItemStack(RockCandyTorchB, 1, i));
list.add(new ItemStack(RockCandyTorchY, 1, i));
list.add(new ItemStack(RockCandyTorchG, 1, i));
list.add(new ItemStack(RockCandyTorchP, 1, i));
list.add(new ItemStack(FrostingBlock, 1, i));
list.add(new ItemStack(ChocolateFrostingBlock, 1, i));
list.add(new ItemStack(CakeCenter, 1, i));
list.add(new ItemStack(GumDropGreen, 1, i));
list.add(new ItemStack(GumDropRed, 1, i));
list.add(new ItemStack(GumDropYellow, 1, i));
list.add(new ItemStack(GumDropBlue, 1, i));
list.add(new ItemStack(GumDropPurple, 1, i));
list.add(new ItemStack(CherryLeaves, 1, i));
list.add(new ItemStack(CherryLog, 1, i));
list.add(new ItemStack(CherrySapling, 1, i));
list.add(new ItemStack(CherryPlanks, 1, i));
list.add(new ItemStack(CherrySlab, 1, i));
list.add(new ItemStack(CherryStairs, 1, i));
list.add(new ItemStack(CottonCandy, 1, i));
list.add(new ItemStack(CCStick, 1, i));
list.add(new ItemStack(CCSapling, 1, i));
list.add(new ItemStack(MintChip, 1, i));
list.add(new ItemStack(ICCone, 1, i));
list.add(new ItemStack(MCSapling, 1, i));
list.add(new ItemStack(CandyCaneBlock, 1, i));
list.add(new ItemStack(SugarStone, 1, i));
list.add(new ItemStack(RedSugarStone, 1, i));
list.add(new ItemStack(Mint, 1, i));
}
creativeInventory = guiscreen;
return true;
}
private static GuiScreen creativeInventory;
//Entity Spawning
public void addRenderer(Map map)
{
map.put(EntityGingerbread.class, new RenderGingerbread(new ModelBiped(), 0.5F));
map.put(EntityGummySquid.class, new RenderGummySquid(new ModelSquid(), 0.5F));
map.put(EntityGummySquidRed.class, new RenderGummySquidRed(new ModelSquid(), 0.5F));
map.put(EntityCandyZombie.class, new RenderBiped(new ModelZombie(), 0.5F));
map.put(EntityStayPuft.class, new RenderStayPuft(new ModelBiped(), 0.5F));
}
public String getVersion()
{
return "v 4.0";
}
public static Object getInstance()
{
// TODO Auto-generated method stub
return null;
}
}
I'm also in the middle of adding a config file but I don't think that would effect it
Put the public static final lines for the biomes after all of the blocks.
I have self-taught myself the basics just by experimenting and such. These are the Java tutorials I used.
together they are powerful beyond imagination."
public void load() { ModLoader.registerEntityID(ModUndeadEntityInfectedZombie.class, "UDInfected", ModLoader.getUniqueEntityId(), 0xb9c200, 0xaf0914); ModLoader.addSpawn(ModUndeadEntityInfectedZombie.class, 5, 5, 6, EnumCreatureType.monster); ModLoader.registerEntityID(ModUndeadEntityCoolZombie.class, "UDCool", ModLoader.getUniqueEntityId(), 0x1f1f1f, 0xe6e6e6); ModLoader.addSpawn(ModUndeadEntityCoolZombie.class, 5, 5, 6, EnumCreatureType.monster); }together they are powerful beyond imagination."
Thanks. I have another issue now. Everytime I try to break a block my minecrashes with this error:
java.lang.NullPointerException at net.minecraft.src.RenderItem.doRenderItem(RenderItem.java:101) at net.minecraft.src.RenderItem.doRender(RenderItem.java:415) at net.minecraft.src.RenderManager.renderEntityWithPosYaw(RenderManager.java:188) at net.minecraft.src.RenderManager.renderEntity(RenderManager.java:175) at net.minecraft.src.RenderGlobal.renderEntities(RenderGlobal.java:431) at net.minecraft.src.EntityRenderer.renderWorld(EntityRenderer.java:1094) at net.minecraft.src.EntityRenderer.updateCameraAndRender(EntityRenderer.java:907) at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:873) at net.minecraft.client.Minecraft.run(Minecraft.java:750) at java.lang.Thread.run(Unknown Source)Any ideas on this?
together they are powerful beyond imagination."
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumYou work magic