Problème avec les textures des plantations [1.7.10]



  • Bonjour à vous !

    Je revient vers vous pour encore un autre problème que j'arrive pas à résoudre même en cherchant de partout, je n'arrive pas à trouver la solution pour mon problème.

    Le problème est que lorsque je plante ma plantation, mon jeu crash immédiatement. Je suis que ça vient des textures mais je n'arrive pas à le régler.

    Voici les codes de ma plantation :

    BlockCropsMod :

    import static net.minecraftforge.common.EnumPlantType.Crop;
    import static net.minecraftforge.common.EnumPlantType.Desert;
    import static net.minecraftforge.common.EnumPlantType.Nether;
    import static net.minecraftforge.common.EnumPlantType.Plains;
    import static net.minecraftforge.common.EnumPlantType.Water;
    
    import java.util.ArrayList;
    import java.util.Map;
    import java.util.Random;
    
    import cpw.mods.fml.relauncher.Side;
    import cpw.mods.fml.relauncher.SideOnly;
    import fr.irisium.irisiummod.IrisiumMod;
    import fr.irisium.irisiummod.init.BlocksMod;
    import fr.irisium.irisiummod.init.ItemsMod;
    import fr.irisium.irisiummod.util.ConfigHandler;
    import fr.irisium.irisiummod.util.ConfigMain;
    import net.minecraft.block.Block;
    import net.minecraft.block.BlockBush;
    import net.minecraft.block.IGrowable;
    import net.minecraft.client.renderer.texture.IIconRegister;
    import net.minecraft.entity.Entity;
    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.util.IIcon;
    import net.minecraft.util.MathHelper;
    import net.minecraft.world.IBlockAccess;
    import net.minecraft.world.World;
    import net.minecraftforge.common.EnumPlantType;
    import net.minecraftforge.common.util.ForgeDirection;
    
    public class BlockCropsMod extends BlockBush implements IGrowable
    {
    	@SideOnly(Side.CLIENT)
        private IIcon[] iconArray;
        private static final String __OBFID = "CL_00000222";
        protected int maxGrowthStage = 7;
    
        public BlockCropsMod()
        {
        	this.setTickRandomly(true);
            float f = 0.5F;
            this.setBlockBounds(0.5F - f, 0.0F, 0.5F - f, 0.5F + f, 0.25F, 0.5F + f);
            this.setHardness(0.0F);
            this.setStepSound(soundTypeGrass);
            this.disableStats();
        }
    
        protected boolean canPlaceBlockOn(Block block) 
        {
            return block == BlocksMod.fertilizedDirt || block == Blocks.farmland;
        }
        
        public boolean canBlockStay(World world, int x, int y, int z) 
        { 
        	return world.getBlock(x, y - 1, z).canSustainPlant(world, x, y - 1, z, ForgeDirection.UP, this); 
        }
    
        public void updateTick(World p_149674_1_, int p_149674_2_, int p_149674_3_, int p_149674_4_, Random p_149674_5_) {
            super.updateTick(p_149674_1_, p_149674_2_, p_149674_3_, p_149674_4_, p_149674_5_);
            if (p_149674_1_.getBlockLightValue(p_149674_2_, p_149674_3_ + 1, p_149674_4_) >= 9) {
                int l = p_149674_1_.getBlockMetadata(p_149674_2_, p_149674_3_, p_149674_4_);
                if (l < 7) {
                    float f = this.func_149864_n(p_149674_1_, p_149674_2_, p_149674_3_, p_149674_4_);
                    if (p_149674_5_.nextInt((int)(25.0F / f) + 1) == 0) {
                        ++l;
                        p_149674_1_.setBlockMetadataWithNotify(p_149674_2_, p_149674_3_, p_149674_4_, l, 2);
                    }
                }
            }
    
        }
    
        private float func_149864_n(World p_149864_1_, int p_149864_2_, int p_149864_3_, int p_149864_4_) {
            float f = 0.1F;
            Block block = p_149864_1_.getBlock(p_149864_2_, p_149864_3_, p_149864_4_ - 1);
            Block block1 = p_149864_1_.getBlock(p_149864_2_, p_149864_3_, p_149864_4_ + 1);
            Block block2 = p_149864_1_.getBlock(p_149864_2_ - 1, p_149864_3_, p_149864_4_);
            Block block3 = p_149864_1_.getBlock(p_149864_2_ + 1, p_149864_3_, p_149864_4_);
            Block block4 = p_149864_1_.getBlock(p_149864_2_ - 1, p_149864_3_, p_149864_4_ - 1);
            Block block5 = p_149864_1_.getBlock(p_149864_2_ + 1, p_149864_3_, p_149864_4_ - 1);
            Block block6 = p_149864_1_.getBlock(p_149864_2_ + 1, p_149864_3_, p_149864_4_ + 1);
            Block block7 = p_149864_1_.getBlock(p_149864_2_ - 1, p_149864_3_, p_149864_4_ + 1);
            boolean flag = block2 == this || block3 == this;
            boolean flag1 = block == this || block1 == this;
            boolean flag2 = block4 == this || block5 == this || block6 == this || block7 == this;
    
            for(int l = p_149864_2_ - 1; l <= p_149864_2_ + 1; ++l) {
                for(int i1 = p_149864_4_ - 1; i1 <= p_149864_4_ + 1; ++i1) {
                    float f1 = 0.0F;
                    if (p_149864_1_.getBlock(l, p_149864_3_ - 1, i1).canSustainPlant(p_149864_1_, l, p_149864_3_ - 1, i1, ForgeDirection.UP, this)) {
                        f1 = 1.0F;
                        if (p_149864_1_.getBlock(l, p_149864_3_ - 1, i1).isFertile(p_149864_1_, l, p_149864_3_ - 1, i1)) {
                            f1 = 3.0F;
                        }
                    }
                    if (l != p_149864_2_ || i1 != p_149864_4_) {
                        f1 /= 4.0F;
                    }
                    f += f1;
                }
            }
            if (flag2 || flag && flag1) {
                f /= 2.0F;
            }
            return f;
        }
    
        public int getRenderType() 
        {
            return 1;
        }
    
        protected Item func_149866_i() 
        {
            return Items.apple;
        }
    
        protected Item func_149865_P() 
        {
            return Items.wheat;
        }
    
        public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_) 
        {
            return p_149650_1_ == 7 ? this.func_149865_P() : this.func_149866_i();
        }
    
        public int quantityDropped(Random p_149745_1_) 
        {
            return 0;
        }
    
        @SideOnly(Side.CLIENT)
        public Item getItem(World p_149694_1_, int p_149694_2_, int p_149694_3_, int p_149694_4_) 
        {
            return this.func_149866_i();
        }
    
        @SideOnly(Side.CLIENT)
        public IIcon getIcon(int p_149691_1_, int meta) 
        {
          if (meta < 0 || meta > 7)
          {
            meta = 7;
          }
          return this.iconArray[meta];
        }
    
        public ArrayList<ItemStack> getDrops(World world, int x, int y, int z, int metadata, int fortune) 
        {
            ArrayList<ItemStack> ret = super.getDrops(world, x, y, z, metadata, fortune);
            if (metadata >= 7 && !ConfigMain.PLANT_ON_BREAK) 
            {
              for (int i = 0; i < 1 + fortune; i++) {
                if (world.rand.nextInt(7) <= metadata) 
                {
                  ret.add(new ItemStack(func_149866_i(), 1, 0));
                }
              } 
            }
            if (metadata >= 7 && ConfigMain.SECOND_SEED_CHANCE > 0) 
            {
              for (int i = 0; i < 1 + fortune; i++) {
                if (world.rand.nextInt(100) <= Math.max(1, ConfigMain.SECOND_SEED_CHANCE)) 
                {
                  ret.add(new ItemStack(func_149866_i(), 1, 0));
                }
              } 
            }
            return ret;
          }
    
        @SideOnly(Side.CLIENT)
        public void randomDisplayTick(World par1World, int par2, int par3, int par4, Random par5Random) 
        {
            super.randomDisplayTick(par1World, par2, par3, par4, par5Random);
            int meta = par1World.getBlockMetadata(par2, par3, par4);
            if (ConfigHandler.cropEffects) 
            {
                if (par5Random.nextInt(5) == 0 && meta >= 7) 
                {
                    par1World.spawnParticle("instantSpell", (double)((float)par2 + par5Random.nextFloat()), (double)((float)par3 + 0.6F), (double)((float)par4 + par5Random.nextFloat()), 0.0D, 0.0D, 0.0D);
                } else if (par5Random.nextInt(5) == 0 && meta <= 6) 
                {
                    par1World.spawnParticle("enchantmenttable", (double)((float)par2 + par5Random.nextFloat()), (double)((float)par3 + 0.9F), (double)((float)par4 + par5Random.nextFloat()), 0.0D, 0.0D, 0.0D);
                }
            }
        }
    
        public void fertilize(World world, int x, int y, int z) 
        {
        	int l = world.getBlockMetadata(x, y, z) + MathHelper.getRandomIntegerInRange(world.rand, 2, 5);
            if (l > 7)
            {
              l = 7;
            }
            world.setBlockMetadataWithNotify(x, y, z, 1, 2);
        }
    
        @Override
        public EnumPlantType getPlantType(IBlockAccess world, int x, int y, int z)
        {
            if (this == BlocksMod.silveriteCrop)          return Crop;
            if (this == BlocksMod.eboneriteCrop)        return Crop;
            if (this == BlocksMod.irisiteCrop)       return Crop;
            if (this == BlocksMod.galaxineCrop)     return Crop;        
            return Crop;
        }
        
        @Override
        public Block getPlant(IBlockAccess world, int x, int y, int z)
        {
            return this;
        }
    
        @Override
        public int getPlantMetadata(IBlockAccess world, int x, int y, int z)
        {
            return world.getBlockMetadata(x, y, z);
        }
    
    	public boolean canFertilize(World world, int x, int y, int z, boolean p_149851_5_) 
    	{
    		return (world.getBlockMetadata(x, y, z) != 7);
    	}
    
    	public boolean shouldFertilize(World world, Random random, int x, int y, int z) 
    	{
    		return true;
    	}
    
    	public void fertilize(World world, Random random, int x, int y, int z) 
    	{
    		
    	}
    
    	@Override
    	public boolean func_149851_a(World p_149851_1_, int p_149851_2_, int p_149851_3_, int p_149851_4_,
    			boolean p_149851_5_) {
    		// TODO Auto-generated method stub
    		return false;
    	}
    
    	@Override
    	public boolean func_149852_a(World p_149852_1_, Random p_149852_2_, int p_149852_3_, int p_149852_4_,
    			int p_149852_5_) {
    		// TODO Auto-generated method stub
    		return false;
    	}
    
    	@Override
    	public void func_149853_b(World p_149853_1_, Random p_149853_2_, int p_149853_3_, int p_149853_4_,
    			int p_149853_5_) {
    		// TODO Auto-generated method stub
    		
    	}
    }
    

    BlockSilveriteCrops :

    
    import cpw.mods.fml.relauncher.Side;
    import cpw.mods.fml.relauncher.SideOnly;
    import fr.irisium.irisiummod.IrisiumMod;
    import fr.irisium.irisiummod.blocks.utils.BlockCropsMod;
    import fr.irisium.irisiummod.init.ItemsMod;
    import fr.irisium.irisiummod.util.ConfigHandler;
    import net.minecraft.block.Block;
    import net.minecraft.client.renderer.texture.IIconRegister;
    import net.minecraft.item.Item;
    import net.minecraft.item.ItemStack;
    import net.minecraft.util.IIcon;
    import net.minecraft.world.World;
    
    public class BlockSilveriteCrops extends BlockCropsMod
    {
    	@SideOnly(Side.CLIENT)
    	private IIcon[] iconArray;
    
    	public BlockSilveriteCrops() 
    	{
    		setBlockName("silveriteCrop");
    	}
    	
    	public Item func_149866_i() 
    	{ 
    		return ItemsMod.silveriteSeed; 
    	}
    
    	public Item func_149865_P() 
    	{ 
    		return ItemsMod.itemGarlic; 
    	}
    	
    	public void dropBlockAsItemWithChance(World p_149690_1_, int p_149690_2_, int p_149690_3_, int p_149690_4_, int p_149690_5_, float p_149690_6_, int p_149690_7_) {
            super.dropBlockAsItemWithChance(p_149690_1_, p_149690_2_, p_149690_3_, p_149690_4_, p_149690_5_, p_149690_6_, 0);
            if (!p_149690_1_.isRemote && p_149690_5_ >= 7 && p_149690_1_.rand.nextInt(80) == 0 && ConfigHandler.essdrop) 
            {
                this.dropBlockAsItem(p_149690_1_, p_149690_2_, p_149690_3_, p_149690_4_, new ItemStack(ItemsMod.silveriteEssence));
            }
        }
    
    	  @SideOnly(Side.CLIENT)
    	  public void registerIcons(IIconRegister p_149651_1_) 
    	  {
    	    this.iconArray = new IIcon[4];
    	    for (int i = 0; i < this.iconArray.length; i++) 
    	    {
    	      this.iconArray[i] = p_149651_1_.registerIcon("irisiummod:silveriteCrop_" + i);
    	    }
    	  }
    	  
    	  @SideOnly(Side.CLIENT)
    	  public IIcon getIcon(int par1, int par2) 
    	  {
    	    if (par2 < 7) 
    	    {
    	      if (par2 == 6) 
    	      {
    	        par2 = 5;
    	      }
    	      return this.iconArray[par2 >> 1];
    	    } 
    	    
    	    return this.iconArray[3];
    	  }
    }
    

    Le crash-report :

    // Quite honestly, I wouldn't worry myself about that.
    
    Time: 29/08/19 14:42
    Description: Rendering entity in world
    
    java.lang.NullPointerException: Rendering entity in world
    	at fr.irisium.irisiummod.blocks.crops.BlockSilveriteCrops.getIcon(BlockSilveriteCrops.java:65)
    	at net.minecraft.block.Block.getBlockTextureFromSide(Block.java:686)
    	at net.minecraft.item.ItemBlock.getIconFromDamage(ItemBlock.java:51)
    	at net.minecraft.item.Item.getIconIndex(Item.java:457)
    	at net.minecraft.item.ItemStack.getIconIndex(ItemStack.java:131)
    	at net.minecraft.client.renderer.entity.RenderItem.doRender(RenderItem.java:211)
    	at net.minecraft.client.renderer.entity.RenderItem.doRender(RenderItem.java:783)
    	at net.minecraft.client.renderer.entity.RenderManager.func_147939_a(RenderManager.java:300)
    	at net.minecraft.client.renderer.entity.RenderManager.renderEntityWithPosYaw(RenderManager.java:283)
    	at net.minecraft.client.particle.EntityPickupFX.renderParticle(EntityPickupFX.java:53)
    	at net.minecraft.client.particle.EffectRenderer.renderLitParticles(EffectRenderer.java:216)
    	at net.minecraft.client.renderer.EntityRenderer.renderWorld(EntityRenderer.java:1347)
    	at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1091)
    	at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1067)
    	at net.minecraft.client.Minecraft.run(Minecraft.java:962)
    	at net.minecraft.client.main.Main.main(Main.java:164)
    	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:135)
    	at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
    	at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source)
    	at GradleStart.main(Unknown Source)
    
    
    A detailed walkthrough of the error, its code path and all known details is as follows:
    ---------------------------------------------------------------------------------------
    
    -- Head --
    Stacktrace:
    	at fr.irisium.irisiummod.blocks.crops.BlockSilveriteCrops.getIcon(BlockSilveriteCrops.java:65)
    	at net.minecraft.block.Block.getBlockTextureFromSide(Block.java:686)
    	at net.minecraft.item.ItemBlock.getIconFromDamage(ItemBlock.java:51)
    	at net.minecraft.item.Item.getIconIndex(Item.java:457)
    	at net.minecraft.item.ItemStack.getIconIndex(ItemStack.java:131)
    	at net.minecraft.client.renderer.entity.RenderItem.doRender(RenderItem.java:211)
    	at net.minecraft.client.renderer.entity.RenderItem.doRender(RenderItem.java:783)
    
    -- Entity being rendered --
    Details:
    	Entity Type: Item (net.minecraft.entity.item.EntityItem)
    	Entity ID: 103295
    	Entity Name: item.tile.silveriteCrop
    	Entity's Exact location: 59,44, 6,31, -313,78
    	Entity's Block location: World: (59,6,-314), Chunk: (at 11,0,6 in 3,-20; contains blocks 48,0,-320 to 63,255,-305), Region: (0,-1; contains chunks 0,-32 to 31,-1, blocks 0,0,-512 to 511,255,-1)
    	Entity's Momentum: -0,13, -0,14, 0,13
    
    -- Renderer details --
    Details:
    	Assigned renderer: net.minecraft.client.renderer.entity.RenderItem@fd01951
    	Location: -0,02,-0,33,-0,00 - World: (-1,-1,-1), Chunk: (at 15,-1,15 in -1,-1; contains blocks -16,0,-16 to -1,255,-1), Region: (-1,-1; contains chunks -32,-32 to -1,-1, blocks -512,0,-512 to -1,255,-1)
    	Rotation: 22.5
    	Delta: 0.13246632
    Stacktrace:
    	at net.minecraft.client.renderer.entity.RenderManager.func_147939_a(RenderManager.java:300)
    	at net.minecraft.client.renderer.entity.RenderManager.renderEntityWithPosYaw(RenderManager.java:283)
    	at net.minecraft.client.particle.EntityPickupFX.renderParticle(EntityPickupFX.java:53)
    	at net.minecraft.client.particle.EffectRenderer.renderLitParticles(EffectRenderer.java:216)
    	at net.minecraft.client.renderer.EntityRenderer.renderWorld(EntityRenderer.java:1347)
    
    -- Affected level --
    Details:
    	Level name: MpServer
    	All players: 1 total; [EntityClientPlayerMP['Player618'/140, l='MpServer', x=59,46, y=6,62, z=-313,78]]
    	Chunk stats: MultiplayerChunkCache: 279, 279
    	Level seed: 0
    	Level generator: ID 00 - default, ver 1. Features enabled: false
    	Level generator options: 
    	Level spawn location: World: (100,64,-206), Chunk: (at 4,4,2 in 6,-13; contains blocks 96,0,-208 to 111,255,-193), Region: (0,-1; contains chunks 0,-32 to 31,-1, blocks 0,0,-512 to 511,255,-1)
    	Level time: 14255 game time, 14255 day time
    	Level dimension: 0
    	Level storage version: 0x00000 - Unknown?
    	Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false)
    	Level game mode: Game mode: survival (ID 0). Hardcore: false. Cheats: false
    	Forced entities: 25 total; [EntityPig['Pig'/64, l='MpServer', x=83,47, y=69,00, z=-237,50], EntityChicken['Chicken'/66, l='MpServer', x=83,47, y=65,00, z=-234,69], EntityClientPlayerMP['Player618'/140, l='MpServer', x=59,46, y=6,62, z=-313,78], EntityBat['Bat'/19, l='MpServer', x=-17,34, y=59,10, z=-370,41], EntityChicken['Chicken'/84, l='MpServer', x=121,50, y=88,00, z=-244,50], EntityBat['Bat'/20, l='MpServer', x=-19,91, y=59,10, z=-369,34], EntityChicken['Chicken'/85, l='MpServer', x=120,50, y=88,00, z=-243,50], EntityBat['Bat'/21, l='MpServer', x=-16,25, y=60,10, z=-366,25], EntityChicken['Chicken'/86, l='MpServer', x=121,50, y=88,00, z=-243,50], EntityChicken['Chicken'/87, l='MpServer', x=120,50, y=88,00, z=-240,50], EntityBat['Bat'/27, l='MpServer', x=-17,25, y=59,00, z=-364,25], EntityBat['Bat'/30, l='MpServer', x=0,00, y=25,82, z=-263,47], EntityChicken['Chicken'/31, l='MpServer', x=-0,63, y=64,00, z=-244,41], EntityBat['Bat'/99, l='MpServer', x=135,16, y=59,85, z=-342,44], EntityChicken['Chicken'/36, l='MpServer', x=4,56, y=64,00, z=-251,44], EntityBat['Bat'/100, l='MpServer', x=135,69, y=59,10, z=-341,78], EntityBat['Bat'/101, l='MpServer', x=139,00, y=58,10, z=-340,50], EntityChicken['Chicken'/38, l='MpServer', x=0,50, y=63,00, z=-235,50], EntityItem['item.tile.stonebrick'/39, l='MpServer', x=31,13, y=6,13, z=-314,88], EntityChicken['Chicken'/40, l='MpServer', x=41,50, y=63,00, z=-325,50], EntityChicken['Chicken'/41, l='MpServer', x=42,50, y=64,00, z=-321,50], EntityChicken['Chicken'/42, l='MpServer', x=47,47, y=64,00, z=-329,44], EntityItem['item.tile.stonebrick'/43, l='MpServer', x=33,13, y=5,13, z=-304,31], EntityChicken['Chicken'/44, l='MpServer', x=45,47, y=64,00, z=-318,53], EntityItem['item.tile.stonebrick'/51, l='MpServer', x=61,88, y=5,13, z=-311,88]]
    	Retry entities: 0 total; []
    	Server brand: fml,forge
    	Server type: Integrated singleplayer server
    Stacktrace:
    	at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:415)
    	at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:2566)
    	at net.minecraft.client.Minecraft.run(Minecraft.java:984)
    	at net.minecraft.client.main.Main.main(Main.java:164)
    	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:135)
    	at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
    	at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source)
    	at GradleStart.main(Unknown Source)
    
    -- System Details --
    Details:
    	Minecraft Version: 1.7.10
    	Operating System: Windows 8.1 (amd64) version 6.3
    	Java Version: 1.8.0_221, Oracle Corporation
    	Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
    	Memory: 706293592 bytes (673 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: 13, tallocated: 95
    	FML: MCP v9.05 FML v7.10.99.99 Minecraft Forge 10.13.4.1614 4 mods loaded, 4 mods active
    	States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored
    	UCHIJAAAA	mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) 
    	UCHIJAAAA	FML{7.10.99.99} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.4.1614-1.7.10.jar) 
    	UCHIJAAAA	Forge{10.13.4.1614} [Minecraft Forge] (forgeSrc-1.7.10-10.13.4.1614-1.7.10.jar) 
    	UCHIJAAAA	irisiummod{0.1} [IrisiumMod] (bin) 
    	GL info: ' Vendor: 'Intel' Version: '4.3.0 - Build 10.18.14.4264' Renderer: 'Intel(R) HD Graphics 4600'
    	Launched Version: 1.7.10
    	LWJGL: 2.9.1
    	OpenGL: Intel(R) HD Graphics 4600 GL version 4.3.0 - Build 10.18.14.4264, Intel
    	GL Caps: Using GL 1.3 multitexturing.
    Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported.
    Anisotropic filtering is supported and maximum anisotropy is 16.
    Shaders are available because OpenGL 2.1 is supported.
    
    	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: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
    	Anisotropic Filtering: Off (1)
    

    Merci d'avance 😃


  • Moddeurs confirmés Rédacteurs Administrateurs

    Bonsoir,

    Qu'est-ce qui te fait penser que cela vient de la texture ?
    Le stack trace ne parle que du placement du bloc depuis l'item, ce qui laisse plutôt penser que ton bloc est null lorsque tu initialises l'item de la graine.



  • Bonjour,

    Merci pour ta réponse, j'ai essayé de chercher à comprendre et j'ai plus ou moins réussi mais c'est toujours assez flou.

    De plus j'ai essayé de ne pas poser les plantations via les graines mais en me donnant directement la plante et comme je m'y attenter mon jeu à crash.

    Voici le crash-report :

    // Don't be sad, have a hug! <3
    
    Time: 29/08/19 11:08
    Description: Rendering entity in world
    
    java.lang.NullPointerException: Rendering entity in world
    	at fr.irisium.irisiummod.blocks.utils.BlockCropsMod.getIcon(BlockCropsMod.java:173)
    	at net.minecraft.block.Block.getBlockTextureFromSide(Block.java:686)
    	at net.minecraft.item.ItemBlock.getIconFromDamage(ItemBlock.java:51)
    	at net.minecraft.item.Item.getIconIndex(Item.java:457)
    	at net.minecraft.item.ItemStack.getIconIndex(ItemStack.java:131)
    	at net.minecraft.client.renderer.entity.RenderItem.doRender(RenderItem.java:211)
    	at net.minecraft.client.renderer.entity.RenderItem.doRender(RenderItem.java:783)
    	at net.minecraft.client.renderer.entity.RenderManager.func_147939_a(RenderManager.java:300)
    	at net.minecraft.client.renderer.entity.RenderManager.renderEntityStatic(RenderManager.java:278)
    	at net.minecraft.client.renderer.entity.RenderManager.renderEntitySimple(RenderManager.java:251)
    	at net.minecraft.client.renderer.RenderGlobal.renderEntities(RenderGlobal.java:527)
    	at net.minecraft.client.renderer.EntityRenderer.renderWorld(EntityRenderer.java:1300)
    	at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1091)
    	at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1067)
    	at net.minecraft.client.Minecraft.run(Minecraft.java:962)
    	at net.minecraft.client.main.Main.main(Main.java:164)
    	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:135)
    	at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
    	at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source)
    	at GradleStart.main(Unknown Source)
    
    
    A detailed walkthrough of the error, its code path and all known details is as follows:
    ---------------------------------------------------------------------------------------
    
    -- Head --
    Stacktrace:
    	at fr.irisium.irisiummod.blocks.utils.BlockCropsMod.getIcon(BlockCropsMod.java:173)
    	at net.minecraft.block.Block.getBlockTextureFromSide(Block.java:686)
    	at net.minecraft.item.ItemBlock.getIconFromDamage(ItemBlock.java:51)
    	at net.minecraft.item.Item.getIconIndex(Item.java:457)
    	at net.minecraft.item.ItemStack.getIconIndex(ItemStack.java:131)
    	at net.minecraft.client.renderer.entity.RenderItem.doRender(RenderItem.java:211)
    	at net.minecraft.client.renderer.entity.RenderItem.doRender(RenderItem.java:783)
    
    -- Entity being rendered --
    Details:
    	Entity Type: Item (net.minecraft.entity.item.EntityItem)
    	Entity ID: 212125
    	Entity Name: item.tile.null
    	Entity's Exact location: 302,67, 12,40, -484,63
    	Entity's Block location: World: (302,12,-485), Chunk: (at 14,0,11 in 18,-31; contains blocks 288,0,-496 to 303,255,-481), Region: (0,-1; contains chunks 0,-32 to 31,-1, blocks 0,0,-512 to 511,255,-1)
    	Entity's Momentum: -0,11, -0,19, 0,05
    
    -- Renderer details --
    Details:
    	Assigned renderer: net.minecraft.client.renderer.entity.RenderItem@575f4499
    	Location: -0,03,-0,33,-0,02 - World: (-1,-1,-1), Chunk: (at 15,-1,15 in -1,-1; contains blocks -16,0,-16 to -1,255,-1), Region: (-1,-1; contains chunks -32,-32 to -1,-1, blocks -512,0,-512 to -1,255,-1)
    	Rotation: 111.09375
    	Delta: 0.033122182
    Stacktrace:
    	at net.minecraft.client.renderer.entity.RenderManager.func_147939_a(RenderManager.java:300)
    	at net.minecraft.client.renderer.entity.RenderManager.renderEntityStatic(RenderManager.java:278)
    	at net.minecraft.client.renderer.entity.RenderManager.renderEntitySimple(RenderManager.java:251)
    	at net.minecraft.client.renderer.RenderGlobal.renderEntities(RenderGlobal.java:527)
    	at net.minecraft.client.renderer.EntityRenderer.renderWorld(EntityRenderer.java:1300)
    
    -- Affected level --
    Details:
    	Level name: MpServer
    	All players: 1 total; [EntityClientPlayerMP['Player121'/368, l='MpServer', x=302,81, y=12,92, z=-484,67]]
    	Chunk stats: MultiplayerChunkCache: 289, 289
    	Level seed: 0
    	Level generator: ID 01 - flat, ver 0. Features enabled: false
    	Level generator options: 
    	Level spawn location: World: (422,4,-546), Chunk: (at 6,0,14 in 26,-35; contains blocks 416,0,-560 to 431,255,-545), Region: (0,-2; contains chunks 0,-64 to 31,-33, blocks 0,0,-1024 to 511,255,-513)
    	Level time: 24509 game time, 24509 day time
    	Level dimension: 0
    	Level storage version: 0x00000 - Unknown?
    	Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false)
    	Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: false
    	Forced entities: 268 total; [EntityItem['item.tile.dirt.default'/69645, l='MpServer', x=283,22, y=1,13, z=-466,97], EntityItem['item.tile.dirt.default'/69644, l='MpServer', x=284,78, y=2,13, z=-467,09], EntityItem['item.tile.dirt.default'/69647, l='MpServer', x=283,94, y=1,13, z=-466,66], EntityItem['item.tile.dirt.default'/69648, l='MpServer', x=278,22, y=1,13, z=-467,38], EntityItem['item.tile.stonebrick'/69651, l='MpServer', x=279,59, y=1,13, z=-468,34], EntityItem['item.tile.dirt.default'/69650, l='MpServer', x=282,66, y=1,13, z=-464,25], EntityItem['item.tile.stonebrick'/69653, l='MpServer', x=279,97, y=5,13, z=-465,00], EntityItem['item.tile.log.oak'/69652, l='MpServer', x=278,22, y=5,13, z=-465,78], EntityItem['item.tile.dirt.default'/69655, l='MpServer', x=280,28, y=1,13, z=-466,63], EntityItem['item.tile.dirt.default'/69654, l='MpServer', x=281,22, y=1,13, z=-463,69], EntityItem['item.tile.dirt.default'/24, l='MpServer', x=283,44, y=1,13, z=-489,88], EntityItem['item.tile.dirt.default'/69657, l='MpServer', x=278,16, y=2,13, z=-468,59], EntityItem['item.tile.dirt.default'/25, l='MpServer', x=284,47, y=1,13, z=-491,09], EntityItem['item.tile.stonebrick'/69656, l='MpServer', x=280,34, y=1,13, z=-467,06], EntityItem['item.tile.dirt.default'/26, l='MpServer', x=287,16, y=2,13, z=-491,88], EntityItem['item.tile.stairsWood'/69659, l='MpServer', x=281,25, y=2,13, z=-465,47], EntityItem['item.tile.stairsStone'/27, l='MpServer', x=284,91, y=5,13, z=-486,88], EntityItem['item.tile.dirt.default'/69658, l='MpServer', x=277,75, y=3,13, z=-467,19], EntityItem['item.tile.stonebrick'/29, l='MpServer', x=287,25, y=1,13, z=-482,81], EntityItem['item.tile.stonebrick'/30, l='MpServer', x=284,13, y=5,13, z=-486,09], EntityItem['item.tile.torch'/31, l='MpServer', x=284,28, y=5,13, z=-486,88], EntityBat['Bat'/32, l='MpServer', x=309,27, y=6,91, z=-452,56], EntityBat['Bat'/64, l='MpServer', x=285,25, y=7,10, z=-455,28], EntityBat['Bat'/65, l='MpServer', x=274,25, y=6,10, z=-459,81], EntityItem['item.tile.stonebrick'/69, l='MpServer', x=286,56, y=2,13, z=-460,13], EntityItem['item.tile.wood.oak'/72, l='MpServer', x=286,41, y=2,13, z=-460,13], EntityItem['item.tile.log.oak'/73, l='MpServer', x=283,13, y=1,13, z=-460,13], EntityItem['item.tile.dirt.default'/74, l='MpServer', x=284,13, y=1,13, z=-460,41], EntityItem['item.tile.stonebrick'/75, l='MpServer', x=283,59, y=2,13, z=-459,13], EntityItem['item.tile.stonebrick'/77, l='MpServer', x=285,13, y=1,13, z=-460,72], EntityBat['Bat'/85, l='MpServer', x=285,25, y=7,10, z=-455,25], EntityItem['item.item.wheat'/150127, l='MpServer', x=319,19, y=2,13, z=-497,13], EntityItem['item.tile.gravel'/110, l='MpServer', x=290,13, y=1,13, z=-503,41], EntityItem['item.tile.dirt.default'/111, l='MpServer', x=289,81, y=2,13, z=-504,91], EntityItem['item.tile.log.oak'/150125, l='MpServer', x=318,78, y=3,13, z=-496,88], EntityItem['item.tile.dirt.default'/112, l='MpServer', x=291,94, y=2,13, z=-506,88], EntityItem['item.tile.dirt.default'/150130, l='MpServer', x=319,75, y=3,13, z=-500,78], EntityItem['item.tile.dirt.default'/113, l='MpServer', x=295,47, y=3,13, z=-505,56], EntityItem['item.tile.dirt.default'/114, l='MpServer', x=294,09, y=2,13, z=-505,03], EntityItem['item.item.seeds'/150128, l='MpServer', x=318,97, y=3,13, z=-498,03], EntityItem['item.tile.dirt.default'/115, l='MpServer', x=292,31, y=1,13, z=-503,31], EntityItem['item.tile.dirt.default'/116, l='MpServer', x=292,66, y=1,13, z=-504,19], EntityItem['item.tile.gravel'/117, l='MpServer', x=292,34, y=1,13, z=-505,16], EntityItem['item.item.wheat'/150135, l='MpServer', x=319,84, y=3,13, z=-500,31], EntityItem['item.tile.dirt.default'/118, l='MpServer', x=294,06, y=3,13, z=-506,84], EntityItem['item.tile.stonebrick'/125047, l='MpServer', x=289,03, y=9,13, z=-486,50], EntityItem['item.tile.dirt.default'/150132, l='MpServer', x=319,88, y=2,13, z=-497,13], EntityItem['item.tile.dirt.default'/119, l='MpServer', x=294,34, y=2,13, z=-501,19], EntityItem['item.tile.stonebrick'/125046, l='MpServer', x=288,88, y=9,13, z=-487,69], EntityItem['item.item.wheat'/150133, l='MpServer', x=321,84, y=3,13, z=-497,84], EntityItem['item.tile.dirt.default'/120, l='MpServer', x=294,78, y=1,13, z=-503,88], EntityItem['item.item.potato'/150138, l='MpServer', x=317,13, y=2,13, z=-498,22], EntityItem['item.tile.dirt.default'/121, l='MpServer', x=290,44, y=2,13, z=-505,88], EntityItem['item.tile.stoneSlab.stone'/86136, l='MpServer', x=278,25, y=4,13, z=-485,03], EntityItem['item.tile.dirt.default'/150139, l='MpServer', x=318,16, y=3,13, z=-497,41], EntityItem['item.tile.dirt.default'/122, l='MpServer', x=290,41, y=1,13, z=-504,13], EntityItem['item.item.seeds'/150136, l='MpServer', x=321,09, y=2,13, z=-498,13], EntityItem['item.tile.gravel'/123, l='MpServer', x=290,13, y=1,13, z=-502,78], EntityItem['item.item.seeds'/150137, l='MpServer', x=322,63, y=4,13, z=-498,84], EntityItem['item.tile.dirt.default'/124, l='MpServer', x=292,19, y=1,13, z=-502,56], EntityItem['item.item.seeds'/150143, l='MpServer', x=320,28, y=2,13, z=-497,13], EntityItem['item.item.seeds'/150141, l='MpServer', x=317,76, y=2,01, z=-498,05], EntityItem['item.item.potatoPoisonous'/150146, l='MpServer', x=321,59, y=5,13, z=-501,66], EntityItem['item.tile.dirt.default'/150147, l='MpServer', x=321,50, y=2,13, z=-498,13], EntityItem['item.tile.log.oak'/150144, l='MpServer', x=317,13, y=3,13, z=-499,81], EntityItem['item.tile.dirt.default'/131, l='MpServer', x=288,88, y=1,13, z=-492,63], EntityItem['item.item.potato'/150145, l='MpServer', x=322,00, y=5,13, z=-501,16], EntityItem['item.tile.dirt.default'/132, l='MpServer', x=288,97, y=3,13, z=-491,63], EntityItem['item.tile.dirt.default'/133, l='MpServer', x=293,88, y=1,13, z=-482,25], EntityItem['item.tile.gravel'/134, l='MpServer', x=291,84, y=1,13, z=-483,72], EntityItem['item.tile.dirt.default'/150148, l='MpServer', x=317,69, y=3,13, z=-499,22], EntityItem['item.tile.dirt.default'/135, l='MpServer', x=293,38, y=1,13, z=-480,19], EntityItem['item.tile.dirt.default'/20615, l='MpServer', x=313,78, y=3,13, z=-521,16], EntityItem['item.tile.stonebrick'/136, l='MpServer', x=288,81, y=1,13, z=-485,19], EntityItem['item.tile.dirt.default'/20616, l='MpServer', x=312,38, y=1,13, z=-518,91], EntityItem['item.tile.stonebrick'/137, l='MpServer', x=291,44, y=1,13, z=-483,13], EntityItem['item.tile.dirt.default'/20617, l='MpServer', x=311,66, y=3,13, z=-515,19], EntityItem['item.tile.stonebrick'/138, l='MpServer', x=291,25, y=5,13, z=-485,09], EntityItem['item.tile.dirt.default'/20618, l='MpServer', x=311,47, y=2,13, z=-517,63], EntityItem['item.tile.stairsWood'/139, l='MpServer', x=290,72, y=10,13, z=-492,88], EntityItem['item.tile.stairsWood'/140, l='MpServer', x=291,13, y=1,13, z=-489,56], EntityItem['item.tile.dirt.default'/20620, l='MpServer', x=316,34, y=1,13, z=-517,72], EntityItem['item.tile.stairsWood'/141, l='MpServer', x=292,19, y=4,13, z=-493,19], EntityItem['item.tile.dirt.default'/20621, l='MpServer', x=316,38, y=2,13, z=-519,91], EntityItem['item.tile.log.oak'/142, l='MpServer', x=295,53, y=5,13, z=-489,13], EntityItem['item.tile.dirt.default'/20622, l='MpServer', x=315,88, y=3,13, z=-515,19], EntityItem['item.tile.dirt.default'/20623, l='MpServer', x=315,78, y=1,13, z=-519,56], EntityItem['item.tile.log.oak'/144, l='MpServer', x=297,88, y=5,13, z=-489,88], EntityItem['item.tile.dirt.default'/20624, l='MpServer', x=313,59, y=1,13, z=-517,47], EntityItem['item.tile.log.oak'/145, l='MpServer', x=296,53, y=5,13, z=-489,31], EntityItem['item.tile.dirt.default'/20625, l='MpServer', x=312,63, y=1,13, z=-519,81], EntityItem['item.tile.log.oak'/146, l='MpServer', x=296,25, y=5,13, z=-490,81], EntityItem['item.tile.dirt.default'/20627, l='MpServer', x=317,59, y=3,13, z=-519,25], EntityItem['item.tile.dirt.default'/20628, l='MpServer', x=314,16, y=1,13, z=-519,84], EntityItem['item.tile.stonebrick'/149, l='MpServer', x=302,94, y=4,13, z=-470,88], EntityItem['item.tile.wood.oak'/150, l='MpServer', x=299,19, y=7,13, z=-471,25], EntityItem['item.tile.dirt.default'/20630, l='MpServer', x=315,03, y=3,13, z=-515,63], EntityItem['item.tile.stairsWood'/151, l='MpServer', x=301,59, y=5,13, z=-468,06], EntityItem['item.tile.dirt.default'/20631, l='MpServer', x=313,06, y=2,13, z=-520,81], EntityItem['item.tile.stairsWood'/152, l='MpServer', x=300,59, y=10,13, z=-467,13], EntityItem['item.tile.log.oak'/24728, l='MpServer', x=307,78, y=1,13, z=-492,13], EntityItem['item.tile.stonebrick'/153, l='MpServer', x=300,91, y=7,13, z=-469,25], EntityItem['item.tile.dirt.default'/20633, l='MpServer', x=313,34, y=1,13, z=-516,59], EntityItem['item.tile.wood.oak'/154, l='MpServer', x=302,13, y=5,13, z=-466,94], EntityItem['item.tile.dirt.default'/20634, l='MpServer', x=311,19, y=2,13, z=-518,44], EntityItem['item.tile.dirt.default'/24730, l='MpServer', x=299,88, y=3,13, z=-497,91], EntityItem['item.tile.stairsWood'/155, l='MpServer', x=299,13, y=9,13, z=-468,81], EntityItem['item.tile.dirt.default'/20635, l='MpServer', x=312,25, y=3,13, z=-521,56], EntityItem['item.tile.dirt.default'/24731, l='MpServer', x=300,97, y=2,13, z=-495,91], EntityItem['item.tile.stairsWood'/156, l='MpServer', x=302,31, y=5,13, z=-468,84], EntityItem['item.tile.dirt.default'/20636, l='MpServer', x=315,28, y=1,13, z=-518,47], EntityItem['item.tile.dirt.default'/24732, l='MpServer', x=304,34, y=2,13, z=-493,22], EntityItem['item.tile.stairsWood'/157, l='MpServer', x=299,06, y=9,13, z=-471,09], EntityItem['item.tile.dirt.default'/24733, l='MpServer', x=302,81, y=3,13, z=-493,88], EntityItem['item.tile.stairsWood'/158, l='MpServer', x=298,13, y=9,13, z=-471,31], EntityItem['item.tile.dirt.default'/24734, l='MpServer', x=300,13, y=1,13, z=-496,31], EntityItem['item.tile.null'/212125, l='MpServer', x=302,67, y=12,40, z=-484,63], EntityItem['item.tile.dirt.default'/159, l='MpServer', x=296,47, y=2,13, z=-478,19], EntityItem['item.tile.gravel'/160, l='MpServer', x=297,69, y=1,13, z=-473,13], EntityItem['item.tile.log.oak'/161, l='MpServer', x=294,13, y=1,13, z=-477,84], EntityItem['item.tile.torch'/162, l='MpServer', x=300,84, y=4,13, z=-474,69], EntityItem['item.tile.cloth.black'/163, l='MpServer', x=298,91, y=4,13, z=-474,63], EntityItem['item.tile.torch'/164, l='MpServer', x=297,88, y=1,13, z=-473,13], EntityItem['item.tile.torch'/165, l='MpServer', x=298,59, y=4,13, z=-472,34], EntityItem['item.tile.dirt.default'/24741, l='MpServer', x=299,78, y=3,13, z=-496,22], EntityItem['item.tile.fence'/166, l='MpServer', x=294,13, y=1,13, z=-477,88], EntityItem['item.tile.dirt.default'/24742, l='MpServer', x=301,13, y=1,13, z=-503,88], EntityItem['item.tile.dirt.default'/167, l='MpServer', x=295,13, y=2,13, z=-478,34], EntityItem['item.item.seeds'/168, l='MpServer', x=296,34, y=2,13, z=-478,66], EntityItem['item.tile.dirt.default'/24744, l='MpServer', x=300,66, y=2,13, z=-494,44], EntityItem['item.tile.stonebrick'/169, l='MpServer', x=297,88, y=1,13, z=-473,13], EntityItem['item.tile.fence'/170, l='MpServer', x=293,41, y=5,13, z=-477,34], EntityItem['item.tile.stonebrick'/171, l='MpServer', x=296,19, y=1,13, z=-476,78], EntityItem['item.tile.dirt.default'/172, l='MpServer', x=298,16, y=2,13, z=-473,91], EntityItem['item.tile.wood.oak'/105645, l='MpServer', x=275,75, y=1,13, z=-472,16], EntityItem['item.tile.dirt.default'/173, l='MpServer', x=297,13, y=1,13, z=-473,13], EntityItem['item.tile.dirt.default'/24749, l='MpServer', x=300,13, y=1,13, z=-497,62], EntityItem['item.tile.log.oak'/174, l='MpServer', x=299,56, y=4,13, z=-476,66], EntityItem['item.tile.dirt.default'/105647, l='MpServer', x=273,44, y=1,13, z=-476,25], EntityItem['item.tile.dirt.default'/175, l='MpServer', x=298,88, y=2,13, z=-475,72], EntityItem['item.tile.dirt.default'/24751, l='MpServer', x=301,13, y=1,13, z=-494,13], EntityItem['item.tile.dirt.default'/176, l='MpServer', x=298,09, y=2,13, z=-473,13], EntityItem['item.tile.dirt.default'/177, l='MpServer', x=297,88, y=1,13, z=-473,13], EntityItem['item.tile.stonebrick'/105648, l='MpServer', x=275,69, y=1,13, z=-473,41], EntityItem['item.tile.dirt.default'/178, l='MpServer', x=294,13, y=1,13, z=-477,88], EntityItem['item.tile.gravel'/179, l='MpServer', x=296,78, y=1,13, z=-476,16], EntityItem['item.tile.dirt.default'/105650, l='MpServer', x=272,97, y=3,13, z=-471,94], EntityItem['item.tile.stonebrick'/180, l='MpServer', x=291,25, y=4,13, z=-478,28], EntityItem['item.tile.dirt.default'/105653, l='MpServer', x=273,06, y=1,13, z=-472,22], EntityVillager['Villager'/181, l='MpServer', x=299,31, y=5,00, z=-448,06], EntityItem['item.tile.dirt.default'/105652, l='MpServer', x=275,16, y=1,13, z=-471,50], EntityVillager['Villager'/182, l='MpServer', x=296,63, y=4,00, z=-449,66], EntityItem['item.tile.stonebrick'/105655, l='MpServer', x=273,16, y=1,13, z=-474,16], EntityItem['item.tile.dirt.default'/105654, l='MpServer', x=275,78, y=2,13, z=-470,91], EntityItem['item.item.doorWood'/105656, l='MpServer', x=273,72, y=1,13, z=-472,94], EntityItem['item.tile.gravel'/105659, l='MpServer', x=271,69, y=1,13, z=-473,63], EntityItem['item.tile.dirt.default'/188, l='MpServer', x=306,84, y=2,13, z=-496,03], EntityItem['item.tile.dirt.default'/105661, l='MpServer', x=278,38, y=1,13, z=-472,06], EntityItem['item.tile.dirt.default'/105663, l='MpServer', x=277,59, y=1,13, z=-471,28], EntityItem['item.tile.dirt.default'/105662, l='MpServer', x=274,13, y=1,13, z=-471,19], EntityItem['item.tile.dirt.default'/105665, l='MpServer', x=276,78, y=1,13, z=-471,75], EntityItem['item.tile.dirt.default'/105664, l='MpServer', x=271,16, y=1,13, z=-474,56], EntityItem['item.tile.dirt.default'/194, l='MpServer', x=306,38, y=2,13, z=-491,13], EntityItem['item.tile.dirt.default'/105667, l='MpServer', x=273,28, y=1,13, z=-473,00], EntityItem['item.tile.dirt.default'/195, l='MpServer', x=307,88, y=1,13, z=-492,13], EntityItem['item.tile.dirt.default'/105666, l='MpServer', x=273,88, y=1,13, z=-474,69], EntityItem['item.tile.stonebrick'/105668, l='MpServer', x=277,56, y=1,13, z=-472,41], EntityItem['item.tile.dirt.default'/199, l='MpServer', x=311,16, y=1,13, z=-492,13], EntityItem['item.tile.log.oak'/206, l='MpServer', x=306,03, y=4,13, z=-466,47], EntityVillager['Villager'/207, l='MpServer', x=308,38, y=4,00, z=-460,69], EntityVillager['Villager'/208, l='MpServer', x=307,31, y=5,00, z=-456,34], EntityBat['Bat'/209, l='MpServer', x=315,75, y=7,10, z=-448,03], EntityVillager['Villager'/210, l='MpServer', x=307,59, y=5,00, z=-457,22], EntityBat['Bat'/216, l='MpServer', x=309,19, y=6,10, z=-456,75], EntityVillager['Villager'/218, l='MpServer', x=294,78, y=5,00, z=-469,50], EntityBat['Bat'/219, l='MpServer', x=306,19, y=6,10, z=-456,25], EntityVillager['Villager'/220, l='MpServer', x=308,16, y=5,00, z=-455,38], EntityVillager['Villager'/221, l='MpServer', x=307,06, y=5,00, z=-453,50], EntityVillager['Villager'/222, l='MpServer', x=301,06, y=7,00, z=-469,66], EntityVillager['Villager'/223, l='MpServer', x=299,14, y=4,00, z=-462,50], EntityChicken['Chicken'/226, l='MpServer', x=355,56, y=4,00, z=-460,44], EntitySheep['Sheep'/227, l='MpServer', x=355,63, y=4,00, z=-457,78], EntityPig['Pig'/228, l='MpServer', x=365,09, y=4,00, z=-435,88], EntitySheep['Sheep'/229, l='MpServer', x=360,78, y=4,00, z=-439,28], EntitySheep['Sheep'/230, l='MpServer', x=355,16, y=4,00, z=-446,84], EntityChicken['Chicken'/231, l='MpServer', x=367,56, y=4,00, z=-438,53], EntityPig['Pig'/232, l='MpServer', x=365,91, y=4,00, z=-437,88], EntityPig['Pig'/233, l='MpServer', x=361,13, y=4,00, z=-461,09], EntityChicken['Chicken'/234, l='MpServer', x=361,63, y=4,00, z=-458,44], EntityPig['Pig'/236, l='MpServer', x=381,84, y=4,00, z=-445,09], EntityChicken['Chicken'/237, l='MpServer', x=376,44, y=4,00, z=-431,38], EntityItem['item.item.seeds'/141115, l='MpServer', x=320,03, y=4,13, z=-486,66], EntityItem['item.item.potato'/141116, l='MpServer', x=318,72, y=2,13, z=-483,13], EntityItem['item.item.seeds'/141122, l='MpServer', x=322,34, y=5,13, z=-488,13], EntityItem['item.item.flint'/141123, l='MpServer', x=314,50, y=3,13, z=-482,81], EntityItem['item.tile.dirt.default'/141127, l='MpServer', x=319,75, y=3,13, z=-482,38], EntityItem['item.item.potato'/141128, l='MpServer', x=321,19, y=4,13, z=-483,81], EntityItem['item.item.potato'/141129, l='MpServer', x=322,06, y=5,13, z=-482,94], EntityItem['item.item.potato'/141135, l='MpServer', x=317,13, y=2,13, z=-484,13], EntityItem['item.tile.dirt.default'/141132, l='MpServer', x=317,13, y=2,13, z=-484,13], EntityItem['item.item.seeds'/141138, l='MpServer', x=317,75, y=5,13, z=-486,97], EntityItem['item.item.wheat'/141137, l='MpServer', x=319,63, y=5,13, z=-488,13], EntityItem['item.item.potato'/141143, l='MpServer', x=318,16, y=3,13, z=-482,19], EntityItem['item.item.wheat'/141140, l='MpServer', x=317,78, y=4,13, z=-486,88], EntityItem['item.tile.log.oak'/141146, l='MpServer', x=317,06, y=3,13, z=-484,22], EntityItem['item.tile.log.oak'/141145, l='MpServer', x=317,34, y=4,13, z=-488,88], EntityItem['item.tile.dirt.default'/141151, l='MpServer', x=320,81, y=3,13, z=-484,78], EntityItem['item.item.seeds'/141148, l='MpServer', x=321,66, y=5,13, z=-486,72], EntityClientPlayerMP['Player121'/368, l='MpServer', x=302,81, y=12,92, z=-484,67], EntityItem['item.tile.torch'/141152, l='MpServer', x=315,06, y=4,13, z=-484,97], EntityItem['item.tile.dirt.default'/34152, l='MpServer', x=295,28, y=1,13, z=-484,66], EntityItem['item.tile.dirt.default'/34153, l='MpServer', x=294,81, y=3,13, z=-484,78], EntityItem['item.item.seeds'/34154, l='MpServer', x=296,22, y=4,13, z=-483,53], EntityItem['item.tile.wood.oak'/34156, l='MpServer', x=295,19, y=5,13, z=-488,41], EntityItem['item.tile.dirt.default'/34158, l='MpServer', x=292,13, y=1,13, z=-489,16], EntityItem['item.item.seeds'/34159, l='MpServer', x=297,91, y=5,13, z=-482,81], EntityItem['item.tile.wood.oak'/34160, l='MpServer', x=297,81, y=6,13, z=-488,31], EntityItem['item.tile.wood.oak'/34161, l='MpServer', x=293,38, y=3,13, z=-489,34], EntityItem['item.tile.dirt.default'/95603, l='MpServer', x=267,88, y=3,13, z=-480,94], EntityItem['item.tile.dirt.default'/95602, l='MpServer', x=270,91, y=2,13, z=-481,78], EntityItem['item.tile.dirt.default'/95604, l='MpServer', x=267,16, y=2,13, z=-478,28], EntityItem['item.tile.dirt.default'/95607, l='MpServer', x=272,81, y=2,13, z=-481,78], EntityItem['item.tile.dirt.default'/95608, l='MpServer', x=271,84, y=2,13, z=-479,84], EntityItem['item.tile.stonebrick'/95611, l='MpServer', x=272,13, y=1,13, z=-478,72], EntityItem['item.tile.wood.oak'/55164, l='MpServer', x=283,53, y=1,13, z=-460,19], EntityItem['item.tile.dirt.default'/95615, l='MpServer', x=271,31, y=3,13, z=-482,09], EntityItem['item.tile.gravel'/95614, l='MpServer', x=271,22, y=2,13, z=-475,22], EntityItem['item.tile.dirt.default'/55168, l='MpServer', x=285,97, y=2,13, z=-465,78], EntityItem['item.tile.wood.oak'/55169, l='MpServer', x=284,56, y=5,13, z=-459,69], EntityItem['item.tile.dirt.default'/95616, l='MpServer', x=271,16, y=3,13, z=-483,34], EntityItem['item.tile.stairsWood'/51074, l='MpServer', x=296,88, y=5,13, z=-466,28], EntityItem['item.tile.dirt.default'/95619, l='MpServer', x=269,59, y=2,13, z=-481,16], EntityItem['item.tile.wood.oak'/51075, l='MpServer', x=295,94, y=5,13, z=-466,13], EntityItem['item.tile.dirt.default'/95618, l='MpServer', x=268,81, y=2,13, z=-477,69], EntityItem['item.tile.stairsWood'/51076, l='MpServer', x=295,47, y=9,13, z=-465,22], EntityItem['item.tile.wood.oak'/55172, l='MpServer', x=279,19, y=4,13, z=-463,84], EntityItem['item.tile.dirt.default'/95621, l='MpServer', x=266,97, y=3,13, z=-476,56], EntityItem['item.tile.wood.oak'/51077, l='MpServer', x=297,50, y=10,13, z=-467,56], EntityItem['item.tile.dirt.default'/55173, l='MpServer', x=287,81, y=3,13, z=-464,78], EntityItem['item.tile.dirt.default'/95620, l='MpServer', x=269,06, y=3,13, z=-474,16], EntityItem['item.tile.dirt.default'/141191, l='MpServer', x=319,78, y=2,13, z=-483,13], EntityItem['item.tile.wood.oak'/51078, l='MpServer', x=296,88, y=5,13, z=-467,88], EntityItem['item.tile.wood.oak'/55174, l='MpServer', x=282,22, y=1,13, z=-461,56], EntityItem['item.tile.dirt.default'/95623, l='MpServer', x=271,06, y=1,13, z=-478,81], EntityItem['item.tile.stonebrick'/95622, l='MpServer', x=273,53, y=4,13, z=-481,81], EntityItem['item.item.flint'/95625, l='MpServer', x=270,47, y=2,13, z=-476,19], EntityItem['item.tile.stonebrick'/55177, l='MpServer', x=286,88, y=2,13, z=-465,09], EntityItem['item.tile.dirt.default'/95624, l='MpServer', x=268,56, y=3,13, z=-482,84], EntityItem['item.tile.dirt.default'/141192, l='MpServer', x=317,16, y=3,13, z=-482,19], EntityItem['item.tile.dirt.default'/95626, l='MpServer', x=271,81, y=1,13, z=-477,56], EntityItem['item.item.book'/68004, l='MpServer', x=280,25, y=1,13, z=-468,25], EntityItem['item.item.carrots'/160699, l='MpServer', x=307,16, y=1,13, z=-492,13], EntityItem['item.item.carrots'/160704, l='MpServer', x=311,81, y=1,13, z=-492,94], EntityItem['item.tile.log.oak'/160711, l='MpServer', x=314,16, y=2,13, z=-495,50], EntityItem['item.tile.dirt.default'/160714, l='MpServer', x=314,31, y=2,13, z=-495,84], EntityItem['item.tile.dirt.default'/160712, l='MpServer', x=312,34, y=1,13, z=-493,13], EntityItem['item.tile.dirt.default'/160717, l='MpServer', x=312,72, y=2,13, z=-492,72], EntityItem['item.item.carrots'/160722, l='MpServer', x=311,22, y=1,97, z=-492,23], EntityItem['item.tile.dirt.default'/160726, l='MpServer', x=310,88, y=2,13, z=-492,94], EntityItem['item.item.carrots'/160729, l='MpServer', x=306,72, y=2,13, z=-496,09], EntityItem['item.tile.dirt.default'/160732, l='MpServer', x=313,59, y=2,13, z=-497,75], EntityItem['item.tile.dirt.default'/160733, l='MpServer', x=312,95, y=1,11, z=-492,98], EntityItem['item.tile.dirt.default'/160736, l='MpServer', x=314,75, y=2,13, z=-494,19], EntityItem['item.tile.stairsWood'/85477, l='MpServer', x=276,56, y=1,13, z=-472,53], EntityItem['item.tile.wood.oak'/94693, l='MpServer', x=274,16, y=5,13, z=-483,69], EntityItem['item.tile.stonebrick'/85479, l='MpServer', x=276,78, y=1,13, z=-472,34], EntityItem['item.tile.stonebrick'/94694, l='MpServer', x=276,25, y=4,13, z=-482,69], EntityItem['item.tile.stonebrick'/85483, l='MpServer', x=278,78, y=9,13, z=-472,34]]
    	Retry entities: 0 total; []
    	Server brand: fml,forge
    	Server type: Integrated singleplayer server
    Stacktrace:
    	at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:415)
    	at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:2566)
    	at net.minecraft.client.Minecraft.run(Minecraft.java:984)
    	at net.minecraft.client.main.Main.main(Main.java:164)
    	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:135)
    	at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
    	at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source)
    	at GradleStart.main(Unknown Source)
    
    -- System Details --
    Details:
    	Minecraft Version: 1.7.10
    	Operating System: Windows 8.1 (amd64) version 6.3
    	Java Version: 1.8.0_221, Oracle Corporation
    	Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
    	Memory: 870713880 bytes (830 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.05 FML v7.10.99.99 Minecraft Forge 10.13.4.1614 4 mods loaded, 4 mods active
    	States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored
    	UCHIJAAAA	mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) 
    	UCHIJAAAA	FML{7.10.99.99} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.4.1614-1.7.10.jar) 
    	UCHIJAAAA	Forge{10.13.4.1614} [Minecraft Forge] (forgeSrc-1.7.10-10.13.4.1614-1.7.10.jar) 
    	UCHIJAAAA	irisiummod{0.1} [IrisiumMod] (bin) 
    	GL info: ' Vendor: 'Intel' Version: '4.3.0 - Build 10.18.14.4264' Renderer: 'Intel(R) HD Graphics 4600'
    	Launched Version: 1.7.10
    	LWJGL: 2.9.1
    	OpenGL: Intel(R) HD Graphics 4600 GL version 4.3.0 - Build 10.18.14.4264, Intel
    	GL Caps: Using GL 1.3 multitexturing.
    Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported.
    Anisotropic filtering is supported and maximum anisotropy is 16.
    Shaders are available because OpenGL 2.1 is supported.
    
    	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: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
    	Anisotropic Filtering: Off (1)
    

    Merci d'avance !


  • Moddeurs confirmés Rédacteurs Administrateurs

    Effectivement cette fois c'est la texture, il y a quoi à la ligne 173 de BlockCropsMod ? (ce que tu as envoyé avant ne correspond pas, ça devrait être dans la fonction getIcon)



  • @robin4002

    J'ai modifié les classes entre temps pour voir si le problème serait résolut mais rien, ça vient toujours de la fonction getIcon de la classe BlockSilveriteCrops dans la ligne 65

    (PS : j'ai remplacé les anciens code par les nouveaux.)


  • Moddeurs confirmés Rédacteurs Administrateurs

    La fonction registerIcons est probablement jamais appelé, tu dois avoir le mauvais non ou la mauvaise signature.

    Ajoutes @Override au dessus, si cela fait une erreur c'est pas bon.



  • @robin4002

    Cela ne change rien, sur le faite de mettre le @Override au dessus de la fonction registerIcons.


  • Moddeurs confirmés Rédacteurs Administrateurs

    Pas d'erreur ?

    Dans ce cas remplace private IIcon[] iconArray; par private IIcon[] iconArray = new IIcon[4]; ça évitera tout possible risque de NPE.



  • @robin4002 a dit dans Problème avec les textures des plantations [1.7.10] :

    private IIcon[] iconArray = new IIcon[4];

    Merci beaucoup pour ton aide, tout marche correctement enfin presque. Les textures n'apparaît pas sur la plantation.



  • Essaye peut être ça se son mes class pour faire une culture

    import cpw.mods.fml.common.registry.GameRegistry;
    import fr.blackbalrog.zeldor.ModZeldor;
    import fr.blackbalrog.zeldor.Reference;
    import fr.blackbalrog.zeldor.loot.BlockCropsModBlee;
    import net.minecraft.block.Block;
    import net.minecraft.creativetab.CreativeTabs;
    
    public class Culture_Block
    {
    	public static Block block_culture_blee;
    	
    	//propriter du block de culture
    	public static void init()
    	{
    		block_culture_blee = new BlockCropsModBlee().setBlockName("block_culture_blee").setCreativeTab(ModZeldor.tabzeldor).setBlockTextureName(Reference.MOD_ID + ":block_blee_texture");
    
    	}
    
    	//enregistre le block de culture
    	public static void registerBlock() 
    	{
    		GameRegistry.registerBlock(block_culture_blee, "block_culture_blee");
    	}
    }
    
    import net.minecraft.block.Block;
    import net.minecraft.item.ItemSeeds;
    
    public class Constructor_Seed_Culture_Item extends ItemSeeds 
    {
    
    	public Constructor_Seed_Culture_Item(Block p_i45352_1_, Block p_i45352_2_) 
    	{
    		super(p_i45352_1_, p_i45352_2_);
    	}
    
    }
    
    import cpw.mods.fml.common.registry.GameRegistry;
    import fr.blackbalrog.zeldor.ModZeldor;
    import fr.blackbalrog.zeldor.Reference;
    import fr.blackbalrog.zeldor.block.Culture_Block;
    import fr.blackbalrog.zeldor.constructor.culture.Constructor_Seed_Culture_Item;
    import net.minecraft.creativetab.CreativeTabs;
    import net.minecraft.init.Blocks;
    import net.minecraft.item.Item;
    
    public class CultureItem 
    {
    	public static Item seed_blee, blee;
    	
    	//defini les propriter
    	public static void Init()
    	{
    		seed_blee = new Constructor_Seed_Culture_Item(Culture_Block.block_culture_blee, Blocks.farmland).setUnlocalizedName("seed_blee").setCreativeTab(ModZeldor.tabzeldor).setTextureName(Reference.MOD_ID + ":seed_blee_texture");
    		blee = new Item().setUnlocalizedName("blee").setCreativeTab(ModZeldor.tabzeldor).setTextureName(Reference.MOD_ID + ":blee_texture");
    	}
    	
    	//enregistre l'item
    	public static void RegisterItem()
    	{
    		GameRegistry.registerItem(seed_blee, "seed_blee");
    		GameRegistry.registerItem(blee, "blee");
    	}
    }
    
    import fr.blackbalrog.zeldor.item.CultureItem;
    import net.minecraft.block.BlockCrops;
    import net.minecraft.item.Item;
    
    public class BlockCropsModBlee extends BlockCrops 
    {
    	
    	/*
    	 * Drop lorsque le joueur casse la culture
    	*/
    	
    	//graine
    	protected Item func_149866_i()
    	{
    		return CultureItem.seed_blee;
    	}
    	
    	//Loot
    	protected Item func_149865_P()
    	{
    		return CultureItem.blee;
    		
    	}
    }
    

    Voilà en espérant que sa puisse t'aider 😊



  • Merci de ton aide mais ça règle pas du tout mon problème de texture de la plantation.



  • @Deans tu as fais ça ? Capture.PNG



  • @Blackbalrog Sur ton code de ta plantation, tu as 8 textures sauf que moi j'en n'ai que 4 et j'ai regardé tes codes et ne permet de faire apparaître les textures.



  • j'ai oublié de préciser mais dans ta class principal dans PreInit tu ajoutes ça

    Culture_Block.init();
    Culture_Block.registerBlock();

    CultureItem.Init();
    CultureItem.RegisterItem();

    ha je crois aussi que t'es pas obliger de fais 8 ou autres tu fais au tant que tu veux ^^'



  • @Blackbalrog

    C'est déjà enregistrer dans ma classe principal, sauf que ça s'appelle pas comme ça mais je voit ce que tu voulais dire.

    Oui je sais que je peut en faire autant que je veut ^^.



  • C'est bon problème résolu, c'était tout bête comme d’habitude. Il fallait mettre registerBlockIcons au lieu de registerIcons dans la classe BlockSilveriteCrops.

    Merci à vous pour votre aide !



  • ha ok bon bha de rien quand même


Log in to reply