Texture Sapling inexistantes
-
J’en ai pas justement et la c’est louche !
-
@‘Kushhh’:
J’en ai pas justement et la c’est louche !
Tu peux envoyer toute la console ? du moment ou tu lance au moment ou le jeu est lancer ?
-
Je donnerais ça quand je rentrerais chez moi

Les seuls texture not found que j’ai sont des blocks, qui n’ont pas de texture -
Bah les saplings c’est des blocs xD
-
@‘AlphaSwittleTeam’:
Bah les saplings c’est des blocs xD
Moi je veux juste la console car je suis sur qui le problème viens pas du code que j’ai même pas regarder avec tous ses paramètre pas renommer ^^.
-
Si tu ne connais pas la signification des fonctions func_*****, je me demande comment tu peux coder ton mod.
Si tu fais de la surcharge, prend au moins la peine de commenter ton code avant d’entrer dans la fonction pour lui donner un nom plus explicite et expliquer ce qu’elle fait.Pourquoi as tu décidés d’appeler ton Icon : field_150201_a ?
" private static final String __OBFID = “CL_00000305”;" est ce que tu sais vraiment a quoi ça sert ?Tu as des CustomBlockBush qui ne sont pas growable ?
Pour ton problème c’est évident qu’il n’a rien a voir avec ce que je viens de te dire.
Je n’ai pas la réponse a ton problème, je n’ai jamais créé de bloc pour l’instant.
Mais si tu veux de l’aide d’autre personne, commence par coder proprement
On y voit rien dans ton bordel. -
sinon la console :
[18:28:51] [main/INFO] [GradleStart]: username: Pl4SmA [18:28:51] [main/INFO] [GradleStart]: Extra: [] [18:28:51] [main/INFO] [GradleStart]: Running with arguments: [–userProperties, {}, --username, Pl4SmA, --tweakClass, cpw.mods.fml.common.launcher.FMLTweaker, --accessToken, FML, --assetIndex, 1.7.10, --assetsDir, D:/Users/Kushhh/.gradle/caches/minecraft/assets, --version, 1.7.10] [18:28:51] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLTweaker [18:28:51] [main/INFO] [LaunchWrapper]: Using primary tweak class name cpw.mods.fml.common.launcher.FMLTweaker [18:28:51] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLTweaker [18:28:51] [main/INFO] [FML]: Forge Mod Loader version 7.10.11.1177 for Minecraft 1.7.10 loading [18:28:51] [main/INFO] [FML]: Java is Java HotSpot(TM) 64-Bit Server VM, version 1.7.0_60, running on Windows 7:amd64:6.1, installed at D:\Program Files\Java\jre7 [18:28:51] [main/INFO] [FML]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation [18:28:51] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker [18:28:51] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLDeobfTweaker [18:28:51] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker [18:28:51] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker [18:28:51] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper [18:28:51] [main/ERROR] [FML]: The binary patch set is missing. Either you are in a development environment, or things are not going to work! [18:28:52] [main/ERROR] [FML]: The minecraft jar file:/D:/Users/Kushhh/.gradle/caches/minecraft/net/minecraftforge/forge/1.7.10-10.13.0.1177/forgeSrc-1.7.10-10.13.0.1177.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! [18:28:52] [main/ERROR] [FML]: FML has been ordered to ignore the invalid or missing minecraft certificate. This is very likely to cause a problem! [18:28:52] [main/ERROR] [FML]: Technical information: ClientBrandRetriever was at jar:file:/D:/Users/Kushhh/.gradle/caches/minecraft/net/minecraftforge/forge/1.7.10-10.13.0.1177/forgeSrc-1.7.10-10.13.0.1177.jar!/net/minecraft/client/ClientBrandRetriever.class, there were 0 certificates for it [18:28:52] [main/ERROR] [FML]: FML appears to be missing any signature data. This is not a good thing [18:28:52] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper [18:28:52] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLDeobfTweaker [18:28:52] [main/INFO] [LaunchWrapper]: Launching wrapped minecraft {net.minecraft.client.main.Main} [18:28:53] [main/INFO]: Setting user: Pl4SmA [18:28:53] [Client thread/INFO]: LWJGL Version: 2.9.1 [18:28:54] [Client thread/INFO] [MinecraftForge]: Attempting early MinecraftForge initialization [18:28:54] [Client thread/INFO] [FML]: MinecraftForge v10.13.0.1177 Initialized [18:28:54] [Client thread/INFO] [FML]: Replaced 182 ore recipies [18:28:54] [Client thread/INFO] [MinecraftForge]: Completed early MinecraftForge initialization [18:28:54] [Client thread/INFO] [FML]: Searching D:\Modding\Minecraft\eclipse\mods for mods [18:28:54] [Client thread/INFO] [WorldOrigins]: Mod WorldOrigins is missing the required element 'name'. Substituting WorldOrigins [18:28:54] [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! [18:28:55] [Client thread/INFO] [FML]: Forge Mod Loader has identified 5 mods to load [18:28:56] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Better World Generation 4, FMLFileResourcePack:WorldOrigins [18:28:56] [Client thread/WARN]: ResourcePack: ignored non-lowercase namespace: %s in %s [18:28:56] [Client thread/WARN]: ResourcePack: ignored non-lowercase namespace: %s in %s [18:28:56] [Client thread/INFO] [FML]: Processing ObjectHolder annotations [18:28:56] [Client thread/INFO] [FML]: Found 341 ObjectHolder annotations [18:28:56] [Client thread/INFO] [FML]: Configured a dormant chunk cache size of 0 [18:28:56] [Client thread/INFO] [FML]: Applying holder lookups [18:28:56] [Client thread/INFO] [FML]: Holder lookups applied Starting up SoundSystem… Initializing LWJGL OpenAL (The LWJGL binding of OpenAL. For more information, see http://www.lwjgl.org) OpenAL initialized. [18:28:56] [Sound Library Loader/INFO]: Sound engine started [18:28:57] [Client thread/ERROR]: Using missing texture, unable to load worldorigins:textures/blocks/nontexturecuzidontcare.png java.io.FileNotFoundException: worldorigins:textures/blocks/nontexturecuzidontcare.png at net.minecraft.client.resources.FallbackResourceManager.getResource(FallbackResourceManager.java:65) ~[FallbackResourceManager.class:?] at net.minecraft.client.resources.SimpleReloadableResourceManager.getResource(SimpleReloadableResourceManager.java:67) ~[SimpleReloadableResourceManager.class:?] at net.minecraft.client.renderer.texture.TextureMap.loadTextureAtlas(TextureMap.java:126) [TextureMap.class:?] at net.minecraft.client.renderer.texture.TextureMap.loadTexture(TextureMap.java:91) [TextureMap.class:?] at net.minecraft.client.renderer.texture.TextureManager.loadTexture(TextureManager.java:89) [TextureManager.class:?] at net.minecraft.client.renderer.texture.TextureManager.loadTickableTexture(TextureManager.java:71) [TextureManager.class:?] at net.minecraft.client.renderer.texture.TextureManager.loadTextureMap(TextureManager.java:58) [TextureManager.class:?] at net.minecraft.client.Minecraft.startGame(Minecraft.java:592) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:941) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:164) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_60] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_60] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_60] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_60] at net.minecraft.launchwrapper.Launch.launch(Launch.java:134) [launchwrapper-1.9.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.9.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_60] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_60] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_60] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_60] at GradleStart.bounce(GradleStart.java:95) [start/:?] at GradleStart.startClient(GradleStart.java:88) [start/:?] at GradleStart.main(GradleStart.java:66) [start/:?] [18:28:57] [Client thread/INFO]: Created: 512x256 textures/blocks-atlas [18:28:57] [Client thread/ERROR]: Using missing texture, unable to load minecraft:textures/items/MISSING_ICON_ITEM_4096_booklearn.png java.io.FileNotFoundException: minecraft:textures/items/MISSING_ICON_ITEM_4096_booklearn.png at net.minecraft.client.resources.FallbackResourceManager.getResource(FallbackResourceManager.java:65) ~[FallbackResourceManager.class:?] at net.minecraft.client.resources.SimpleReloadableResourceManager.getResource(SimpleReloadableResourceManager.java:67) ~[SimpleReloadableResourceManager.class:?] at net.minecraft.client.renderer.texture.TextureMap.loadTextureAtlas(TextureMap.java:126) [TextureMap.class:?] at net.minecraft.client.renderer.texture.TextureMap.loadTexture(TextureMap.java:91) [TextureMap.class:?] at net.minecraft.client.renderer.texture.TextureManager.loadTexture(TextureManager.java:89) [TextureManager.class:?] at net.minecraft.client.renderer.texture.TextureManager.loadTickableTexture(TextureManager.java:71) [TextureManager.class:?] at net.minecraft.client.renderer.texture.TextureManager.loadTextureMap(TextureManager.java:58) [TextureManager.class:?] at net.minecraft.client.Minecraft.startGame(Minecraft.java:593) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:941) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:164) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_60] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_60] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_60] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_60] at net.minecraft.launchwrapper.Launch.launch(Launch.java:134) [launchwrapper-1.9.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.9.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_60] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_60] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_60] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_60] at GradleStart.bounce(GradleStart.java:95) [start/:?] at GradleStart.startClient(GradleStart.java:88) [start/:?] at GradleStart.main(GradleStart.java:66) [start/:?] [18:28:57] [Client thread/INFO]: Created: 256x256 textures/items-atlas ClientProxy Initialized. [18:28:57] [Client thread/INFO] [FML]: Forge Mod Loader has successfully loaded 5 mods [18:28:57] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Better World Generation 4, FMLFileResourcePack:WorldOrigins [18:28:57] [Client thread/WARN]: ResourcePack: ignored non-lowercase namespace: %s in %s [18:28:57] [Client thread/WARN]: ResourcePack: ignored non-lowercase namespace: %s in %s [18:28:57] [Client thread/ERROR]: Using missing texture, unable to load minecraft:textures/items/MISSING_ICON_ITEM_4096_booklearn.png java.io.FileNotFoundException: minecraft:textures/items/MISSING_ICON_ITEM_4096_booklearn.png at net.minecraft.client.resources.FallbackResourceManager.getResource(FallbackResourceManager.java:65) ~[FallbackResourceManager.class:?] at net.minecraft.client.resources.SimpleReloadableResourceManager.getResource(SimpleReloadableResourceManager.java:67) ~[SimpleReloadableResourceManager.class:?] at net.minecraft.client.renderer.texture.TextureMap.loadTextureAtlas(TextureMap.java:126) [TextureMap.class:?] at net.minecraft.client.renderer.texture.TextureMap.loadTexture(TextureMap.java:91) [TextureMap.class:?] at net.minecraft.client.renderer.texture.TextureManager.loadTexture(TextureManager.java:89) [TextureManager.class:?] at net.minecraft.client.renderer.texture.TextureManager.onResourceManagerReload(TextureManager.java:170) [TextureManager.class:?] at net.minecraft.client.resources.SimpleReloadableResourceManager.notifyReloadListeners(SimpleReloadableResourceManager.java:134) [SimpleReloadableResourceManager.class:?] at net.minecraft.client.resources.SimpleReloadableResourceManager.reloadResources(SimpleReloadableResourceManager.java:118) [SimpleReloadableResourceManager.class:?] at net.minecraft.client.Minecraft.refreshResources(Minecraft.java:653) [Minecraft.class:?] at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:303) [FMLClientHandler.class:?] at net.minecraft.client.Minecraft.startGame(Minecraft.java:596) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:941) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:164) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_60] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_60] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_60] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_60] at net.minecraft.launchwrapper.Launch.launch(Launch.java:134) [launchwrapper-1.9.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.9.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_60] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_60] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_60] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_60] at GradleStart.bounce(GradleStart.java:95) [start/:?] at GradleStart.startClient(GradleStart.java:88) [start/:?] at GradleStart.main(GradleStart.java:66) [start/:?] [18:28:57] [Client thread/INFO]: Created: 256x256 textures/items-atlas [18:28:57] [Client thread/ERROR]: Using missing texture, unable to load worldorigins:textures/blocks/nontexturecuzidontcare.png java.io.FileNotFoundException: worldorigins:textures/blocks/nontexturecuzidontcare.png at net.minecraft.client.resources.FallbackResourceManager.getResource(FallbackResourceManager.java:65) ~[FallbackResourceManager.class:?] at net.minecraft.client.resources.SimpleReloadableResourceManager.getResource(SimpleReloadableResourceManager.java:67) ~[SimpleReloadableResourceManager.class:?] at net.minecraft.client.renderer.texture.TextureMap.loadTextureAtlas(TextureMap.java:126) [TextureMap.class:?] at net.minecraft.client.renderer.texture.TextureMap.loadTexture(TextureMap.java:91) [TextureMap.class:?] at net.minecraft.client.renderer.texture.TextureManager.loadTexture(TextureManager.java:89) [TextureManager.class:?] at net.minecraft.client.renderer.texture.TextureManager.onResourceManagerReload(TextureManager.java:170) [TextureManager.class:?] at net.minecraft.client.resources.SimpleReloadableResourceManager.notifyReloadListeners(SimpleReloadableResourceManager.java:134) [SimpleReloadableResourceManager.class:?] at net.minecraft.client.resources.SimpleReloadableResourceManager.reloadResources(SimpleReloadableResourceManager.java:118) [SimpleReloadableResourceManager.class:?] at net.minecraft.client.Minecraft.refreshResources(Minecraft.java:653) [Minecraft.class:?] at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:303) [FMLClientHandler.class:?] at net.minecraft.client.Minecraft.startGame(Minecraft.java:596) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:941) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:164) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_60] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_60] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_60] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_60] at net.minecraft.launchwrapper.Launch.launch(Launch.java:134) [launchwrapper-1.9.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.9.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_60] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_60] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_60] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_60] at GradleStart.bounce(GradleStart.java:95) [start/:?] at GradleStart.startClient(GradleStart.java:88) [start/:?] at GradleStart.main(GradleStart.java:66) [start/:?] [18:28:57] [Client thread/INFO]: Created: 512x256 textures/blocks-atlas SoundSystem shutting down… Author: Paul Lamb, www.paulscode.com Starting up SoundSystem... Initializing LWJGL OpenAL (The LWJGL binding of OpenAL. For more information, see http://www.lwjgl.org) OpenAL initialized. [18:28:58] [Sound Library Loader/INFO]: Sound engine started -
Vérifie le nom de la texture dans le dossier textures/blocks/
ça doit être “sapling_aeza.png” -
Bon alors :
private static final String __OBFID = “CL_00000305”;
ça tu l’enlève, ça va créer des problèmes d’obfucations.Enlève aussi :
@SideOnly(Side.CLIENT)
private IIcon field_150201_a;@SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister p_149651_1_)
{
p_149651_1_.registerIcon(this.textureName);}
Et à la place de :
@SideOnly(Side.CLIENT)
public IIcon getIcon(int p_149691_1_, int p_149691_2_)
{ //p_149691_1_ != 1 && p_149691_1_ != 0 ? this.blockIcon :
return this.field_150201_a;
}
Mets :
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int medata)
{
return this.blockIcon;
}
Et ensuite dans le constructeur mets :
.setTextureName(“modid:nom de ta texture”); -
bon je vois pas d’ou viens le problème, le nom de la texture est bon, j’ai fait les modif que robin m’as conseillée mais toujours ces P****** de carré noir et roses …
-
tu peux m’envoyer ton code (src) par MP ?
-
j’peux te filer mon github ?
-
Je te mets un 0/20 en respect de la convention JAVA.
Retourne voir les tutoriels du forum + retourne apprendre les bases de Java -
sympa …
-
STP, je ne vais rien faire avec un code plein d’erreur donc corrige tous et donne moi le github une fois mis a jours. Tu as des truc de la 1.6 dans un code 1.7 !
-
Mon code est mal organisé, je sais mais, c’est exactement le meme que les autres sapling (vanilla ) sauf que j’ai retiré les meta datas
j’ai tout arrangé (normalement)
BlockAezaSapling :package net.KSH.mod.WO.Blocks; import java.util.List; import java.util.Random; import net.KSH.mod.Main; import net.KSH.mod.WO.aezaria.WorldGenerators.WorldGenAezaNormalTree; import net.KSH.mod.WO.aezaria.WorldGenerators.WorldGenAezaPurpleTree; import net.minecraft.block.Block; import net.minecraft.block.BlockBush; import net.minecraft.block.IGrowable; import net.minecraft.block.material.Material; 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; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; public class BlockAezaSapling extends CustomBlockBush implements IGrowable { /** * Constructeur */ protected BlockAezaSapling() { super(Material.plants); 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(Main.WO); this.setTickRandomly(true); this.setBlockName("aezasapling"); this.setBlockTextureName("worldorigins:sapling"); } /** * Ticking */ public void updateTick(World world, int PosX, int PosY, int PosZ, Random random) { if (!world.isRemote) { super.updateTick(world, PosX, PosY, PosZ, random); if (world.getBlockLightValue(PosX, PosY + 1, PosZ) >= 9 && random.nextInt(7) == 0) { this.func_149879_c(world, PosX, PosY, PosZ, random); } } } /** * Texture */ @SideOnly(Side.CLIENT) public void registerBlockIcons(IIconRegister IIconRegisterer) { IIconRegisterer.registerIcon(this.textureName); } @SideOnly(Side.CLIENT) public IIcon getIcon(int p_149691_1_, int p_149691_2_) { return this.blockIcon; } /** * Generating */ public void func_149879_c(World world, int PosX, int PosY, int PosZ, Random random) { this.func_149878_d(world, PosX, PosY, PosZ, random); } public void func_149878_d(World world, int PosX, int PosY, int PosZ, Random random) { if (!net.minecraftforge.event.terraingen.TerrainGen.saplingGrowTree(world, random, PosX, PosY, PosZ)) return; int l = world.getBlockMetadata(PosX, PosY, PosZ) & 7; Object object = random.nextInt(10) == 0 ? new WorldGenBigTree(true) : new WorldGenTrees(true); boolean flag = false; object = new WorldGenAezaNormalTree(true); ((WorldGenerator)object).generate(world, random, PosX, PosY, PosZ); } 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_) { return true; } 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_) { return (double)p_149852_1_.rand.nextFloat() < 0.45D; } 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_) { this.func_149879_c(p_149853_1_, p_149853_3_, p_149853_4_, p_149853_5_, p_149853_2_); } }et CutomBlockBush
package net.KSH.mod.WO.Blocks; import static net.minecraftforge.common.EnumPlantType.Cave; 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.Random; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.init.Blocks; import net.minecraft.util.AxisAlignedBB; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import net.minecraftforge.common.EnumPlantType; import net.minecraftforge.common.IPlantable; import net.minecraftforge.common.util.ForgeDirection; public class CustomBlockBush extends Block implements IPlantable { /** * Constructeur */ protected CustomBlockBush(Material p_i45395_1_) { super(p_i45395_1_); this.setTickRandomly(true); float f = 0.2F; this.setBlockBounds(0.5F - f, 0.0F, 0.5F - f, 0.5F + f, f * 3.0F, 0.5F + f); this.setCreativeTab(CreativeTabs.tabDecorations); } /** * Check si le block peux etre placé en X Y Z */ public boolean canPlaceBlockAt(World world, int PosX, int PosY, int PosZ) { return super.canPlaceBlockAt(world, PosX, PosY, PosZ) && this.canBlockStay(world, PosX, PosY, PosZ); } /** * Definis sur quel block peux etre placé la plante */ protected boolean canPlaceBlockOn(Block block) { return block == BlockList.aezagrass || block == BlockList.aezadirt; } /** * Changement d'état d'un block a proximité */ public void onNeighborBlockChange(World world, int PosX, int PosY, int PosZ, Block block) { super.onNeighborBlockChange(world, PosX, PosY, PosZ, block); this.checkAndDropBlock(world, PosX, PosY, PosZ); } /** * Ticking */ public void updateTick(World world, int PosX, int PosY, int PosZ, Random random) { this.checkAndDropBlock(world, PosX, PosY, PosZ); } /** * teste si le block peux rester, sinon on le drop en tant qu'item */ protected void checkAndDropBlock(World world, int PosX, int PosY, int PosZ) { if (!this.canBlockStay(world, PosX, PosY, PosZ)) { this.dropBlockAsItem(world, PosX, PosY, PosZ, world.getBlockMetadata(PosX, PosY, PosZ), 0); world.setBlock( PosX, PosY, PosZ, getBlockById(0), 0, 2); } } /** * comme canBlockStayAt mais, s'execute tout le temps */ public boolean canBlockStay(World world, int PosX, int PosY, int PosZ) { return world.getBlock(PosX, PosY -1, PosZ).canSustainPlant(world, PosX, PosY-1, PosZ, ForgeDirection.UP, this); } /** * Hitbox */ public AxisAlignedBB getCollisionBoundingBoxFromPool(World p_149668_1_, int p_149668_2_, int p_149668_3_, int p_149668_4_) { return null; } /** * block non opaque (!= 1m cube) */ public boolean isOpaqueCube() { return false; } /** * rendu normal ou pas (non) */ public boolean renderAsNormalBlock() { return false; } /** * type du render */ public int getRenderType() { return 1; } /** * retourne le type de plante (plaine = sapling) */ @Override public EnumPlantType getPlantType(IBlockAccess world, int x, int y, int z) { return Plains; } /** * retourne la plante (this) */ @Override public Block getPlant(IBlockAccess world, int x, int y, int z) { return this; } /** * MetaDonnées */ @Override public int getPlantMetadata(IBlockAccess world, int x, int y, int z) { return world.getBlockMetadata(x, y, z); } } -
this.setBlockTextureName(“worldorigins:sapling”);
Ce devrait être aezasapling, non ?
-
Croit moi Kushhh, tu y gagnerai plus a prendre en compte la remarque de Superloup10 plutôt que de la prendre comme une attaque personnelle.
La clareté du code c’est la base. -
@‘Blackout’:
Croit moi Kushhh, tu y gagnerai plus a prendre en compte la remarque de Superloup10 plutôt que de la prendre comme une attaque personnelle.
La clareté du code c’est la base.Si tu doit bosser en équipe et que tu code comme un pied tu vas te faire viré.
-
je déteste coder en équipe

sans doute pour ça que je code pas du tout clairement … bref j’vais revoir les bases du java mais ce p*tain de problème
mais sinon la texture fonctionne quand je l’applique sur un block Plein

