Résolu Fluid
-
Bien Salut, je recherche comment faire un fluid ses juste que le seul tutoriel que j’ai trouvé et en 1.6 ducoups je ne sait pas par ou commencer.
Merci a vous de prendre le temps de me répondre -
-
Ça crash voila mes class :
package com.adamitemod.mod; import java.awt.Color; import java.io.File; import java.util.Properties; 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.Dynamite.EntityDynamite; import com.adamitemod.mod.blocks.BlockElevator; import com.adamitemod.mod.blocks.ElevatorEvent; import com.adamitemod.mod.init.BlocksMod; import com.adamitemod.mod.init.CraftsMod; import com.adamitemod.mod.init.ItemsMod; import com.adamitemod.mod.items.ItemDynamite; import com.adamitemod.mod.proxy.CommonProxy; 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.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; 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) { fluidFake = new Fluid("fluid").setDensity(4000).setViscosity(500).setTemperature(459).setLuminosity(10).setUnlocalizedName("fluid"); FluidRegistry.registerFluid(fluidFake); fluidFake = FluidRegistry.getFluid("fluidFake"); if(fluidFake.getBlock() == null) { BlockFluidFake = new BlockFluidFake(fluidFake, Material.water).setBlockName("fluidFake"); GameRegistry.registerBlock(BlockFluidFake, "fluidFake"); fluidFake.setBlock(BlockFluidFake); } else { BlockFluidFake = fluidFake.getBlock(); } GameRegistry.registerItem(bucketFake, "bucketFake", "AdamiteMod"); FluidContainerRegistry.registerFluidContainer(FluidRegistry.getFluidStack("tutorial", FluidContainerRegistry.BUCKET_VOLUME), new ItemStack(bucketFake), FluidContainerRegistry.EMPTY_BUCKET); BlocksMod.init(); 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"); ItemsMod.register(); Dynamite = new ItemDynamite(Dynamite).setUnlocalizedName("Dynamite").setCreativeTab(AdamiteMod.Ada).setTextureName(References.MOD_ID + ":dynamite"); GameRegistry.registerItem(Dynamite, "Dynamite"); GameRegistry.registerBlock(Machine, "Machine"); CraftsMod.init(); WorldRegister.mainRegsitry(); proxy.registerRenders(); EntityRegistry.registerModEntity(EntityDynamite.class, "Dynamite", 7, this, 64, 20, true); } @EventHandler public void init(FMLInitializationEvent event) { proxy.registerRenders(); 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()); EntityRegistry.registerModEntity(EntityDynamite.class, "Dynamite", 7, this, 64, 20, true); GameRegistry.registerTileEntity(TileEntityMachine.class, References.MOD_ID + ":MachineTileEntity"); } @EventHandler public void postInit(FMLPostInitializationEvent event) { } @SideOnly(Side.CLIENT) public void onTick(TickEvent.ClientTickEvent event) { Minecraft mc = FMLClientHandler.instance().getClient(); {} } }
package com.adamitemod.mod; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.util.IIcon; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import net.minecraftforge.fluids.BlockFluidClassic; import net.minecraftforge.fluids.Fluid; public class BlockFluidFake extends BlockFluidClassic { private IIcon stillIcon, flowingIcon; public BlockFluidFake(Fluid fluid, Material material) { super(fluid, material); } public IIcon getIcon(int side, int meta) { return (side == 0 || side == 1) ? stillIcon : flowingIcon; } public void registerBlockIcons(IIconRegister register) { stillIcon = register.registerIcon("AdamiteMod:tuto_fluid_still"); flowingIcon = register.registerIcon("AdamiteMod:tuto_fluid_flow"); } public boolean canDisplace(IBlockAccess world, int x, int y, int z) { if(world.getBlock(x, y, z).getMaterial().isLiquid()) { return false; } return super.canDisplace(world, x, y, z); } public boolean displaceIfPossible(World world, int x, int y, int z) { if(world.getBlock(x, y, z).getMaterial().isLiquid()) { return false; } return super.displaceIfPossible(world, x, y, z); } }
package com.adamitemod.mod; import net.minecraft.block.Block; import net.minecraft.item.ItemStack; import net.minecraftforge.event.entity.player.FillBucketEvent; import cpw.mods.fml.common.eventhandler.Event.Result; import cpw.mods.fml.common.eventhandler.SubscribeEvent; public class BucketEvent { @SubscribeEvent public void onBucketFill(FillBucketEvent event) { Block block = event.world.getBlock(event.target.blockX, event.target.blockY, event.target.blockZ); int metadata = event.world.getBlockMetadata(event.target.blockX, event.target.blockY, event.target.blockZ); if(block == AdamiteMod.BlockFluidFake && metadata == 0) { event.world.setBlockToAir(event.target.blockX, event.target.blockY, event.target.blockZ); event.result = new ItemStack(AdamiteMod.bucketFake); event.setResult(Result.ALLOW); } } }
–-- Minecraft Crash Report ---- // Sorry :( Time: 17/05/16 18:04 Description: Initializing game java.lang.NullPointerException: Initializing game at com.adamitemod.mod.AdamiteMod.preInit(AdamiteMod.java:102) 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) at net.minecraft.client.Minecraft.run(Minecraft.java:942) at net.minecraft.client.main.Main.main(Main.java:164) 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 net.minecraft.launchwrapper.Launch.launch(Launch.java:135) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source) at GradleStart.main(Unknown Source) A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Stacktrace: at com.adamitemod.mod.AdamiteMod.preInit(AdamiteMod.java:102) 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) -- Initialization -- Details: Stacktrace: at net.minecraft.client.Minecraft.run(Minecraft.java:942) at net.minecraft.client.main.Main.main(Main.java:164) 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 net.minecraft.launchwrapper.Launch.launch(Launch.java:135) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source) at GradleStart.main(Unknown Source) -- System Details -- Details: Minecraft Version: 1.7.10 Operating System: Windows 10 (x86) version 10.0 Java Version: 1.8.0_66, Oracle Corporation Java VM Version: Java HotSpot(TM) Client VM (mixed mode), Oracle Corporation Memory: 861103544 bytes (821 MB) / 1046937600 bytes (998 MB) up to 1046937600 bytes (998 MB) JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0 FML: MCP v9.05 FML v7.10.99.99 Minecraft Forge 10.13.4.1558 4 mods loaded, 4 mods active States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored UCH mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) UCH FML{7.10.99.99} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.4.1558-1.7.10.jar) UCH Forge{10.13.4.1558} [Minecraft Forge] (forgeSrc-1.7.10-10.13.4.1558-1.7.10.jar) UCE adamitemod{1.0.0} [Adamite Mod] (bin) GL info: ' Vendor: 'Intel' Version: '4.0.0 - Build 10.18.10.4276' Renderer: 'Intel(R) HD Graphics' Launched Version: 1.7.10 LWJGL: 2.9.1 OpenGL: Intel(R) HD Graphics GL version 4.0.0 - Build 10.18.10.4276, Intel GL Caps: Using GL 1.3 multitexturing. Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported. Anisotropic filtering is supported and maximum anisotropy is 16. Shaders are available because OpenGL 2.1 is supported. Is Modded: Definitely; Client brand changed to 'fml,forge' Type: Client (map_client.txt) Resource Packs: [] Current Language: English (US) Profiler Position: N/A (disabled) Vec3 Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used Anisotropic Filtering: Off (1)
-
fluidFake = new Fluid("fluid").setDensity(4000).setViscosity(500).setTemperature(459).setLuminosity(10).setUnlocalizedName("fluid"); FluidRegistry.registerFluid(fluidFake); fluidFake = FluidRegistry.getFluid("fluidFake");
↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓
fluidFake = new Fluid("fake").setDensity(4000).setViscosity(500).setTemperature(459).setLuminosity(10).setUnlocalizedName("fake"); FluidRegistry.registerFluid(fluidFake); fluidFake = FluidRegistry.getFluid("fake");
-
Sa crash toujour
-
Même rapport de crash ?
Si non, envoies le nouveau rapport de crash. -
non le voilla :
–-- Minecraft Crash Report ---- // I just don't know what went wrong :( Time: 17/05/16 18:45 Description: Initializing game java.lang.NullPointerException: Can't add null-object to the registry, name adamitemod:bucketFake. at cpw.mods.fml.common.registry.FMLControlledNamespacedRegistry.add(FMLControlledNamespacedRegistry.java:384) at cpw.mods.fml.common.registry.GameData.registerItem(GameData.java:849) at cpw.mods.fml.common.registry.GameData.registerItem(GameData.java:812) at cpw.mods.fml.common.registry.GameRegistry.registerItem(GameRegistry.java:149) at com.adamitemod.mod.AdamiteMod.preInit(AdamiteMod.java:113) 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) at net.minecraft.client.Minecraft.run(Minecraft.java:942) at net.minecraft.client.main.Main.main(Main.java:164) 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 net.minecraft.launchwrapper.Launch.launch(Launch.java:135) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source) at GradleStart.main(Unknown Source) A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Stacktrace: at cpw.mods.fml.common.registry.FMLControlledNamespacedRegistry.add(FMLControlledNamespacedRegistry.java:384) at cpw.mods.fml.common.registry.GameData.registerItem(GameData.java:849) at cpw.mods.fml.common.registry.GameData.registerItem(GameData.java:812) at cpw.mods.fml.common.registry.GameRegistry.registerItem(GameRegistry.java:149) at com.adamitemod.mod.AdamiteMod.preInit(AdamiteMod.java:113) 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) -- Initialization -- Details: Stacktrace: at net.minecraft.client.Minecraft.run(Minecraft.java:942) at net.minecraft.client.main.Main.main(Main.java:164) 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 net.minecraft.launchwrapper.Launch.launch(Launch.java:135) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source) at GradleStart.main(Unknown Source) -- System Details -- Details: Minecraft Version: 1.7.10 Operating System: Windows 10 (x86) version 10.0 Java Version: 1.8.0_66, Oracle Corporation Java VM Version: Java HotSpot(TM) Client VM (mixed mode), Oracle Corporation Memory: 860609056 bytes (820 MB) / 1046937600 bytes (998 MB) up to 1046937600 bytes (998 MB) JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0 FML: MCP v9.05 FML v7.10.99.99 Minecraft Forge 10.13.4.1558 4 mods loaded, 4 mods active States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored UCH mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) UCH FML{7.10.99.99} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.4.1558-1.7.10.jar) UCH Forge{10.13.4.1558} [Minecraft Forge] (forgeSrc-1.7.10-10.13.4.1558-1.7.10.jar) UCE adamitemod{1.0.0} [Adamite Mod] (bin) GL info: ' Vendor: 'Intel' Version: '4.0.0 - Build 10.18.10.4276' Renderer: 'Intel(R) HD Graphics' Launched Version: 1.7.10 LWJGL: 2.9.1 OpenGL: Intel(R) HD Graphics GL version 4.0.0 - Build 10.18.10.4276, Intel GL Caps: Using GL 1.3 multitexturing. Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported. Anisotropic filtering is supported and maximum anisotropy is 16. Shaders are available because OpenGL 2.1 is supported. Is Modded: Definitely; Client brand changed to 'fml,forge' Type: Client (map_client.txt) Resource Packs: [] Current Language: English (US) Profiler Position: N/A (disabled) Vec3 Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used Anisotropic Filtering: Off (1)
-
Ton item bucketFake n’est jamais initialisé, il manque la ligne bucketFake = new Item …
-
Ses bon j’ai mis sa : ```java
bucketFake = new ItemBucketFake(BlockFluidFake).setUnlocalizedName(“bucketFake”).setTextureName(“AdamiteMod:Fake”);et voici le nouveau crash :
–-- Minecraft Crash Report ----
// You’re mean.Time: 17/05/16 20:13
Description: Initializing gamejava.lang.NullPointerException: Can’t add null-object to the registry, name adamitemod:bucketFake.
at cpw.mods.fml.common.registry.FMLControlledNamespacedRegistry.add(FMLControlledNamespacedRegistry.java:384)
at cpw.mods.fml.common.registry.GameData.registerItem(GameData.java:849)
at cpw.mods.fml.common.registry.GameData.registerItem(GameData.java:812)
at cpw.mods.fml.common.registry.GameRegistry.registerItem(GameRegistry.java:149)
at com.adamitemod.mod.AdamiteMod.preInit(AdamiteMod.java:113)
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)
at net.minecraft.client.Minecraft.run(Minecraft.java:942)
at net.minecraft.client.main.Main.main(Main.java:164)
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 net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source)
at GradleStart.main(Unknown Source)A detailed walkthrough of the error, its code path and all known details is as follows:
– Head –
Stacktrace:
at cpw.mods.fml.common.registry.FMLControlledNamespacedRegistry.add(FMLControlledNamespacedRegistry.java:384)
at cpw.mods.fml.common.registry.GameData.registerItem(GameData.java:849)
at cpw.mods.fml.common.registry.GameData.registerItem(GameData.java:812)
at cpw.mods.fml.common.registry.GameRegistry.registerItem(GameRegistry.java:149)
at com.adamitemod.mod.AdamiteMod.preInit(AdamiteMod.java:113)
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)– Initialization –
Details:
Stacktrace:
at net.minecraft.client.Minecraft.run(Minecraft.java:942)
at net.minecraft.client.main.Main.main(Main.java:164)
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 net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source)
at GradleStart.main(Unknown Source)– System Details –
Details:
Minecraft Version: 1.7.10
Operating System: Windows 10 (x86) version 10.0
Java Version: 1.8.0_66, Oracle Corporation
Java VM Version: Java HotSpot Client VM (mixed mode), Oracle Corporation
Memory: 856367032 bytes (816 MB) / 1046937600 bytes (998 MB) up to 1046937600 bytes (998 MB)
JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
FML: MCP v9.05 FML v7.10.99.99 Minecraft Forge 10.13.4.1558 4 mods loaded, 4 mods active
States: ‘U’ = Unloaded ‘L’ = Loaded ‘C’ = Constructed ‘H’ = Pre-initialized ‘I’ = Initialized ‘J’ = Post-initialized ‘A’ = Available ‘D’ = Disabled ‘E’ = Errored
UCH mcp{9.05} [Minecraft Coder Pack] (minecraft.jar)
UCH FML{7.10.99.99} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.4.1558-1.7.10.jar)
UCH Forge{10.13.4.1558} [Minecraft Forge] (forgeSrc-1.7.10-10.13.4.1558-1.7.10.jar)
UCE adamitemod{1.0.0} [Adamite Mod] (bin)
GL info: ’ Vendor: ‘Intel’ Version: ‘4.0.0 - Build 10.18.10.4276’ Renderer: ‘Intel HD Graphics’
Launched Version: 1.7.10
LWJGL: 2.9.1
OpenGL: Intel HD Graphics GL version 4.0.0 - Build 10.18.10.4276, Intel
GL Caps: Using GL 1.3 multitexturing.
Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported.
Anisotropic filtering is supported and maximum anisotropy is 16.
Shaders are available because OpenGL 2.1 is supported.Is Modded: Definitely; Client brand changed to ‘fml,forge’
Type: Client (map_client.txt)
Resource Packs: []
Current Language: English (US)
Profiler Position: N/A (disabled)
Vec3 Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
Anisotropic Filtering: Off (1) -
ses le meme crash report et voici mon cod
package com.adamitemod.mod; import java.awt.Color; import java.io.File; import java.util.Properties; 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.Dynamite.EntityDynamite; import com.adamitemod.mod.blocks.BlockElevator; import com.adamitemod.mod.blocks.ElevatorEvent; import com.adamitemod.mod.init.BlocksMod; import com.adamitemod.mod.init.CraftsMod; import com.adamitemod.mod.init.ItemsMod; import com.adamitemod.mod.items.ItemDynamite; import com.adamitemod.mod.proxy.CommonProxy; 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.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; 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) { 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); fluidFake.setBlock(BlockFluidFake); } else { BlockFluidFake = fluidFake.getBlock(); } GameRegistry.registerItem(bucketFake, "bucketFake", "AdamiteMod"); FluidContainerRegistry.registerFluidContainer(FluidRegistry.getFluidStack("tutorial", FluidContainerRegistry.BUCKET_VOLUME), new ItemStack(bucketFake), FluidContainerRegistry.EMPTY_BUCKET); BlocksMod.init(); Elevator = new BlockElevator().setBlockTextureName(References.MOD_ID + ":elevator").setHardness(3.5F).setBlockName("Elevator").setCreativeTab(AdamiteMod.Ada); GameRegistry.registerBlock(Elevator, "Elevator"); bucketFake = new ItemBucketFake(BlockFluidFake).setUnlocalizedName("bucketFake").setTextureName("AdamiteMod:Fake"); BlocksMod.register(); ItemsMod.init(); Machine = new Machine().setBlockName("machine"); ItemsMod.register(); Dynamite = new ItemDynamite(Dynamite).setUnlocalizedName("Dynamite").setCreativeTab(AdamiteMod.Ada).setTextureName(References.MOD_ID + ":dynamite"); GameRegistry.registerItem(Dynamite, "Dynamite"); GameRegistry.registerBlock(Machine, "Machine"); CraftsMod.init(); WorldRegister.mainRegsitry(); proxy.registerRenders(); EntityRegistry.registerModEntity(EntityDynamite.class, "Dynamite", 7, this, 64, 20, true); } @EventHandler public void init(FMLInitializationEvent event) { proxy.registerRenders(); 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()); EntityRegistry.registerModEntity(EntityDynamite.class, "Dynamite", 7, this, 64, 20, true); GameRegistry.registerTileEntity(TileEntityMachine.class, References.MOD_ID + ":MachineTileEntity"); } @EventHandler public void postInit(FMLPostInitializationEvent event) { } @SideOnly(Side.CLIENT) public void onTick(TickEvent.ClientTickEvent event) { Minecraft mc = FMLClientHandler.instance().getClient(); { } } }
-
GameRegistry.registerItem(bucketFake, “bucketFake”, “AdamiteMod”); -> où est-ce que tu crées ton seau ?! Robin l’a dit juste au-dessus
-
bucketFake = new ItemBucketFake(BlockFluidFake).setUnlocalizedName(“bucketFake”).setTextureName(“AdamiteMod:Fake”);
doit être avant la ligne
GameRegistry.registerItem(bucketFake, “bucketFake”, “AdamiteMod”); -
oui mais sa crash toujours voici mes code :
package com.adamitemod.mod; import java.awt.Color; import java.io.File; import java.util.Properties; 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.Dynamite.EntityDynamite; import com.adamitemod.mod.blocks.BlockElevator; import com.adamitemod.mod.blocks.ElevatorEvent; import com.adamitemod.mod.init.BlocksMod; import com.adamitemod.mod.init.CraftsMod; import com.adamitemod.mod.init.ItemsMod; import com.adamitemod.mod.items.ItemDynamite; import com.adamitemod.mod.proxy.CommonProxy; 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.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; 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) { fluidFake = new Fluid("fake").setDensity(4000).setViscosity(500).setTemperature(459).setLuminosity(10).setUnlocalizedName("fake"); FluidRegistry.registerFluid(fluidFake); fluidFake = FluidRegistry.getFluid("fake"); bucketFake = new ItemBucketFake(BlockFluidFake).setUnlocalizedName("bucketFake").setTextureName("AdamiteMod:Fake"); if(fluidFake.getBlock() == null) { BlockFluidFake = new BlockFluidFake(fluidFake, Material.water).setBlockName("fluidFake"); GameRegistry.registerBlock(BlockFluidFake, "fluidFake"); fluidFake.setBlock(BlockFluidFake); fluidFake.setBlock(BlockFluidFake); } else { BlockFluidFake = fluidFake.getBlock(); } GameRegistry.registerItem(bucketFake, "bucketFake", "AdamiteMod"); FluidContainerRegistry.registerFluidContainer(FluidRegistry.getFluidStack("tutorial", FluidContainerRegistry.BUCKET_VOLUME), new ItemStack(bucketFake), FluidContainerRegistry.EMPTY_BUCKET); BlocksMod.init(); 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"); ItemsMod.register(); Dynamite = new ItemDynamite(Dynamite).setUnlocalizedName("Dynamite").setCreativeTab(AdamiteMod.Ada).setTextureName(References.MOD_ID + ":dynamite"); GameRegistry.registerItem(Dynamite, "Dynamite"); GameRegistry.registerBlock(Machine, "Machine"); CraftsMod.init(); WorldRegister.mainRegsitry(); proxy.registerRenders(); EntityRegistry.registerModEntity(EntityDynamite.class, "Dynamite", 7, this, 64, 20, true); } @EventHandler public void init(FMLInitializationEvent event) { proxy.registerRenders(); 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()); EntityRegistry.registerModEntity(EntityDynamite.class, "Dynamite", 7, this, 64, 20, true); GameRegistry.registerTileEntity(TileEntityMachine.class, References.MOD_ID + ":MachineTileEntity"); } @EventHandler public void postInit(FMLPostInitializationEvent event) { } @SideOnly(Side.CLIENT) public void onTick(TickEvent.ClientTickEvent event) { Minecraft mc = FMLClientHandler.instance().getClient(); { } } }
package com.adamitemod.mod; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.util.IIcon; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import net.minecraftforge.fluids.BlockFluidClassic; import net.minecraftforge.fluids.Fluid; public class BlockFluidFake extends BlockFluidClassic { private IIcon stillIcon, flowingIcon; public BlockFluidFake(Fluid fluid, Material material) { super(fluid, material); } public IIcon getIcon(int side, int meta) { return (side == 0 || side == 1) ? stillIcon : flowingIcon; } public void registerBlockIcons(IIconRegister register) { stillIcon = register.registerIcon("AdamiteMod:tuto_fluid_still"); flowingIcon = register.registerIcon("AdamiteMod:tuto_fluid_flow"); } public boolean canDisplace(IBlockAccess world, int x, int y, int z) { if(world.getBlock(x, y, z).getMaterial().isLiquid()) { return false; } return super.canDisplace(world, x, y, z); } public boolean displaceIfPossible(World world, int x, int y, int z) { if(world.getBlock(x, y, z).getMaterial().isLiquid()) { return false; } return super.displaceIfPossible(world, x, y, z); } }
package com.adamitemod.mod; import net.minecraft.block.Block; import net.minecraft.item.ItemStack; import net.minecraftforge.event.entity.player.FillBucketEvent; import cpw.mods.fml.common.eventhandler.Event.Result; import cpw.mods.fml.common.eventhandler.SubscribeEvent; public class BucketEvent { @SubscribeEvent public void onBucketFill(FillBucketEvent event) { Block block = event.world.getBlock(event.target.blockX, event.target.blockY, event.target.blockZ); int metadata = event.world.getBlockMetadata(event.target.blockX, event.target.blockY, event.target.blockZ); if(block == AdamiteMod.BlockFluidFake && metadata == 0) { event.world.setBlockToAir(event.target.blockX, event.target.blockY, event.target.blockZ); event.result = new ItemStack(AdamiteMod.bucketFake); event.setResult(Result.ALLOW); } } }
package com.adamitemod.mod; import net.minecraft.block.Block; import net.minecraft.item.ItemBucket; public class ItemBucketFake extends ItemBucket { public ItemBucketFake(Block fluid) { super(fluid); this.setCreativeTab(AdamiteMod.Ada); } }
le crash report
–-- Minecraft Crash Report ---- // Oops. Time: 17/05/16 23:25 Description: Initializing game java.lang.RuntimeException: Invalid FluidContainerData - a parameter was null. at net.minecraftforge.fluids.FluidContainerRegistry$FluidContainerData.<init>(FluidContainerRegistry.java:381) at net.minecraftforge.fluids.FluidContainerRegistry$FluidContainerData.<init>(FluidContainerRegistry.java:370) at net.minecraftforge.fluids.FluidContainerRegistry.registerFluidContainer(FluidContainerRegistry.java:102) at com.adamitemod.mod.AdamiteMod.preInit(AdamiteMod.java:122) 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) at net.minecraft.client.Minecraft.run(Minecraft.java:942) at net.minecraft.client.main.Main.main(Main.java:164) 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 net.minecraft.launchwrapper.Launch.launch(Launch.java:135) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source) at GradleStart.main(Unknown Source) A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Stacktrace: at net.minecraftforge.fluids.FluidContainerRegistry$FluidContainerData.<init>(FluidContainerRegistry.java:381) at net.minecraftforge.fluids.FluidContainerRegistry$FluidContainerData.<init>(FluidContainerRegistry.java:370) at net.minecraftforge.fluids.FluidContainerRegistry.registerFluidContainer(FluidContainerRegistry.java:102) at com.adamitemod.mod.AdamiteMod.preInit(AdamiteMod.java:122) 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) -- Initialization -- Details: Stacktrace: at net.minecraft.client.Minecraft.run(Minecraft.java:942) at net.minecraft.client.main.Main.main(Main.java:164) 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 net.minecraft.launchwrapper.Launch.launch(Launch.java:135) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source) at GradleStart.main(Unknown Source) -- System Details -- Details: Minecraft Version: 1.7.10 Operating System: Windows 10 (x86) version 10.0 Java Version: 1.8.0_66, Oracle Corporation Java VM Version: Java HotSpot(TM) Client VM (mixed mode), Oracle Corporation Memory: 856486296 bytes (816 MB) / 1046937600 bytes (998 MB) up to 1046937600 bytes (998 MB) JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0 FML: MCP v9.05 FML v7.10.99.99 Minecraft Forge 10.13.4.1558 4 mods loaded, 4 mods active States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored UCH mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) UCH FML{7.10.99.99} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.4.1558-1.7.10.jar) UCH Forge{10.13.4.1558} [Minecraft Forge] (forgeSrc-1.7.10-10.13.4.1558-1.7.10.jar) UCE adamitemod{1.0.0} [Adamite Mod] (bin) GL info: ' Vendor: 'Intel' Version: '4.0.0 - Build 10.18.10.4276' Renderer: 'Intel(R) HD Graphics' Launched Version: 1.7.10 LWJGL: 2.9.1 OpenGL: Intel(R) HD Graphics GL version 4.0.0 - Build 10.18.10.4276, Intel GL Caps: Using GL 1.3 multitexturing. Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported. Anisotropic filtering is supported and maximum anisotropy is 16. Shaders are available because OpenGL 2.1 is supported. Is Modded: Definitely; Client brand changed to 'fml,forge' Type: Client (map_client.txt) Resource Packs: [] Current Language: English (US) Profiler Position: N/A (disabled) Vec3 Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used Anisotropic Filtering: Off (1) ```</init></init></init></init>
-
Dans ```java
FluidContainerRegistry.registerFluidContainer(FluidRegistry.getFluidStack(“tutorial”, FluidContainerRegistry.BUCKET_VOLUME), new ItemStack(bucketFake), FluidContainerRegistry.EMPTY_BUCKET); -
Sa crash encore :
Le crash report
–-- Minecraft Crash Report ---- // This is a token for 1 free hug. Redeem at your nearest Mojangsta: [~~HUG~~] Time: 18/05/16 00:11 Description: Initializing game java.lang.RuntimeException: Invalid FluidContainerData - a parameter was null. at net.minecraftforge.fluids.FluidContainerRegistry$FluidContainerData.<init>(FluidContainerRegistry.java:381) at net.minecraftforge.fluids.FluidContainerRegistry$FluidContainerData.<init>(FluidContainerRegistry.java:370) at net.minecraftforge.fluids.FluidContainerRegistry.registerFluidContainer(FluidContainerRegistry.java:102) at com.adamitemod.mod.AdamiteMod.preInit(AdamiteMod.java:122) 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) at net.minecraft.client.Minecraft.run(Minecraft.java:942) at net.minecraft.client.main.Main.main(Main.java:164) 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 net.minecraft.launchwrapper.Launch.launch(Launch.java:135) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source) at GradleStart.main(Unknown Source) A detailed walkthrough of the error, its code path and all known details is as follows: –------------------------------------------------------------------------------------- -- Head -- Stacktrace: at net.minecraftforge.fluids.FluidContainerRegistry$FluidContainerData.<init>(FluidContainerRegistry.java:381) at net.minecraftforge.fluids.FluidContainerRegistry$FluidContainerData.<init>(FluidContainerRegistry.java:370) at net.minecraftforge.fluids.FluidContainerRegistry.registerFluidContainer(FluidContainerRegistry.java:102) at com.adamitemod.mod.AdamiteMod.preInit(AdamiteMod.java:122) 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) -- Initialization -- Details: Stacktrace: at net.minecraft.client.Minecraft.run(Minecraft.java:942) at net.minecraft.client.main.Main.main(Main.java:164) 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 net.minecraft.launchwrapper.Launch.launch(Launch.java:135) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source) at GradleStart.main(Unknown Source) -- System Details -- Details: Minecraft Version: 1.7.10 Operating System: Windows 10 (x86) version 10.0 Java Version: 1.8.0_66, Oracle Corporation Java VM Version: Java HotSpot(TM) Client VM (mixed mode), Oracle Corporation Memory: 856166744 bytes (816 MB) / 1046937600 bytes (998 MB) up to 1046937600 bytes (998 MB) JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0 FML: MCP v9.05 FML v7.10.99.99 Minecraft Forge 10.13.4.1558 4 mods loaded, 4 mods active States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored UCH mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) UCH FML{7.10.99.99} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.4.1558-1.7.10.jar) UCH Forge{10.13.4.1558} [Minecraft Forge] (forgeSrc-1.7.10-10.13.4.1558-1.7.10.jar) UCE adamitemod{1.0.0} [Adamite Mod] (bin) GL info: ' Vendor: 'Intel' Version: '4.0.0 - Build 10.18.10.4276' Renderer: 'Intel(R) HD Graphics' Launched Version: 1.7.10 LWJGL: 2.9.1 OpenGL: Intel(R) HD Graphics GL version 4.0.0 - Build 10.18.10.4276, Intel GL Caps: Using GL 1.3 multitexturing. Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported. Anisotropic filtering is supported and maximum anisotropy is 16. Shaders are available because OpenGL 2.1 is supported. Is Modded: Definitely; Client brand changed to 'fml,forge' Type: Client (map_client.txt) Resource Packs: [] Current Language: English (US) Profiler Position: N/A (disabled) Vec3 Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used Anisotropic Filtering: Off (1)
Ma Class principale :
package com.adamitemod.mod; import java.awt.Color; import java.io.File; import java.util.Properties; 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.Dynamite.EntityDynamite; import com.adamitemod.mod.blocks.BlockElevator; import com.adamitemod.mod.blocks.ElevatorEvent; import com.adamitemod.mod.init.BlocksMod; import com.adamitemod.mod.init.CraftsMod; import com.adamitemod.mod.init.ItemsMod; import com.adamitemod.mod.items.ItemDynamite; import com.adamitemod.mod.proxy.CommonProxy; 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.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; 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) { fluidFake = new Fluid("fake").setDensity(4000).setViscosity(500).setTemperature(459).setLuminosity(10).setUnlocalizedName("fake"); FluidRegistry.registerFluid(fluidFake); fluidFake = FluidRegistry.getFluid("fake"); bucketFake = new ItemBucketFake(BlockFluidFake).setUnlocalizedName("bucketFake").setTextureName("AdamiteMod:Fake"); if(fluidFake.getBlock() == null) { BlockFluidFake = new BlockFluidFake(fluidFake, Material.water).setBlockName("fluidFake"); GameRegistry.registerBlock(BlockFluidFake, "fluidFake"); fluidFake.setBlock(BlockFluidFake); fluidFake.setBlock(BlockFluidFake); } else { BlockFluidFake = fluidFake.getBlock(); } GameRegistry.registerItem(bucketFake, "bucketFake", "AdamiteMod"); FluidContainerRegistry.registerFluidContainer(FluidRegistry.getFluidStack("Fake", FluidContainerRegistry.BUCKET_VOLUME), new ItemStack(bucketFake), FluidContainerRegistry.EMPTY_BUCKET); BlocksMod.init(); 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"); ItemsMod.register(); Dynamite = new ItemDynamite(Dynamite).setUnlocalizedName("Dynamite").setCreativeTab(AdamiteMod.Ada).setTextureName(References.MOD_ID + ":dynamite"); GameRegistry.registerItem(Dynamite, "Dynamite"); GameRegistry.registerBlock(Machine, "Machine"); CraftsMod.init(); WorldRegister.mainRegsitry(); proxy.registerRenders(); EntityRegistry.registerModEntity(EntityDynamite.class, "Dynamite", 7, this, 64, 20, true); } @EventHandler public void init(FMLInitializationEvent event) { proxy.registerRenders(); 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()); EntityRegistry.registerModEntity(EntityDynamite.class, "Dynamite", 7, this, 64, 20, true); GameRegistry.registerTileEntity(TileEntityMachine.class, References.MOD_ID + ":MachineTileEntity"); } @EventHandler public void postInit(FMLPostInitializationEvent event) { } @SideOnly(Side.CLIENT) public void onTick(TickEvent.ClientTickEvent event) { Minecraft mc = FMLClientHandler.instance().getClient(); { } } } ```</init></init></init></init>
-
Sans majuscule.
-
Ses bon mais des que je fait clique droit pour sortire l’eau du seau sa crash voici le crash report :
–-- Minecraft Crash Report ---- // Why did you do that? Time: 18/05/16 00:44 Description: Unexpected error java.lang.NullPointerException: Unexpected error at net.minecraft.world.chunk.storage.ExtendedBlockStorage.func_150818_a(ExtendedBlockStorage.java:86) at net.minecraft.world.chunk.Chunk.func_150807_a(Chunk.java:653) at net.minecraft.world.World.setBlock(World.java:519) at net.minecraft.item.ItemBucket.tryPlaceContainedLiquid(ItemBucket.java:210) at net.minecraft.item.ItemBucket.onItemRightClick(ItemBucket.java:142) at net.minecraft.item.ItemStack.useItemRightClick(ItemStack.java:164) at net.minecraft.client.multiplayer.PlayerControllerMP.sendUseItem(PlayerControllerMP.java:430) at net.minecraft.client.Minecraft.func_147121_ag(Minecraft.java:1557) at net.minecraft.client.Minecraft.runTick(Minecraft.java:2044) at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1039) at net.minecraft.client.Minecraft.run(Minecraft.java:962) at net.minecraft.client.main.Main.main(Main.java:164) 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 net.minecraft.launchwrapper.Launch.launch(Launch.java:135) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source) at GradleStart.main(Unknown Source) A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Stacktrace: at net.minecraft.world.chunk.storage.ExtendedBlockStorage.func_150818_a(ExtendedBlockStorage.java:86) at net.minecraft.world.chunk.Chunk.func_150807_a(Chunk.java:653) at net.minecraft.world.World.setBlock(World.java:519) at net.minecraft.item.ItemBucket.tryPlaceContainedLiquid(ItemBucket.java:210) at net.minecraft.item.ItemBucket.onItemRightClick(ItemBucket.java:142) at net.minecraft.item.ItemStack.useItemRightClick(ItemStack.java:164) at net.minecraft.client.multiplayer.PlayerControllerMP.sendUseItem(PlayerControllerMP.java:430) at net.minecraft.client.Minecraft.func_147121_ag(Minecraft.java:1557) -- Affected level -- Details: Level name: MpServer All players: 1 total; [EntityClientPlayerMP['Player390'/240, l='MpServer', x=-99,60, y=82,62, z=365,71]] Chunk stats: MultiplayerChunkCache: 49, 49 Level seed: 0 Level generator: ID 00 - default, ver 1\. Features enabled: false Level generator options: Level spawn location: World: (-188,64,256), Chunk: (at 4,4,0 in -12,16; contains blocks -192,0,256 to -177,255,271), Region: (-1,0; contains chunks -32,0 to -1,31, blocks -512,0,0 to -1,255,511) Level time: 431333 game time, 294677 day time Level dimension: 0 Level storage version: 0x00000 - Unknown? Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false) Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: false Forced entities: 29 total; [EntityZombie['Zombie'/128, l='MpServer', x=-64,50, y=31,00, z=411,97], EntityZombie['Zombie'/129, l='MpServer', x=-64,41, y=29,00, z=404,94], EntitySkeleton['Skeleton'/321, l='MpServer', x=-84,50, y=37,00, z=406,50], EntityChicken['Chicken'/134, l='MpServer', x=-57,44, y=69,00, z=366,44], EntityChicken['Chicken'/135, l='MpServer', x=-57,44, y=68,00, z=368,56], EntityChicken['Chicken'/136, l='MpServer', x=-62,59, y=69,00, z=372,34], EntityChicken['Chicken'/137, l='MpServer', x=-63,59, y=69,00, z=382,59], EntityClientPlayerMP['Player390'/240, l='MpServer', x=-99,60, y=82,62, z=365,71], EntityCreeper['Creeper'/138, l='MpServer', x=-62,78, y=30,00, z=408,31], EntityChicken['Chicken'/139, l='MpServer', x=-57,41, y=76,00, z=401,56], EntityPig['Pig'/84, l='MpServer', x=-147,22, y=73,00, z=368,50], EntityWolf['Wolf'/100, l='MpServer', x=-141,59, y=65,00, z=411,94], EntityPig['Pig'/102, l='MpServer', x=-123,91, y=72,00, z=331,72], EntityChicken['Chicken'/103, l='MpServer', x=-125,56, y=75,00, z=341,66], EntitySkeleton['Skeleton'/106, l='MpServer', x=-103,53, y=14,00, z=343,31], EntityItem['item.tile.stone'/107, l='MpServer', x=-98,13, y=78,13, z=365,16], EntityItem['item.tile.workbench'/108, l='MpServer', x=-97,41, y=81,13, z=368,03], EntityBat['Bat'/364, l='MpServer', x=-126,79, y=30,01, z=406,40], EntityChicken['Chicken'/118, l='MpServer', x=-80,44, y=71,00, z=330,44], EntityChicken['Chicken'/119, l='MpServer', x=-94,47, y=72,00, z=338,47], EntityZombie['Zombie'/120, l='MpServer', x=-85,50, y=28,00, z=350,50], EntityCreeper['Creeper'/121, l='MpServer', x=-87,50, y=29,00, z=356,50], EntitySkeleton['Skeleton'/122, l='MpServer', x=-93,84, y=79,00, z=358,44], EntityCreeper['Creeper'/250, l='MpServer', x=-104,50, y=33,00, z=340,50], EntitySkeleton['Skeleton'/123, l='MpServer', x=-80,50, y=26,00, z=377,50], EntityCreeper['Creeper'/251, l='MpServer', x=-104,50, y=33,00, z=339,50], EntityZombie['Zombie'/253, l='MpServer', x=-110,50, y=33,00, z=344,50], EntityZombie['Zombie'/254, l='MpServer', x=-109,50, y=33,00, z=342,50], EntityBat['Bat'/127, l='MpServer', x=-73,31, y=32,90, z=391,68]] Retry entities: 0 total; [] Server brand: fml,forge Server type: Integrated singleplayer server Stacktrace: at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:415) at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:2566) at net.minecraft.client.Minecraft.run(Minecraft.java:991) at net.minecraft.client.main.Main.main(Main.java:164) 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 net.minecraft.launchwrapper.Launch.launch(Launch.java:135) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source) at GradleStart.main(Unknown Source) – System Details -- Details: Minecraft Version: 1.7.10 Operating System: Windows 10 (x86) version 10.0 Java Version: 1.8.0_66, Oracle Corporation Java VM Version: Java HotSpot(TM) Client VM (mixed mode), Oracle Corporation Memory: 780825672 bytes (744 MB) / 1046937600 bytes (998 MB) up to 1046937600 bytes (998 MB) JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used IntCache: cache: 0, tcache: 0, allocated: 13, tallocated: 95 FML: MCP v9.05 FML v7.10.99.99 Minecraft Forge 10.13.4.1558 4 mods loaded, 4 mods active States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored UCHIJAAAA mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) UCHIJAAAA FML{7.10.99.99} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.4.1558-1.7.10.jar) UCHIJAAAA Forge{10.13.4.1558} [Minecraft Forge] (forgeSrc-1.7.10-10.13.4.1558-1.7.10.jar) UCHIJAAAA adamitemod{1.0.0} [Adamite Mod] (bin) GL info: ' Vendor: 'Intel' Version: '4.0.0 - Build 10.18.10.4276' Renderer: 'Intel(R) HD Graphics' Launched Version: 1.7.10 LWJGL: 2.9.1 OpenGL: Intel(R) HD Graphics GL version 4.0.0 - Build 10.18.10.4276, Intel GL Caps: Using GL 1.3 multitexturing. Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported. Anisotropic filtering is supported and maximum anisotropy is 16. Shaders are available because OpenGL 2.1 is supported. Is Modded: Definitely; Client brand changed to 'fml,forge' Type: Client (map_client.txt) Resource Packs: [] Current Language: English (US) Profiler Position: N/A (disabled) Vec3 Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used Anisotropic Filtering: Off (1)
-
Toujours une question d’ordre.
bucketFake = new ItemBucketFake(BlockFluidFake).setUnlocalizedName("bucketFake").setTextureName("AdamiteMod:Fake");
doit être avant
GameRegistry.registerItem(bucketFake, "bucketFake", "AdamiteMod");
(comme déjà fait)
mais également après :if(fluidFake.getBlock() == null) { BlockFluidFake = new BlockFluidFake(fluidFake, Material.water).setBlockName("fluidFake"); GameRegistry.registerBlock(BlockFluidFake, "fluidFake"); fluidFake.setBlock(BlockFluidFake); } else { BlockFluidFake = fluidFake.getBlock(); }
(ce qui n’est pas le cas)
-
Oui
%(#000000)[[size=small] bucketFake ]%(#666600)[[size=small]=] %(#7f0055)[[size=small]**new**] %(#000000)[[size=small]ItemBucketFake]%(#666600)[[size=small](]%(#000000)[[size=small]BlockFluidFake]%(#666600)[[size=small]).]%(#000000)[[size=small]setUnlocalizedName]%(#666600)[[size=small](]%(#2a00ff)[[size=small]"bucketFake"]%(#666600)[[size=small]).]%(#000000)[[size=small]setTextureName]%(#666600)[[size=small](]%(#2a00ff)[[size=small]"AdamiteMod:Fake"]%(#666600)[[size=small]);]
est bien avant
%(#000000)[[size=small]GameRegistry]%(#666600)[[size=small].]%(#000000)[[size=small]registerItem]%(#666600)[[size=small](]%(#000000)[[size=small]bucketFake]%(#666600)[[size=small],] %(#2a00ff)[[size=small]"bucketFake"]%(#666600)[[size=small],] %(#2a00ff)[[size=small]"AdamiteMod"]%(#666600)[[size=small]);]
mais pour le reste je m’excuse tu ma laisser loin car j’ai pas compris se que tu veux dire
-
sa dois bien etre comme sa ?
public void preInit(FMLPreInitializationEvent event) { fluidFake = new Fluid("fake").setDensity(4000).setViscosity(500).setTemperature(459).setLuminosity(10).setUnlocalizedName("fake"); FluidRegistry.registerFluid(fluidFake); fluidFake = FluidRegistry.getFluid("fake"); bucketFake = new ItemBucketFake(BlockFluidFake).setUnlocalizedName("bucketFake").setTextureName("AdamiteMod:Fake"); if(fluidFake.getBlock() == null) { BlockFluidFake = new BlockFluidFake(fluidFake, Material.water).setBlockName("fluidFake"); GameRegistry.registerBlock(BlockFluidFake, "fluidFake"); fluidFake.setBlock(BlockFluidFake); } else { BlockFluidFake = fluidFake.getBlock(); } GameRegistry.registerItem(bucketFake, "bucketFake", "AdamiteMod"); FluidContainerRegistry.registerFluidContainer(FluidRegistry.getFluidStack("fake", FluidContainerRegistry.BUCKET_VOLUME), new ItemStack(bucketFake), FluidContainerRegistry.EMPTY_BUCKET); BlocksMod.init();