Créer une Dynamite



  • Bonjours, j'ai un probleme avec les dynamite pouvez-vous m'aidez voici mon code :

    package com.mod.exonia.dynamite;
    
    import net.minecraft.creativetab.CreativeTabs;
    import net.minecraft.entity.player.EntityPlayer;
    import net.minecraft.entity.projectile.EntitySnowball;
    import net.minecraft.item.Item;
    import net.minecraft.item.ItemStack;
    import net.minecraft.world.World;
    
    public class dynamite extends Item
    {
        public dynamite()
        {
            this.maxStackSize = 16;
            this.setCreativeTab(CreativeTabs.tabMisc);
        }
        public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player)
        {
            if (!player.capabilities.isCreativeMode)
            {
                –stack.stackSize;
            }
    
            world.playSoundAtEntity(player, "random.bow", 0.5F, 0.8F / (itemRand.nextFloat() * 0.4F + 0.8F));
    
            if (!world.isRemote)
            {
                world.spawnEntityInWorld(new EntityDynamite(world, player));
            }
    
            return stack;
        }
    }
    
    package com.mod.exonia.dynamite;
    
    import cpw.mods.fml.common.registry.IEntityAdditionalSpawnData;
    import io.netty.buffer.ByteBuf;
    import net.minecraft.entity.EntityLivingBase;
    import net.minecraft.entity.monster.EntityBlaze;
    import net.minecraft.entity.projectile.EntityThrowable;
    import net.minecraft.util.DamageSource;
    import net.minecraft.util.MovingObjectPosition;
    import net.minecraft.world.World;
    
    public class EntityDynamite extends EntityThrowable implements IEntityAdditionalSpawnData
    {
       private int fuseTime = 40;
    
       public EntityDynamite(World world)
       {
           super(world);
       }
    
       public EntityDynamite(World world, EntityLivingBase thrower)
       {
           super(world, thrower);
       }
    
       public EntityDynamite(World world, double x, double y, double z)
       {
           super(world, x, y, z);
       }
    
       protected void onImpact(MovingObjectPosition mop)
       {
           this.motionX = 0;
           this.motionY = 0;
           this.motionZ = 0;
           if (!this.worldObj.isRemote)
           {
    
           }
       }       
       @Override
       public void onUpdate()
       {
           super.onUpdate();
           if(this.fuseTime > 0)
           {
               this.fuseTime --;
           }
    
           else if(!this.worldObj.isRemote)
           {
               this.worldObj.newExplosion(this, this.posX, this.posY, this.posZ, 5.0F, false, true);
               this.setDead();
           }
    
       }
    
       @Override
       public void writeSpawnData(ByteBuf buffer)
       {
           buffer.writeInt(this.fuseTime);
       }
    
       @Override
       public void readSpawnData(ByteBuf additionalData)
       {
           this.fuseTime = additionalData.readInt();
       }
    }
    
    package com.mod.exonia.dynamite;
    
    import net.minecraft.client.renderer.entity.Render;
    import net.minecraft.entity.Entity;
    import net.minecraft.item.Item;
    import net.minecraft.util.ResourceLocation;
    
    public class RenderDynamite extends Render
    {
        private Item dynamite;
        private int RenderDynamite;
        private static final String __OBFID = "CL_00001008";
    
        public RenderDynamite(Item dynamite, int RenderDynamite)
        {
            this.dynamite = dynamite;
            this.RenderDynamite = RenderDynamite;
        }
    
        public RenderDynamite(Item dynamite)
        {
            this(dynamite, 0);
        }
    
        @Override
        public void doRender(Entity dynamite, double x, double y, double z, float dynamite1, float RenderDynamite)
        {
            // TODO Auto-generated method stub
    
        }
    
        @Override
        protected ResourceLocation getEntityTexture(Entity dynamite)
        {
            // TODO Auto-generated method stub
            return null;
        }
    }
    
    package com.mod.exonia;
    
    import com.mod.exonia.dynamite.EntityDynamite;
    import com.mod.exonia.init.BlockMod;
    import com.mod.exonia.init.ItemMod;
    import com.mod.exonia.proxy.CommonProxy;
    import com.mod.exonia.world.WorldRegister;
    
    import cpw.mods.fml.common.Mod;
    import cpw.mods.fml.common.Mod.EventHandler;
    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.registry.EntityRegistry;
    
    @Mod(modid = Reference.MOD_NAME, version = Reference.VERSION)
    
    public class Exonia
    {
        @SidedProxy(clientSide = Reference.CLIENT_PROXY, serverSide = Reference.SERVER_PROXY)
        public static CommonProxy proxy;
    
        @EventHandler
        public void preInit(FMLPreInitializationEvent event)
        {
            BlockMod.init();
            BlockMod.register();
            ItemMod.init();
            ItemMod.register();
            WorldRegister.mainRegistry();
        }
    
        @EventHandler
        public void Init(FMLInitializationEvent event)
        {
            proxy.registerRenders();
            EntityRegistry.registerModEntity(EntityDynamite.class, "EntityDynamite", 420, ItemMod.instance, 32, 20, false);
        }
    
        @EventHandler
        public void postInit(FMLPostInitializationEvent event)
        {
    
        }
    }
    
    package com.mod.exonia.proxy;
    
    import org.lwjgl.input.Keyboard;
    
    import com.mod.exonia.dynamite.EntityDynamite;
    import com.mod.exonia.dynamite.RenderDynamite;
    import com.mod.exonia.init.ItemMod;
    
    import cpw.mods.fml.client.registry.RenderingRegistry;
    import cpw.mods.fml.common.FMLCommonHandler;
    import cpw.mods.fml.common.eventhandler.SubscribeEvent;
    import cpw.mods.fml.common.gameevent.InputEvent.KeyInputEvent;
    import net.minecraft.client.renderer.entity.RenderSnowball;
    import net.minecraft.client.settings.KeyBinding;
    
    public class ClientProxy extends CommonProxy
    {
    
        public static KeyBinding keyBinding;
    
        @Override
        public void registerRenders()
        {
            RenderingRegistry.registerEntityRenderingHandler(EntityDynamite.class, new RenderSnowball(ItemMod.dynamite));
    
        }
    
        public ClientProxy()
        {
    
        }
    
        @SubscribeEvent
        public void onEvent(KeyInputEvent event)
        {
    
        }
    
        private void keyPressed()
        {
    
        }
    
    }
    

    Quand je lance le jeu je crash

    Voila merci de me répondre vite



  • Et quel est le problème exactement ?



  • Envoie le crash report.



  • @'Alexandre1156':

    Envoie le crash report.

    [23:44:38] [main/INFO] [GradleStart]: Extra: []
    [23:44:38] [main/INFO] [GradleStart]: Running with arguments: [–userProperties, {}, --assetsDir, C:/Users/Zokyt/.gradle/caches/minecraft/assets, --assetIndex, 1.7.10, --accessToken, {REDACTED}, --version, 1.7.10, --tweakClass, cpw.mods.fml.common.launcher.FMLTweaker, --tweakClass, net.minecraftforge.gradle.tweakers.CoremodTweaker]
    [23:44:38] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLTweaker
    [23:44:38] [main/INFO] [LaunchWrapper]: Using primary tweak class name cpw.mods.fml.common.launcher.FMLTweaker
    [23:44:38] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.CoremodTweaker
    [23:44:38] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLTweaker
    [23:44:38] [main/INFO] [FML]: Forge Mod Loader version 7.99.40.1614 for Minecraft 1.7.10 loading
    [23:44:38] [main/INFO] [FML]: Java is Java HotSpot(TM) 64-Bit Server VM, version 1.8.0_121, running on Windows 10:amd64:10.0, installed at C:\Program Files\Java\jdk1.8.0_121\jre
    [23:44:38] [main/INFO] [FML]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation
    [23:44:38] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.CoremodTweaker
    [23:44:38] [main/INFO] [GradleStart]: Injecting location in coremod cpw.mods.fml.relauncher.FMLCorePlugin
    [23:44:38] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.classloading.FMLForgePlugin
    [23:44:38] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker
    [23:44:38] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLDeobfTweaker
    [23:44:38] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.AccessTransformerTweaker
    [23:44:38] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker
    [23:44:38] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker
    [23:44:38] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper
    [23:44:39] [main/ERROR] [FML]: The binary patch set is missing. Either you are in a development environment, or things are not going to work!
    [23:44:40] [main/ERROR] [FML]: FML appears to be missing any signature data. This is not a good thing
    [23:44:40] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper
    [23:44:40] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLDeobfTweaker
    [23:44:40] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.AccessTransformerTweaker
    [23:44:40] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.TerminalTweaker
    [23:44:40] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.TerminalTweaker
    [23:44:40] [main/INFO] [LaunchWrapper]: Launching wrapped minecraft {net.minecraft.client.main.Main}
    [23:44:41] [main/INFO]: Setting user: Player158
    [23:44:42] [Client thread/INFO]: LWJGL Version: 2.9.1
    [23:44:44] [Client thread/INFO] [STDOUT]: [cpw.mods.fml.client.SplashProgress:start:188]: –-- Minecraft Crash Report ----
    // Oh - I know what I did wrong!
    
    Time: 12/06/17 23:44
    Description: Loading screen debug info
    
    This is just a prompt for computer specs to be printed. THIS IS NOT A ERROR
    
    A detailed walkthrough of the error, its code path and all known details is as follows:
    ---------------------------------------------------------------------------------------
    
    -- System Details --
    Details:
    Minecraft Version: 1.7.10
    Operating System: Windows 10 (amd64) version 10.0
    Java Version: 1.8.0_121, Oracle Corporation
    Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
    Memory: 773221312 bytes (737 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 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: 
    GL info: ' Vendor: 'NVIDIA Corporation' Version: '4.5.0 NVIDIA 376.53' Renderer: 'GeForce GTX 750 Ti/PCIe/SSE2'
    [23:44:44] [Client thread/INFO] [MinecraftForge]: Attempting early MinecraftForge initialization
    [23:44:44] [Client thread/INFO] [FML]: MinecraftForge v10.13.4.1614 Initialized
    [23:44:44] [Client thread/INFO] [FML]: Replaced 183 ore recipies
    [23:44:44] [Client thread/INFO] [MinecraftForge]: Completed early MinecraftForge initialization
    [23:44:44] [Client thread/INFO] [FML]: Found 0 mods from the command line. Injecting into mod discoverer
    [23:44:44] [Client thread/INFO] [FML]: Searching C:\Users\Zokyt\Desktop\forge-1.7.10-10.13.4.1614-1.7.10-src\eclipse\mods for mods
    [23:44:44] [Client thread/INFO] [Exonia]: Mod Exonia is missing the required element 'name'. Substituting Exonia
    [23:44:49] [Client thread/INFO] [FML]: Forge Mod Loader has identified 4 mods to load
    [23:44:49] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, Exonia] at CLIENT
    [23:44:49] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, Exonia] at SERVER
    [23:44:50] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Exonia
    [23:44:50] [Client thread/INFO] [FML]: Processing ObjectHolder annotations
    [23:44:50] [Client thread/INFO] [FML]: Found 341 ObjectHolder annotations
    [23:44:50] [Client thread/INFO] [FML]: Identifying ItemStackHolder annotations
    [23:44:50] [Client thread/INFO] [FML]: Found 0 ItemStackHolder annotations
    [23:44:50] [Client thread/INFO] [FML]: Configured a dormant chunk cache size of 0
    [23:44:50] [Client thread/INFO] [FML]: Applying holder lookups
    [23:44:50] [Client thread/INFO] [FML]: Holder lookups applied
    [23:44:50] [Client thread/INFO] [FML]: Injecting itemstacks
    [23:44:50] [Client thread/INFO] [FML]: Itemstack injection complete
    [23:44:50] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: 
    [23:44:50] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Starting up SoundSystem…
    [23:44:50] [Thread-8/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Initializing LWJGL OpenAL
    [23:44:50] [Thread-8/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]:     (The LWJGL binding of OpenAL.  For more information, see http://www.lwjgl.org)
    [23:44:50] [Thread-8/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: OpenAL initialized.
    [23:44:51] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: 
    [23:44:51] [Sound Library Loader/INFO]: Sound engine started
    [23:44:51] [Client thread/INFO]: Created: 16x16 textures/blocks-atlas
    [23:44:51] [Client thread/INFO]: Created: 16x16 textures/items-atlas
    [23:44:51] [Client thread/ERROR] [FML]: Fatal errors were detected during the transition from INITIALIZATION to POSTINITIALIZATION. Loading cannot continue
    [23:44:51] [Client thread/ERROR] [FML]: 
    States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored
    UCHI mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) 
    UCHI FML{7.10.99.99} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.4.1614-1.7.10.jar) 
    UCHI Forge{10.13.4.1614} [Minecraft Forge] (forgeSrc-1.7.10-10.13.4.1614-1.7.10.jar) 
    UCHE Exonia{1.0.0} [Exonia] (bin) 
    [23:44:51] [Client thread/ERROR] [FML]: The following problems were captured during this phase
    [23:44:51] [Client thread/ERROR] [FML]: Caught exception from Exonia
    java.lang.NullPointerException
    at cpw.mods.fml.common.registry.EntityRegistry.doModEntityRegistration(EntityRegistry.java:164) ~[forgeSrc-1.7.10-10.13.4.1614-1.7.10.jar:?]
    at cpw.mods.fml.common.registry.EntityRegistry.registerModEntity(EntityRegistry.java:150) ~[forgeSrc-1.7.10-10.13.4.1614-1.7.10.jar:?]
    at com.mod.exonia.Exonia.Init(Exonia.java:38) ~[bin/:?]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_121]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_121]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_121]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_121]
    at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:532) ~[forgeSrc-1.7.10-10.13.4.1614-1.7.10.jar:?]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_121]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_121]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_121]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_121]
    at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) ~[guava-17.0.jar:?]
    at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) ~[guava-17.0.jar:?]
    at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) ~[guava-17.0.jar:?]
    at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) ~[guava-17.0.jar:?]
    at com.google.common.eventbus.EventBus.post(EventBus.java:275) ~[guava-17.0.jar:?]
    at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:212) ~[forgeSrc-1.7.10-10.13.4.1614-1.7.10.jar:?]
    at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:190) ~[forgeSrc-1.7.10-10.13.4.1614-1.7.10.jar:?]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_121]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_121]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_121]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_121]
    at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) ~[guava-17.0.jar:?]
    at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) ~[guava-17.0.jar:?]
    at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) ~[guava-17.0.jar:?]
    at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) ~[guava-17.0.jar:?]
    at com.google.common.eventbus.EventBus.post(EventBus.java:275) ~[guava-17.0.jar:?]
    at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:119) [LoadController.class:?]
    at cpw.mods.fml.common.Loader.initializeMods(Loader.java:737) [Loader.class:?]
    at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:311) [FMLClientHandler.class:?]
    at net.minecraft.client.Minecraft.startGame(Minecraft.java:597) [Minecraft.class:?]
    at net.minecraft.client.Minecraft.run(Minecraft.java:942) [Minecraft.class:?]
    at net.minecraft.client.main.Main.main(Main.java:164) [Main.class:?]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_121]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_121]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_121]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_121]
    at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?]
    at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?]
    at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source) [start/:?]
    at GradleStart.main(Unknown Source) [start/:?]
    [23:44:51] [Client thread/INFO] [STDOUT]: [net.minecraft.client.Minecraft:displayCrashReport:388]: –-- Minecraft Crash Report ----
    // I just don't know what went wrong :(
    
    Time: 12/06/17 23:44
    Description: Initializing game
    
    java.lang.NullPointerException: Initializing game
    at cpw.mods.fml.common.registry.EntityRegistry.doModEntityRegistration(EntityRegistry.java:164)
    at cpw.mods.fml.common.registry.EntityRegistry.registerModEntity(EntityRegistry.java:150)
    at com.mod.exonia.Exonia.Init(Exonia.java:38)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:532)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at 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(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    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.initializeMods(Loader.java:737)
    at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:311)
    at net.minecraft.client.Minecraft.startGame(Minecraft.java:597)
    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(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
    at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
    at 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.EntityRegistry.doModEntityRegistration(EntityRegistry.java:164)
    at cpw.mods.fml.common.registry.EntityRegistry.registerModEntity(EntityRegistry.java:150)
    at com.mod.exonia.Exonia.Init(Exonia.java:38)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:532)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at 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(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    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.initializeMods(Loader.java:737)
    at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:311)
    at net.minecraft.client.Minecraft.startGame(Minecraft.java:597)
    
    -- 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(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
    at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
    at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source)
    at GradleStart.main(Unknown Source)
    
    -- System Details --
    Details:
    Minecraft Version: 1.7.10
    Operating System: Windows 10 (amd64) version 10.0
    Java Version: 1.8.0_121, Oracle Corporation
    Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
    Memory: 658714376 bytes (628 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 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.1614 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
    UCHI mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) 
    UCHI FML{7.10.99.99} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.4.1614-1.7.10.jar) 
    UCHI Forge{10.13.4.1614} [Minecraft Forge] (forgeSrc-1.7.10-10.13.4.1614-1.7.10.jar) 
    UCHE Exonia{1.0.0} [Exonia] (bin) 
    GL info: ' Vendor: 'NVIDIA Corporation' Version: '4.5.0 NVIDIA 376.53' Renderer: 'GeForce GTX 750 Ti/PCIe/SSE2'
    Launched Version: 1.7.10
    LWJGL: 2.9.1
    OpenGL: GeForce GTX 750 Ti/PCIe/SSE2 GL version 4.5.0 NVIDIA 376.53, NVIDIA Corporation
    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: Français (France)
    Profiler Position: N/A (disabled)
    Vec3 Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
    Anisotropic Filtering: Off (1)
    [23:44:51] [Client thread/INFO] [STDOUT]: [net.minecraft.client.Minecraft:displayCrashReport:398]: #@!@# Game crashed! Crash report saved to: #@!@# C:\Users\Zokyt\Desktop\forge-1.7.10-10.13.4.1614-1.7.10-src\eclipse\.\crash-reports\crash-2017-06-12_23.44.51-client.txt
    AL lib: (EE) alc_cleanup: 1 device not closed
    Java HotSpot(TM) 64-Bit Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release
    

  • Administrateurs

    EntityRegistry.registerModEntity(EntityDynamite.class, "EntityDynamite", 420, ItemMod.instance, 32, 20, false);
    

    devrait être :

    EntityRegistry.registerModEntity(EntityDynamite.class, "EntityDynamite", 420, Exonia.instance, 32, 20, false);
    

    et tu devrais avoir une variable instance déclaré comme ceci :

    @Instance(Reference.MOD_NAME)
    public static Exonia instance;
    


  • @'robin4002':

           EntityRegistry.registerModEntity(EntityDynamite.class, "EntityDynamite", 420, ItemMod.instance, 32, 20, false);
    

    devrait être :

           EntityRegistry.registerModEntity(EntityDynamite.class, "EntityDynamite", 420, Exonia.instance, 32, 20, false);
    

    et tu devrais avoir une variable instance déclaré comme ceci :

       @Instance(Reference.MOD_NAME)
       public static Exonia instance;
    

    Merci sa marche déja mieu mais mtn regarde comment il se lance comment je regles sa ?

    Il se jette pas la ou je vise mais il explose la ou je vise

    Youtube Video


  • Administrateurs

    Surement un soucis de synchro avec le client, dans writeSpawnData et readSpawnData ajoutes les motionX, motionY et motionZ pour qu'elles soient synchro.



  • @'robin4002':

    Surement un soucis de synchro avec le client, dans writeSpawnData et readSpawnData ajoutes les motionX, motionY et motionZ pour qu'elles soient synchro.

    Je dois les rajouter comment ?
    Comme sa ?

    @Override
       public void writeSpawnData(ByteBuf buffer, motionX motionY, motionZ)
       {
           buffer.writeInt(this.fuseTime);
       }
    
       @Override
       public void readSpawnData(ByteBuf additionalData, motionX ,motionY, motionZ)
       {
           this.fuseTime = additionalData.readInt();
       }
    }
    


  • Non, c'est faux !
    On ne rajoute jamais de paramètres lorsqu'on override une fonction d'une classe mère, ça n'aurait aucun sens.
    Tu dois juste faire un buffer.writeDouble(this.motionX) dans la fonction writeSpawnData, et un this.motionX = additionalData.readDouble(). N'oublie pas de faire la même manip pour motionY et motionZ.



  • @'Plaigon':

    Non, c'est faux !
    On ne rajoute jamais de paramètres lorsqu'on override une fonction d'une classe mère, ça n'aurait aucun sens.
    Tu dois juste faire un buffer.writeDouble(this.motionX) dans la fonction writeSpawnData, et un this.motionX = additionalData.readDouble(). N'oublie pas de faire la même manip pour motionY et motionZ.

    Ces bon MERCI A TOUSSE !



  • Bonjour j'ai suivie le code et j'ai ca
    http://prntscr.com/g1u6nh
    et j'ai declarer l'instance comme ca http://prntscr.com/g1u6u2


  • Administrateurs

    Tu as une variable nommé DrakaMod, ce qui n'est pas bon;
    Et tu ne devrais que avoir une variable instance (la seconde).



  • en gros je dois retire le DrakaMod et garde le reste, et delete la première?


  • Administrateurs

    oui.



  • mais la du coup je suis obligé de faire:
    @Instance (References.MOD_ID)
    public static DrakaMod instance;

    mais ca me genere toujours l'erreur http://prntscr.com/g2xv1j


  • Administrateurs

    Envoies ta classe principale entière.



  • https://pastebin.com/xAF48CE1
    voila ma classe principale


  • Administrateurs

    Changes la ligne suivante :
    public static CreativeTabs DrakaMod = new CreativeTabs ("drakamod")
    En :
    public static CreativeTabs drakaModTab = new CreativeTabs ("drakamod")

    Aucune variable ne doit avoir le même nom que la classe dans laquelle elle est.



  • Merci beaucoup robin 4002, maintant le problème et que mon "entity" ne s'affiche pas


  • Administrateurs

    Il faut lui ajouter un rendu.
    Après si tu as un problème pour ça il serait mieux de créer une nouvelle discussion plutôt que squatter une discussion résolu.