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>