• Mon block ne droppe pas d'xp

    Résolu 1.8
    3
    0 Votes
    3 Messages
    1k Vues
    F
    merci beaucoup !
  • Faire un compteur de tick (Bar de soif)

    Résolu 1.8.9
    88
    0 Votes
    88 Messages
    16k Vues
    E
    Ca marche !!! Merci à tous pour votre aide. Aussi, pour éclairer ceux qui chercherait à faire une chose semblable, je met en pièce jointe les classes relative à ce système de soif. Encore merci. Système de soif.zip
  • Problème Setblockstate

    Résolu 1.8.9
    21
    0 Votes
    21 Messages
    3k Vues
    Jerem_TechJ
    Re , Pour le tickrate j’ai pas nécessairement besoin tout les ticks , c’était pour tester , vu que l’arbre doit pousser au bout d’un temps relativement long Sinon pour l’update des blocks posé : parfait Je passe ce sujet en résolu , merci pour votre aide ! Cordialement , Jeremy60800
  • Propriétés pour couper des arbres

    Résolu 1.8.9
    42
    0 Votes
    42 Messages
    7k Vues
    E
    Super, ça fonctionne, mon item est donc complètement terminé : Voilà à quoi ça ressemble : Dans la classe de mon item, il y a ceci : [size=x-small**public**] **[color=#7f0055boolean]** onBlockDestroyed(ItemStack [color=#6a3e3estack], World [color=#6a3e3eworldIn], Block [color=#6a3e3eblockIn], BlockPos [color=#6a3e3epos], EntityLivingBase [color=#6a3e3eplayerIn]) { **[color=#7f0055         if]**([color=#6a3e3eworldIn].getBlockState([color=#6a3e3epos].up(7)).getBlock().isWood([color=#6a3e3eworldIn], [color=#6a3e3epos].up(7)))       { **[color=#7f0055                 if]**([color=#6a3e3eplayerIn] **[color=#7f0055instanceof]** EntityPlayer && ![color=#6a3e3eworldIn].[color=#0000c0isRemote])            {            } **[color=#7f0055                return]** **[color=#7f0055super]**.onBlockDestroyed([color=#6a3e3estack], [color=#6a3e3eworldIn], [color=#6a3e3eblockIn], [color=#6a3e3epos], [color=#6a3e3eplayerIn]);       } **[color=#7f0055         for]** (**[color=#7f0055int]** [color=#6a3e3ei] = 0 ; [color=#6a3e3ei] < 7; [color=#6a3e3ei]++)       {                 BlockPos [color=#6a3e3etestPos] = [color=#6a3e3epos].up([color=#6a3e3ei]); **[color=#7f0055                if]** ([color=#6a3e3eworldIn].getBlockState([color=#6a3e3etestPos]).getBlock().isWood([color=#6a3e3eworldIn], [color=#6a3e3etestPos]))           { [color=#6a3e3e                      stack].damageItem(1, [color=#6a3e3eplayerIn]); **[color=#7f0055                       if]** (![color=#6a3e3eworldIn].[color=#0000c0isRemote] && [color=#6a3e3eworldIn].getGameRules().getBoolean([color=#2a00ff"doTileDrops"]))                { **[color=#7f0055                                 float]** [color=#6a3e3ef] = 0.7F; **[color=#7f0055                                double]** [color=#6a3e3ed0] = (**[color=#7f0055double]**)([color=#6a3e3eworldIn].[color=#0000c0rand].nextFloat() * [color=#6a3e3ef]) + (**[color=#7f0055double]**)(1.0F - [color=#6a3e3ef]) * 0.5D; **[color=#7f0055                                double]** [color=#6a3e3ed1] = (**[color=#7f0055double]**)([color=#6a3e3eworldIn].[color=#0000c0rand].nextFloat() * [color=#6a3e3ef]) + (**[color=#7f0055double]**)(1.0F - [color=#6a3e3ef]) * 0.5D; **[color=#7f0055                                double]** [color=#6a3e3ed2] = (**[color=#7f0055double]**)([color=#6a3e3eworldIn].[color=#0000c0rand].nextFloat() * [color=#6a3e3ef]) + (**[color=#7f0055double]**)(1.0F - [color=#6a3e3ef]) * 0.5D;                       EntityItem [color=#6a3e3eentityItem] = **[color=#7f0055new]** EntityItem([color=#6a3e3eworldIn], (**[color=#7f0055double]**)[color=#6a3e3etestPos].getX() + [color=#6a3e3ed0], (**[color=#7f0055double]**)[color=#6a3e3etestPos].getY() + [color=#6a3e3ed1], (**[color=#7f0055double]**)[color=#6a3e3etestPos].getZ() + [color=#6a3e3ed2], **[color=#7f0055new]** ItemStack(Item.*getItemFromBlock*([color=#6a3e3eblockIn]), 1,[color=#6a3e3e     worldIn].getBlockState([color=#6a3e3etestPos]).getBlock().getMetaFromState([color=#6a3e3eworldIn].getBlockState([color=#6a3e3etestPos])))); [color=#6a3e3e                               entityItem].setDefaultPickupDelay(); [color=#6a3e3e                               worldIn].spawnEntityInWorld([color=#6a3e3eentityItem]);                } [color=#6a3e3e                     worldIn].setBlockToAir([color=#6a3e3etestPos]);           } **[color=#7f0055               else]**               { **[color=#7f0055                       return]** **[color=#7f0055super]**.onBlockDestroyed([color=#6a3e3estack], [color=#6a3e3eworldIn], [color=#6a3e3eblockIn], [color=#6a3e3epos], [color=#6a3e3eplayerIn]);           }       } **[color=#7f0055         return]** **[color=#7f0055super]**.onBlockDestroyed([color=#6a3e3estack], [color=#6a3e3eworldIn], [color=#6a3e3eblockIn], [color=#6a3e3epos], [color=#6a3e3eplayerIn]); } Dans ma classe event, il y a ceci : @SubscribeEvent **[color=#7f0055public]** **[color=#7f0055void]** breakBlock(BlockEvent.BreakEvent [color=#6a3e3eevent]) { **[color=#7f0055        if]** ([color=#6a3e3eevent].[color=#0000c0world].getBlockState([color=#6a3e3eevent].[color=#0000c0pos].up(7)).getBlock().isWood([color=#6a3e3eevent].[color=#0000c0world], [color=#6a3e3eevent].[color=#0000c0pos]))      { [color=#6a3e3e                event].setCanceled(**[color=#7f0055true]**); [color=#6a3e3e                event].getPlayer().addChatMessage(**[color=#7f0055new]** ChatComponentText([color=#2a00ff"Cet arbre est trop grand pour pouvoir être coupé"]));      } } Je met la balise en résolu : )
  • Pas d'import forge

    Résolu 1.8
    9
    0 Votes
    9 Messages
    3k Vues
    J
    Avec ma malchance des fois il ne faut pas ce poser de questions et 9ui en effet le problème est corriger donc c’est bien
  • Probleme de Capabilities

    Résolu 1.8.9
    4
    0 Votes
    4 Messages
    1k Vues
    moscaphone421M
    Effectivement j’ai oublier se poste problème résolue :tick server et sync toutes les 30 secs
  • Changer la texture d'un block et d'un item vanilla et bug

    Résolu 1.8.9
    22
    0 Votes
    22 Messages
    4k Vues
    E
    Super ça fonctionne, au cas où quelqu’un cherche comment faire, j’ai mis ça dans ma classe Event : @SubscribeEvent     public void useBonemeal(BonemealEvent event)     {         if (event.block.getBlock() == BlockMod.blockCoconut)         {             event.setCanceled(true);         }     } Merci à tous, je met le sujet en résolu.
  • Crash lors de l'initialisation

    Résolu 1.8.9
    3
    0 Votes
    3 Messages
    1k Vues
    ph1823P
    Bonjour, je me permet de UP, car malgré mes recherche, je ne trouve pas Je sais que ca dois venir de l’un de mes modèle, mais je les ai vérifié est revérifié, j’ai remarqué que ca crashé entre la “Prè L’initialisation” et le "L’initialisation " sauf que entre c’est deux code, il n’y a rien Voici le crash report : ::: [16:24:27] [Client thread/INFO] [STDOUT/]: [net.minecraft.init.Bootstrap:printToSYSOUT:612]: –-- Minecraft Crash Report ---- // Surprise! Haha. Well, this is awkward. Time: 19/12/16 16:24 Description: Initializing game java.lang.NullPointerException: Initializing game at net.minecraftforge.client.model.ModelLoader$VanillaModelWrapper.bakeNormal(ModelLoader.java:556) at net.minecraftforge.client.model.ModelLoader$VanillaModelWrapper.bake(ModelLoader.java:538) at net.minecraftforge.client.model.ModelLoader$WeightedRandomModel.bake(ModelLoader.java:780) at net.minecraftforge.client.model.ModelLoader.setupModelRegistry(ModelLoader.java:152) at net.minecraft.client.resources.model.ModelManager.onResourceManagerReload(ModelManager.java:28) at net.minecraft.client.resources.SimpleReloadableResourceManager.registerReloadListener(SimpleReloadableResourceManager.java:120) at net.minecraft.client.Minecraft.startGame(Minecraft.java:515) at net.minecraft.client.Minecraft.run(Minecraft.java:360) at net.minecraft.client.main.Main.main(Main.java:116) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) at GradleStart.main(GradleStart.java:26) A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Stacktrace: at net.minecraftforge.client.model.ModelLoader$VanillaModelWrapper.bakeNormal(ModelLoader.java:556) at net.minecraftforge.client.model.ModelLoader$VanillaModelWrapper.bake(ModelLoader.java:538) at net.minecraftforge.client.model.ModelLoader$WeightedRandomModel.bake(ModelLoader.java:780) at net.minecraftforge.client.model.ModelLoader.setupModelRegistry(ModelLoader.java:152) at net.minecraft.client.resources.model.ModelManager.onResourceManagerReload(ModelManager.java:28) at net.minecraft.client.resources.SimpleReloadableResourceManager.registerReloadListener(SimpleReloadableResourceManager.java:120) at net.minecraft.client.Minecraft.startGame(Minecraft.java:515) -- Initialization -- Details: Stacktrace: at net.minecraft.client.Minecraft.run(Minecraft.java:360) at net.minecraft.client.main.Main.main(Main.java:116) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) at GradleStart.main(GradleStart.java:26) -- System Details -- Details: Minecraft Version: 1.8.9 Operating System: Windows 10 (amd64) version 10.0 Java Version: 1.8.0_111, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 372371552 bytes (355 MB) / 814219264 bytes (776 MB) up to 1897922560 bytes (1810 MB) JVM Flags: 0 total; IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0 FML: MCP 9.19 Powered by Forge 11.15.1.1722 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 UCH mcp{9.19} [Minecraft Coder Pack] (minecraft.jar) UCH FML{8.0.99.99} [Forge Mod Loader] (forgeSrc-1.8.9-11.15.1.1722.jar) UCH Forge{11.15.1.1722} [Minecraft Forge] (forgeSrc-1.8.9-11.15.1.1722.jar) UCH NewLife{Alpha-1.0} [NewLife] (NewLife-1.0.jar) Loaded coremods (and transformers): GL info: ' Vendor: 'NVIDIA Corporation' Version: '4.5.0 NVIDIA 376.33' Renderer: 'GeForce GTX 750 Ti/PCIe/SSE2' Launched Version: 1.8.9 LWJGL: 2.9.4 OpenGL: GeForce GTX 750 Ti/PCIe/SSE2 GL version 4.5.0 NVIDIA 376.33, NVIDIA Corporation GL Caps: Using GL 1.3 multitexturing. Using GL 1.3 texture combiners. Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported. Shaders are available because OpenGL 2.1 is supported. VBOs are available because OpenGL 1.5 is supported. Using VBOs: No 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) CPU: 4x Intel(R) Core(TM) i5-4670K CPU @ 3.40GHz [16:24:27] [Client thread/INFO] [STDOUT/]: [net.minecraft.init.Bootstrap:printToSYSOUT:612]: #@!@# Game crashed! Crash report saved to: #@!@# E:\OLD\Serveur - Minecraft\NewLife\run\.\crash-reports\crash-2016-12-19_16.24.27-client.txt ::: Voici le code de la classe main : ::: package fr.ph1823.MyLife; import com.silvaniastudios.cities.core.EventDrops; import com.silvaniastudios.cities.core.FlenixCities_Core; import com.silvaniastudios.cities.core.client.StoreStockInfoRender; import com.silvaniastudios.cities.core.npc.spawner.NPCSpawnerEntity; import com.silvaniastudios.cities.econ.atm.TileEntityATMEntity; import com.silvaniastudios.cities.econ.store.entity.TileEntityAdminShop; import com.silvaniastudios.cities.econ.store.entity.TileEntityFloatingShelves; import com.silvaniastudios.cities.econ.store.entity.TileEntityStockChest; import fr.ph1823.MyLife.Block.road.sign.direction.RightTurnSign; import fr.ph1823.MyLife.Block.road.sign.obligation.StopSign; import fr.ph1823.MyLife.Block.road.sign.obligation.YieldSign; import fr.ph1823.MyLife.Block.road.traffic.TrafficCone; import fr.ph1823.MyLife.Item.armor.*; import fr.ph1823.MyLife.Item.civil.Identity; import fr.ph1823.MyLife.Item.illegal.Joint; import fr.ph1823.MyLife.Item.illegal.TalkieWalkie; import fr.ph1823.MyLife.Item.legal.Bier; import fr.ph1823.MyLife.Item.legal.RedBull; import fr.ph1823.MyLife.Item.police.Search; import fr.ph1823.MyLife.Proxy.ClientProxy; import fr.ph1823.MyLife.command.donne; import fr.ph1823.MyLife.command.name; import fr.ph1823.MyLife.command.pay; import fr.ph1823.MyLife.tab.CustomCreativeTab; import fr.ph1823.MyLife.Block.illegal.BlockCannabis; import fr.ph1823.MyLife.Block.illegal.BlockHoublon; import fr.ph1823.MyLife.Item.legal.Key; import fr.ph1823.MyLife.Item.police.Menotes; import fr.ph1823.MyLife.Proxy.CommonProxy; import fr.ph1823.MyLife.Seed.SeedCannabis; import fr.ph1823.MyLife.Seed.SeedHoublon; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.resources.model.ModelResourceLocation; 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.ItemArmor; import net.minecraft.item.ItemFood; import net.minecraft.item.ItemStack; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraft.server.MinecraftServer; import net.minecraft.util.ChatComponentText; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiMainMenu; import net.minecraftforge.client.model.ModelLoader; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.common.util.EnumHelper; import net.minecraftforge.fml.client.FMLClientHandler; import net.minecraftforge.fml.client.registry.ClientRegistry; import net.minecraftforge.fml.common.FMLCommonHandler; import net.minecraftforge.fml.common.FMLLog; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.SidedProxy; import net.minecraftforge.fml.common.event.FMLInitializationEvent; import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; import net.minecraftforge.fml.common.event.FMLServerStartingEvent; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import net.minecraftforge.fml.common.gameevent.TickEvent; import net.minecraftforge.fml.common.network.simpleimpl.SimpleNetworkWrapper; import net.minecraftforge.fml.common.registry.GameRegistry; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.fml.server.FMLServerHandler; import org.apache.logging.log4j.LogManager; import com.mojang.authlib.GameProfile; import java.io.File; import java.io.IOException; import java.util.HashMap; import static net.minecraftforge.fml.common.FMLCommonHandler.*; @Mod(modid = GloryRP.MODID, name = GloryRP.NAME, version = GloryRP.VERSION/*, dependencies = "after:FlenixCities"/*;after:Monoblocks;after:MonoblocksMultipart"*/) public class GloryRP {     @Mod.Instance("NewLife")     public static GloryRP instance;     @SidedProxy(clientSide="fr.ph1823.MyLife.Proxy.ClientProxy", serverSide="fr.ph1823.MyLife.Proxy.CommonProxy")     public static CommonProxy PROXY;     public static ClientProxy proxyClient = new ClientProxy();     public static SimpleNetworkWrapper network;     public static CustomCreativeTab plantTab = new CustomCreativeTab("plant_tab");     public static CustomCreativeTab boissonsTab = new CustomCreativeTab("boissons_tab");    // public static CustomCreativeTab tabTennue = new CustomCreativeTab("armor_tab");     public static final String MODID = "NewLife";     public static final String VERSION = "Alpha-1.0";     public static final String NAME = "NewLife";     public static final org.apache.logging.log4j.Logger LOGGER = LogManager.getLogger(NAME);     public static Item cannabisItem = new Item(/*2, 2, false*/).setUnlocalizedName("cannabisi").setCreativeTab(plantTab);     public static Block houblonPlant = new BlockHoublon(Material.plants);     public static Block cannabisPlant = new BlockCannabis(Material.plants);     public static Block RightTurnsign = new RightTurnSign(Material.barrier);///voir atm ou tilentityatm     public static Block trafficcone = new TrafficCone(Material.barrier);     public static Block stopsign = new StopSign(Material.barrier);     public static Block yieldsign = new YieldSign(Material.barrier);     public static Item cannabisSeed = new SeedCannabis();     public static Item houblonSeed = new SeedHoublon();     public static Item houblonItem = new Item().setUnlocalizedName("houbloni").setCreativeTab(plantTab);     public static Item Oeuf = new ItemFood(2, 2, false).setUnlocalizedName("oeuf").setCreativeTab(plantTab);     public static Item MenotesItem = new Menotes();     public static Item KeyItem = new Key();     public static Item Search = new Search();     public static Item Identity = new Identity();     public static Item joints = new Joint();     public static int height = 0;     public static int with = 0;     public static HashMap <string,string>search = new HashMap<>();     public static int tick = 0;     public static int  sec = 0;  //   public static int  min = 0;     public static final ItemArmor.ArmorMaterial MilitaireMaterial = EnumHelper.addArmorMaterial("MilitaireMaterial","NewLife", 33, new int[]{3, 8, 6, 3}, 10);     public static final ItemArmor.ArmorMaterial TaxiMaterial = EnumHelper.addArmorMaterial("TaxiMaterial","NewLife", 5, new int[]{1, 3, 2, 1}, 15);     public static final ItemArmor.ArmorMaterial CrsMaterial = EnumHelper.addArmorMaterial("CrsMaterial","NewLife", 15, new int[]{2, 6, 5, 2}, 9);     public static final ItemArmor.ArmorMaterial CrsMaterial2 = EnumHelper.addArmorMaterial("CrsMaterial2","NewLife", 15, new int[]{2, 6, 5, 2}, 9);     public static final ItemArmor.ArmorMaterial PoliceMaterial = EnumHelper.addArmorMaterial("PoliceMaterial","NewLife", 15, new int[]{2, 5, 4, 1}, 12);     public static final ItemArmor.ArmorMaterial PompierMaterial = EnumHelper.addArmorMaterial("PompierMaterial","NewLife", 5, new int[]{1, 3, 2, 1}, 15);     public static final ItemArmor.ArmorMaterial SamuMaterial = EnumHelper.addArmorMaterial("SamuMaterial","NewLife", 5, new int[]{1, 3, 2, 1}, 15);     public static final ItemArmor.ArmorMaterial TerroristeMaterial = EnumHelper.addArmorMaterial("TerroristeMaterial","NewLife", 15, new int[]{2, 6, 5, 2}, 9);     public static final ItemArmor.ArmorMaterial TerroristeMaterial2 = EnumHelper.addArmorMaterial("TerroristeMaterial2","NewLife", 15, new int[]{2, 6, 5, 2}, 9);     public static final ItemArmor.ArmorMaterial GhillieMaterial = EnumHelper.addArmorMaterial("GhillieMaterial","NewLife", 15, new int[]{2, 6, 5, 2}, 9);     public static final ItemArmor.ArmorMaterial GipnMaterial = EnumHelper.addArmorMaterial("GipnMaterial","NewLife", 33, new int[]{3, 8, 6, 3}, 10);     public static final ItemArmor.ArmorMaterial plongeeMaterial = EnumHelper.addArmorMaterial("","NewLife", 5, new int[]{1, 3, 2, 1}, 10);     public static final ItemArmor.ArmorMaterial MasqueMaterial = EnumHelper.addArmorMaterial("","NewLife", 15, new int[]{2, 0, 0, 0}, 0);     public static  HashMap <entityplayer,integer>tick1 = new HashMap<>();     public static  HashMap <entityplayer,boolean>dro = new HashMap<>();     public static Item chope = new Item().setUnlocalizedName("chope").setCreativeTab(boissonsTab);     public static Item canette = new Item().setUnlocalizedName("canette").setCreativeTab(boissonsTab);     public static Item  biere = new Bier(1, 2, false);     public static Item  redbull = new RedBull(1, 2, false);     public static Item talkie = new TalkieWalkie();     public static Item police = new Item().setCreativeTab(plantTab).setUnlocalizedName("police");   /*  public static Item GhillieBoots = new IGhillieMaterial(GhillieMaterial, 0, 3).setUnlocalizedName("GhillieBoots").setCreativeTab(tabTennue);     public static Item GhillieChestplate = new IGhillieMaterial(GhillieMaterial, 0, 1).setUnlocalizedName("GhillieChestplate").setCreativeTab(tabTennue);     public static Item GhillieHelmet = new IGhillieMaterial(GhillieMaterial, 0, 0).setUnlocalizedName("GhillieHelmet").setCreativeTab(tabTennue);     public static Item GhillieLeggings = new IGhillieMaterial(GhillieMaterial, 0, 2).setUnlocalizedName("GhillieLeggings").setCreativeTab(tabTennue);     public static Item Gipnboots = new IGipnMaterial(GipnMaterial, 0, 3).setUnlocalizedName("Gipnboots").setCreativeTab(tabTennue);     public static Item Gipnchestplate = new IGipnMaterial(GipnMaterial, 0, 1).setUnlocalizedName("Gipnchestplate").setCreativeTab(tabTennue);     public static Item Gipnhelmet = new IGipnMaterial(GipnMaterial, 0, 0).setUnlocalizedName("Gipnhelmet").setCreativeTab(tabTennue);     public static Item Gipnleggings = new IGipnMaterial(GipnMaterial, 0, 2).setUnlocalizedName("Gipnleggings").setCreativeTab(tabTennue);     public static Item HelmetMilitaire = new IMilitaireMaterial(MilitaireMaterial, 0, 0).setUnlocalizedName("HelmetMilitaire").setCreativeTab(tabTennue);     public static Item  Helmetcrs = new ICRSMaterial(CrsMaterial, 0, 0).setUnlocalizedName("Helmetcrs").setCreativeTab(tabTennue);     public static Item  Helmetcrs2 = new ICRSMaterial2(CrsMaterial2, 0, 0).setUnlocalizedName("Helmetcrs2").setCreativeTab(tabTennue);   //  Joint = (new Joint(0, 0.0F, false)).setUnlocalizedName("Joint").setTextureName("newlife:Joint").setCreativeTab(tabAltisMinePlante);   public static Item LeggingsMilitaire = new IMilitaireMaterial(MilitaireMaterial, 0, 2).setUnlocalizedName("LeggingsMilitaire").setCreativeTab(tabTennue);     public static Item LeggingsT = new ITerroristeMaterial(TerroristeMaterial, 0, 2).setUnlocalizedName("LeggingsT").setCreativeTab(tabTennue);     public static Item LeggingsT2 = new ITerroristeMaterial2(TerroristeMaterial2, 0, 2).setUnlocalizedName("LeggingsT2").setCreativeTab(tabTennue);     public static Item Leggingscrs = new ICRSMaterial(CrsMaterial, 0, 2).setUnlocalizedName("Leggingscrs").setCreativeTab(tabTennue);     public static Item LeggingsTaxi = new ITaxiMaterial(TaxiMaterial, 0, 2).setUnlocalizedName("LeggingsTaxi").setCreativeTab(tabTennue);     public static Item Leggingscrs2 = new ICRSMaterial2(CrsMaterial2, 0, 2).setUnlocalizedName("Leggingscrs2").setCreativeTab(tabTennue);     public static Item Leggingspolice = new IPoliceArmor(PompierMaterial, 0, 2).setUnlocalizedName("Leggingspolice").setCreativeTab(tabTennue);     public static Item LeggingsPompier = new IPompierMaterial(PompierMaterial, 0, 2).setUnlocalizedName("LeggingsPompier").setCreativeTab(tabTennue);     public static Item  Leggingssamu = new ISamuArmor(SamuMaterial, 0, 2).setUnlocalizedName("Leggingssamu").setCreativeTab(tabTennue);     public static Item  CheeseBurger = (new ItemFood(20, 0.8F, true)).setUnlocalizedName("CheeseBurger").setCreativeTab(boissonsTab);     public static Item BootsMilitaire = new IMilitaireMaterial(MilitaireMaterial, 0, 3).setUnlocalizedName("BootsMilitaire").setCreativeTab(tabTennue);     public static Item  BootsTaxi = new ITaxiMaterial(TaxiMaterial, 0, 3).setUnlocalizedName("BootsTaxi").setCreativeTab(tabTennue);     public static Item  Bootscrs = new ICRSMaterial(CrsMaterial, 0, 3).setUnlocalizedName("Bootscrs").setCreativeTab(tabTennue);     public static Item  Bootscrs2 = new ICRSMaterial2(CrsMaterial2, 0, 3).setUnlocalizedName("Bootscrs2").setCreativeTab(tabTennue);     public static Item   Bootspolice = new IPoliceArmor(PoliceMaterial, 0, 3).setUnlocalizedName("Bootspolice").setCreativeTab(tabTennue);     public static Item   Bootspompier = new IPompierMaterial(PompierMaterial, 0, 3).setUnlocalizedName("Bootspompier").setCreativeTab(tabTennue);     public static Item  Bootssamu = new ISamuArmor(SamuMaterial, 0, 3).setUnlocalizedName("Bootssamu").setCreativeTab(tabTennue);     public static Item  Cagoule = new ITerroristeMaterial(TerroristeMaterial, 0, 0).setUnlocalizedName("Cagoule").setCreativeTab(tabTennue);     public static Item   Cagoule2 = new ITerroristeMaterial2(TerroristeMaterial2, 0, 0).setUnlocalizedName("Cagoule2").setCreativeTab(tabTennue); //    public static Item ChestplateB = new ITerroristeMaterial2(TerroristeMaterial2, 0, 1).setUnlocalizedName("Gilet par Balle Bleu").setTextureName("newlife:Chestplatebleubyball").setCreativeTab(tabTennue);     public static Item ChestplateMilitaire = new IMilitaireMaterial(MilitaireMaterial, 0, 1).setUnlocalizedName("ChestplateMilitaire").setCreativeTab(tabTennue);     public static Item ChestplateN = new ITerroristeMaterial(TerroristeMaterial, 0, 1).setUnlocalizedName("ChestplateN").setCreativeTab(tabTennue);     public static Item ChestplateTaxi = new ITaxiMaterial(TaxiMaterial, 0, 1).setUnlocalizedName("ChestplateTaxi").setCreativeTab(tabTennue);     public static Item Chestplatecrs = new ICRSMaterial(CrsMaterial, 0, 1).setUnlocalizedName("Chestplatecrs").setCreativeTab(tabTennue);     public static Item Chestplatecrs2 = new ICRSMaterial(CrsMaterial, 0, 1).setUnlocalizedName("Chestplatecrs2").setCreativeTab(tabTennue);     public static Item  Chestplatepolice = new IPoliceArmor(PoliceMaterial, 0, 1).setUnlocalizedName("Chestplatepolice").setCreativeTab(tabTennue);     public static Item  Chestplatepompier = new IPompierMaterial(PompierMaterial, 0, 1).setUnlocalizedName("Chestplatepompier").setCreativeTab(tabTennue);     public static Item Chestplatesamu = new ISamuArmor(SamuMaterial, 0, 1).setUnlocalizedName("Chestplatesamu").setCreativeTab(tabTennue);     //public static Item Cigarrette = (new Cigarrette()).setUnlocalizedName("Cigarrette").setTextureName("newlife:Cigarrette").setCreativeTab();     //public static Item Cigarre = (new Cigarre(0, 0.0F, false)).setUnlocalizedName("Cigarre").setTextureName("newlife:Cigarre").setCreativeTab();     //public static Item Cocaine = (new Cocaine(0, 0.0F, false)).setUnlocalizedName("Cocaine").setTextureName("newlife:Cocaine").setCreativeTab();    // public static Item  Kebab = new ItemFood(20, 0.8F, true).setTextureName("plant:kebab").setUnlocalizedName("Kebab").func_77637_a(); */     @SideOnly(Side.CLIENT)     public void registerRender()     {         proxyClient.registerBlockTexture(cannabisPlant, "cannabisb");         proxyClient.registerItemTexture(cannabisSeed, "cannabis_seed");         proxyClient.registerBlockTexture(RightTurnsign, "rightcorner");         proxyClient.registerBlockTexture(stopsign, "stopsign");         proxyClient.registerBlockTexture(yieldsign, "yieldsign");         proxyClient.registerBlockTexture(trafficcone, "trafficcone");         FMLLog.bigWarning("Lel");     }    @SideOnly(Side.CLIENT)    public static void registerItemsModels()    {        plantTab.setLogo(cannabisItem);        boissonsTab.setLogo(biere);        //tabTennue.setLogo(Cagoule);        ModelLoader.setCustomModelResourceLocation(cannabisItem, 0, new ModelResourceLocation("newlife:cannabisi", "inventory"));        ModelLoader.setCustomModelResourceLocation(houblonItem, 0, new ModelResourceLocation("newlife:houbloni", "inventory"));        ModelLoader.setCustomModelResourceLocation(cannabisSeed, 0, new ModelResourceLocation("newlife:cannabis_seed", "inventory"));        ModelLoader.setCustomModelResourceLocation(houblonSeed, 0, new ModelResourceLocation("newlife:houblon_seed", "inventory"));                                                             /*                                                             BOISSONS                                                              */        ModelLoader.setCustomModelResourceLocation(redbull, 0, new ModelResourceLocation("boissons:redbull", "inventory"));        ModelLoader.setCustomModelResourceLocation(chope, 0, new ModelResourceLocation("boissons:chope", "inventory"));        ModelLoader.setCustomModelResourceLocation(canette, 0, new ModelResourceLocation("boissons:canette", "inventory"));        ModelLoader.setCustomModelResourceLocation(biere, 0, new ModelResourceLocation("boissons:biere", "inventory"));      /*  ModelLoader.setCustomModelResourceLocation(, 0, new ModelResourceLocation("boissons:", "inventory"));        ModelLoader.setCustomModelResourceLocation(, 0, new ModelResourceLocation("boissons:", "inventory"));        ModelLoader.setCustomModelResourceLocation(, 0, new ModelResourceLocation("boissons:", "inventory"));        ModelLoader.setCustomModelResourceLocation(, 0, new ModelResourceLocation("boissons:", "inventory"));        ModelLoader.setCustomModelResourceLocation(, 0, new ModelResourceLocation("boissons:", "inventory"));*/        ModelLoader.setCustomModelResourceLocation(joints, 0, new ModelResourceLocation("newlife:joint", "inventory"));        ModelLoader.setCustomModelResourceLocation(talkie, 0, new ModelResourceLocation("newlife:talkie", "inventory"));        ModelLoader.setCustomModelResourceLocation(Oeuf , 0, new ModelResourceLocation("newlife:Oeuf", "inventory"));        ModelLoader.setCustomModelResourceLocation(MenotesItem, 0, new ModelResourceLocation("newlife:menottes", "inventory"));        ModelLoader.setCustomModelResourceLocation(KeyItem, 0, new ModelResourceLocation("newlife:key", "inventory"));        ModelLoader.setCustomModelResourceLocation(Search, 0, new ModelResourceLocation("newlife:a", "inventory"));       // ModelLoader.setCustomModelResourceLocation(Identity, 0, new ModelResourceLocation("", "inventory"));        //ModelLoader.setCustomModelResourceLocation(joints, 0, new ModelResourceLocation("", "inventory"));        ModelLoader.setCustomModelResourceLocation(police, 0, new ModelResourceLocation("newlife:Police", "inventory"));      //  ModelLoader.setCustomModelResourceLocation(GhillieBoots, 0, new ModelResourceLocation("newlife:GhillieBootsGreenicon", "inventory"));       /*  ModelLoader.setCustomModelResourceLocation(GhillieChestplate, 0, new ModelResourceLocation("newlife:GhillieChestplateGreenicon", "inventory"));        ModelLoader.setCustomModelResourceLocation(GhillieHelmet, 0, new ModelResourceLocation("newlife:GhillieHelmetGreenicon", "inventory"));        ModelLoader.setCustomModelResourceLocation(Gipnboots, 0, new ModelResourceLocation("newlife:BootsGIPN", "inventory"));        ModelLoader.setCustomModelResourceLocation(Gipnchestplate, 0, new ModelResourceLocation("newlife:ChestplateGIPN", "inventory"));        ModelLoader.setCustomModelResourceLocation(Gipnhelmet, 0, new ModelResourceLocation("newlife:HelmetGIPN", "inventory"));          ModelLoader.setCustomModelResourceLocation(HelmetMilitaire, 0, new ModelResourceLocation("newlife:Casque_Militaire", "inventory"));        ModelLoader.setCustomModelResourceLocation(Helmetcrs, 0, new ModelResourceLocation("newlife:HelmetCRS", "inventory"));        ModelLoader.setCustomModelResourceLocation(Helmetcrs2, 0, new ModelResourceLocation("newlife:HelmetCRS2", "inventory"));        ModelLoader.setCustomModelResourceLocation(Cagoule,0,new ModelResourceLocation("newlife:Cagoule", "inventory"));        ModelLoader.setCustomModelResourceLocation(Cagoule2,0,new ModelResourceLocation("newlife:Cagoule", "inventory"));        /*         Enregistrement des texutre de pantalon (pour pas qu'il sois cu nu :p)         */      /*  ModelLoader.setCustomModelResourceLocation(Gipnleggings, 0, new ModelResourceLocation("newlife:LeggingsGIPN", "inventory"));        ModelLoader.setCustomModelResourceLocation(GhillieLeggings, 0, new ModelResourceLocation("newlife:GhilliePantsGreenicon", "inventory"));        ModelLoader.setCustomModelResourceLocation(LeggingsMilitaire, 0, new ModelResourceLocation("newlife:LegginsMilitaire", "inventory"));        ModelLoader.setCustomModelResourceLocation(LeggingsT, 0, new ModelResourceLocation("newlife:LegginsT", "inventory"));        ModelLoader.setCustomModelResourceLocation(LeggingsT2, 0, new ModelResourceLocation("newlife:LegginsT", "inventory"));        ModelLoader.setCustomModelResourceLocation(Leggingscrs, 0, new ModelResourceLocation("newlife:LeggingsCRS", "inventory"));        ModelLoader.setCustomModelResourceLocation(LeggingsTaxi, 0, new ModelResourceLocation("newlife:LegginsTAXI", "inventory"));        ModelLoader.setCustomModelResourceLocation(Leggingscrs2, 0, new ModelResourceLocation("newlife:LeggingsCRS", "inventory"));        ModelLoader.setCustomModelResourceLocation(Leggingspolice, 0, new ModelResourceLocation("newlife:LegginsPolice", "inventory"));        ModelLoader.setCustomModelResourceLocation(LeggingsPompier, 0, new ModelResourceLocation("newlife:LegginsPompier", "inventory"));        ModelLoader.setCustomModelResourceLocation(Leggingssamu, 0, new ModelResourceLocation("newlife:LegginsSAMU", "inventory"));        ModelLoader.setCustomModelResourceLocation(CheeseBurger, 0, new ModelResourceLocation("newlife:CheeseBurger", "inventory"));        ModelLoader.setCustomModelResourceLocation(BootsMilitaire, 0, new ModelResourceLocation("newlife:BootsMilitaire", "inventory"));        ModelLoader.setCustomModelResourceLocation(BootsTaxi, 0, new ModelResourceLocation("newlife:BootsTAXI", "inventory"));        ModelLoader.setCustomModelResourceLocation(Bootscrs, 0, new ModelResourceLocation("newlife:BootsCRS", "inventory"));        ModelLoader.setCustomModelResourceLocation(Bootscrs2, 0, new ModelResourceLocation("newlife:BootsCRS", "inventory"));        ModelLoader.setCustomModelResourceLocation(Bootspolice, 0, new ModelResourceLocation("newlife:BootsPolice", "inventory"));        ModelLoader.setCustomModelResourceLocation(Bootspompier, 0, new ModelResourceLocation("newlife:BootsPompier", "inventory"));        ModelLoader.setCustomModelResourceLocation(Bootssamu, 0, new ModelResourceLocation("newlife:BootsSAMU", "inventory"));        ModelLoader.setCustomModelResourceLocation(ChestplateMilitaire, 0, new ModelResourceLocation("newlife:ChestplateMilitaire", "inventory"));        ModelLoader.setCustomModelResourceLocation(ChestplateN, 0, new ModelResourceLocation("newlife:Chestplateblackbyball", "inventory"));        ModelLoader.setCustomModelResourceLocation(ChestplateTaxi, 0, new ModelResourceLocation("newlife:ChestplateTAXI", "inventory"));        ModelLoader.setCustomModelResourceLocation(Chestplatecrs, 0, new ModelResourceLocation("newlife:ChestplateCRS", "inventory"));        ModelLoader.setCustomModelResourceLocation(Chestplatecrs2, 0, new ModelResourceLocation("newlife:ChestplateCRS", "inventory"));        ModelLoader.setCustomModelResourceLocation(Chestplatepolice, 0, new ModelResourceLocation("newlife:ChestplatePolice", "inventory"));        ModelLoader.setCustomModelResourceLocation(Chestplatepompier, 0, new ModelResourceLocation("newlife:ChestplatePompier", "inventory"));        ModelLoader.setCustomModelResourceLocation(Chestplatesamu, 0, new ModelResourceLocation("newlife:ChestplateSAMU", "inventory"));        //  ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(cannabisPlant), 0, new ModelResourceLocation("newlife:cannabisb", "inventory"));        /*        PROXY REGISTER BLOCK         */    }     @Mod.EventHandler     public void init(FMLInitializationEvent event)     { FMLLog.bigWarning("LOLOLOL");         FlenixCities_Core.Init(event);             instance().bus().register(this);         MinecraftForge.EVENT_BUS.register(new EventHandler1());         //PROXY.init();         MinecraftForge.EVENT_BUS.register(new EventDrops());         if (FMLCommonHandler.instance().getEffectiveSide() == Side.CLIENT) {             MinecraftForge.EVENT_BUS.register(new StoreStockInfoRender(FMLClientHandler.instance().getClient()));         }         GameRegistry.registerTileEntity(TileEntityATMEntity.class, "newlife:tileEntityATM");         GameRegistry.registerTileEntity(TileEntityFloatingShelves.class, "newlife:tileEntityFloatingShelves");         GameRegistry.registerTileEntity(TileEntityAdminShop.class, "newlife:tileEntityAdminShop");         GameRegistry.registerTileEntity(NPCSpawnerEntity.class, "newlife:npcSpawnerBlock");         GameRegistry.registerTileEntity(TileEntityStockChest.class, "newlife:tileEntityStockChest");        proxyClient.registerRenderThings();      //  proxyClient.registerRenderers();         registerRender();        // GameRegistry.registerTileEntity(TileEntityRightCorner.class, "tileEntityRightCorner");        // ClientRegistry.bindTileEntitySpecialRenderer(TileEntityRightCorner.class, new TileEntitySpecialRenderCorner());        // proxyClient.registerRender();     }     @Mod.EventHandler     public void serverLoad(FMLServerStartingEvent event)     {         event.registerServerCommand(new pay());         event.registerServerCommand(new name());         event.registerServerCommand(new donne());     }     @SubscribeEvent     @SideOnly(Side.CLIENT)     public void onTick(TickEvent.ClientTickEvent event)     {         Minecraft mc = FMLClientHandler.instance().getClient();         if(mc.currentScreen != null && mc.currentScreen.getClass().equals(GuiMainMenu.class))         {      //    mc.displayGuiScreen(new CustomMainMenu());         }     }     public void LeL(EntityPlayer p) {             p.addPotionEffect(new PotionEffect(Potion.confusion.getId(), 20 * 60, 3));             p.addPotionEffect(new PotionEffect(Potion.moveSlowdown.getId(), 20 * 60, 3));         dro.remove(p);     } @SubscribeEvent @SideOnly(Side.SERVER) public void onServerTick(TickEvent.ServerTickEvent event) throws IOException {          MinecraftServer mc1 = FMLServerHandler.instance().getServer();             tick++;          if(tick == 20) {              tick = 0;              sec++;          }          for (GameProfile g : mc1.getGameProfiles()) {              if(sec == 60) {                  sec = 0;                  if(search != null & search.size() > 0) {                      EntityPlayer p = mc1.getEntityWorld().getPlayerEntityByUUID(g.getId());                      p.addChatComponentMessage(new ChatComponentText("§cAvis de recherche en cours : \n"));                      for (int i = search.size(); i >= 0; i–) {                          p.addChatComponentMessage(new ChatComponentText("Prénom/Nom/Pseudo : " + search.keySet().toArray()* + "\n Description : " + search.values().toArray()*));                      }                  }              }              EntityPlayer p = mc1.getEntityWorld().getPlayerEntityByUUID(g.getId());              if(dro.get(p) != null) {                 int i = tick1.get(p);                  tick1.remove(tick1);                  tick1.put(p,i+1);                  if(tick1.get(p) == 20*15) {                      LeL(p);                  }              }          }   /*     for(GameProfile g : mc1.getGameProfiles()) {        EntityPlayer p = mc1.getEntityWorld().getPlayerEntityByUUID(g.getId()); if(p != null && p.getEntityWorld().getWorldInfo().getWorldName().equals("world") && p.getEntityWorld() != null && p.getEntityWorld().getWorldInfo() != null && p.getEntityWorld().getWorldInfo().getWorldName() != null ) {            EconUtils e = new EconUtils();    double i =  e.getBalance(p);                       File f = new File("./plugins/GloryRP1/users/" + g.getName() + ".yml");     if(!f.exists()) {     f.createNewFile();     }     FileConfiguration fc = YamlConfiguration.loadConfiguration(f);     fc.set("money", i);     try { fc.save(f); } catch (IOException e1) { e1.printStackTrace(); }        }        }*/ }     //     @Mod.EventHandler     public void preInit(FMLPreInitializationEvent event)     {         FlenixCities_Core.preInit(event);         PROXY.preInit(event.getSuggestedConfigurationFile());         GameRegistry.registerBlock(stopsign, "stopsign");         GameRegistry.registerBlock(trafficcone, "trafficcone");//FIRE ARLARM crazyfish model         GameRegistry.registerBlock(yieldsign, "yieldsign");      //   GameRegistry.registerBlock(, "");     GameRegistry.registerBlock(cannabisPlant, "cannabisb");         GameRegistry.registerBlock(houblonPlant, "houblonb");         GameRegistry.registerBlock(RightTurnsign,"rightcorner");         GameRegistry.registerItem(houblonItem, "houbloni");         GameRegistry.registerItem(houblonSeed, "houblon_seed");         GameRegistry.registerItem(cannabisItem, "cannabisi");        GameRegistry.registerItem(MenotesItem, "menottes");         GameRegistry.registerItem(KeyItem, "key");         GameRegistry.registerItem(cannabisSeed, "cannabis_seed");         GameRegistry.registerItem(Search, "search");         GameRegistry.registerItem(Identity, "identity");      //   GameRegistry.registerItem(joints, "joint");         GameRegistry.registerItem(joints, "jointsC");         GameRegistry.registerItem(chope, "chope");         GameRegistry.registerItem(canette, "canette");         GameRegistry.registerItem(biere, "biere");         GameRegistry.registerItem(redbull, "redbull");         GameRegistry.registerItem(talkie, "talkie");         GameRegistry.registerItem(Oeuf, "Oeuf");         GameRegistry.registerItem(police, "police");         /*GameRegistry.registerItem(ChestplateMilitaire, ChestplateMilitaire.getUnlocalizedName().substring(5));         GameRegistry.registerItem(ChestplateN, ChestplateN.getUnlocalizedName().substring(5));         GameRegistry.registerItem(ChestplateTaxi, ChestplateTaxi.getUnlocalizedName().substring(5));         GameRegistry.registerItem(Chestplatecrs, Chestplatecrs.getUnlocalizedName().substring(5));         GameRegistry.registerItem(Chestplatecrs2, Chestplatecrs2.getUnlocalizedName().substring(5));         GameRegistry.registerItem(Chestplatepolice, Chestplatepolice.getUnlocalizedName().substring(5));         GameRegistry.registerItem(Chestplatepompier, Chestplatepompier.getUnlocalizedName().substring(5));         GameRegistry.registerItem(Chestplatesamu, Chestplatesamu.getUnlocalizedName().substring(5));        /* GameRegistry.registerItem(Cigarrette, Cigarrette.getUnlocalizedName().substring(5));         GameRegistry.registerItem(Cigarre, Cigarre.getUnlocalizedName().substring(5));         GameRegistry.registerItem(Cocaine, Cocaine.getUnlocalizedName().substring(5));*/     /*    GameRegistry.registerItem(GhillieBoots, GhillieBoots.getUnlocalizedName().substring(5));         GameRegistry.registerItem(GhillieChestplate, GhillieChestplate.getUnlocalizedName().substring(5));         GameRegistry.registerItem(GhillieHelmet, GhillieHelmet.getUnlocalizedName().substring(5));         GameRegistry.registerItem(GhillieLeggings, GhillieLeggings.getUnlocalizedName().substring(5));         GameRegistry.registerItem(CheeseBurger, CheeseBurger.getUnlocalizedName().substring(5));         GameRegistry.registerItem(Gipnboots, Gipnboots.getUnlocalizedName().substring(5));         GameRegistry.registerItem(Gipnchestplate, Gipnchestplate.getUnlocalizedName().substring(5));         GameRegistry.registerItem(Gipnhelmet, Gipnhelmet.getUnlocalizedName().substring(5));         GameRegistry.registerItem(Gipnleggings, Gipnleggings.getUnlocalizedName().substring(5));         GameRegistry.registerItem(HelmetMilitaire, HelmetMilitaire.getUnlocalizedName().substring(5));         GameRegistry.registerItem(Helmetcrs, Helmetcrs.getUnlocalizedName().substring(5));         GameRegistry.registerItem(Helmetcrs2, Helmetcrs2.getUnlocalizedName().substring(5));         GameRegistry.registerItem(LeggingsMilitaire, LeggingsMilitaire.getUnlocalizedName().substring(5));         GameRegistry.registerItem(LeggingsT, LeggingsT.getUnlocalizedName().substring(5));         GameRegistry.registerItem(LeggingsT2, LeggingsT2.getUnlocalizedName().substring(5));         GameRegistry.registerItem(Leggingscrs, Leggingscrs.getUnlocalizedName().substring(5));         GameRegistry.registerItem(LeggingsTaxi, LeggingsTaxi.getUnlocalizedName().substring(5));         GameRegistry.registerItem(Leggingscrs2, Leggingscrs2.getUnlocalizedName().substring(5));         GameRegistry.registerItem(Leggingspolice, Leggingspolice.getUnlocalizedName().substring(5));         GameRegistry.registerItem(LeggingsPompier, LeggingsPompier.getUnlocalizedName().substring(5));         GameRegistry.registerItem(Leggingssamu, Leggingssamu.getUnlocalizedName().substring(5));         GameRegistry.registerItem(BootsTaxi, BootsTaxi.getUnlocalizedName().substring(5));         GameRegistry.registerItem(Bootscrs, Bootscrs.getUnlocalizedName().substring(5));         GameRegistry.registerItem(Bootscrs2, Bootscrs2.getUnlocalizedName().substring(5));         GameRegistry.registerItem(Bootspolice, Bootspolice.getUnlocalizedName().substring(5));         GameRegistry.registerItem(Bootspompier, Bootspompier.getUnlocalizedName().substring(5));         GameRegistry.registerItem(Bootssamu, Bootssamu.getUnlocalizedName().substring(5));         GameRegistry.registerItem(BootsMilitaire, BootsMilitaire.getUnlocalizedName().substring(5));         GameRegistry.registerItem(Cagoule, Cagoule.getUnlocalizedName().substring(5));         GameRegistry.registerItem(Cagoule2, Cagoule2.getUnlocalizedName().substring(5)); /TODO TODO FloorBlock WoolWood/stone TileEntitySpecialRenderer ItemATMBlock BlockWalkway BlockWalkwayStairs BlockMlti TODO voir -> ItemBlockPosterVertical & getSubBlocks */        registerItemsModels();         GameRegistry.addRecipe(new ItemStack(chope),                 "A",                 "A",                 "A",                 'A', Blocks.glass);         GameRegistry.addRecipe(new ItemStack(canette), "A",                 "A",                 'A', Blocks.glass);         GameRegistry.addRecipe(new ItemStack(biere),                 " A ",                 " B ",                 " A "                 , 'A', houblonItem,'B', chope);         GameRegistry.addRecipe(new ItemStack(redbull),                 " R ",                 " W ",                 " A ",               'W', Items.water_bucket, 'A', canette, 'R', Items.redstone);         GameRegistry.addRecipe(new ItemStack(joints),                 " P ",                 " C ",                 " P ",                 'P', Items.paper, 'C', cannabisItem); /*         GameRegistry.addRecipe(new ItemStack(talkie),             "CS ",             "   ",             "   ",             'C', CoreItems.cpu,'S', MBlocks.Stereo);         NetworkRegistry.INSTANCE.registerGuiHandler(instance, PROXY);         GameRegistry.addRecipe(new ItemStack(talkie),                 "   ",                 "CS ",                 "   ",                 'C', CoreItems.cpu,'S', MBlocks.Stereo);         NetworkRegistry.INSTANCE.registerGuiHandler(instance, PROXY);         GameRegistry.addRecipe(new ItemStack(talkie),                 "   ",                 "   ",                 "CS ",                 'C', CoreItems.cpu,'S', MBlocks.Stereo);         NetworkRegistry.INSTANCE.registerGuiHandler(instance, PROXY);*/     } } ::: et enfin, en complément, le code source : http://www.mediafire.com/file/9dcts7kwjeg31vv/src.rar, je tiens a préciser que depuis la dernière fois, j’ai changé le code source, merci de votre aide !</entityplayer,boolean></entityplayer,integer></string,string>
  • Système de nom et prénom à la place du pseudo

    Résolu 1.8
    155
    0 Votes
    155 Messages
    33k Vues
    GabsG
    @‘robin4002’: Il n’y a pas ce problème chez moi. (regardes le screenshot, on voit bien les deux pseudos et ils sont différents). Je t’envoie mon src, je n’ai pas de problème non plus pour la connexion en solo. Ah exact ça marche avec ce src. Bon nickel. Seul petit soucis rien de bien méchant: Quand le joueur ce connecte pour la première fois il a donc son username de Minecraft et il s’actualise pas il faut déco reco pour qu’il s’actualise. Je vais faire que dès que il valide son nom_prénom ça le reconnecte sur le serveur comme ça je suis tranquille.
  • Ajouter un slot à l'inventaire du joueur

    Résolu 1.8.9
    7
    0 Votes
    7 Messages
    2k Vues
    robin4002R
    Plutôt comme ça : @SubscribeEvent public void onOpenContainer(PlayerOpenContainerEvent event) { Container container = event.entityPlayer.openContainer; InventoryPlayer playerInventory = event.entityPlayer.inventory; InventoryCustomPlayer inventoryCustom = ExtendedPlayer.get(event.entityPlayer).inventory; if(container instanceof ContainerPlayer) { for(int i = playerInventory.getSizeInventory(); i < playerInventory.getSizeInventory() + inventoryCustom.getSizeInventory(); i++) { Slot s = new Slot(inventoryCustom, i, posX, posY); // à remplacer s.slotNumber = container.inventorySlots.size(); container.inventorySlots.add(s); container.inventoryItemStacks.add((ItemStack)null); } } }
  • Changer le craft d'un block

    Résolu 1.8.9
    9
    0 Votes
    9 Messages
    2k Vues
    E
    C’est bon je viens de trouver tout seul, je l’ai refait pour le lit par exemple : GameRegistry.addRecipe(new ItemStack(Items.bed), new Object[] {"###", '#', new ItemStack(Blocks.leaves, 3, BlockPlanks.EnumType.OAK.getMetadata())}); Avec ce code on peut crafter le lit qu’avec 3 blocks de feuilles de chêne dans un ordre particulier.
  • Tile entity qui est invisible ..

    Résolu 1.8.9
    15
    0 Votes
    15 Messages
    3k Vues
    ph1823P
    Problème résolue merci a vous deux !
  • Problème avec un item plantable

    Résolu 1.8.9
    7
    0 Votes
    7 Messages
    1k Vues
    ph1823P
    Bonjour, problème résolue, voici le code final pour ce qu’il veulent : ::: package fr.ph1823.MyLife; import java.util.Random; import net.minecraft.block.*; import net.minecraft.block.material.Material; import net.minecraft.block.properties.IProperty; import net.minecraft.block.properties.PropertyInteger; import net.minecraft.block.state.BlockState; import net.minecraft.block.state.IBlockState; import net.minecraft.init.Blocks; import net.minecraft.item.Item; import net.minecraft.util.BlockPos; import net.minecraft.util.MathHelper; import net.minecraft.world.World; import net.minecraftforge.common.EnumPlantType; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; public class PPlant   extends BlockBush   implements IGrowable {   public static final PropertyInteger AGE = PropertyInteger.create("age", 0, 7);   protected int maxGrowthStage = 7;   @SideOnly(Side.CLIENT)   public PPlant(Material p)   {     super(p);     setTickRandomly(true);     float f = 0.5F;     setBlockBounds(0.5F - f, 0.0F, 0.5F - f, 0.5F + f, 0.25F, 0.5F + f);     setHardness(0.0F);     setStepSound(soundTypeGrass);     disableStats();     tickRate();   }   public int tickRate() {     return 20;   }   protected boolean canPlaceBlockOn(Block parBlock)   {     return parBlock == Blocks.grass;   }   public void incrementGrowStage(World parWorld, Random parRand, BlockPos pos)   {     IBlockState blockState = parWorld.getBlockState(pos);     int growStage = blockState.getBlock().getMetaFromState(blockState) + MathHelper.getRandomIntegerInRange(parRand, 2, 5);     if (growStage > this.maxGrowthStage) {       growStage = this.maxGrowthStage;     }     parWorld.setBlockState(pos, blockState.getBlock().getStateFromMeta(growStage), 2);   }   public Item getItemDropped(IBlockState                                      blockState, Random parRand, int parFortune)   {     return Item.getItemFromBlock(this);   }   @Override   public boolean canGrow(World worldIn, BlockPos pos, IBlockState state, boolean isClient) {     return worldIn.getBlockState(pos).getBlock().getMetaFromState(state) != 7;   }   @Override   public boolean canUseBonemeal(World worldIn, Random rand, BlockPos pos, IBlockState state) {     return false;   }   @Override   public void grow(World parworld, Random parRand, BlockPos pos, IBlockState state) {     incrementGrowStage(parworld, parRand,pos);   }   @Override   protected BlockState createBlockState() {     return new BlockState(this); // this works just fine   }   @Override   public IBlockState  getPlant(net.minecraft.world.IBlockAccess world, BlockPos blockPos)   {     IBlockState state = world.getBlockState(blockPos);     if (state.getBlock() != this) return getDefaultState();     return state;   }   @Override   public  net.minecraftforge.common.EnumPlantType getPlantType(net.minecraft.world.IBlockAccess world, BlockPos blockPos)   {     return  EnumPlantType.Plains;   } } ::: ::: package fr.ph1823.MyLife.Item.legal; import net.minecraft.block.Block; import net.minecraft.block.BlockCrops; import net.minecraft.block.BlockStem; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemSeeds; import net.minecraft.item.ItemStack; import net.minecraft.util.BlockPos; import net.minecraft.util.ChatComponentText; import net.minecraft.util.EnumFacing; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import net.minecraftforge.common.EnumPlantType; import net.minecraftforge.common.IPlantable; import org.bukkit.material.Crops; public class PItem   extends Item   implements IPlantable {   private  Block theBlockPlant;   private Block soilId;   public PItem(Block parBlockPlant, Block parSoilBlock)   {     this.theBlockPlant = parBlockPlant;     this.soilId = parSoilBlock;   }   public boolean onItemUse(ItemStack stack, EntityPlayer playerIn, World worldIn, BlockPos pos, EnumFacing side, float hitX, float hitY, float hitZ)   {     if (side != EnumFacing.UP) {       return false;     }     /*     if (playerIn.canPlayerEdit(pos.add(0,1,0), side, stack))     {       if ((worldIn.getBlockState(pos).getBlock() == this.soilId) &&         (worldIn.isAirBlock(pos.add(0,1,0))))       {         playerIn.addChatComponentMessage(new ChatComponentText("000000000" ));       //  worldIn.setBlockState(pos.add(0,1,0), this.theBlockPlant.getDefaultState());         stack.stackSize -= 1;         return true;       }       return false;     }     return false;*/     else if (!playerIn.canPlayerEdit(pos.offset(side), side, stack))     {       return false;     }     else if (/*worldIn.getBlockState(pos).getBlock().canSustainPlant(worldIn, pos, EnumFacing.UP, this) &&*/ worldIn.isAirBlock(pos.up()) && worldIn.getBlockState(pos).getBlock()==soilId)     {       worldIn.setBlockState(pos.up(), this.theBlockPlant.getDefaultState());       –stack.stackSize;       return true;     }     else     {       return false;     }   }   public EnumPlantType getPlantType(IBlockAccess world, BlockPos pos)   {     return EnumPlantType.Crop;   }     @Override     public net.minecraft.block.state.IBlockState getPlant(net.minecraft.world.IBlockAccess world, BlockPos pos)     {         return this.theBlockPlant.getDefaultState();     } } ::: ::: package fr.ph1823.MyLife.Block.illegal; import java.util.Random; import com.google.common.base.Predicate; import fr.ph1823.MyLife.GloryRP; import fr.ph1823.MyLife.PPlant; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.block.properties.PropertyDirection; import net.minecraft.block.properties.PropertyInteger; import net.minecraft.block.state.BlockState; import net.minecraft.block.state.IBlockState; import net.minecraft.init.Blocks; import net.minecraft.item.Item; import net.minecraft.util.BlockPos; import net.minecraft.util.EnumFacing; import net.minecraft.world.World; public class BlockCannabis   extends PPlant {   public static final PropertyInteger AGE = PropertyInteger.create(“age”, 0, 7); private int ticks = 0; public BlockCannabis(Material m)   {   super(m);     createBlockState();     setDefaultState(this.blockState.getBaseState().withProperty(AGE, 0));     setUnlocalizedName(“cannabisb”); //super(Material.air);     //setDefaultState(); //net.minecraft.item.ItemStack. } @Override   public void breakBlock(World w, BlockPos pos,IBlockState blockState)   {     super.breakBlock(w, pos, blockState);     if (w.getBlockState(pos.add(0,-1,0)).getBlock() == Blocks.grass) {       w.setBlockState(pos, GloryRP.cannabisPlant.getDefaultState());     }     if (blockState.getBlock().getMetaFromState(blockState) == 7) {     //  dropBlockAsItem(w, pos, new ItemStack(GloryRP.cannabisItem), 1); }   } @Override   protected boolean canPlaceBlockOn(Block ground)   {     return ground == Blocks.grass;   } @Override   public Item getItemDropped(IBlockState state, Random parRand, int parFortune)   {     return GloryRP.cannabisSeed;   } public void updateTick(World parWorld, BlockPos pos, IBlockState blockState, Random r)   {     super.updateTick(parWorld, pos, blockState, r);     parWorld.scheduleBlockUpdate(pos,blockState.getBlock() ,20,2);     ticks++;     if (this.ticks > 2400)     {       int growStage = blockState.getValue(AGE) + 1;       if (growStage > 7) {         growStage = 7;       }       parWorld.setBlockState(pos,blockState.withProperty(AGE,growStage));      // parWorld.setBlockMetadataWithNotify(parX, parY, parZ, growStage, 2);       this.ticks = 0;     } }   @Override   public IBlockState getStateFromMeta(int meta)   { return this.getDefaultState().withProperty(AGE, meta);   } @Override   public int getMetaFromState(IBlockState state)   { int grow = state.getValue(AGE);     //EnumColour colour = (EnumColour)state.getValue(PROPERTYCOLOUR); //int facingbits = facing.getHorizontalIndex();     //int colourbits = colour.getMetadata() << 2;     return grow;// | colourbits;   } @Override   protected BlockState createBlockState() {     return new BlockState(this, AGE); // this works just fine   }   @Override   public IBlockState  getPlant(net.minecraft.world.IBlockAccess world, BlockPos blockPos)   {     IBlockState state = world.getBlockState(blockPos);     if (state.getBlock() != this) return getDefaultState();     return state;   } /* @Override   public IBlockState getPlant(IBlockAccess world, BlockPos blockPos)   {     return GloryRP.cannabisPlant.getDefaultState();   } */ } ::: ::: package fr.ph1823.MyLife.Seed; import fr.ph1823.MyLife.GloryRP; import fr.ph1823.MyLife.Item.legal.PItem; import net.minecraft.init.Blocks; public class SeedCannabis   extends PItem {   public SeedCannabis()   {    super(GloryRP.cannabisPlant, Blocks.grass);    setUnlocalizedName("cannabis_seed");    setCreativeTab(GloryRP.plantTab);   } } ::: P.S Je fichier JSON : (ou j’ai rempalcé le “crops” “cross” {    "parent": "block/cross",    "textures": {        "cross": "plants:blocks/cannabis_stage_0"    } }
  • Crash lors du lancement de mon serveur

    Résolu 1.8
    10
    0 Votes
    10 Messages
    2k Vues
    robin4002R
    Oui.
  • Problème sendToAllAround

    Résolu 1.8
    9
    0 Votes
    9 Messages
    2k Vues
    GabsG
    @‘robin4002’: Minecraft.getMinecraft().getSoundHandler().playSound(PositionedSoundRecord.create(new ResourceLocation(“gui.button.press”), 1.0F)); Merci !
  • WorldSavedData crash

    Résolu 1.8
    7
    0 Votes
    7 Messages
    2k Vues
    RedRelayR
    Ton code est sujet a erreur. Ta variable “instance” n’est pas fiable, puisque tu initialise ta map storage en fonction du monde et cette initialisation écrase le contenu de ta variable si c’est la première fois que tu charge ton WorldSavedData ou laisse une mauvaise référence dans ta variable dans le cas contraire. Supprime ta variable instance, et n’utilise que ta fonction load pour récupérer ton WorldSavedData.
  • Texture block inventaire

    Résolu 1.8
    14
    0 Votes
    14 Messages
    3k Vues
    GabsG
    @‘robin4002’: [18:38:02] [Client thread/ERROR] [FML]: Model definition for location csc:block_machinelaver#normal not found Regardes BlockPumpkin, la classe est extends BlockHorizontal (en tout cas en 1.10.2, c’est surement la même chose en 1.8). Dans BlockHorizontal  il y a une PropertyDirection “FACING” et dans BlockPumpkin il y a pas mal de fonction qui utilise cette propriété. Sans ça la direction ne peut pas fonctionner. Le json ne gère que la texture pas le reste. Ah ouais super merci robin ! Et dis moi tu serrais pas pour le block_sale ? Problème réglé j’ai refais le json et c’est bon merci !!
  • Rendu des pseudos des joueurs dans un rayon de bloc

    Résolu 1.8
    3
    0 Votes
    3 Messages
    990 Vues
    GabsG
    D’accord ok merci
  • Crash Serveur

    Résolu 1.8
    6
    0 Votes
    6 Messages
    1k Vues
    robin4002R
    Pourquoi tu envoie au serveur un paquet qui à pour action Minecraft.getMinecraft().displayGuiScreen(new menuF4()); ??? Minecraft.getMinecraft() n’existe pas côté serveur. Si tu veux ouvrir un gui lorsque tu appuies sur une touche, tu n’as même pas besoin de paquet.
  • Plusieurs questions

    Résolu 1.8
    11
    0 Votes
    11 Messages
    2k Vues
    GabsG
    @‘robin4002’: Non, ça ne risque pas de fonctionner … Pour savoir où le curseur pointe il faut faire un traceRay merci !