Hello all,
I almost finished updating my two mods.
But I always get this error with my sapling:
[11:04:02] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLTweaker
[11:04:02] [main/INFO] [LaunchWrapper]: Using primary tweak class name cpw.mods.fml.common.launcher.FMLTweaker
[11:04:02] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLTweaker
[11:04:02] [main/INFO] [FML]: Forge Mod Loader version 7.2.116.1024 for Minecraft 1.7.2 loading
[11:04:03] [main/INFO] [FML]: Java is Java HotSpot(TM) 64-Bit Server VM, version 1.7.0_25, running on Windows 7:amd64:6.1, installed at C:\Program Files\Java\jre7
[11:04:03] [main/INFO] [FML]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation
[11:04:03] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker
[11:04:03] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLDeobfTweaker
[11:04:03] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker
[11:04:03] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker
[11:04:03] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper
[11:04:03] [main/ERROR] [FML]: The binary patch set is missing. Either you are in a development environment, or things are not going to work!
[11:04:03] [main/ERROR] [FML]: The minecraft jar file:/C:/Users/*/.gradle/caches/minecraft/net/minecraftforge/forge/1.7.2-10.12.0.1024/forgeSrc-1.7.2-10.12.0.1024.jar!/net/minecraft/client/ClientBrandRetriever.class appears to be corrupt! There has been CRITICAL TAMPERING WITH MINECRAFT, it is highly unlikely minecraft will work! STOP NOW, get a clean copy and try again!
[11:04:03] [main/ERROR] [FML]: FML has been ordered to ignore the invalid or missing minecraft certificate. This is very likely to cause a problem!
[11:04:03] [main/ERROR] [FML]: Technical information: ClientBrandRetriever was at jar:file:/C:/Users/*/.gradle/caches/minecraft/net/minecraftforge/forge/1.7.2-10.12.0.1024/forgeSrc-1.7.2-10.12.0.1024.jar!/net/minecraft/client/ClientBrandRetriever.class, there were 0 certificates for it
[11:04:03] [main/ERROR] [FML]: FML appears to be missing any signature data. This is not a good thing
[11:04:03] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper
[11:04:03] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLDeobfTweaker
[11:04:04] [main/INFO] [LaunchWrapper]: Launching wrapped minecraft {net.minecraft.client.main.Main}
[11:04:07] [main/INFO]: Setting user: Player675
[11:04:09] [Client thread/INFO]: LWJGL Version: 2.9.0
[11:04:09] [Client thread/INFO] [MinecraftForge]: Attempting early MinecraftForge initialization
[11:04:09] [Client thread/INFO] [FML]: MinecraftForge v10.12.0.1024 Initialized
[11:04:10] [Client thread/INFO] [FML]: Replaced 128 ore recipies
[11:04:10] [Client thread/INFO] [MinecraftForge]: Completed early MinecraftForge initialization
[11:04:10] [Client thread/INFO] [FML]: Searching *:\*\Minecraft\MCP-1.7.2\eclipse\mods for mods
[11:04:11] [Client thread/ERROR] [FML]: FML has detected a mod that is using a package name based on 'net.minecraft.src' : net.minecraft.src.FMLRenderAccessLibrary. This is generally a severe programming error. There should be no mod code in the minecraft namespace. MOVE YOUR MOD! If you're in eclipse, select your source code and 'refactor' it into a new package. Go on. DO IT NOW!
[11:04:17] [Client thread/INFO] [FML]: Forge Mod Loader has identified 5 mods to load
[11:04:17] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Cars and Drives, FMLFileResourcePack:Robbi Blechdose Mod
[11:04:18] [Client thread/INFO] [FML]: Configured a dormant chunk cache size of 0
Starting up SoundSystem...
Initializing LWJGL OpenAL
(The LWJGL binding of OpenAL. For more information, see http://www.lwjgl.org)
OpenAL initialized.
[11:04:21] [Sound Library Loader/INFO]: Sound engine started
---- Minecraft Crash Report ----
// On the bright side, I bought you a teddy bear!
Time: 09.05.14 11:04
Description: Initializing game
java.lang.ArrayIndexOutOfBoundsException: 2
at net.minecraft.block.BlockFlower.registerBlockIcons(BlockFlower.java:47)
at net.minecraft.client.renderer.texture.TextureMap.registerIcons(TextureMap.java:317)
at net.minecraft.client.renderer.texture.TextureMap.<init>(TextureMap.java:59)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:617)
at net.minecraft.client.Minecraft.run(Minecraft.java:931)
at net.minecraft.client.main.Main.main(Main.java:112)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:134)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------
-- Head --
Stacktrace:
at net.minecraft.block.BlockFlower.registerBlockIcons(BlockFlower.java:47)
at net.minecraft.client.renderer.texture.TextureMap.registerIcons(TextureMap.java:317)
at net.minecraft.client.renderer.texture.TextureMap.<init>(TextureMap.java:59)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:617)
-- Initialization --
Details:
Stacktrace:
at net.minecraft.client.Minecraft.run(Minecraft.java:931)
at net.minecraft.client.main.Main.main(Main.java:112)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:134)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
-- System Details --
Details:
Minecraft Version: 1.7.2
Operating System: Windows 7 (amd64) version 6.1
Java Version: 1.7.0_25, Oracle Corporation
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 676353872 bytes (645 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 MB)
JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
FML: MCP v9.01-pre FML v7.2.116.1024 Minecraft Forge 10.12.0.1024 5 mods loaded, 5 mods active
mcp{8.09} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized
FML{7.2.116.1024} [Forge Mod Loader] (forgeSrc-1.7.2-10.12.0.1024.jar) Unloaded->Constructed->Pre-initialized
Forge{10.12.0.1024} [Minecraft Forge] (forgeSrc-1.7.2-10.12.0.1024.jar) Unloaded->Constructed->Pre-initialized
carsanddrives{1.0.4} [Cars and Drives] (bin) Unloaded->Constructed->Pre-initialized
robbiblechdosemod{1.2.6} [Robbi Blechdose Mod] (bin) Unloaded->Constructed->Pre-initialized
Launched Version: 1.6
LWJGL: 2.9.0
OpenGL: GeForce 410M/PCI/SSE2 GL version 4.1.0, NVIDIA Corporation
Is Modded: Definitely; Client brand changed to 'fml,forge'
Type: Client (map_client.txt)
Resource Packs: []
Current Language: English (US)
Profiler Position: N/A (disabled)
Vec3 Pool Size: ~~ERROR~~ NullPointerException: null
Anisotropic Filtering: Off (1)
#@!@# Game crashed! Crash report saved to: #@!@# *:\*\Minecraft\MCP-1.7.2\eclipse\.\crash-reports\crash-2014-05-09_11.04.22-client.txt
AL lib: (EE) alc_cleanup: 1 device not closed
I think it is because of my Blocks extending BlockFlower.
My code is:
RoboSapling:
package RobbiBlechdoseMod.Basis.Block;
import RobbiBlechdoseMod.Basis.Basis;
import RobbiBlechdoseMod.Basis.Dimension.WorldGenGlowTree;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import java.util.List;
import java.util.Random;
import net.minecraft.block.Block;
import net.minecraft.block.BlockBush;
import net.minecraft.block.BlockFlower;
import net.minecraft.block.IGrowable;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.init.Blocks;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
import net.minecraft.util.MathHelper;
import net.minecraft.world.World;
import net.minecraft.world.gen.feature.WorldGenBigTree;
import net.minecraft.world.gen.feature.WorldGenCanopyTree;
import net.minecraft.world.gen.feature.WorldGenForest;
import net.minecraft.world.gen.feature.WorldGenMegaJungle;
import net.minecraft.world.gen.feature.WorldGenMegaPineTree;
import net.minecraft.world.gen.feature.WorldGenSavannaTree;
import net.minecraft.world.gen.feature.WorldGenTaiga2;
import net.minecraft.world.gen.feature.WorldGenTrees;
import net.minecraft.world.gen.feature.WorldGenerator;
public class BlockRoboSapling extends BlockFlower
{
public static final String[] typesSapling = new String[] {"Robo"};
public BlockRoboSapling() {
super(2);
this.stepSound = soundTypeGrass;
this.setHardness(0.0F);
float f = 0.4F;
this.setBlockBounds(0.5F - f, 0.0F, 0.5F - f, 0.5F + f, f * 2.0F, 0.5F + f);
this.setCreativeTab(Basis.tabRobbiBlechdoseMod);
}
/**
@SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister reg) {
reg.registerIcon("robbiblechdosemod:RoboSapling");
}
**/
/**
* Determines if the same sapling is present at the given location.
*/
public boolean isSameSapling(World par1World, int par2, int par3, int par4, int par5)
{
return par1World.getBlock(par2, par3, par4) == this && (par1World.getBlockMetadata(par2, par3, par4) & 3) == par5;
}
/**
* Determines the damage on the item the block drops. Used in cloth and
* wood.
*/
public int damageDropped(int par1) {
return par1 & 3;
}
/**
* returns a list of blocks with the same ID, but different meta (eg: wood
* returns 4 blocks)
*/
@SideOnly(Side.CLIENT)
public void getSubBlocks(Item item, CreativeTabs tab, List listSaplings) {
listSaplings.add(new ItemStack(item, 1, 0));
}
/**
* Grow tree function
***/
public void growTree(World world, int x, int y, int z, Random par1Random) {
if (!net.minecraftforge.event.terraingen.TerrainGen.saplingGrowTree(world, par1Random, x, y, z)) return;
int l = world.getBlockMetadata(x, y, z) & 7;
Object object = null;
int i1 = 0;
int j1 = 0;
object = new WorldGenGlowTree(true, (2 + par1Random.nextInt(4)) * 2, 0, 0, false);
world.setBlock(x, y, z, Blocks.air, 0, 4);
if (!((WorldGenerator) object).generate(world, par1Random, x + i1, y, z + j1)) {
world.setBlock(x, y, z, this, l, 4);
}
}
/**
* Ticks the block if it's been scheduled
*/
@Override
public void updateTick(World world, int x, int y, int z, Random par1Random) {
if (!world.isRemote) {
super.updateTick(world, x, y, z, par1Random);
}
}
}
Glow Sapling is the same as this (but not textures and name).
FriendBush
package RobbiBlechdoseMod.Basis.FriendBush;
import java.util.Random;
import RobbiBlechdoseMod.Basis.Basis;
import net.minecraft.block.Block;
import net.minecraft.block.BlockFlower;
import net.minecraft.block.ITileEntityProvider;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.stats.StatList;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import net.minecraft.world.gen.feature.WorldGenMinable;
public class FriendBushBlock extends BlockFlower implements ITileEntityProvider
{
public FriendBushBlock(int par1)
{
super(par1);
float f = 0.4F;
this.setBlockBounds(0.5F - f, 0.0F, 0.5F - f, 0.5F + f, 0.8F, 0.5F + f);
this.setCreativeTab(Basis.tabRobbiBlechdoseMod);
}
/**
* Gets passed in the blockID of the block below and supposed to return true if its allowed to grow on the type of
* blockID passed in. Args: blockID
*/
protected boolean canThisPlantGrowOnThisBlockID(Block par1)
{
return par1 == Blocks.sand;
}
/**
* Returns the ID of the items to drop on destruction.
*/
public int idDropped(int par1, Random par2Random, int par3)
{
return -1;
}
public boolean onBlockActivated(World world, int par2, int par3, int par4, EntityPlayer player, int par6, float f1, float f2, float f3)
{
TileEntityFriendBush tileEntity = (TileEntityFriendBush)world.getTileEntity(par2, par3, par4);
tileEntity.chat(player, world);
return true;
}
/**
* Called when the player destroys a block with an item that can harvest it. (i, j, k) are the coordinates of the
* block and l is the block's subtype/damage.
*/
public void harvestBlock(World par1World, EntityPlayer par2EntityPlayer, int par3, int par4, int par5, int par6)
{
if (!par1World.isRemote && par2EntityPlayer.getCurrentEquippedItem() != null && par2EntityPlayer.getCurrentEquippedItem() == new ItemStack(Items.shears))
{
//par2EntityPlayer.addStat(StatList.mineBlockStatArray[this], 1);
this.dropBlockAsItem(par1World, par3, par4, par5, new ItemStack(Basis.FriendBush, 1, par6));
}
else
{
super.harvestBlock(par1World, par2EntityPlayer, par3, par4, par5, par6);
}
}
public void registerIcons(IIconRegister reg)
{
this.blockIcon = reg.registerIcon("deadbush");
}
@Override
public TileEntity createNewTileEntity(World par1World, int var1)
{
return new TileEntityFriendBush();
}
}
I noticed that in RoboSapling's constructor, you use "super(2)", and the error is saying that "2" is over some array's length. I don't know if this is related to the error at all (because I don't have the Minecraft 1.7.2 source code with me at the moment), but try changing that to maybe "super(1)", and see what happens.
I see you're really helpless so I will take my best shot at you're last question, and will keep helping you every time you quote any of my posts. Anytime you need my help, message me or reply to one of my posts.
You have to override the BlockFlower method. Like So:
public boolean canPlaceBlockAt(World world, int x, int y, int z)
{
return world.getBlock(x, y + 1, z).isReplaceable(world, x, y + 1, z) && world.getBlock(x, y - 1, z).getMaterial().isSolid();
}
That makes sure that the block under you is solid. If you want your flower to only be placed on a specific block, you can replace the return with this:
With this, I can't place it on any block, and if I tell it "return block == Base.GlowGrass" then I can palce it there but not bonemeal anymore and everytime I click with this onto this sapling (placed) it break the old one :(.
You could override the onBlockActivated(…) method with something like this...
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int idk, float sideX, float sideY, float sideZ)
{
//If the player is holding Bonemeal...
if(player.getHeldItem().getItem() == Items.dye && player.getHeldItem().getItemDamage() == 15)
{
//If you have a WorldGen class with the tree, you can do...
if(hasWorldGenClass)
{
WorldGenerator gen = new WorldGenCustomTree(parameters...);
return gen.generate(world, world.rand, x, y, z);
}
//If you don't have a WorldGen class, you can just simply do...
else
{
for(int i = -3; i < 4; i++)
{
for(int j = 0; j < 8; j++)
{
for(int k = -3; k < 4; k++)
{
if(world.isAirBlock(x + i, y + j, z + k) || world.getBlock(x + i, y + j, z + k).isReplaceable(world, x + i, y + k, z + k))
{
world.setBlock(x + i, y + j, z + k, Blocks.log);
}
}
}
}
return true;
}
}
}
I almost finished updating my two mods.
But I always get this error with my sapling:
I think it is because of my Blocks extending BlockFlower.
My code is:
RoboSapling:
Glow Sapling is the same as this (but not textures and name).
FriendBush
Robbi Blechdose
Hope this helps!
Mapping and Modding rules | Global rules
but now I have another problem: I can't place my sapling.
And it look like a flower.
Robbi Blechdose
Robbi Blechdose
Robbi Blechdose
Robbi Blechdose
Robbi Blechdose
Please help, I really need to update my mod.
Robbi Blechose
Which is the method that tells it on which block I can place my sapling???
Robbi Blechdose
Robbi Blechdose
You have to override the BlockFlower method. Like So:
That makes sure that the block under you is solid. If you want your flower to only be placed on a specific block, you can replace the return with this:
If this doesn't work, let me know. I'd love to help
Hello!
Robbi Blechdose
Hello!