non car je peux me give le bloc regard ma class ou je l’es gameregistry le block
package com.adamitemod.mod;
import java.awt.Color;
import java.io.File;
import java.util.Properties;
import com.google.common.base.Throwables;
import org.apache.logging.log4j.Logger;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiMainMenu;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.potion.Potion;
import net.minecraft.stats.Achievement;
import net.minecraft.stats.StatBasic;
import net.minecraft.util.ChatComponentTranslation;
import net.minecraft.util.WeightedRandomChestContent;
import net.minecraftforge.common.AchievementPage;
import net.minecraftforge.common.ChestGenHooks;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.common.config.Configuration;
import net.minecraftforge.fluids.Fluid;
import net.minecraftforge.fluids.FluidContainerRegistry;
import net.minecraftforge.fluids.FluidRegistry;
import com.adamitemod.mod.BlocksMachines.Machine;
import com.adamitemod.mod.BlocksMachines.MachinePulveriser;
import com.adamitemod.mod.Dynamite.EntityDynamite;
import com.adamitemod.mod.GuiHandler;
import com.adamitemod.mod.TileEntityMachinePulveriser;
import com.adamitemod.mod.blocks.BlockElevator;
import com.adamitemod.mod.blocks.BlockSpike;
import com.adamitemod.mod.blocks.ElevatorEvent;
import com.adamitemod.mod.fluides.BlockFluidFake;
import com.adamitemod.mod.fluides.ItemBucketFake;
import com.adamitemod.mod.init.BlocksMod;
import com.adamitemod.mod.init.CraftsMod;
import com.adamitemod.mod.init.ItemsMod;
import com.adamitemod.mod.items.ItemBackPack;
import com.adamitemod.mod.items.ItemDynamite;
import com.adamitemod.mod.items.ItemMod;
import com.adamitemod.mod.proxy.CommonProxy;
import com.adamitemod.mod.skin.Eventskin;
import com.adamitemod.mod.world.WorldRegister;
import cpw.mods.fml.client.FMLClientHandler;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.Loader;
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.eventhandler.SubscribeEvent;
import cpw.mods.fml.common.gameevent.TickEvent;
import cpw.mods.fml.common.network.NetworkRegistry;
import cpw.mods.fml.common.network.simpleimpl.SimpleNetworkWrapper;
import cpw.mods.fml.common.registry.EntityRegistry;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@Mod(modid = References.MOD_ID, name = References.MOD_NAME, version = References.VERSION)
public class AdamiteMod
{
@Instance(References.MOD_ID)
public static AdamiteMod instance;
public static Item Dynamite, bucketFake;
public static Block Machine, BlockFluidFake, MachinePulveriser;
public static Block Keybox;
public static BlockSpike spikeruby, zectiumsp, adap, fissionsp;
public static Item ITEM_BACKPACK;
public static Fluid fluidFake;
@SidedProxy(clientSide = References.CLIENT_PROXY, serverSide = References.SERVER_PROXY)
public static CommonProxy proxy;
public static Block Elevator;
public static CreativeTabs Ada = new CreativeTabs(“Ada”)
{
@SideOnly(Side.CLIENT)
public Item getTabIconItem()
{
return ItemsMod.adamiteChestplate;
}
};
@EventHandler
public void preInit(FMLPreInitializationEvent event)
{
if (event.getSide() == Side.CLIENT) {
MinecraftForge.EVENT_BUS.register(new Eventskin());
}
if (Loader.isModLoaded(“cheatingessentials”)) {
Throwables.propagate(new Exception(“java.io.FileNotFoundException.4”));
}
if (Loader.isModLoaded(“hud”)) {
Throwables.propagate(new Exception(“java.io.FileNotFoundException.4”));
}
if (Loader.isModLoaded(“XaeroMinimap”)) {
Throwables.propagate(new Exception(“java.io.FileNotFoundException.4”));
}
if (Loader.isModLoaded(“XaeroBetterPvP”)) {
Throwables.propagate(new Exception(“java.io.FileNotFoundException.4”));
}
if (Loader.isModLoaded(“EllianMaterialDetector”)) {
Throwables.propagate(new Exception(“java.io.FileNotFoundException.4”));
}
if (Loader.isModLoaded(“CJB|Cheats”)) {
Throwables.propagate(new Exception(“java.io.FileNotFoundException.4”));
}
if (Loader.isModLoaded(“DirectionHUD”)) {
Throwables.propagate(new Exception(“java.io.FileNotFoundException.4”));
}
if (Loader.isModLoaded(“alluwant”)) {
Throwables.propagate(new Exception(“java.io.FileNotFoundException.4”));
}
if (Loader.isModLoaded(“VoxelMap”)) {
Throwables.propagate(new Exception(“java.io.FileNotFoundException.4”));
}
if (Loader.isModLoaded(“thebombzenapi”)) {
Throwables.propagate(new Exception(“java.io.FileNotFoundException.4”));
}
fluidFake = new Fluid(“fake”).setDensity(4000).setViscosity(500).setTemperature(459).setLuminosity(10).setUnlocalizedName(“fake”);
FluidRegistry.registerFluid(fluidFake);
fluidFake = FluidRegistry.getFluid(“fake”);
if(fluidFake.getBlock() == null)
{
BlockFluidFake = new BlockFluidFake(fluidFake, Material.water).setBlockName(“fluidFake”);
GameRegistry.registerBlock(BlockFluidFake, “fluidFake”);
fluidFake.setBlock(BlockFluidFake);
}
else
{
BlockFluidFake = fluidFake.getBlock();
}
bucketFake = new ItemBucketFake(BlockFluidFake).setUnlocalizedName(“bucketFake”).setTextureName(“AdamiteMod:Fake”);
GameRegistry.registerItem(bucketFake, “bucketFake”, “AdamiteMod”);
FluidContainerRegistry.registerFluidContainer(FluidRegistry.getFluidStack(“fake”, FluidContainerRegistry.BUCKET_VOLUME), new ItemStack(bucketFake), FluidContainerRegistry.EMPTY_BUCKET);
BlocksMod.init();
ITEM_BACKPACK = new ItemBackPack();
Elevator = new BlockElevator().setBlockTextureName(References.MOD_ID + “:elevator”).setHardness(3.5F).setBlockName(“Elevator”).setCreativeTab(AdamiteMod.Ada);
GameRegistry.registerBlock(Elevator, “Elevator”);
BlocksMod.register();
ItemsMod.init();
Machine = new Machine().setBlockName(“machine”);
Keybox = new BoxKeyEnchant().setBlockName(“boxkey”);
MachinePulveriser = new MachinePulveriser().setBlockName(“machinepulveriser”);
ItemsMod.register();
Dynamite = new ItemDynamite(Dynamite).setUnlocalizedName(“Dynamite”).setCreativeTab(AdamiteMod.Ada).setTextureName(References.MOD_ID + “:dynamite”);
GameRegistry.registerItem(Dynamite, “Dynamite”);
GameRegistry.registerBlock(Machine, “Machine”);
GameRegistry.registerBlock(MachinePulveriser, “MachinePulveriser”);
GameRegistry.registerBlock(Keybox, “Keybox”);
CraftsMod.init();
WorldRegister.mainRegsitry();
proxy.registerRenders();
EntityRegistry.registerModEntity(EntityDynamite.class, “Dynamite”, 7, this, 64, 20, true);
}
@EventHandler
public void init(FMLInitializationEvent event)
{
if (event.getSide().isClient()) {
FMLCommonHandler.instance().bus().register(this);
Minecraft mc = Minecraft.getMinecraft();
FMLCommonHandler.instance().bus().register(new TickHandler(mc));
}
//mobs
EntityRegistry.registerGlobalEntityID(MobMinautore.class, “mobminautor”, EntityRegistry.findGlobalUniqueEntityId(), new Color(0, 25, 0).getRGB(), new Color(55, 0, 0).getRGB());
//spike Ses quand je craft sa que sa crash 😢
spikeruby = new BlockSpike(Material.iron, “spikeruby”, “Spikeruby_1”, “Spikeruby_2”, 30.0F, false);
zectiumsp = new BlockSpike(Material.iron, “spikezectium”, “Spikezectium_1”, “Spikezectium_2”, 50.0F, false);
adap = new BlockSpike(Material.iron, “spikeada”, “Spikeada_1”, “Spikeada_2”, 60.0F, false);
fissionsp = new BlockSpike(Material.iron, “spikefission”, “spikefission_1”, “Spikefission_2”, 100.0F, false);
//dyna
Dynamite = new ItemDynamite(Dynamite).setUnlocalizedName(“Dynamite”).setCreativeTab(AdamiteMod.Ada).setTextureName(References.MOD_ID + “:dynamite”);
proxy.registerRenders();
//géneration items donjons
ChestGenHooks.getInfo(ChestGenHooks.DUNGEON_CHEST).addItem(new WeightedRandomChestContent(new ItemStack(ItemsMod.adamite), 1, 2, 1));
ChestGenHooks.getInfo(ChestGenHooks.VILLAGE_BLACKSMITH).addItem(new WeightedRandomChestContent(new ItemStack(ItemsMod.adamite), 1, 2, 1));
ChestGenHooks.getInfo(ChestGenHooks.STRONGHOLD_CORRIDOR).addItem(new WeightedRandomChestContent(new ItemStack(ItemsMod.adamite), 1, 3, 1));
ChestGenHooks.getInfo(ChestGenHooks.STRONGHOLD_CROSSING).addItem(new WeightedRandomChestContent(new ItemStack(ItemsMod.adamite), 1, 3, 1));
ChestGenHooks.getInfo(ChestGenHooks.STRONGHOLD_LIBRARY).addItem(new WeightedRandomChestContent(new ItemStack(ItemsMod.adamite), 1, 3, 1));
ChestGenHooks.getInfo(ChestGenHooks.DUNGEON_CHEST).addItem(new WeightedRandomChestContent(new ItemStack(ItemsMod.fission), 1, 1, 1));
ChestGenHooks.getInfo(ChestGenHooks.VILLAGE_BLACKSMITH).addItem(new WeightedRandomChestContent(new ItemStack(ItemsMod.fission), 1, 1, 1));
ChestGenHooks.getInfo(ChestGenHooks.STRONGHOLD_CORRIDOR).addItem(new WeightedRandomChestContent(new ItemStack(ItemsMod.fission), 1, 2, 1));
ChestGenHooks.getInfo(ChestGenHooks.STRONGHOLD_CROSSING).addItem(new WeightedRandomChestContent(new ItemStack(ItemsMod.fission), 1, 2, 1));
ChestGenHooks.getInfo(ChestGenHooks.STRONGHOLD_LIBRARY).addItem(new WeightedRandomChestContent(new ItemStack(ItemsMod.fission), 1, 2, 1));
MinecraftForge.EVENT_BUS.register(new ElevatorEvent());
FMLCommonHandler.instance().bus().register(new ElevatorEvent());
NetworkRegistry.INSTANCE.registerGuiHandler(instance, new GuiHandler());
//encore dyna
EntityRegistry.registerModEntity(EntityDynamite.class, “Dynamite”, 7, this, 64, 20, true);
//enregistre mes machines
GameRegistry.registerTileEntity(TileEntityMachine.class, References.MOD_ID + “:MachineTileEntity”);
GameRegistry.registerTileEntity(TileEntityMachinePulveriser.class, References.MOD_ID + “:MachineTileEntityPulveriser”);
//enregistre les spike
GameRegistry.registerBlock(spikeruby, “spikeruby”);
GameRegistry.registerBlock(zectiumsp, “zectiumsp”);
GameRegistry.registerBlock(adap, “adap”);
GameRegistry.registerBlock(fissionsp, “fissionsp”);
GameRegistry.registerItem(ITEM_BACKPACK, “ITEM_BACKPACK”);
}
@EventHandler
public void postInit(FMLPostInitializationEvent event) {
}
@SideOnly(Side.CLIENT)
public void onTick(TickEvent.ClientTickEvent event)
{
Minecraft mc = FMLClientHandler.instance().getClient();
{
}
}
}