Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Pour traduire des choses etc
- 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("[Thirst mod] " + s);
- }
- public static CreativeTabs thirstCreativeTab = new CreativeTabs("drinks") {
- @Override
- public Item getTabIconItem() {
- return ItemLoader.chocolateMilk;
- }
- };
- }
- 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<? extends InfoType> 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);
- }
- }
- package com.carpentersblocks;
- import net.minecraft.creativetab.CreativeTabs;
- import net.minecraftforge.common.config.Configuration;
- import com.carpentersblocks.proxy.CommonProxy;
- import com.carpentersblocks.util.CarpentersBlocksTab;
- 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.FMLPreInitializationEvent;
- import cpw.mods.fml.common.network.FMLEventChannel;
- import cpw.mods.fml.common.network.NetworkRegistry;
- @Mod(
- modid = CarpentersBlocks.MODID,
- name = "Carpenter's Blocks",
- version = CarpentersBlocks.VERSION,
- dependencies = "required-after:Forge@[10.13.0.1180,)"
- )
- public class CarpentersBlocks {
- public static final String MODID = "CarpentersBlocks";
- public static final String VERSION = "3.3.7";
- public static FMLEventChannel channel;
- public static CreativeTabs creativeTab = new CarpentersBlocksTab(MODID);
- @Instance(MODID)
- public static CarpentersBlocks instance;
- @SidedProxy(clientSide = "com.carpentersblocks.proxy.ClientProxy", serverSide = "com.carpentersblocks.proxy.CommonProxy")
- public static CommonProxy proxy;
- @EventHandler
- public void preInit(FMLPreInitializationEvent event)
- {
- channel = NetworkRegistry.INSTANCE.newEventDrivenChannel(MODID);
- Configuration config = new Configuration(event.getSuggestedConfigurationFile());
- config.load();
- proxy.preInit(event, config);
- if (config.hasChanged()) {
- config.save();
- }
- }
- @EventHandler
- public void init(FMLInitializationEvent event)
- {
- proxy.init(event);
- }
- }
- et mon mod :
- package fr.altiscraft.altiscraft.common;
- import net.minecraft.block.Block;
- import net.minecraft.block.material.Material;
- import net.minecraft.creativetab.CreativeTabs;
- import net.minecraft.item.Item;
- import net.minecraft.item.Item.ToolMaterial;
- import net.minecraft.item.ItemArmor.ArmorMaterial;
- import net.minecraft.item.ItemStack;
- import net.minecraft.potion.Potion;
- import net.minecraft.potion.PotionEffect;
- import net.minecraft.util.ResourceLocation;
- import net.minecraftforge.common.util.EnumHelper;
- 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.FMLPostInitializationEvent;
- import cpw.mods.fml.common.event.FMLPreInitializationEvent;
- import cpw.mods.fml.common.registry.EntityRegistry;
- import cpw.mods.fml.common.registry.GameRegistry;
- import fr.altiscraft.altiscraft.client.ModelBlockATM;
- import fr.altiscraft.altiscraft.client.ModelBlockCoco;
- import fr.altiscraft.altiscraft.client.ModelBlockLampadaire;
- import fr.altiscraft.altiscraft.client.ModelBlockVLampadaire;
- import fr.altiscraft.altiscraft.proxy.CommonProxy;
- @Mod(modid = "altiscraft.MODID", name = "AltisCraft.fr", version ="1.0.0")
- public class ModAltisCraft
- {
- public static final Block.SoundType soundTypeWood = new Block.SoundType("wood", 1.0F, 1.0F);
- public static final String MODID = "altiscraft";
- @Instance("altiscraft.MODID")
- public static ModAltisCraft instance;
- @SidedProxy(clientSide = "fr.altiscraft.altiscraft.proxy.ClientProxy", serverSide = "fr.altiscraft.altiscraft.proxy.CommonProxy")
- public static CommonProxy proxy;
- public static Item PorteHopital, itemDSable, Tortue, itemAltisCraft, itemAncienAltisCraft, itemRestaurant, secrets, Marteau, Coco, pioche, pelle, itemCuivre, itemCiseaux, itemFil, itemLSD, itemFLSD, itemLMeth, itemMeth, itemCannabis, itemCokaine0, itemCokaine1, itemCokaine2, itemMcDoV, itemMcDoR, Icentime, IIcentimes, Vcentimes, Xcentimes, XXcentimes, Lcentimes, Ieuro, IIeuros, Veuros, Xeuros, XXeuros, Leuros, Ceuros, Meuros, XMeuros, itemPeche, itemFCocaine, itemFCannabis, lunettesCivil, lunettesSoleilCivil, helmetRebelle, chestPlateRebelle, leggingsRebelle, bootsRebelle, helmetAdjoint, helmetBrigadier, chestPlateBrigadier, leggingsBrigadier, bootsBrigadier, helmetSergent, chestPlateSergent, leggingsSergent, bootsSergent, helmetAdjudant, chestPlateAdjudant, leggingsAdjudant, bootsAdjudant, helmetMajor, chestPlateMajor, leggingsMajor, bootsMajor, helmetAspirant, chestPlateAspirant, leggingsAspirant, bootsAspirant, helmetLieutenant, chestPlateLieutenant, leggingsLieutenant, bootsLieutenant, helmetCapitaine, chestPlateCapitaine, leggingsCapitaine, bootsCapitaine, helmetCommandant, chestPlateCommandant, leggingsCommandant, bootsCommandant, helmetColonel, chestPlateColonel, leggingsColonel, bootsColonel, helmetGeneral, chestPlateGeneral, leggingsGeneral, bootsGeneral, helmetCivil, chestPlateCivil, leggingsCivil, bootsCivil, CocaCola, CocaColaLight, CocaColaZero, CocaColaLife;
- public static Block BlocVLampadaire, SemiBrique, BlocLampadaire, PlastiqueRouge, PlastiqueBlanc, PlastiqueBleu, Cyan, Aluminium, PierreBlanc, PierreBlanche, BlanchePierre, PlancheMarron, Flesh, PlastiqueVert, PlastiqueFlashVert, FerGris, FerPeuGris, Rouge, Blanc, BlocCoco, BlocMetaData, Barriere, blockPeche, blockPomme, blockBrique, blocSemiBrique, blocGrisBrique, blockMcDoV, blockMcDoR, MineraisCuivre, MineraisMeth, CannabisPlante, CocainePlante, BlocATM, BlocRoute1, BlocRoute2, BlocATMTexture, BlocFerMarron, BlocPierreVert;
- public static ToolMaterial outils = EnumHelper.addToolMaterial("outils", 3, 1000, 1.0F, 1.0F, 30);
- public static CreativeTabs AltisCraft = new CreativeTabs("AltisCraft")
- {
- public Item getTabIconItem()
- {
- return ModAltisCraft.itemAltisCraft;
- }
- };
- public static ArmorMaterial lunettesSoleil = EnumHelper.addArmorMaterial("lunettesSoleilCivil", 1, new int []{3}, 1);
- public static ArmorMaterial lunettes = EnumHelper.addArmorMaterial("lunettesCivil", 1, new int []{2}, 1);
- public static ArmorMaterial armorAdjoint = EnumHelper.addArmorMaterial("armorAdjoint", 1, new int []{1}, 1);
- public static ArmorMaterial armorBrigadier = EnumHelper.addArmorMaterial("armorBrigadier", 1, new int []{1, 1, 1, 1}, 1);
- public static ArmorMaterial armorSergent = EnumHelper.addArmorMaterial("armorSergent", 1, new int []{1, 2, 2, 1}, 1);
- public static ArmorMaterial armorAdjudant = EnumHelper.addArmorMaterial("armorAdjudant", 1, new int []{2, 2, 2, 2}, 1);
- public static ArmorMaterial armorMajor = EnumHelper.addArmorMaterial("armorMajor", 1, new int []{2, 3, 3, 2}, 1);
- public static ArmorMaterial armorAspirant = EnumHelper.addArmorMaterial("armorAspirant", 1, new int []{3, 3, 3, 3}, 1);
- public static ArmorMaterial armorLieutenant = EnumHelper.addArmorMaterial("armorLieutenant", 1, new int []{3, 4, 4, 3}, 1);
- public static ArmorMaterial armorCapitaine = EnumHelper.addArmorMaterial("armorCapitaine", 1, new int []{4, 4, 4, 4}, 1);
- public static ArmorMaterial armorCommandant = EnumHelper.addArmorMaterial("armorCommandant", 1, new int []{4, 5, 5, 4}, 1);
- public static ArmorMaterial armorColonel = EnumHelper.addArmorMaterial("armorColonel", 1, new int []{5, 5, 5, 5}, 1);
- public static ArmorMaterial armorGeneral = EnumHelper.addArmorMaterial("armorGeneral", 1, new int []{5, 5, 5, 5}, 1);
- public static ArmorMaterial armorCivil = EnumHelper.addArmorMaterial("armorCivil", 1, new int []{1, 2, 2, 1}, 1);
- public static ArmorMaterial armorRebelle = EnumHelper.addArmorMaterial("armorRebelle", 1, new int []{2, 3, 3, 2}, 1);
- @EventHandler
- public void preInit(FMLPreInitializationEvent event)
- {
- // if(event.getSide().isClient()){if(!Minecraft.getMinecraft().mcDataDir.getAbsolutePath().contains("AltisCraft") && !Minecraft.getMinecraft().mcDataDir.equals(new File("."))){Throwables.propagate(new Exception("Launcher non autorisé"));}}
- System.out.println("Pré-initialisation !");
- ModelBlockATM model = new ModelBlockATM();
- ResourceLocation texture = new ResourceLocation(ModAltisCraft.MODID, "textures/models/blocks/ModelBlockATM.png");
- ModelBlockCoco models = new ModelBlockCoco();
- ResourceLocation textures = new ResourceLocation(ModAltisCraft.MODID, "textures/models/blocks/ModelBlockCoco.png");
- ModelBlockLampadaire modelsb = new ModelBlockLampadaire();
- ResourceLocation texturesb = new ResourceLocation(ModAltisCraft.MODID, "textures/models/blocks/ModelBlockLampadaire.png");
- ModelBlockVLampadaire modelv = new ModelBlockVLampadaire();
- ResourceLocation texturev = new ResourceLocation(ModAltisCraft.MODID, "textures/models/blocks/ModelBlockVLampadaire.png");
- itemDSable = new ItemDSable().setUnlocalizedName("itemDSable").setTextureName(MODID + ":itemDSable").setCreativeTab(AltisCraft).setMaxStackSize(1);
- itemAltisCraft = new Logo().setUnlocalizedName("AltisCraft").setTextureName(MODID + ":Logo").setCreativeTab(AltisCraft).setMaxStackSize(4);
- itemAncienAltisCraft = new Logo().setUnlocalizedName("AncienAltisCraft").setTextureName(MODID + ":AncienLogo").setCreativeTab(AltisCraft).setMaxStackSize(8);
- itemRestaurant = new Logo().setUnlocalizedName("Restaurant").setTextureName(MODID + ":Restaurant").setCreativeTab(AltisCraft).setMaxStackSize(4);
- Marteau = new Marteau().setUnlocalizedName("Marteau").setTextureName(MODID + ":Marteau").setCreativeTab(AltisCraft).setMaxStackSize(1);
- secrets = new secrets().setUnlocalizedName("secrets").setTextureName(MODID + ":secrets").setCreativeTab(AltisCraft).setMaxStackSize(1);
- itemCuivre = new item().setUnlocalizedName("Cuivre").setTextureName(MODID + ":Cuivre").setCreativeTab(AltisCraft).setMaxStackSize(4);
- itemMcDoV = new Logo().setUnlocalizedName("McDoV").setTextureName(MODID + ":McDoV").setCreativeTab(AltisCraft).setMaxStackSize(4);
- itemMcDoR = new Logo().setUnlocalizedName("McDoR").setTextureName(MODID + ":McDoR").setCreativeTab(AltisCraft).setMaxStackSize(4);
- itemCiseaux = new item().setUnlocalizedName("Ciseaux").setTextureName(MODID + ":Ciseaux").setCreativeTab(AltisCraft).setMaxStackSize(1);
- itemFil = new item().setUnlocalizedName("Fil").setTextureName(MODID + ":Fil").setCreativeTab(AltisCraft).setMaxStackSize(1);
- Icentime = new Icent().setUnlocalizedName("1cent").setTextureName(MODID + ":1centime").setCreativeTab(AltisCraft).setMaxStackSize(50);
- IIcentimes = new IIcents().setUnlocalizedName("2cents").setTextureName(MODID + ":2centimes").setCreativeTab(AltisCraft).setMaxStackSize(50);
- Vcentimes = new Vcents().setUnlocalizedName("5cents").setTextureName(MODID + ":5centimes").setCreativeTab(AltisCraft).setMaxStackSize(50);
- Xcentimes = new Xcents().setUnlocalizedName("10cents").setTextureName(MODID + ":10centimes").setCreativeTab(AltisCraft).setMaxStackSize(50);
- XXcentimes = new XXcents().setUnlocalizedName("20cents").setTextureName(MODID + ":20centimes").setCreativeTab(AltisCraft).setMaxStackSize(50);
- Lcentimes = new Lcents().setUnlocalizedName("50cents").setTextureName(MODID + ":50centimes").setCreativeTab(AltisCraft).setMaxStackSize(50);
- Ieuro = new Ieuro().setUnlocalizedName("1euro").setTextureName(MODID + ":1euro").setCreativeTab(AltisCraft).setMaxStackSize(50);
- IIeuros = new IIeuros().setUnlocalizedName("2euros").setTextureName(MODID + ":2euros").setCreativeTab(AltisCraft).setMaxStackSize(50);
- Veuros = new Veuros().setUnlocalizedName("5euros").setTextureName(MODID + ":5euros").setCreativeTab(AltisCraft).setMaxStackSize(50);
- Xeuros = new Xeuros().setUnlocalizedName("10euros").setTextureName(MODID + ":10euros").setCreativeTab(AltisCraft).setMaxStackSize(50);
- XXeuros = new XXeuros().setUnlocalizedName("20euros").setTextureName(MODID + ":20euros").setCreativeTab(AltisCraft).setMaxStackSize(50);
- Leuros = new Leuros().setUnlocalizedName("50euros").setTextureName(MODID + ":50euros").setCreativeTab(AltisCraft).setMaxStackSize(50);
- Ceuros = new Ceuros().setUnlocalizedName("100euros").setTextureName(MODID + ":100euros").setCreativeTab(AltisCraft).setMaxStackSize(50);
- Meuros = new Meuros().setUnlocalizedName("1000euros").setTextureName(MODID + ":1000euros").setCreativeTab(AltisCraft).setMaxStackSize(50);
- XMeuros = new XMeuros().setUnlocalizedName("10000euros").setTextureName(MODID + ":10000euros").setCreativeTab(AltisCraft).setMaxStackSize(50);
- itemCannabis = new Drogue().setUnlocalizedName("Cannabis").setTextureName(MODID + ":Cannabis").setCreativeTab(AltisCraft).setMaxStackSize(16);
- itemLMeth = new Drogue().setUnlocalizedName("LMeth").setTextureName(MODID + ":LingotMeth").setCreativeTab(AltisCraft).setMaxStackSize(1);
- itemCokaine0 = new Drogue().setUnlocalizedName("Cokaine0").setTextureName(MODID + ":Cokaine0").setCreativeTab(AltisCraft).setMaxStackSize(64);
- itemLSD = new Drogue().setUnlocalizedName("LSD").setTextureName(MODID + ":LSD").setCreativeTab(AltisCraft).setMaxStackSize(32);
- itemCokaine1 = new Drogue().setUnlocalizedName("Cokaine1").setTextureName(MODID + ":Cokaine1").setCreativeTab(AltisCraft).setMaxStackSize(32);
- itemCokaine2 = new Drogue().setUnlocalizedName("Cokaine2").setTextureName(MODID + ":Cokaine2").setCreativeTab(AltisCraft).setMaxStackSize(16);
- lunettesSoleilCivil = new lunettesSoleilCivil(lunettesSoleil, 0).setUnlocalizedName("lunettesSoleilCivil").setTextureName(MODID + ":lunettesSoleilCivil").setCreativeTab(AltisCraft);
- lunettesCivil = new lunettesCivil(lunettes, 0).setUnlocalizedName("lunettesCivil").setTextureName(MODID + ":lunettesCivil").setCreativeTab(AltisCraft);
- helmetAdjoint = new ItemAdjointArmor(armorAdjoint, 0).setUnlocalizedName("helmetAdjoint").setTextureName(MODID + ":Adjoint_Chapeau").setCreativeTab(AltisCraft);
- helmetRebelle = new ItemRebelleArmor(armorRebelle, 0).setUnlocalizedName("helmetRebelle").setTextureName(MODID + ":Rebelle_Chapeau").setCreativeTab(AltisCraft);
- chestPlateRebelle = new ItemRebelleArmor(armorRebelle, 1).setUnlocalizedName("chestPlateRebelle").setTextureName(MODID + ":Rebelle_Plastron").setCreativeTab(AltisCraft);
- leggingsRebelle = new ItemRebelleArmor(armorRebelle, 2).setUnlocalizedName("leggingsRebelle").setTextureName(MODID + ":Rebelle_Pantalon").setCreativeTab(AltisCraft);
- bootsRebelle = new ItemRebelleArmor(armorRebelle, 3).setUnlocalizedName("bootsRebelle").setTextureName(MODID + ":Rebelle_Chaussures").setCreativeTab(AltisCraft);
- helmetBrigadier = new ItemBrigadierArmor(armorBrigadier, 0).setUnlocalizedName("helmetBrigadier").setTextureName(MODID + ":Brigadier_Chapeau").setCreativeTab(AltisCraft);
- chestPlateBrigadier = new ItemBrigadierArmor(armorBrigadier, 1).setUnlocalizedName("chestPlateBrigadier").setTextureName(MODID + ":Brigadier_Plastron").setCreativeTab(AltisCraft);
- leggingsBrigadier = new ItemBrigadierArmor(armorBrigadier, 2).setUnlocalizedName("leggingsBrigadier").setTextureName(MODID + ":Brigadier_Pantalon").setCreativeTab(AltisCraft);
- bootsBrigadier = new ItemBrigadierArmor(armorBrigadier, 3).setUnlocalizedName("bootsBrigadier").setTextureName(MODID + ":Brigadier_Chaussures").setCreativeTab(AltisCraft);
- helmetSergent = new ItemSergentArmor(armorSergent, 0).setUnlocalizedName("helmetSergent").setTextureName(MODID + ":Sergent_Chapeau").setCreativeTab(AltisCraft);
- chestPlateSergent = new ItemSergentArmor(armorSergent, 1).setUnlocalizedName("chestPlateSergent").setTextureName(MODID + ":Sergent_Plastron").setCreativeTab(AltisCraft);
- leggingsSergent = new ItemSergentArmor(armorSergent, 2).setUnlocalizedName("leggingsSergent").setTextureName(MODID + ":Sergent_Pantalon").setCreativeTab(AltisCraft);
- bootsSergent = new ItemSergentArmor(armorSergent, 3).setUnlocalizedName("bootsSergent").setTextureName(MODID + ":Sergent_Chaussures").setCreativeTab(AltisCraft);
- helmetAdjudant = new ItemAdjudantArmor(armorAdjudant, 0).setUnlocalizedName("helmetAdjudant").setTextureName(MODID + ":Adjudant_Chapeau").setCreativeTab(AltisCraft);
- chestPlateAdjudant = new ItemAdjudantArmor(armorAdjudant, 1).setUnlocalizedName("chestPlateAdjudant").setTextureName(MODID + ":Adjudant_Plastron").setCreativeTab(AltisCraft);
- leggingsAdjudant = new ItemAdjudantArmor(armorAdjudant, 2).setUnlocalizedName("leggingsAdjudant").setTextureName(MODID + ":Adjudant_Pantalon").setCreativeTab(AltisCraft);
- bootsAdjudant = new ItemAdjudantArmor(armorAdjudant, 3).setUnlocalizedName("bootsAdjudant").setTextureName(MODID + ":Adjudant_Chaussures").setCreativeTab(AltisCraft);
- helmetMajor = new ItemMajorArmor(armorMajor, 0).setUnlocalizedName("helmetMajor").setTextureName(MODID + ":Major_Chapeau").setCreativeTab(AltisCraft);
- chestPlateMajor = new ItemMajorArmor(armorMajor, 1).setUnlocalizedName("chestPlateMajor").setTextureName(MODID + ":Major_Plastron").setCreativeTab(AltisCraft);
- leggingsMajor = new ItemMajorArmor(armorMajor, 2).setUnlocalizedName("leggingsMajor").setTextureName(MODID + ":Major_Pantalon").setCreativeTab(AltisCraft);
- bootsMajor = new ItemMajorArmor(armorMajor, 3).setUnlocalizedName("bootsMajor").setTextureName(MODID + ":Major_Chaussures").setCreativeTab(AltisCraft);
- helmetAspirant = new ItemAspirantArmor(armorAspirant, 0).setUnlocalizedName("helmetAspirant").setTextureName(MODID + ":Aspirant_Chapeau").setCreativeTab(AltisCraft);
- chestPlateAspirant = new ItemAspirantArmor(armorAspirant, 1).setUnlocalizedName("chestPlateAspirant").setTextureName(MODID + ":Aspirant_Plastron").setCreativeTab(AltisCraft);
- leggingsAspirant = new ItemAspirantArmor(armorAspirant, 2).setUnlocalizedName("leggingsAspirant").setTextureName(MODID + ":Aspirant_Pantalon").setCreativeTab(AltisCraft);
- bootsAspirant = new ItemAspirantArmor(armorAspirant, 3).setUnlocalizedName("bootsAspirant").setTextureName(MODID + ":Aspirant_Chaussures").setCreativeTab(AltisCraft);
- helmetLieutenant = new ItemLieutenantArmor(armorLieutenant, 0).setUnlocalizedName("helmetLieutenant").setTextureName(MODID + ":Lieutenant_Chapeau").setCreativeTab(AltisCraft);
- chestPlateLieutenant = new ItemLieutenantArmor(armorLieutenant, 1).setUnlocalizedName("chestPlateLieutenant").setTextureName(MODID + ":Lieutenant_Plastron").setCreativeTab(AltisCraft);
- leggingsLieutenant = new ItemLieutenantArmor(armorLieutenant, 2).setUnlocalizedName("leggingsLieutenant").setTextureName(MODID + ":Lieutenant_Pantalon").setCreativeTab(AltisCraft);
- bootsLieutenant = new ItemLieutenantArmor(armorLieutenant, 3).setUnlocalizedName("bootsLieutenant").setTextureName(MODID + ":Lieutenant_Chaussures").setCreativeTab(AltisCraft);
- helmetCapitaine = new ItemCapitaineArmor(armorCapitaine, 0).setUnlocalizedName("helmetCapitaine").setTextureName(MODID + ":Capitaine_Chapeau").setCreativeTab(AltisCraft);
- chestPlateCapitaine = new ItemCapitaineArmor(armorCapitaine, 1).setUnlocalizedName("chestPlateCapitaine").setTextureName(MODID + ":Capitaine_Plastron").setCreativeTab(AltisCraft);
- leggingsCapitaine = new ItemCapitaineArmor(armorCapitaine, 2).setUnlocalizedName("leggingsCapitaine").setTextureName(MODID + ":Capitaine_Pantalon").setCreativeTab(AltisCraft);
- bootsCapitaine = new ItemCapitaineArmor(armorCapitaine, 3).setUnlocalizedName("bootsCapitaine").setTextureName(MODID + ":Capitaine_Chaussures").setCreativeTab(AltisCraft);
- helmetCommandant = new ItemCommandantArmor(armorCommandant, 0).setUnlocalizedName("helmetCommandant").setTextureName(MODID + ":Commandant_Chapeau").setCreativeTab(AltisCraft);
- chestPlateCommandant = new ItemCommandantArmor(armorCommandant, 1).setUnlocalizedName("chestPlateCommandant").setTextureName(MODID + ":Commandant_Plastron").setCreativeTab(AltisCraft);
- leggingsCommandant = new ItemCommandantArmor(armorCommandant, 2).setUnlocalizedName("leggingsCommandant").setTextureName(MODID + ":Commandant_Pantalon").setCreativeTab(AltisCraft);
- bootsCommandant = new ItemCommandantArmor(armorCommandant, 3).setUnlocalizedName("bootsCommandant").setTextureName(MODID + ":Commandant_Chaussures").setCreativeTab(AltisCraft);
- helmetColonel = new ItemColonelArmor(armorColonel, 0).setUnlocalizedName("helmetColonel").setTextureName(MODID + ":Colonel_Chapeau").setCreativeTab(AltisCraft);
- chestPlateColonel = new ItemColonelArmor(armorColonel, 1).setUnlocalizedName("chestPlateColonel").setTextureName(MODID + ":Colonel_Plastron").setCreativeTab(AltisCraft);
- leggingsColonel = new ItemColonelArmor(armorColonel, 2).setUnlocalizedName("leggingsColonel").setTextureName(MODID + ":Colonel_Pantalon").setCreativeTab(AltisCraft);
- bootsColonel = new ItemColonelArmor(armorColonel, 3).setUnlocalizedName("bootsColonel").setTextureName(MODID + ":Colonel_Chaussures").setCreativeTab(AltisCraft);
- helmetGeneral = new ItemGeneralArmor(armorGeneral, 0).setUnlocalizedName("helmetGeneral").setTextureName(MODID + ":General_Chapeau").setCreativeTab(AltisCraft);
- chestPlateGeneral = new ItemGeneralArmor(armorGeneral, 1).setUnlocalizedName("chestPlateGeneral").setTextureName(MODID + ":General_Plastron").setCreativeTab(AltisCraft);
- leggingsGeneral = new ItemGeneralArmor(armorGeneral, 2).setUnlocalizedName("leggingsGeneral").setTextureName(MODID + ":General_Pantalon").setCreativeTab(AltisCraft);
- bootsGeneral = new ItemGeneralArmor(armorGeneral, 3).setUnlocalizedName("bootsGeneral").setTextureName(MODID + ":General_Chaussures").setCreativeTab(AltisCraft);
- helmetCivil = new ItemCivilArmor(armorCivil, 0).setUnlocalizedName("helmetCivil").setTextureName(MODID + ":Civil_Chapeau").setCreativeTab(AltisCraft);
- chestPlateCivil = new ItemCivilArmor(armorCivil, 1).setUnlocalizedName("chestPlateCivil").setTextureName(MODID + ":Civil_Plastron").setCreativeTab(AltisCraft);
- leggingsCivil = new ItemCivilArmor(armorCivil, 2).setUnlocalizedName("leggingsCivil").setTextureName(MODID + ":Civil_Pantalon").setCreativeTab(AltisCraft);
- bootsCivil = new ItemCivilArmor(armorCivil, 3).setUnlocalizedName("bootsCivil").setTextureName(MODID + ":Civil_Chaussures").setCreativeTab(AltisCraft);
- GameRegistry.registerItem(pioche = new ItemPioche("pioche", outils).setCreativeTab(AltisCraft), "pioche");
- GameRegistry.registerItem(pelle = new ItemPelle("pelle", outils).setCreativeTab(AltisCraft), "pelle");
- GameRegistry.registerItem(Tortue = new NourritureDrogue("Tortue", 5, 1.0f, false).setAlwaysEdible().setCreativeTab(AltisCraft).setMaxStackSize(12), "Tortue");
- GameRegistry.registerItem(itemAltisCraft, "item_altiscraft");
- GameRegistry.registerItem(itemAncienAltisCraft, "item_ancienaltiscraft");
- GameRegistry.registerItem(itemRestaurant, "item_restaurant");
- GameRegistry.registerItem(Marteau, "marteau");
- GameRegistry.registerItem(itemDSable, "itemdsable");
- GameRegistry.registerItem(secrets, "secrets");
- GameRegistry.registerItem(itemCuivre, "item_cuivre");
- GameRegistry.registerItem(itemMcDoV, "item_mcdov");
- GameRegistry.registerItem(itemMcDoR, "item_mcdor");
- GameRegistry.registerItem(itemFil, "item_fil");
- GameRegistry.registerItem(itemCiseaux, "item_ciseaux");
- GameRegistry.registerItem(itemLMeth, "item_lmeth");
- GameRegistry.registerItem(itemLSD, "item_lsd");
- GameRegistry.registerItem(itemFLSD = new BoissonDrogue("itemFLSD", 12, 0.5f, false).addPotionEffect(new PotionEffect(Potion.confusion.id, 200, 1), 0.5).addPotionEffect(new PotionEffect(Potion.jump.id, 100, 1), 0.5).addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 250, 1), 0.5).setAlwaysEdible().setCreativeTab(AltisCraft).setMaxStackSize(16), "itemFLSD");
- GameRegistry.registerItem(itemMeth = new NourritureDrogue("itemMeth", 8, 0.5f, false).addPotionEffect(new PotionEffect(Potion.jump.id, 400, 3), 0.5).addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 450, 2), 0.5).addPotionEffect(new PotionEffect(Potion.regeneration.id, 150, 3), 0.5).setAlwaysEdible().setCreativeTab(AltisCraft).setMaxStackSize(2), "itemMeth");
- GameRegistry.registerItem(itemFCannabis = new NourritureDrogue("itemFCannabis", 12, 0.5f, false).addPotionEffect(new PotionEffect(Potion.confusion.id, 600, 3), 0.5).addPotionEffect(new PotionEffect(Potion.jump.id, 200, 1), 0.5).addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 450, 1), 0.5).setAlwaysEdible().setCreativeTab(AltisCraft).setMaxStackSize(8), "itemFCannabis");
- GameRegistry.registerItem(itemFCocaine = new NourritureDrogue("itemFCocaine", 18, 1.0f, false).addPotionEffect(new PotionEffect(Potion.confusion.id, 1200, 3), 0.5).addPotionEffect(new PotionEffect(Potion.jump.id, 600, 3), 0.5).addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 1800, 2), 0.5).setAlwaysEdible().setCreativeTab(AltisCraft).setMaxStackSize(8), "itemFCocaine");
- GameRegistry.registerItem(itemPeche = new Nourriture("peche", 1, 0.2f, false).setAlwaysEdible().setCreativeTab(AltisCraft).setMaxStackSize(16), "peche");
- GameRegistry.registerItem(Coco = new Nourriture("Coco", 3, 0.2f, false).setAlwaysEdible().setCreativeTab(AltisCraft).setMaxStackSize(8), "Coco");
- GameRegistry.registerItem(CocaCola = new Boisson("coca_cola", 0, 0.2f, false).setAlwaysEdible().setCreativeTab(AltisCraft).setMaxStackSize(4), "coca_cola");
- GameRegistry.registerItem(CocaColaLife = new Boisson("coca_cola_life", 0, 0.2f, false).setAlwaysEdible().setCreativeTab(AltisCraft).setMaxStackSize(4), "coca_cola_life");
- GameRegistry.registerItem(CocaColaZero = new Boisson("coca_cola_zero", 0, 0.2f, false).setAlwaysEdible().setCreativeTab(AltisCraft).setMaxStackSize(4), "coca_cola_zero");
- GameRegistry.registerItem(CocaColaLight = new Boisson("coca_cola_light", 0, 0.2f, false).setAlwaysEdible().setCreativeTab(AltisCraft).setMaxStackSize(4), "coca_cola_light");
- GameRegistry.registerItem(Icentime, "item_1centime");
- GameRegistry.registerItem(IIcentimes, "item_2centimes");
- GameRegistry.registerItem(Vcentimes, "item_5centimes");
- GameRegistry.registerItem(Xcentimes, "item_10centimes");
- GameRegistry.registerItem(XXcentimes, "item_20centimes");
- GameRegistry.registerItem(Lcentimes, "item_50centimes");
- GameRegistry.registerItem(Ieuro, "item_1euro");
- GameRegistry.registerItem(IIeuros, "item_2euros");
- GameRegistry.registerItem(Veuros, "item_5euros");
- GameRegistry.registerItem(Xeuros, "item_10euros");
- GameRegistry.registerItem(XXeuros, "item_20euros");
- GameRegistry.registerItem(Leuros, "item_50euros");
- GameRegistry.registerItem(Ceuros, "item_100euros");
- GameRegistry.registerItem(Meuros, "item_1000euros");
- GameRegistry.registerItem(XMeuros, "item_10000euros");
- GameRegistry.registerItem(itemCannabis, "item_cannabis");
- GameRegistry.registerItem(itemCokaine0, "item_cokaine0");
- GameRegistry.registerItem(itemCokaine1, "item_cokaine1");
- GameRegistry.registerItem(itemCokaine2, "item_cokaine2");
- GameRegistry.registerItem(lunettesSoleilCivil, "lunettessoleilcivil");
- GameRegistry.registerItem(lunettesCivil, "lunettescivil");
- GameRegistry.registerItem(helmetAdjoint, "item_adjoint_helmet");
- GameRegistry.registerItem(helmetRebelle, "item_rebelle_helmet");
- GameRegistry.registerItem(chestPlateRebelle, "item_rebelle_chestplate");
- GameRegistry.registerItem(leggingsRebelle, "item_rebelle_leggings");
- GameRegistry.registerItem(bootsRebelle, "item_rebelle_boots");
- GameRegistry.registerItem(helmetBrigadier, "item_brigadier_helmet");
- GameRegistry.registerItem(chestPlateBrigadier, "item_brigadier_chestplate");
- GameRegistry.registerItem(leggingsBrigadier, "item_brigadier_leggings");
- GameRegistry.registerItem(bootsBrigadier, "item_brigadier_boots");
- GameRegistry.registerItem(helmetSergent, "item_sergent_helmet");
- GameRegistry.registerItem(chestPlateSergent, "item_sergent_chestplate");
- GameRegistry.registerItem(leggingsSergent, "item_sergent_leggings");
- GameRegistry.registerItem(bootsSergent, "item_sergent_boots");
- GameRegistry.registerItem(helmetAdjudant, "item_adjudant_helmet");
- GameRegistry.registerItem(chestPlateAdjudant, "item_adjudant_chestplate");
- GameRegistry.registerItem(leggingsAdjudant, "item_adjudant_leggings");
- GameRegistry.registerItem(bootsAdjudant, "item_adjudant_boots");
- GameRegistry.registerItem(helmetMajor, "item_major_helmet");
- GameRegistry.registerItem(chestPlateMajor, "item_major_chestplate");
- GameRegistry.registerItem(leggingsMajor, "item_major_leggings");
- GameRegistry.registerItem(bootsMajor, "item_major_boots");
- GameRegistry.registerItem(helmetAspirant, "item_aspirant_helmet");
- GameRegistry.registerItem(chestPlateAspirant, "item_aspirant_chestplate");
- GameRegistry.registerItem(leggingsAspirant, "item_aspirant_leggings");
- GameRegistry.registerItem(bootsAspirant, "item_aspirant_boots");
- GameRegistry.registerItem(helmetLieutenant, "item_lieutenant_helmet");
- GameRegistry.registerItem(chestPlateLieutenant, "item_lieutenant_chestplate");
- GameRegistry.registerItem(leggingsLieutenant, "item_lieutenant_leggings");
- GameRegistry.registerItem(bootsLieutenant, "item_lieutenant_boots");
- GameRegistry.registerItem(helmetCapitaine, "item_capitaine_helmet");
- GameRegistry.registerItem(chestPlateCapitaine, "item_capitaine_chestplate");
- GameRegistry.registerItem(leggingsCapitaine, "item_capitaine_leggings");
- GameRegistry.registerItem(bootsCapitaine, "item_capitaine_boots");
- GameRegistry.registerItem(helmetCommandant, "item_commandant_helmet");
- GameRegistry.registerItem(chestPlateCommandant, "item_commandant_chestplate");
- GameRegistry.registerItem(leggingsCommandant, "item_commandant_leggings");
- GameRegistry.registerItem(bootsCommandant, "item_commandant_boots");
- GameRegistry.registerItem(helmetColonel, "item_colonel_helmet");
- GameRegistry.registerItem(chestPlateColonel, "item_colonel_chestplate");
- GameRegistry.registerItem(leggingsColonel, "item_colonel_leggings");
- GameRegistry.registerItem(bootsColonel, "item_colonel_boots");
- GameRegistry.registerItem(helmetGeneral, "item_general_helmet");
- GameRegistry.registerItem(chestPlateGeneral, "item_general_chestplate");
- GameRegistry.registerItem(leggingsGeneral, "item_general_leggings");
- GameRegistry.registerItem(bootsGeneral, "item_general_boots");
- GameRegistry.registerItem(helmetCivil, "item_civil_helmet");
- GameRegistry.registerItem(chestPlateCivil, "item_civil_chestplate");
- GameRegistry.registerItem(leggingsCivil, "item_civil_leggings");
- GameRegistry.registerItem(bootsCivil, "item_civil_boots");
- SemiBrique = new BlocS(Material.ground).setBlockName("blocsb").setCreativeTab(AltisCraft);
- blockPeche = new BlockPeche().setBlockName("blocpeche").setBlockTextureName(MODID + ":BlocPeche").setCreativeTab(AltisCraft).setHardness(7.5F);
- blockPomme = new BlockPomme().setBlockName("blocpomme").setBlockTextureName(MODID + ":BlocPomme").setCreativeTab(AltisCraft).setHardness(7.5F);
- MineraisCuivre = new MineraisCuivre().setBlockName("bloccuivre").setBlockTextureName(MODID + ":BlocCuivre").setCreativeTab(AltisCraft).setHardness(7.5F);
- MineraisMeth = new MineraisMeth().setBlockName("blocmeth").setBlockTextureName(MODID + ":BlocMeth").setCreativeTab(AltisCraft).setHardness(25.5F);
- blockBrique = new Bloc().setBlockName("blocbrique").setBlockTextureName(MODID + ":BlocBrique").setCreativeTab(AltisCraft);
- Blanc = new Bloc().setBlockName("blanc").setBlockTextureName(MODID + ":Blanc").setCreativeTab(AltisCraft);
- blocSemiBrique = new Bloc().setBlockName("blocsemibrique").setCreativeTab(AltisCraft);
- blocGrisBrique = new Bloc().setBlockName("blocgrisbrique").setBlockTextureName(MODID + ":BlocGrisBrique").setCreativeTab(AltisCraft);
- CocainePlante = new CocainePlante().setBlockName("plantecocaine").setBlockTextureName(MODID + ":Cocaine").setCreativeTab(AltisCraft).setHardness(1.5F);
- CannabisPlante = new CannabisPlante().setBlockName("plantecannabis").setBlockTextureName(MODID + ":Cannabis").setCreativeTab(AltisCraft).setHardness(1.0F);
- blockMcDoV = new Bloc().setBlockName("blocmcdov").setBlockTextureName(MODID + ":McDoV").setCreativeTab(AltisCraft);
- blockMcDoR = new Bloc().setBlockName("blocmcdor").setBlockTextureName(MODID + ":McDoR").setCreativeTab(AltisCraft);
- BlocATM = new BlocATM().setBlockName("blocatm").setCreativeTab(AltisCraft);
- BlocCoco = new BlocCoco().setBlockName("bloccoco").setCreativeTab(AltisCraft).setHardness(7.5F);
- BlocRoute1 = new Bloc().setBlockName("blocroute1").setBlockTextureName(MODID + ":BlocRoute1").setCreativeTab(AltisCraft);
- BlocRoute2 = new Bloc().setBlockName("blocroute2").setBlockTextureName(MODID + ":BlocRoute2").setCreativeTab(AltisCraft);
- BlocATMTexture = new Bloc().setBlockName("blocatmtexture").setBlockTextureName(MODID + ":BlocATMTexture").setCreativeTab(AltisCraft);
- BlocPierreVert = new Bloc().setBlockName("blocpierrevert").setBlockTextureName(MODID + ":BlocPierreVert").setCreativeTab(AltisCraft);
- BlocFerMarron = new Bloc().setBlockName("blocfermarron").setBlockTextureName(MODID + ":BlocFerMarron").setCreativeTab(AltisCraft);
- BlocMetaData = new BlocMetaData().setBlockName("blocmetadata").setCreativeTab(AltisCraft);
- Blanc = new Bloc().setBlockName("blanc").setBlockTextureName(MODID + ":Blanc").setCreativeTab(AltisCraft);
- FerPeuGris = new Bloc().setBlockName("ferpeugris").setBlockTextureName(MODID + ":FerPeuGris").setCreativeTab(AltisCraft);
- PierreBlanc = new Bloc().setBlockName("pierreblanc").setBlockTextureName(MODID + ":PierreBlanc").setCreativeTab(AltisCraft);
- FerGris = new Bloc().setBlockName("fergris").setBlockTextureName(MODID + ":FerGris").setCreativeTab(AltisCraft);
- PlastiqueFlashVert = new Bloc().setBlockName("plastiqueflashvert").setBlockTextureName(MODID + ":PlastiqueFlashVert").setCreativeTab(AltisCraft);
- Cyan = new Bloc().setBlockName("cyan").setBlockTextureName(MODID + ":Cyan").setCreativeTab(AltisCraft);
- Aluminium = new Bloc().setBlockName("aluminium").setBlockTextureName(MODID + ":Aluminium").setCreativeTab(AltisCraft);
- BlanchePierre = new Bloc().setBlockName("blanchepierre").setBlockTextureName(MODID + ":BlanchePierre").setCreativeTab(AltisCraft);
- PierreBlanche = new Bloc().setBlockName("pierreblanche").setBlockTextureName(MODID + ":PierreBlanche").setCreativeTab(AltisCraft);
- PlastiqueVert = new Bloc().setBlockName("plastiquevert").setBlockTextureName(MODID + ":PlastiqueVert").setCreativeTab(AltisCraft);
- Flesh = new Bloc().setBlockName("flesh").setBlockTextureName(MODID + ":Flesh").setCreativeTab(AltisCraft);
- PlancheMarron = new Bloc().setBlockName("planchemarron").setBlockTextureName(MODID + ":PlancheMarron").setCreativeTab(AltisCraft);
- Rouge = new Bloc().setBlockName("rouge").setBlockTextureName(MODID + ":Rouge").setCreativeTab(AltisCraft);
- PlastiqueRouge = new Bloc().setBlockName("plastiquerouge").setBlockTextureName(MODID + ":PlastiqueRouge").setCreativeTab(AltisCraft);
- PlastiqueBlanc = new Bloc().setBlockName("plastiqueblanc").setBlockTextureName(MODID + ":PlastiqueBlanc").setCreativeTab(AltisCraft);
- PlastiqueBleu = new Bloc().setBlockName("plastiquebleu").setBlockTextureName(MODID + ":PlastiqueBleu").setCreativeTab(AltisCraft);
- BlocLampadaire = new BlocLampadaire().setBlockName("bloclampadaire").setCreativeTab(AltisCraft);
- BlocVLampadaire = new BlocVLampadaire().setBlockName("blocvlampadaire").setCreativeTab(AltisCraft);
- PorteHopital = new PorteHopital(Material.ground).setUnlocalizedName("portehopital").setTextureName(ModAltisCraft.MODID + ":PorteHopital");
- GameRegistry.registerItem(PorteHopital, "portehopital");
- GameRegistry.registerBlock(SemiBrique, "blocsb");
- GameRegistry.registerBlock(PlastiqueRouge, "plastiquerouge");
- GameRegistry.registerBlock(PlastiqueBlanc, "plastiqueblanc");
- GameRegistry.registerBlock(PlastiqueBleu, "plastiquebleu");
- GameRegistry.registerBlock(Blanc, "blanc");
- GameRegistry.registerBlock(FerPeuGris, "ferpeugris");
- GameRegistry.registerBlock(PierreBlanc, "pierreblanc");
- GameRegistry.registerBlock(FerGris, "fergris");
- GameRegistry.registerBlock(PlastiqueFlashVert, "plastiqueflashvert");
- GameRegistry.registerBlock(Cyan, "cyan");
- GameRegistry.registerBlock(Aluminium, "aluminium");
- GameRegistry.registerBlock(BlanchePierre, "blanchepierre");
- GameRegistry.registerBlock(PierreBlanche, "pierreblanche");
- GameRegistry.registerBlock(PlastiqueVert, "plastiquevert");
- GameRegistry.registerBlock(Flesh, "flesh");
- GameRegistry.registerBlock(PlancheMarron, "planchemarron");
- GameRegistry.registerBlock(Rouge, "rouge");
- GameRegistry.registerBlock(blockPeche, "block_peche");
- GameRegistry.registerBlock(blockPomme, "block_pomme");
- GameRegistry.registerBlock(blockBrique, "block_brick");
- GameRegistry.registerBlock(blocSemiBrique, "block_semibrick");
- GameRegistry.registerBlock(blocGrisBrique, "block_grisbrick");
- GameRegistry.registerBlock(MineraisCuivre, "bloc_cuivre");
- GameRegistry.registerBlock(CannabisPlante, "plante_cannabis");
- GameRegistry.registerBlock(CocainePlante, "plante_cocaine");
- GameRegistry.registerBlock(blockMcDoV, "block_mcdov");
- GameRegistry.registerBlock(blockMcDoR, "block_mcdor");
- GameRegistry.registerBlock(BlocRoute1, "bloc_route1");
- GameRegistry.registerBlock(BlocRoute2, "bloc_route2");
- GameRegistry.registerBlock(BlocATMTexture, "bloc_atmtexture");
- GameRegistry.registerBlock(BlocATM, "blocatm");
- GameRegistry.registerBlock(BlocLampadaire, "bloclampadaire");
- GameRegistry.registerBlock(BlocVLampadaire, "blocvlampadaire");
- GameRegistry.registerBlock(BlocCoco, "bloccoco");
- GameRegistry.registerBlock(MineraisMeth, "mineraismeth");
- GameRegistry.registerBlock(BlocPierreVert, "blocpierrevert");
- GameRegistry.registerBlock(BlocFerMarron, "blocfermarron");
- GameRegistry.registerBlock(BlocMetaData, ItemBlocMetaData.class, "bloc_metadata");
- GameRegistry.registerTileEntity(TileEntityATM.class, "modid:atm");
- GameRegistry.registerTileEntity(TileEntityVLampadaire.class, "modid:vlampadaire");
- GameRegistry.addRecipe(new ItemStack(ModAltisCraft.IIcentimes, 1), new Object[] {"##", '#', ModAltisCraft.Icentime});
- GameRegistry.addRecipe(new ItemStack(ModAltisCraft.IIcentimes, 1), new Object[] {"#", "#", '#', ModAltisCraft.Icentime});
- GameRegistry.addRecipe(new ItemStack(ModAltisCraft.Vcentimes, 1), new Object[] {"#", "I", "#", '#', ModAltisCraft.IIcentimes, 'I', ModAltisCraft.Icentime});
- GameRegistry.addRecipe(new ItemStack(ModAltisCraft.Vcentimes, 1), new Object[] {"#I#", '#', ModAltisCraft.IIcentimes, 'I', ModAltisCraft.Icentime});
- GameRegistry.addRecipe(new ItemStack(ModAltisCraft.Xcentimes, 1), new Object[] {"##", '#', ModAltisCraft.Vcentimes});
- GameRegistry.addRecipe(new ItemStack(ModAltisCraft.Xcentimes, 1), new Object[] {"#", "#", '#', ModAltisCraft.Vcentimes});
- GameRegistry.addRecipe(new ItemStack(ModAltisCraft.XXcentimes, 1), new Object[] {"##", '#', ModAltisCraft.Xcentimes});
- GameRegistry.addRecipe(new ItemStack(ModAltisCraft.XXcentimes, 1), new Object[] {"#", "#", '#', ModAltisCraft.Xcentimes});
- GameRegistry.addRecipe(new ItemStack(ModAltisCraft.Lcentimes, 1), new Object[] {"#", "I", "#", '#', ModAltisCraft.XXcentimes, 'I', ModAltisCraft.Xcentimes});
- GameRegistry.addRecipe(new ItemStack(ModAltisCraft.Lcentimes, 1), new Object[] {"#I#", '#', ModAltisCraft.XXcentimes, 'I', ModAltisCraft.Xcentimes});
- GameRegistry.addRecipe(new ItemStack(ModAltisCraft.Ieuro, 1), new Object[] {"##", '#', ModAltisCraft.Lcentimes});
- GameRegistry.addRecipe(new ItemStack(ModAltisCraft.Ieuro, 1), new Object[] {"#", "#", '#', ModAltisCraft.Lcentimes});
- GameRegistry.addRecipe(new ItemStack(ModAltisCraft.IIeuros, 1), new Object[] {"##", '#', ModAltisCraft.Ieuro});
- GameRegistry.addRecipe(new ItemStack(ModAltisCraft.IIeuros, 1), new Object[] {"#", "#", '#', ModAltisCraft.Ieuro});
- GameRegistry.addRecipe(new ItemStack(ModAltisCraft.Veuros, 1), new Object[] {"#", "I", "#", '#', ModAltisCraft.IIeuros, 'I', ModAltisCraft.Ieuro});
- GameRegistry.addRecipe(new ItemStack(ModAltisCraft.Veuros, 1), new Object[] {"#I#", '#', ModAltisCraft.IIeuros, 'I', ModAltisCraft.Ieuro});
- GameRegistry.addRecipe(new ItemStack(ModAltisCraft.Xeuros, 1), new Object[] {"##", '#', ModAltisCraft.Veuros});
- GameRegistry.addRecipe(new ItemStack(ModAltisCraft.Xeuros, 1), new Object[] {"#", "#", '#', ModAltisCraft.Veuros});
- GameRegistry.addRecipe(new ItemStack(ModAltisCraft.XXeuros, 1), new Object[] {"##", '#', ModAltisCraft.Xeuros});
- GameRegistry.addRecipe(new ItemStack(ModAltisCraft.XXeuros, 1), new Object[] {"#", "#", '#', ModAltisCraft.Xeuros});
- GameRegistry.addRecipe(new ItemStack(ModAltisCraft.Leuros, 1), new Object[] {"#", "I", "#", '#', ModAltisCraft.XXeuros, 'I', ModAltisCraft.Xeuros});
- GameRegistry.addRecipe(new ItemStack(ModAltisCraft.Leuros, 1), new Object[] {"#I#", '#', ModAltisCraft.XXeuros, 'I', ModAltisCraft.Xeuros});
- GameRegistry.addRecipe(new ItemStack(ModAltisCraft.Ceuros, 1), new Object[] {"##", '#', ModAltisCraft.Leuros});
- GameRegistry.addRecipe(new ItemStack(ModAltisCraft.Ceuros, 1), new Object[] {"#", "#", '#', ModAltisCraft.Leuros});
- GameRegistry.addRecipe(new ItemStack(ModAltisCraft.Icentime, 2), new Object[] {"#", '#', ModAltisCraft.IIcentimes});
- GameRegistry.addRecipe(new ItemStack(ModAltisCraft.Icentime, 5), new Object[] {"#", '#', ModAltisCraft.Vcentimes});
- GameRegistry.addRecipe(new ItemStack(ModAltisCraft.Vcentimes, 2), new Object[] {"#", '#', ModAltisCraft.Xcentimes});
- GameRegistry.addRecipe(new ItemStack(ModAltisCraft.Xcentimes, 2), new Object[] {"#", '#', ModAltisCraft.XXcentimes});
- GameRegistry.addRecipe(new ItemStack(ModAltisCraft.Xcentimes, 5), new Object[] {"#", '#', ModAltisCraft.Lcentimes});
- GameRegistry.addRecipe(new ItemStack(ModAltisCraft.Lcentimes, 2), new Object[] {"#", '#', ModAltisCraft.Ieuro});
- GameRegistry.addRecipe(new ItemStack(ModAltisCraft.Ieuro, 2), new Object[] {"#", '#', ModAltisCraft.IIeuros});
- GameRegistry.addRecipe(new ItemStack(ModAltisCraft.Ieuro, 5), new Object[] {"#", '#', ModAltisCraft.Veuros});
- GameRegistry.addRecipe(new ItemStack(ModAltisCraft.Veuros, 2), new Object[] {"#", '#', ModAltisCraft.Xeuros});
- GameRegistry.addRecipe(new ItemStack(ModAltisCraft.Xeuros, 2), new Object[] {"#", '#', ModAltisCraft.XXeuros});
- GameRegistry.addRecipe(new ItemStack(ModAltisCraft.Xeuros, 5), new Object[] {"#", '#', ModAltisCraft.Leuros});
- GameRegistry.addRecipe(new ItemStack(ModAltisCraft.Leuros, 2), new Object[] {"#", '#', ModAltisCraft.Ceuros});
- GameRegistry.addSmelting(ModAltisCraft.MineraisCuivre, new ItemStack(ModAltisCraft.itemCuivre), 1.0F);
- }
- @EventHandler
- public void Init(FMLPreInitializationEvent event)
- {
- proxy.registerRender();
- System.out.println("Initialisation !");
- }
- @EventHandler
- public void postInit(FMLPostInitializationEvent event)
- {
- System.out.println("Post-initialisation !");
- addEntity(EntityMobBenjaminLoison.class, "BenjaminLoison", 420, 0, 0);
- proxy.registerRender();
- }
- public void addEntity(Class<? extends net.minecraft.entity.Entity> entityClass, String name, int id, int backgroundColor, int foregroundColor)
- {
- EntityRegistry.registerGlobalEntityID(entityClass, name, EntityRegistry.findGlobalUniqueEntityId(), backgroundColor, foregroundColor);
- EntityRegistry.registerModEntity(entityClass, name, id, this, 40, 1, true);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement