oui mais quand je vais compiler sa va compiler les 2 mod en 1 sauf que moi je veut 2 mod dans 2 workspace different
Best posts made by impuuu
Latest posts made by impuuu
-
RE: Plusieur mod en meme temp ?
-
Plusieur mod en meme temp ?
Bonjour/Bonsoir
Sa fait plusieur jour que je me pose la question est ce que ses possible de developper 2 mod en meme temps sans perdre le premier mod
je voudrait savoir si cela et possible si ou commentmerci d’avance
-
RE: Probleme texture Flans
Aidez moi se probléme et tres chiant et je n’arrive pas a le reglé
-
Probleme texture Flans
Bonjour j ai une probléme de texture sur les arme avec les source flans genre les texture d’arme sont totalement buggé
Erreur:
[20:28:57] [Client thread/INFO] [STDOUT]: [com.flansmod.common.FlansMod:log:549]: [Flan's Mod] Failed to add recipe for : dwCasualLegs [20:28:57] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: java.lang.NullPointerException [20:28:57] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.item.crafting.CraftingManager.addRecipe(CraftingManager.java:236) [20:28:57] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at cpw.mods.fml.common.registry.GameRegistry.addShapedRecipe(GameRegistry.java:250) [20:28:57] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at cpw.mods.fml.common.registry.GameRegistry.addRecipe(GameRegistry.java:245) [20:28:57] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at com.flansmod.common.types.InfoType.addRecipe(InfoType.java:245) [20:28:57] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at com.flansmod.common.types.InfoType.addRecipe(InfoType.java:157) [20:28:57] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at com.flansmod.common.FlansMod.init(FlansMod.java:223) [20:28:57] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [20:28:57] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) [20:28:57] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) [20:28:57] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at java.lang.reflect.Method.invoke(Unknown Source) [20:28:57] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:532) [20:28:57] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [20:28:57] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) [20:28:57] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) [20:28:57] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at java.lang.reflect.Method.invoke(Unknown Source) [20:28:57] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) [20:28:57] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) [20:28:57] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) [20:28:57] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) [20:28:57] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at com.google.common.eventbus.EventBus.post(EventBus.java:275) [20:28:57] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:212) [20:28:57] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:190) [20:28:57] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [20:28:57] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) [20:28:57] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) [20:28:57] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at java.lang.reflect.Method.invoke(Unknown Source) [20:28:57] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) [20:28:57] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) [20:28:57] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) [20:28:57] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) [20:28:57] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at com.google.common.eventbus.EventBus.post(EventBus.java:275) [20:28:57] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:119) [20:28:57] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at cpw.mods.fml.common.Loader.initializeMods(Loader.java:737) [20:28:57] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:311) [20:28:57] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.client.Minecraft.startGame(Minecraft.java:597) [20:28:57] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.client.Minecraft.run(Minecraft.java:942) [20:28:57] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.client.main.Main.main(Main.java:164) [20:28:57] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [20:28:57] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) [20:28:57] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) [20:28:57] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at java.lang.reflect.Method.invoke(Unknown Source) [20:28:57] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [20:28:57] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [20:28:57] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source) [20:28:57] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at GradleStart.main(Unknown Source)
erreur :
[20:41:27] [Server thread/INFO] [STDOUT]: [com.flansmod.common.FlansMod:log:549]: [Flan's Mod] Tried to add gl1 to player class CriminalDemolitions but the item did not exist [20:41:27] [Server thread/INFO] [STDOUT]: [com.flansmod.common.FlansMod:log:549]: [Flan's Mod] Tried to add m1887 to player class CriminalGunslinger but the item did not exist [20:41:27] [Server thread/INFO] [STDOUT]: [com.flansmod.common.FlansMod:log:549]: [Flan's Mod] Tried to add mwMedicBag to player class CriminalMedic but the item did not exist [20:41:27] [Server thread/INFO] [STDOUT]: [com.flansmod.common.FlansMod:log:549]: [Flan's Mod] Tried to add mwBinoculars to player class CriminalSniper but the item did not exist [20:41:27] [Server thread/INFO] [STDOUT]: [com.flansmod.common.FlansMod:log:549]: [Flan's Mod] Tried to add m4Carbine to player class gignAssault1 but the item did not exist [20:41:27] [Server thread/INFO] [STDOUT]: [com.flansmod.common.FlansMod:log:549]: [Flan's Mod] Tried to add mp5k to player class gignDualWield1 but the item did not exist [20:41:27] [Server thread/INFO] [STDOUT]: [com.flansmod.common.FlansMod:log:549]: [Flan's Mod] Tried to add mwBinoculars to player class gignSniper1 but the item did not exist [20:41:27] [Server thread/INFO] [STDOUT]: [com.flansmod.common.FlansMod:log:549]: [Flan's Mod] Tried to add mp5k+flanMWSilencer to player class gignSniper2 but the item did not exist [20:41:27] [Server thread/INFO] [STDOUT]: [com.flansmod.common.FlansMod:log:549]: [Flan's Mod] Tried to add mwBinoculars to player class kskSniper1 but the item did not exist [20:41:27] [Server thread/INFO] [STDOUT]: [com.flansmod.common.FlansMod:log:549]: [Flan's Mod] Tried to add mwBinoculars to player class marineSniper1 but the item did not exist [20:41:27] [Server thread/INFO] [STDOUT]: [com.flansmod.common.FlansMod:log:549]: [Flan's Mod] Tried to add gl6 to player class PETFumigator but the item did not exist [20:41:27] [Server thread/INFO] [STDOUT]: [com.flansmod.common.FlansMod:log:549]: [Flan's Mod] Tried to add mp5k to player class PETShield but the item did not exist [20:41:27] [Server thread/INFO] [STDOUT]: [com.flansmod.common.FlansMod:log:549]: [Flan's Mod] Tried to add mwBinoculars to player class PETSniper but the item did not exist [20:41:27] [Server thread/INFO] [STDOUT]: [com.flansmod.common.FlansMod:log:549]: [Flan's Mod] Tried to add mwBinoculars to player class sasSniper1 but the item did not exist [20:41:28] [Server thread/INFO] [STDOUT]: [com.flansmod.common.FlansMod:log:549]: [Flan's Mod] Tried to add mwBinoculars to player class spetsnazSniper1 but the item did not exist [20:41:28] [Server thread/INFO] [STDOUT]: [com.flansmod.common.FlansMod:log:549]: [Flan's Mod] Tried to add spas to player class SWATCombatMedic but the item did not exist [20:41:28] [Server thread/INFO] [STDOUT]: [com.flansmod.common.FlansMod:log:549]: [Flan's Mod] Tried to add gl6 to player class SWATFumigator but the item did not exist [20:41:28] [Server thread/INFO] [STDOUT]: [com.flansmod.common.FlansMod:log:549]: [Flan's Mod] Tried to add mwBinoculars to player class SWATSniper but the item did not exist [20:41:28] [Server thread/INFO] [FML]: Loading dimension -1 (New World) (net.minecraft.server.integrated.IntegratedServer@cc9fb2d) [20:41:28] [Server thread/INFO] [STDOUT]: [com.flansmod.common.FlansMod:log:549]: [Flan's Mod] Tried to add gl1 to player class CriminalDemolitions but the item did not exist [20:41:28] [Server thread/INFO] [STDOUT]: [com.flansmod.common.FlansMod:log:549]: [Flan's Mod] Tried to add m1887 to player class CriminalGunslinger but the item did not exist [20:41:28] [Server thread/INFO] [STDOUT]: [com.flansmod.common.FlansMod:log:549]: [Flan's Mod] Tried to add mwMedicBag to player class CriminalMedic but the item did not exist [20:41:28] [Server thread/INFO] [STDOUT]: [com.flansmod.common.FlansMod:log:549]: [Flan's Mod] Tried to add mwBinoculars to player class CriminalSniper but the item did not exist [20:41:28] [Server thread/INFO] [STDOUT]: [com.flansmod.common.FlansMod:log:549]: [Flan's Mod] Tried to add m4Carbine to player class gignAssault1 but the item did not exist [20:41:28] [Server thread/INFO] [STDOUT]: [com.flansmod.common.FlansMod:log:549]: [Flan's Mod] Tried to add mp5k to player class gignDualWield1 but the item did not exist [20:41:28] [Server thread/INFO] [STDOUT]: [com.flansmod.common.FlansMod:log:549]: [Flan's Mod] Tried to add mwBinoculars to player class gignSniper1 but the item did not exist [20:41:28] [Server thread/INFO] [STDOUT]: [com.flansmod.common.FlansMod:log:549]: [Flan's Mod] Tried to add mp5k+flanMWSilencer to player class gignSniper2 but the item did not exist [20:41:28] [Server thread/INFO] [STDOUT]: [com.flansmod.common.FlansMod:log:549]: [Flan's Mod] Tried to add mwBinoculars to player class kskSniper1 but the item did not exist [20:41:28] [Server thread/INFO] [STDOUT]: [com.flansmod.common.FlansMod:log:549]: [Flan's Mod] Tried to add mwBinoculars to player class marineSniper1 but the item did not exist [20:41:28] [Server thread/INFO] [STDOUT]: [com.flansmod.common.FlansMod:log:549]: [Flan's Mod] Tried to add gl6 to player class PETFumigator but the item did not exist [20:41:28] [Server thread/INFO] [STDOUT]: [com.flansmod.common.FlansMod:log:549]: [Flan's Mod] Tried to add mp5k to player class PETShield but the item did not exist [20:41:28] [Server thread/INFO] [STDOUT]: [com.flansmod.common.FlansMod:log:549]: [Flan's Mod] Tried to add mwBinoculars to player class PETSniper but the item did not exist [20:41:28] [Server thread/INFO] [STDOUT]: [com.flansmod.common.FlansMod:log:549]: [Flan's Mod] Tried to add mwBinoculars to player class sasSniper1 but the item did not exist [20:41:29] [Server thread/INFO] [STDOUT]: [com.flansmod.common.FlansMod:log:549]: [Flan's Mod] Tried to add mwBinoculars to player class spetsnazSniper1 but the item did not exist [20:41:29] [Server thread/INFO] [STDOUT]: [com.flansmod.common.FlansMod:log:549]: [Flan's Mod] Tried to add spas to player class SWATCombatMedic but the item did not exist [20:41:29] [Server thread/INFO] [STDOUT]: [com.flansmod.common.FlansMod:log:549]: [Flan's Mod] Tried to add gl6 to player class SWATFumigator but the item did not exist [20:41:29] [Server thread/INFO] [STDOUT]: [com.flansmod.common.FlansMod:log:549]: [Flan's Mod] Tried to add mwBinoculars to player class SWATSniper but the item did not exist [20:41:29] [Server thread/INFO] [STDOUT]: [com.flansmod.common.FlansMod:log:549]: [Flan's Mod] Tried to add gl1 to player class CriminalDemolitions but the item did not exist [20:41:29] [Server thread/INFO] [STDOUT]: [com.flansmod.common.FlansMod:log:549]: [Flan's Mod] Tried to add m1887 to player class CriminalGunslinger but the item did not exist [20:41:29] [Server thread/INFO] [STDOUT]: [com.flansmod.common.FlansMod:log:549]: [Flan's Mod] Tried to add mwMedicBag to player class CriminalMedic but the item did not exist [20:41:29] [Server thread/INFO] [STDOUT]: [com.flansmod.common.FlansMod:log:549]: [Flan's Mod] Tried to add mwBinoculars to player class CriminalSniper but the item did not exist [20:41:29] [Server thread/INFO] [STDOUT]: [com.flansmod.common.FlansMod:log:549]: [Flan's Mod] Tried to add m4Carbine to player class gignAssault1 but the item did not exist [20:41:29] [Server thread/INFO] [STDOUT]: [com.flansmod.common.FlansMod:log:549]: [Flan's Mod] Tried to add mp5k to player class gignDualWield1 but the item did not exist [20:41:29] [Server thread/INFO] [STDOUT]: [com.flansmod.common.FlansMod:log:549]: [Flan's Mod] Tried to add mwBinoculars to player class gignSniper1 but the item did not exist [20:41:29] [Server thread/INFO] [STDOUT]: [com.flansmod.common.FlansMod:log:549]: [Flan's Mod] Tried to add mp5k+flanMWSilencer to player class gignSniper2 but the item did not exist [20:41:29] [Server thread/INFO] [STDOUT]: [com.flansmod.common.FlansMod:log:549]: [Flan's Mod] Tried to add mwBinoculars to player class kskSniper1 but the item did not exist [20:41:29] [Server thread/INFO] [STDOUT]: [com.flansmod.common.FlansMod:log:549]: [Flan's Mod] Tried to add mwBinoculars to player class marineSniper1 but the item did not exist [20:41:29] [Server thread/INFO] [STDOUT]: [com.flansmod.common.FlansMod:log:549]: [Flan's Mod] Tried to add gl6 to player class PETFumigator but the item did not exist [20:41:29] [Server thread/INFO] [STDOUT]: [com.flansmod.common.FlansMod:log:549]: [Flan's Mod] Tried to add mp5k to player class PETShield but the item did not exist [20:41:29] [Server thread/INFO] [STDOUT]: [com.flansmod.common.FlansMod:log:549]: [Flan's Mod] Tried to add mwBinoculars to player class PETSniper but the item did not exist [20:41:29] [Server thread/INFO] [STDOUT]: [com.flansmod.common.FlansMod:log:549]: [Flan's Mod] Tried to add mwBinoculars to player class sasSniper1 but the item did not exist [20:41:29] [Server thread/INFO] [STDOUT]: [com.flansmod.common.FlansMod:log:549]: [Flan's Mod] Tried to add mwBinoculars to player class spetsnazSniper1 but the item did not exist [20:41:29] [Server thread/INFO] [STDOUT]: [com.flansmod.common.FlansMod:log:549]: [Flan's Mod] Tried to add spas to player class SWATCombatMedic but the item did not exist [20:41:29] [Server thread/INFO] [STDOUT]: [com.flansmod.common.FlansMod:log:549]: [Flan's Mod] Tried to add gl6 to player class SWATFumigator but the item did not exist [20:41:30] [Server thread/INFO] [STDOUT]: [com.flansmod.common.FlansMod:log:549]: [Flan's Mod] Tried to add mwBinoculars to player class SWATSniper but the item did not exist
code flans:
package com.flansmod.common; import java.io.BufferedReader; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException; import java.io.InputStreamReader; import java.lang.reflect.Method; import java.util.ArrayList; import java.util.List; import java.util.zip.ZipEntry; import java.util.zip.ZipFile; import java.util.zip.ZipInputStream; import net.minecraft.block.material.Material; import net.minecraft.command.CommandHandler; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.monster.EntitySkeleton; import net.minecraft.entity.monster.EntityZombie; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; import net.minecraftforge.common.ForgeChunkManager; import net.minecraftforge.common.config.Configuration; import net.minecraftforge.event.entity.item.ItemTossEvent; import net.minecraftforge.event.entity.living.LivingSpawnEvent; import net.minecraftforge.event.entity.player.PlayerDropsEvent; import cpw.mods.fml.client.event.ConfigChangedEvent; import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.EventHandler; import cpw.mods.fml.common.Mod.Instance; import cpw.mods.fml.common.SidedProxy; import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.event.FMLPostInitializationEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent; import cpw.mods.fml.common.event.FMLServerStartedEvent; import cpw.mods.fml.common.eventhandler.SubscribeEvent; import cpw.mods.fml.common.network.NetworkRegistry; import cpw.mods.fml.common.registry.EntityRegistry; import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.relauncher.Side; import com.flansmod.common.driveables.EntityPlane; import com.flansmod.common.driveables.EntitySeat; import com.flansmod.common.driveables.EntityVehicle; import com.flansmod.common.driveables.EntityWheel; import com.flansmod.common.driveables.ItemPlane; import com.flansmod.common.driveables.ItemVehicle; import com.flansmod.common.driveables.PlaneType; import com.flansmod.common.driveables.VehicleType; import com.flansmod.common.driveables.mechas.EntityMecha; import com.flansmod.common.driveables.mechas.ItemMecha; import com.flansmod.common.driveables.mechas.ItemMechaAddon; import com.flansmod.common.driveables.mechas.MechaItemType; import com.flansmod.common.driveables.mechas.MechaType; import com.flansmod.common.guns.AAGunType; import com.flansmod.common.guns.AttachmentType; import com.flansmod.common.guns.BulletType; import com.flansmod.common.guns.EntityAAGun; import com.flansmod.common.guns.EntityBullet; import com.flansmod.common.guns.EntityGrenade; import com.flansmod.common.guns.EntityMG; import com.flansmod.common.guns.GrenadeType; import com.flansmod.common.guns.GunType; import com.flansmod.common.guns.ItemAAGun; import com.flansmod.common.guns.ItemAttachment; import com.flansmod.common.guns.ItemBullet; import com.flansmod.common.guns.ItemGrenade; import com.flansmod.common.guns.ItemGun; import com.flansmod.common.guns.boxes.BlockGunBox; import com.flansmod.common.guns.boxes.GunBoxType; import com.flansmod.common.network.PacketHandler; import com.flansmod.common.parts.ItemPart; import com.flansmod.common.parts.PartType; import com.flansmod.common.teams.ArmourBoxType; import com.flansmod.common.teams.ArmourType; import com.flansmod.common.teams.BlockArmourBox; import com.flansmod.common.teams.BlockSpawner; import com.flansmod.common.teams.ChunkLoadingHandler; import com.flansmod.common.teams.CommandTeams; import com.flansmod.common.teams.EntityFlag; import com.flansmod.common.teams.EntityFlagpole; import com.flansmod.common.teams.EntityGunItem; import com.flansmod.common.teams.EntityTeamItem; import com.flansmod.common.teams.ItemFlagpole; import com.flansmod.common.teams.ItemOpStick; import com.flansmod.common.teams.ItemTeamArmour; import com.flansmod.common.teams.Team; import com.flansmod.common.teams.TeamsManager; import com.flansmod.common.teams.TileEntitySpawner; import com.flansmod.common.tools.EntityParachute; import com.flansmod.common.tools.ItemTool; import com.flansmod.common.tools.ToolType; import com.flansmod.common.types.EnumType; import com.flansmod.common.types.InfoType; import com.flansmod.common.types.TypeFile; import com.flansmod.common.eventhandlers.PlayerDeathEventListener; @Mod(modid = FlansMod.MODID, name = "Flan's Mod", version = FlansMod.VERSION, acceptableRemoteVersions = "@ALLOWEDVERSIONS@", guiFactory = "com.flansmod.client.gui.config.ModGuiFactory") public class FlansMod { //Core mod stuff public static boolean DEBUG = false; public static Configuration configFile; public static final String MODID = "flansmod"; public static final String VERSION = "@VERSION@"; @Instance(MODID) public static FlansMod INSTANCE; public static int generalConfigInteger = 32; public static String generalConfigString = "Hello!"; public static boolean addGunpowderRecipe = true; public static int teamsConfigInteger = 32; public static String teamsConfigString = "Hello!"; public static boolean teamsConfigBoolean = false; @SidedProxy(clientSide = "com.flansmod.client.ClientProxy", serverSide = "com.flansmod.common.CommonProxy") public static CommonProxy proxy; //A standardised ticker for all bits of the mod to call upon if they need one public static int ticker = 0; public static long lastTime; public static File flanDir; public static final float soundRange = 50F; public static final float driveableUpdateRange = 200F; public static final int numPlayerSnapshots = 20; public static float armourSpawnRate = 0.25F; /** The spectator team. Moved here to avoid a concurrent modification error */ public static Team spectators = new Team("spectators", "Spectators", 0x404040, '7'); //Handlers public static final PacketHandler packetHandler = new PacketHandler(); public static final PlayerHandler playerHandler = new PlayerHandler(); public static final TeamsManager teamsManager = new TeamsManager(); public static final CommonTickHandler tickHandler = new CommonTickHandler(); public static FlansHooks hooks = new FlansHooks(); //Items and creative tabs public static BlockFlansWorkbench workbench; public static BlockSpawner spawner; public static ItemOpStick opStick; public static ItemFlagpole flag; public static ArrayList <blockgunbox>gunBoxBlocks = new ArrayList<blockgunbox>(); public static ArrayList <itembullet>bulletItems = new ArrayList<itembullet>(); public static ArrayList <itemgun>gunItems = new ArrayList<itemgun>(); public static ArrayList <itemattachment>attachmentItems = new ArrayList<itemattachment>(); public static ArrayList <itempart>partItems = new ArrayList<itempart>(); public static ArrayList <itemplane>planeItems = new ArrayList<itemplane>(); public static ArrayList <itemvehicle>vehicleItems = new ArrayList<itemvehicle>(); public static ArrayList <itemmechaaddon>mechaToolItems = new ArrayList<itemmechaaddon>(); public static ArrayList <itemmecha>mechaItems = new ArrayList<itemmecha>(); public static ArrayList <itemaagun>aaGunItems = new ArrayList<itemaagun>(); public static ArrayList <itemgrenade>grenadeItems = new ArrayList<itemgrenade>(); public static ArrayList <itemtool>toolItems = new ArrayList<itemtool>(); public static ArrayList <itemteamarmour>armourItems = new ArrayList<itemteamarmour>(); public static ArrayList <blockarmourbox>armourBoxBlocks = new ArrayList<blockarmourbox>(); public static CreativeTabFlan tabFlanGuns = new CreativeTabFlan(0), tabFlanDriveables = new CreativeTabFlan(1), tabFlanParts = new CreativeTabFlan(2), tabFlanTeams = new CreativeTabFlan(3), tabFlanMechas = new CreativeTabFlan(4); /** The mod pre-initialiser method */ @EventHandler public void preInit(FMLPreInitializationEvent event) { log("Preinitialising Flan's mod."); configFile = new Configuration(event.getSuggestedConfigurationFile()); syncConfig(); //TODO : Load properties //configuration = new Configuration(event.getSuggestedConfigurationFile()); //loadProperties(); flanDir = new File(event.getModConfigurationDirectory().getParentFile(), "/Flan/"); if (!flanDir.exists()) { log("Flan folder not found. Creating empty folder."); log("You should get some content packs and put them in the Flan folder."); flanDir.mkdirs(); flanDir.mkdir(); } //Set up mod blocks and items workbench = (BlockFlansWorkbench)(new BlockFlansWorkbench(1, 0).setBlockName("flansWorkbench").setBlockTextureName("flansWorkbench")); GameRegistry.registerBlock(workbench, ItemBlockManyNames.class, "flansWorkbench"); GameRegistry.addRecipe(new ItemStack(workbench, 1, 0), "BBB", "III", "III", 'B', Items.bowl, 'I', Items.iron_ingot ); GameRegistry.addRecipe(new ItemStack(workbench, 1, 1), "ICI", "III", 'C', Items.cauldron, 'I', Items.iron_ingot ); opStick = new ItemOpStick(); GameRegistry.registerItem(opStick, "opStick", MODID); flag = (ItemFlagpole)(new ItemFlagpole().setUnlocalizedName("flagpole")); GameRegistry.registerItem(flag, "flagpole", MODID); spawner = (BlockSpawner)(new BlockSpawner(Material.iron).setBlockName("teamsSpawner").setBlockUnbreakable().setResistance(1000000F)); GameRegistry.registerBlock(spawner, ItemBlockManyNames.class, "teamsSpawner"); GameRegistry.registerTileEntity(TileEntitySpawner.class, "teamsSpawner"); proxy.registerRenderers(); //Read content packs readContentPacks(event); //Do proxy loading proxy.load(); //Force Minecraft to reload all resources in order to load content pack resources. proxy.forceReload(); log("Preinitializing complete."); } /** The mod initialiser method */ @EventHandler public void init(FMLInitializationEvent event) { log("Initialising Flan's Mod."); //Initialising handlers packetHandler.initialise(); NetworkRegistry.INSTANCE.registerGuiHandler(this, new CommonGuiHandler()); // Recipes for (InfoType type : InfoType.infoTypes) { type.addRecipe(); } if(addGunpowderRecipe) { ItemStack charcoal = new ItemStack(Items.coal, 1, 1); GameRegistry.addShapelessRecipe(new ItemStack(Items.gunpowder), charcoal, charcoal, charcoal, new ItemStack(Items.glowstone_dust)); } log("Loaded recipes."); //Register teams mod entities EntityRegistry.registerGlobalEntityID(EntityFlagpole.class, "Flagpole", EntityRegistry.findGlobalUniqueEntityId()); EntityRegistry.registerModEntity(EntityFlagpole.class, "Flagpole", 93, this, 40, 5, true); EntityRegistry.registerGlobalEntityID(EntityFlag.class, "Flag", EntityRegistry.findGlobalUniqueEntityId()); EntityRegistry.registerModEntity(EntityFlag.class, "Flag", 94, this, 40, 5, true); EntityRegistry.registerGlobalEntityID(EntityTeamItem.class, "TeamsItem", EntityRegistry.findGlobalUniqueEntityId()); EntityRegistry.registerModEntity(EntityTeamItem.class, "TeamsItem", 97, this, 100, 10000, true); EntityRegistry.registerGlobalEntityID(EntityGunItem.class, "GunItem", EntityRegistry.findGlobalUniqueEntityId()); EntityRegistry.registerModEntity(EntityGunItem.class, "GunItem", 98, this, 100, 20, true); //Register driveables EntityRegistry.registerGlobalEntityID(EntityPlane.class, "Plane", EntityRegistry.findGlobalUniqueEntityId()); EntityRegistry.registerModEntity(EntityPlane.class, "Plane", 90, this, 250, 3, false); EntityRegistry.registerGlobalEntityID(EntityVehicle.class, "Vehicle", EntityRegistry.findGlobalUniqueEntityId()); EntityRegistry.registerModEntity(EntityVehicle.class, "Vehicle", 95, this, 250, 10, false); EntityRegistry.registerGlobalEntityID(EntitySeat.class, "Seat", EntityRegistry.findGlobalUniqueEntityId()); EntityRegistry.registerModEntity(EntitySeat.class, "Seat", 99, this, 250, 20, false); EntityRegistry.registerGlobalEntityID(EntityWheel.class, "Wheel", EntityRegistry.findGlobalUniqueEntityId()); EntityRegistry.registerModEntity(EntityWheel.class, "Wheel", 103, this, 250, 20, false); EntityRegistry.registerGlobalEntityID(EntityParachute.class, "Parachute", EntityRegistry.findGlobalUniqueEntityId()); EntityRegistry.registerModEntity(EntityParachute.class, "Parachute", 101, this, 40, 20, false); EntityRegistry.registerGlobalEntityID(EntityMecha.class, "Mecha", EntityRegistry.findGlobalUniqueEntityId()); EntityRegistry.registerModEntity(EntityMecha.class, "Mecha", 102, this, 250, 20, false); //Register bullets and grenades //EntityRegistry.registerGlobalEntityID(EntityBullet.class, "Bullet", EntityRegistry.findGlobalUniqueEntityId()); EntityRegistry.registerModEntity(EntityBullet.class, "Bullet", 96, this, 40, 100, false); EntityRegistry.registerGlobalEntityID(EntityGrenade.class, "Grenade", EntityRegistry.findGlobalUniqueEntityId()); EntityRegistry.registerModEntity(EntityGrenade.class, "Grenade", 100, this, 40, 100, true); //Register MGs and AA guns EntityRegistry.registerGlobalEntityID(EntityMG.class, "MG", EntityRegistry.findGlobalUniqueEntityId()); EntityRegistry.registerModEntity(EntityMG.class, "MG", 91, this, 40, 5, true); EntityRegistry.registerGlobalEntityID(EntityAAGun.class, "AAGun", EntityRegistry.findGlobalUniqueEntityId()); EntityRegistry.registerModEntity(EntityAAGun.class, "AAGun", 92, this, 40, 500, false); //Register the chunk loader //TODO : Re-do chunk loading ForgeChunkManager.setForcedChunkLoadingCallback(this, new ChunkLoadingHandler()); //Config FMLCommonHandler.instance().bus().register(INSTANCE); //Starting the EventListener new PlayerDeathEventListener(); log("Loading complete."); } /** The mod post-initialisation method */ @EventHandler public void postInit(FMLPostInitializationEvent event) { packetHandler.postInitialise(); hooks.hook(); /* TODO : ICBM isICBMSentryLoaded = Loader.instance().isModLoaded("ICBM|Sentry"); log("ICBM hooking complete."); */ } @SubscribeEvent public void playerDrops(PlayerDropsEvent event) { for(int i = event.drops.size() - 1; i >= 0; i–) { EntityItem ent = event.drops.get(i); InfoType type = InfoType.getType(ent.getEntityItem()); if(type != null && !type.canDrop) event.drops.remove(i); } } @SubscribeEvent public void playerDrops(ItemTossEvent event) { InfoType type = InfoType.getType(event.entityItem.getEntityItem()); if(type != null && !type.canDrop) event.setCanceled(true); } /** Teams command register method */ @EventHandler public void registerCommand(FMLServerStartedEvent e) { CommandHandler handler = ((CommandHandler)FMLCommonHandler.instance().getSidedDelegate().getServer().getCommandManager()); handler.registerCommand(new CommandTeams()); } @SubscribeEvent public void onConfigChanged(ConfigChangedEvent.OnConfigChangedEvent eventArgs) { if(eventArgs.modID.equals(MODID)) syncConfig(); } @SubscribeEvent public void onLivingSpecialSpawn(LivingSpawnEvent.CheckSpawn event) { double chance = event.world.rand.nextDouble(); if(chance < armourSpawnRate && event.entityLiving instanceof EntityZombie || event.entityLiving instanceof EntitySkeleton) { if(event.world.rand.nextBoolean() && ArmourType.armours.size() > 0) { //Give a completely random piece of armour ArmourType armour = ArmourType.armours.get(event.world.rand.nextInt(ArmourType.armours.size())); if(armour != null && armour.type != 2) event.entityLiving.setCurrentItemOrArmor(armour.type + 1, new ItemStack(armour.item)); } else if(Team.teams.size() > 0) { //Give a random set of armour Team team = Team.teams.get(event.world.rand.nextInt(Team.teams.size())); if(team.hat != null) event.entityLiving.setCurrentItemOrArmor(1, team.hat.copy()); if(team.chest != null) event.entityLiving.setCurrentItemOrArmor(2, team.chest.copy()); //if(team.legs != null) // event.entityLiving.setCurrentItemOrArmor(3, team.legs.copy()); if(team.shoes != null) event.entityLiving.setCurrentItemOrArmor(4, team.shoes.copy()); } } } /** Reads type files from all content packs */ private void getTypeFiles(List <file>contentPacks) { for (File contentPack : contentPacks) { if(contentPack.isDirectory()) { for(EnumType typeToCheckFor : EnumType.values()) { File typesDir = new File(contentPack, "/" + typeToCheckFor.folderName + "/"); if(!typesDir.exists()) continue; for(File file : typesDir.listFiles()) { try { BufferedReader reader = new BufferedReader(new FileReader(file)); String[] splitName = file.getName().split("/"); TypeFile typeFile = new TypeFile(typeToCheckFor, splitName[splitName.length - 1].split("\\.")[0]); for(;;) { String line = null; try { line = reader.readLine(); } catch (Exception e) { break; } if (line == null) break; typeFile.lines.add(line); } reader.close(); } catch(FileNotFoundException e) { e.printStackTrace(); } catch(IOException e) { e.printStackTrace(); } } } } else { try { ZipFile zip = new ZipFile(contentPack); ZipInputStream zipStream = new ZipInputStream(new FileInputStream(contentPack)); BufferedReader reader = new BufferedReader(new InputStreamReader(zipStream)); ZipEntry zipEntry = zipStream.getNextEntry(); do { zipEntry = zipStream.getNextEntry(); if(zipEntry == null) continue; TypeFile typeFile = null; for(EnumType type : EnumType.values()) { if(zipEntry.getName().startsWith(type.folderName + "/") && zipEntry.getName().split(type.folderName + "/").length > 1 && zipEntry.getName().split(type.folderName + "/")[1].length() > 0) { String[] splitName = zipEntry.getName().split("/"); typeFile = new TypeFile(type, splitName[splitName.length - 1].split("\\.")[0]); } } if(typeFile == null) { continue; } for(;;) { String line = null; try { line = reader.readLine(); } catch (Exception e) { break; } if (line == null) break; typeFile.lines.add(line); } } while(zipEntry != null); reader.close(); zip.close(); zipStream.close(); } catch(IOException e) { e.printStackTrace(); } } } } /** Content pack reader method */ private void readContentPacks(FMLPreInitializationEvent event) { // Icons, Skins, Models // Get the classloader in order to load the images ClassLoader classloader = (net.minecraft.server.MinecraftServer.class).getClassLoader(); Method method = null; try { method = (java.net.URLClassLoader.class).getDeclaredMethod("addURL", java.net.URL.class); method.setAccessible(true); } catch (Exception e) { log("Failed to get class loader. All content loading will now fail."); e.printStackTrace(); } List <file>contentPacks = proxy.getContentList(method, classloader); if (!event.getSide().equals(Side.CLIENT)) { //Gametypes (Server only) // TODO: gametype loader } getTypeFiles(contentPacks); for(EnumType type : EnumType.values()) { Class typeClass = type.getTypeClass(); for(TypeFile typeFile : TypeFile.files.get(type)) { try { InfoType infoType = (typeClass.getConstructor(TypeFile.class).newInstance(typeFile)); infoType.read(typeFile); switch(type) { case bullet : bulletItems.add((ItemBullet)new ItemBullet((BulletType)infoType).setUnlocalizedName(infoType.shortName)); break; case attachment : attachmentItems.add((ItemAttachment)new ItemAttachment((AttachmentType)infoType).setUnlocalizedName(infoType.shortName)); break; case gun : gunItems.add((ItemGun)new ItemGun((GunType)infoType).setUnlocalizedName(infoType.shortName)); break; case grenade : grenadeItems.add((ItemGrenade)new ItemGrenade((GrenadeType)infoType).setUnlocalizedName(infoType.shortName)); break; case part : partItems.add((ItemPart)new ItemPart((PartType)infoType).setUnlocalizedName(infoType.shortName)); break; case plane : planeItems.add((ItemPlane)new ItemPlane((PlaneType)infoType).setUnlocalizedName(infoType.shortName)); break; case vehicle : vehicleItems.add((ItemVehicle)new ItemVehicle((VehicleType)infoType).setUnlocalizedName(infoType.shortName)); break; case aa : aaGunItems.add((ItemAAGun)new ItemAAGun((AAGunType)infoType).setUnlocalizedName(infoType.shortName)); break; case mechaItem : mechaToolItems.add((ItemMechaAddon)new ItemMechaAddon((MechaItemType)infoType).setUnlocalizedName(infoType.shortName)); break; case mecha : mechaItems.add((ItemMecha)new ItemMecha((MechaType)infoType).setUnlocalizedName(infoType.shortName)); break; case tool : toolItems.add((ItemTool)new ItemTool((ToolType)infoType).setUnlocalizedName(infoType.shortName)); break; case box : gunBoxBlocks.add((BlockGunBox)new BlockGunBox((GunBoxType)infoType).setBlockName(infoType.shortName)); break; case armour : armourItems.add((ItemTeamArmour)new ItemTeamArmour((ArmourType)infoType).setUnlocalizedName(infoType.shortName)); break; case armourBox : armourBoxBlocks.add((BlockArmourBox)new BlockArmourBox((ArmourBoxType)infoType).setBlockName(infoType.shortName)); break; case playerClass : break; case team : break; default : log("Unrecognised type for " + infoType.shortName); break; } } catch(Exception e) { log("Failed to add " + type.name() + " : " + typeFile.name); e.printStackTrace(); } } log("Loaded " + type.name() + "."); } Team.spectators = spectators; } public static PacketHandler getPacketHandler() { return INSTANCE.packetHandler; } public static void syncConfig() { //generalConfigInteger = configFile.getInt("Config Integer", Configuration.CATEGORY_GENERAL, generalConfigInteger, 0, Integer.MAX_VALUE, "An Integer!"); //generalConfigString = configFile.getString("Config String", Configuration.CATEGORY_GENERAL, generalConfigString, "A String!"); addGunpowderRecipe = configFile.getBoolean("Gunpowder Recipe", Configuration.CATEGORY_GENERAL, addGunpowderRecipe, "Whether or not to add the extra gunpowder recipe (3 charcoal + 1 lightstone)"); //teamsConfigInteger = configFile.getInt("Config Integer", Configuration.CATEGORY_GENERAL, teamsConfigInteger, 0, Integer.MAX_VALUE, "An Integer!"); //teamsConfigString = configFile.getString("Config String", Configuration.CATEGORY_GENERAL, teamsConfigString, "A String!"); //teamsConfigBoolean = configFile.getBoolean("Config Boolean", Configuration.CATEGORY_GENERAL, teamsConfigBoolean, "A Boolean!"); if(configFile.hasChanged()) configFile.save(); } //TODO : Proper logger public static void log(String string) { System.out.println("[Flan's Mod] " + string); } } ```</file></file></blockarmourbox></blockarmourbox></itemteamarmour></itemteamarmour></itemtool></itemtool></itemgrenade></itemgrenade></itemaagun></itemaagun></itemmecha></itemmecha></itemmechaaddon></itemmechaaddon></itemvehicle></itemvehicle></itemplane></itemplane></itempart></itempart></itemattachment></itemattachment></itemgun></itemgun></itembullet></itembullet></blockgunbox></blockgunbox>
-
RE: Crach ThirstMod
ok je te donne sa tout de suite
import java.io.BufferedReader; import java.io.File; import java.io.FileReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.Enumeration; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.zip.ZipEntry; import java.util.zip.ZipFile; import com.thetorine.thirstmod.core.content.ItemDrink; import com.thetorine.thirstmod.core.content.blocks.DBRecipes; import com.thetorine.thirstmod.core.main.ThirstMod; import cpw.mods.fml.common.registry.GameData; import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.common.registry.LanguageRegistry; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; public class ContentLoader { public List <string>categories = new ArrayList<string>(); public Map<string, arraylist<templatemodifier="">> templateLoad = new HashMap<string, arraylist<templatemodifier="">>(); public Map<integer, arraylist<drinkmodifier="">> drinkLoad = new HashMap<integer, arraylist<drinkmodifier="">>(); public HashMap <string, string="">languageTable = new HashMap<string, string="">(); public List <file>filesToLoad = new ArrayList<file>(); public String split; public ContentLoader() { try { parseTemplate(); } catch (IOException e) { e.printStackTrace(); } } public void parseTemplate() throws IOException { BufferedReader reader = new BufferedReader(new InputStreamReader(ContentLoader.class.getResourceAsStream("/assets/thirstmod/content/template.txt"))); List <string>elements = new ArrayList<string>(); while(reader.ready()) { elements.add(reader.readLine()); } String prevCategory = ""; for(String s : elements) { if(s.startsWith(" ")) { String[] modifers = s.replaceFirst(" ", "").split(" "); TemplateModifier c = new TemplateModifier(modifers[0], modifers[1]); addValues(prevCategory, c, 0); } else if(!s.contains("//")) { prevCategory = s; if(s.contains("split")) { split = s.split(" ", 2)[1]; } } } reader.close(); loadDrinks(new File(ThirstMod.getMinecraftDir(), "/thirstmod/content/")); } public void loadDrinks(File dir) { int i = 0; if(!dir.exists()) { dir.mkdirs(); return; } findFiles(dir); for(File f : filesToLoad) { try { if(f.getName().endsWith(".txt")) { parseDrink(new BufferedReader(new FileReader(f)), i); i++; } else if(f.getName().endsWith(".zip")) { i = readZip(f, i); } } catch (Exception e) { e.printStackTrace(); } } addDrinks(); } public void findFiles(File root) { File[] files = root.listFiles(); if(files != null) { for (File file : files) { if (file.isFile()) { if(file.getName().endsWith(".txt") || file.getName().endsWith(".zip")) { filesToLoad.add(file); } } else if (file.isDirectory()) { findFiles(file); } } } } public void parseDrink(BufferedReader reader, int currentLoad) throws IOException { List <string>elements = new ArrayList<string>(); while(reader.ready()) { elements.add(reader.readLine()); } String prevCategory = ""; for(String s : elements) { if(s.startsWith(" ")) { String[] modifers = s.replaceFirst(" ", "").split(split, 2); for(TemplateModifier c: templateLoad.get(prevCategory)) { if(c.modifier.equals(modifers[0])) { DrinkModifier m = new DrinkModifier(modifers[0], parseValue(modifers[1], c.datatype)); addValues(currentLoad, m, 1); } } } else { prevCategory = s; if(!categories.contains(s)) { categories.add(s); } } } reader.close(); } public int readZip(File zip, int i) throws IOException { int load = i; ZipFile zf = new ZipFile(zip); Enumeration entries = zf.entries(); while(entries.hasMoreElements()) { ZipEntry entry = entries.nextElement(); if(entry.getName().endsWith(".txt") && !entry.getName().contains("__MACOSX/._")) { BufferedReader reader = new BufferedReader(new InputStreamReader(zf.getInputStream(entry))); parseDrink(reader, load); reader.close(); load++; } } zf.close(); return load; } public void addDrinks() { for(int i = 0; i < drinkLoad.size(); i++) { String name = "", shortname = "", item = ""; int color = 0, stacksize = 0, bar_heal = 0, bar_heal_hunger = 0, potionID = 0, duration = 0, itemMetadata = 0; float sat_thirst = 0, sat_hunger = 0, poisonChance = 0; boolean hasEffect = false, potion_cure = false, alwaysDrinkable = false; for(DrinkModifier dm : drinkLoad.get(i)) { if(dm.modifier.equals("name")) name = (String) dm.value; if(dm.modifier.equals("internal_name")) shortname = (String) dm.value; if(dm.modifier.equals("item")) item = (String) dm.value; if(dm.modifier.equals("item_mod_id")) item = ((String) dm.value) + ":" + item; if(dm.modifier.equals("item_metadata")) itemMetadata = (Integer) dm.value; if(dm.modifier.equals("colour")) color = (Integer) dm.value; if(dm.modifier.equals("stacksize")) stacksize = (Integer) dm.value; if(dm.modifier.equals("bar_heal")) bar_heal = (Integer) dm.value; if(dm.modifier.equals("bar_heal_hunger")) bar_heal_hunger = (Integer) dm.value; if(dm.modifier.equals("id")) potionID = (Integer) dm.value; if(dm.modifier.equals("duration")) duration = (Integer) dm.value; if(dm.modifier.equals("saturation_heal")) sat_thirst = (Float) dm.value; if(dm.modifier.equals("saturation_heal_hunger")) sat_hunger = (Float) dm.value; if(dm.modifier.equals("poisonChance")) poisonChance = (Float) dm.value; if(dm.modifier.equals("effect")) hasEffect = (Boolean) dm.value; if(dm.modifier.equals("potion_cure")) potion_cure = (Boolean) dm.value; if(dm.modifier.equals("always_drinkable")) alwaysDrinkable = (Boolean) dm.value; } ItemDrink loadedDrink = new ItemDrink(bar_heal, sat_thirst, color, stacksize, hasEffect, alwaysDrinkable, shortname) .healFood(bar_heal_hunger, sat_hunger).setPoisoningChance(poisonChance) .setPotionEffect(potionID, duration).setCuresPotions(potion_cure); if(shortname.length() > 0) { Item recipeItem = GameData.getItemRegistry().getObject(item); if(recipeItem != null) { loadedDrink.setRecipeItem(recipeItem); GameRegistry.registerItem(loadedDrink, shortname); DrinkLists.addDrink(new ItemStack(loadedDrink), bar_heal, sat_thirst); ItemStack tempRecipeStack = new ItemStack(recipeItem, 0, itemMetadata); DBRecipes.instance().addRecipe(tempRecipeStack.getUnlocalizedName(), itemMetadata, new ItemStack(loadedDrink)); languageTable.put(String.format("item.%s.name", shortname), name); } else { ThirstMod.print( "Content Loader: Unable to aquire recipe for item id: " + item + "/n Item not added: " + name); } } } injectLanguage(); } @SuppressWarnings({ "unchecked", "rawtypes" }) private void addValues(Object key, Object value, int map) { ArrayList tempList = null; switch(map) { case 0: { if (templateLoad.containsKey(key)) { tempList = templateLoad.get(key); if (tempList == null) tempList = new ArrayList<templatemodifier>(); tempList.add(value); } else { tempList = new ArrayList<templatemodifier>(); tempList.add(value); } templateLoad.put((String) key, tempList); break; } case 1: { if (drinkLoad.containsKey(key)) { tempList = drinkLoad.get(key); if (tempList == null) tempList = new ArrayList<templatemodifier>(); tempList.add(value); } else { tempList = new ArrayList<templatemodifier>(); tempList.add(value); } drinkLoad.put((Integer) key, tempList); break; } } } private Object parseValue(String s, String datatype) { if(datatype.equals("string")) { return s; } else if(datatype.equals("integer")) { return Integer.parseInt(s); } else if(datatype.equals("float")) { return Float.parseFloat(s); } else if(datatype.equals("boolean")) { return Boolean.parseBoolean(s); } else if(datatype.equals("hex")) { return Integer.parseInt(s, 16); } return null; } public void injectLanguage() { if(languageTable.size() <= 0) return; LanguageRegistry.instance().injectLanguage("en_US", languageTable); } private static class TemplateModifier { public String modifier; public String datatype; public TemplateModifier(String s, String s1) { this.modifier = s; this.datatype = s1; } } private static class DrinkModifier { public String modifier; public Object value; public DrinkModifier(String modifier, Object value) { this.modifier = modifier; this.value = value; } } } ```</templatemodifier></templatemodifier></templatemodifier></templatemodifier></string></string></string></string></file></file></string,></string,></integer,></integer,></string,></string,></string></string>
-
Crach ThirstMod
Bonjour/Bonsoir
j ai installé les source du thirstmod dans mon mod mais quand je tente de lancer le minecraft de dev le jeu crachErreur :
at java.io.Reader.<init>(Unknown Source) at java.io.InputStreamReader.<init>(Unknown Source) at com.thetorine.thirstmod.core.content.packs.ContentLoader.parseTemplate(ContentLoader.java:43) at com.thetorine.thirstmod.core.content.packs.ContentLoader.<init>(ContentLoader.java:36) at com.thetorine.thirstmod.core.main.ThirstMod.loadMain(ThirstMod.java:60) at com.thetorine.thirstmod.core.main.ThirstMod.preInit(ThirstMod.java:41) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:532) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) at com.google.common.eventbus.EventBus.post(EventBus.java:275) at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:212) at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:190) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) at com.google.common.eventbus.EventBus.post(EventBus.java:275) at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:119) at cpw.mods.fml.common.Loader.preinitializeMods(Loader.java:556) at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:243) at net.minecraft.client.Minecraft.startGame(Minecraft.java:522)
le code de la classe thirstMod
package com.thetorine.thirstmod.core.main; import java.io.File; import java.lang.reflect.Field; import com.thetorine.thirstmod.core.content.BlockLoader; import com.thetorine.thirstmod.core.content.ItemLoader; import com.thetorine.thirstmod.core.content.packs.ContentLoader; import com.thetorine.thirstmod.core.content.packs.DrinkRegistry; import com.thetorine.thirstmod.core.network.*; import com.thetorine.thirstmod.core.player.PlayerContainer; import com.thetorine.thirstmod.core.utils.Config; import com.thetorine.thirstmod.core.utils.Constants; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.EventHandler; import cpw.mods.fml.common.Mod.Instance; import cpw.mods.fml.common.event.*; import cpw.mods.fml.common.network.*; import cpw.mods.fml.common.*; import cpw.mods.fml.relauncher.Side; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; import net.minecraftforge.common.*; @Mod(modid = Constants.MODID, version = Constants.VERSION, name = Constants.NAME) public class ThirstMod { @Instance(Constants.MODID) public static ThirstMod instance; public static EventSystem eventHook = new EventSystem(); public static Config config = new Config(); @SidedProxy(clientSide = Constants.PACKAGE + ".core.client.ClientProxy", serverSide = Constants.PACKAGE + ".core.main.CommonProxy") public static CommonProxy commonProxy; @EventHandler public void preInit(FMLPreInitializationEvent event) { FMLCommonHandler.instance().bus().register(eventHook); MinecraftForge.EVENT_BUS.register(eventHook); NetworkRegistry.INSTANCE.registerGuiHandler(this, eventHook); loadMain(); } @EventHandler public void postInit(FMLPostInitializationEvent event) { new DrinkRegistry(); } @EventHandler public void serverClosed(FMLServerStoppedEvent event) { if(FMLCommonHandler.instance().getEffectiveSide() == Side.CLIENT) { PlayerContainer.ALL_PLAYERS.clear(); } } public void loadMain() { new NetworkHandler(); new BlockLoader(); new ItemLoader(); new ContentLoader(); } public static String getMinecraftDir() { try { Field mcDataDir = Loader.class.getDeclaredField("minecraftDir"); if(mcDataDir != null) { mcDataDir.setAccessible(true); return ((File)mcDataDir.get(null)).getAbsolutePath(); } throw new Exception(); } catch(Exception e) { print("Unable to retrieve Minecraft Directory."); return null; } } public static void print(String s) { System.out.println("[ThirstMod] " + s); } public static CreativeTabs thirstCreativeTab = new CreativeTabs("drinks") { @Override public Item getTabIconItem() { return ItemLoader.chocolateMilk; } }; } ```</init></init></init>
-
RE: Probléme avec le Minecraft
Sinon tu a quelque chose pour remplacer les ligne de code ?
-
RE: Probléme avec le Minecraft
je suis en 1.7.10 mais je remplace ces ligne de code par quoi ou sinon avez-vous les dimensions du logo minecraft ? il vous plait ? o
-
RE: Probléme avec le Minecraft
En faite je voudrait changer le logo minecraft par le drawlife que vous pouvez voir sur le screenshot mais bon sur le screen vous montre le probleme que sa me donne et excusé moi pour les balise et le mauvais placement du sujet