
iKreal
Members-
Posts
25 -
Joined
-
Last visited
Everything posted by iKreal
-
Ok thank you! The problem is solved!
-
So how can I do to don't spawn it? I don't understand "You spawned it on the client"
-
Ok, I'll change the operation. I would like to detect a right click on dirt, gravel, sand, coarse dirt, clay on water. So I put this code: public EnumActionResult onItemUse(ItemStack stack, EntityPlayer playerIn, World worldIn, BlockPos pos, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ) { if (!playerIn.canPlayerEdit(pos.offset(facing), facing, stack)) { return EnumActionResult.FAIL; } else { IBlockState iblockstate = worldIn.getBlockState(pos); Block block = iblockstate.getBlock(); if (facing != EnumFacing.DOWN && worldIn.getBlockState(pos.up()).getMaterial() == Material.WATER && (block == Blocks.DIRT || block == Blocks.GRAVEL || block == Blocks.SAND || block == Blocks.CLAY)) { worldIn.spawnEntityInWorld(new EntityItem(worldIn, playerIn.posX, playerIn.posY, playerIn.posZ, new ItemStack(net.dev.premiermod.init.ModItems.speck_gold, 1))); worldIn.playSound(playerIn, pos, SoundEvents.ITEM_BUCKET_FILL, SoundCategory.BLOCKS, 1.0F, 1.0F); if (!worldIn.isRemote) { stack.damageItem(1, playerIn); } return EnumActionResult.SUCCESS; } else { return EnumActionResult.PASS; } } } It's more simple, and it works! But I didn't tell you one other problem... There are 2 items which spawn, including one that we cannot pick up and we can't kill it... Do you know what's the problem there? Or maybe we can give the item instead of summoning it?
-
OMG I'm so so so dumb!! Thank you so muuuchhh, I was desperate!!
-
So what's the problem in my code?
-
I'm coding for Minecraft 1.10.2 and this is not the problem (I think so) But is it possible to use JSON recipe system in 1.10 ?
-
Ok it looks cool but hard, and it is not my goal And it would be very sympathetic if you could help me about the code, because I'm stuck.. Maybe you have the solution? Thank you
-
It's simply a chance to get "some speckles" of some materials (it's not really logic but it's cool, isn't it?)
-
I would like to get a piece of speckles of gold. In fact, I would like to get randomly speckles, for example: 5% speckles of diamond 50% speckles of iron 35% speckles of gold 4% speckles of emerald And the percents aren't complementary, so you can get speckles of iron and speckles of gold with one right click. The item is a (miner's) pan, to get speckles from water...
-
Hi, i tried to copy the code and change it but actually I'm lost '-' This is the code: public ActionResult<ItemStack> onItemRightClick(ItemStack itemStackIn, World worldIn, EntityPlayer playerIn, EnumHand hand) { RayTraceResult raytraceresult = this.rayTracePan(worldIn, playerIn); ActionResult<ItemStack> ret = onPanUse(playerIn, worldIn, itemStackIn, raytraceresult); if (ret != null) return ret; if (raytraceresult == null) { return new ActionResult<ItemStack>(EnumActionResult.PASS, itemStackIn); } else if (raytraceresult.typeOfHit != RayTraceResult.Type.BLOCK) { return new ActionResult<ItemStack>(EnumActionResult.PASS, itemStackIn); } else { BlockPos blockpos = raytraceresult.getBlockPos(); { if (!playerIn.canPlayerEdit(blockpos.offset(raytraceresult.sideHit), raytraceresult.sideHit, itemStackIn)) { return new ActionResult<ItemStack>(EnumActionResult.FAIL, itemStackIn); } else { IBlockState iblockstate = worldIn.getBlockState(blockpos); Material material = iblockstate.getMaterial(); if (material == Material.WATER && ((Integer)iblockstate.getValue(BlockLiquid.LEVEL)).intValue() == 0) { worldIn.spawnEntityInWorld(new EntityItem(worldIn, playerIn.posX, playerIn.posY, playerIn.posZ, new ItemStack(net.dev.premiermod.init.ModItems.speck_gold, 1))); worldIn.playSound(playerIn, blockpos, SoundEvents.ITEM_BUCKET_FILL, SoundCategory.BLOCKS, 1.0F, 1.0F); itemStackIn.damageItem(1, playerIn); } else { return new ActionResult<ItemStack>(EnumActionResult.FAIL, itemStackIn); } } } } return ret; } private ActionResult<ItemStack> onPanUse(EntityPlayer playerIn, World worldIn, ItemStack itemStackIn, RayTraceResult raytraceresult) { // TODO Auto-generated method stub return null; } private RayTraceResult rayTracePan(World worldIn, EntityPlayer playerIn) { // TODO Auto-generated method stub return null; } I don't understand a lot of lines, so could you help me to delete ones and to modify things wrong please? I know I'm a dimwit... but I really want that thing works!! Thanks for your help
-
Hi, Thank you so much for your help. Although, no any message is displayed when I right click with the item. So the problem is at start... and it's frightening... The class of the item contains exactly this: package net.dev.premiermod.items; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraft.init.SoundEvents; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumActionResult; import net.minecraft.util.EnumFacing; import net.minecraft.util.EnumHand; import net.minecraft.util.SoundCategory; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; public class pan extends Item { public pan() { this.maxStackSize = 1; this.setMaxDamage(40); this.setCreativeTab(CreativeTabs.TOOLS); this.setRegistryName("pan"); this.setUnlocalizedName("pan"); } public EnumActionResult onItemRightClick(ItemStack stack, EntityPlayer playerIn, World worldIn, BlockPos pos, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ) { System.out.println("onItemRightClick with item = "+stack.getItem()+" at position = "+pos); IBlockState iblockstate = worldIn.getBlockState(pos); Block block = iblockstate.getBlock(); if (worldIn.getBlockState(pos.up()).getMaterial() == Material.AIR && block == Blocks.WATER || block == Blocks.FLOWING_WATER) { System.out.println("Condition met -- block pos is surface water"); worldIn.playSound(playerIn, pos, SoundEvents.ITEM_BUCKET_FILL, SoundCategory.BLOCKS, 1.0F, 1.0F); if(!worldIn.isRemote) { worldIn.spawnEntityInWorld(new EntityItem(worldIn, playerIn.posX, playerIn.posY, playerIn.posZ, new ItemStack(net.dev.premiermod.init.ModItems.speck_gold, 1))); stack.damageItem(1, playerIn); } return EnumActionResult.SUCCESS; } else { System.out.println("Condition not met -- block pos isn't surface water"); return EnumActionResult.PASS; } } } So what should I do? It's in principle an easy "system" but it doesn't work. Thanks for the future helps EDIT: I tried to replace "blocks.WATER" and "blocks.FLOWING_WATER" with "blocks.GRASS", and it works!! But the current problem is how will I do??
-
Hello, I'm making a new recipe (a Shaped recipe) but when I launch the game, the craft doesn't work... In the CommonProxy class: public void init() { new ModRecipes().RegisterCraftRecipes(); } In the ModRecipes class: package net.dev.premiermod.init; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; import net.minecraftforge.fml.common.registry.GameRegistry; public class ModRecipes { public void RegisterCraftRecipes() { GameRegistry.addRecipe(new ItemStack(ModItems.pan), new Object[]{"III"," I ", 'I', Items.IRON_INGOT}); } } And in the main class: @Mod.EventHandler public void preInit(FMLPreInitializationEvent event) {proxy.preInit();} public void init(FMLInitializationEvent event) {proxy.init();} Everything should work, but the recipe doesn't! Do you have an idea of the problem? Thank you
-
Err... I mean when I click with the item in the hand (right click) on water, there is no sound and I don't get "speckles of gold"... So the "system" doesn't work... Ok I'll try this but it seems a little hard for me. I'll see! Anyway, thanks for your response. Edit: I launched a debug "mode" and this is the console log: [10:26:16] [main/INFO] [GradleStart]: Extra: [] [10:26:16] [main/INFO] [GradleStart]: Running with arguments: [--userProperties, {}, --assetsDir, C:/Users/antoi_000/.gradle/caches/minecraft/assets, --assetIndex, 1.10, --accessToken{REDACTED}, --version, 1.10.2, --tweakClass, net.minecraftforge.fml.common.launcher.FMLTweaker, --tweakClass, net.minecraftforge.gradle.tweakers.CoremodTweaker] [10:26:16] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker [10:26:17] [main/INFO] [LaunchWrapper]: Using primary tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker [10:26:17] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.CoremodTweaker [10:26:17] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLTweaker [10:26:17] [main/INFO] [FML]: Forge Mod Loader version 12.18.3.2185 for Minecraft 1.10.2 loading [10:26:17] [main/INFO] [FML]: Java is Java HotSpot(TM) 64-Bit Server VM, version 1.8.0_171, running on Windows 10:amd64:10.0, installed at C:\Program Files\Java\jre1.8.0_171 [10:26:17] [main/INFO] [FML]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation [10:26:17] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.CoremodTweaker [10:26:17] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.fml.relauncher.FMLCorePlugin [10:26:17] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.classloading.FMLForgePlugin [10:26:17] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker [10:26:17] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLDeobfTweaker [10:26:17] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.AccessTransformerTweaker [10:26:17] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker [10:26:17] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker [10:26:17] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper [10:26:17] [main/ERROR] [FML]: The binary patch set is missing. Either you are in a development environment, or things are not going to work! [10:26:21] [main/ERROR] [FML]: FML appears to be missing any signature data. This is not a good thing [10:26:21] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper [10:26:21] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLDeobfTweaker [10:26:22] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.AccessTransformerTweaker [10:26:22] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.TerminalTweaker [10:26:22] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.TerminalTweaker [10:26:22] [main/INFO] [LaunchWrapper]: Launching wrapped minecraft {net.minecraft.client.main.Main} 2018-04-24 10:26:24,626 WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream 2018-04-24 10:26:24,682 WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream 2018-04-24 10:26:24,686 WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream [10:26:25] [Client thread/INFO]: Setting user: Player348 [10:26:34] [Client thread/WARN]: Skipping bad option: lastServer: [10:26:34] [Client thread/INFO]: LWJGL Version: 2.9.4 [10:26:37] [Client thread/INFO] [STDOUT]: [net.minecraftforge.fml.client.SplashProgress:start:221]: ---- Minecraft Crash Report ---- // Hey, that tickles! Hehehe! Time: 24/04/18 10:26 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.10.2 Operating System: Windows 10 (amd64) version 10.0 Java Version: 1.8.0_171, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 171791432 bytes (163 MB) / 392691712 bytes (374 MB) up to 913833984 bytes (871 MB) JVM Flags: 0 total; IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0 FML: Loaded coremods (and transformers): GL info: ' Vendor: 'Intel' Version: '4.0.0 - Build 10.18.10.4358' Renderer: 'Intel(R) HD Graphics 4000' [10:26:37] [Client thread/INFO] [FML]: MinecraftForge v12.18.3.2185 Initialized [10:26:37] [Client thread/INFO] [FML]: Replaced 231 ore recipes [10:26:38] [Client thread/INFO] [FML]: Found 0 mods from the command line. Injecting into mod discoverer [10:26:38] [Client thread/INFO] [FML]: Searching C:\Users\antoi_000\Desktop\Minecraft\Mes mods\PremierMod\run\mods for mods [10:26:42] [Client thread/INFO] [FML]: Forge Mod Loader has identified 4 mods to load [10:26:42] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, premod] at CLIENT [10:26:42] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, premod] at SERVER [10:26:45] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Premier Mod [10:26:45] [Client thread/INFO] [FML]: Processing ObjectHolder annotations [10:26:45] [Client thread/INFO] [FML]: Found 423 ObjectHolder annotations [10:26:45] [Client thread/INFO] [FML]: Identifying ItemStackHolder annotations [10:26:45] [Client thread/INFO] [FML]: Found 0 ItemStackHolder annotations [10:26:45] [Client thread/INFO] [FML]: Applying holder lookups [10:26:45] [Client thread/INFO] [FML]: Holder lookups applied [10:26:45] [Client thread/INFO] [FML]: Applying holder lookups [10:26:45] [Client thread/INFO] [FML]: Holder lookups applied [10:26:45] [Client thread/INFO] [FML]: Applying holder lookups [10:26:45] [Client thread/INFO] [FML]: Holder lookups applied [10:26:45] [Client thread/INFO] [FML]: Configured a dormant chunk cache size of 0 [10:26:45] [Forge Version Check/INFO] [ForgeVersionCheck]: [Forge] Starting version check at http://files.minecraftforge.net/maven/net/minecraftforge/forge/promotions_slim.json [10:26:45] [Client thread/INFO] [FML]: Applying holder lookups [10:26:45] [Client thread/INFO] [FML]: Holder lookups applied [10:26:45] [Client thread/INFO] [FML]: Injecting itemstacks [10:26:45] [Client thread/INFO] [FML]: Itemstack injection complete [10:26:46] [Forge Version Check/INFO] [ForgeVersionCheck]: [Forge] Found status: UP_TO_DATE Target: null [10:27:23] [Sound Library Loader/INFO]: Starting up SoundSystem... [10:27:23] [Thread-8/INFO]: Initializing LWJGL OpenAL [10:27:23] [Thread-8/INFO]: (The LWJGL binding of OpenAL. For more information, see http://www.lwjgl.org) [10:27:24] [Thread-8/INFO]: OpenAL initialized. [10:27:24] [Sound Library Loader/INFO]: Sound engine started [10:27:32] [Client thread/INFO] [FML]: Max texture size: 8192 [10:27:32] [Client thread/INFO]: Created: 16x16 textures-atlas [10:27:35] [Client thread/INFO] [FML]: Injecting itemstacks [10:27:35] [Client thread/INFO] [FML]: Itemstack injection complete [10:27:36] [Client thread/INFO] [FML]: Forge Mod Loader has successfully loaded 4 mods [10:27:36] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Premier Mod [10:28:01] [Client thread/INFO]: SoundSystem shutting down... [10:28:01] [Client thread/WARN]: Author: Paul Lamb, www.paulscode.com [10:28:01] [Sound Library Loader/INFO]: Starting up SoundSystem... [10:28:02] [Thread-10/INFO]: Initializing LWJGL OpenAL [10:28:02] [Thread-10/INFO]: (The LWJGL binding of OpenAL. For more information, see http://www.lwjgl.org) [10:28:02] [Thread-10/INFO]: OpenAL initialized. [10:28:02] [Sound Library Loader/INFO]: Sound engine started [10:28:09] [Client thread/INFO] [FML]: Max texture size: 8192 [10:28:09] [Client thread/INFO]: Created: 512x512 textures-atlas [10:28:11] [Client thread/WARN]: Skipping bad option: lastServer: [10:28:13] [Realms Notification Availability checker #1/INFO]: Could not authorize you against Realms server: Invalid session id I don't see any error... So how can I do to check the code? 2nd Edit: I launched the Client with Coverage and in the following lines, a line has been missed: IBlockState iblockstate = worldIn.getBlockState(pos); Block block = iblockstate.getBlock(); if (worldIn.getBlockState(pos.up()).getMaterial() == Material.AIR && block == Blocks.WATER || block == Blocks.FLOWING_WATER) { worldIn.playSound(playerIn, pos, SoundEvents.ITEM_BUCKET_FILL, SoundCategory.BLOCKS, 1.0F, 1.0F); if(!worldIn.isRemote) { worldIn.spawnEntityInWorld(new EntityItem(worldIn, playerIn.posX, playerIn.posY, playerIn.posZ, new ItemStack(net.dev.premiermod.init.ModItems.speck_gold, 1))); stack.damageItem(1, playerIn); } return EnumActionResult.SUCCESS; } else { return EnumActionResult.PASS; ...This line: if (worldIn.getBlockState(pos.up()).getMaterial() == Material.AIR && block == Blocks.WATER || block == Blocks.FLOWING_WATER) It's written "All 6 branched missed."... I don't know how to fix that. And this is the Coverage (I don't know what it represents): Thanks for your help!
-
I worked on that, and I have this: public EnumActionResult onItemRightClick(ItemStack stack, EntityPlayer playerIn, World worldIn, BlockPos pos, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ) { IBlockState iblockstate = worldIn.getBlockState(pos); Block block = iblockstate.getBlock(); if (worldIn.getBlockState(pos.up()).getMaterial() == Material.AIR && block == Blocks.WATER || block == Blocks.FLOWING_WATER) { worldIn.playSound(playerIn, pos, SoundEvents.ITEM_BUCKET_FILL, SoundCategory.BLOCKS, 1.0F, 1.0F); if(!worldIn.isRemote) { worldIn.spawnEntityInWorld(new EntityItem(worldIn, playerIn.posX, playerIn.posY, playerIn.posZ, new ItemStack(net.dev.premiermod.init.ModItems.speck_gold, 1))); stack.damageItem(1, playerIn); } return EnumActionResult.SUCCESS; } else { return EnumActionResult.PASS; } } Although, it doesn't work! Could you find the problem? Thank you for your help
-
Hhmmm I've had a look at the empty bucket class, I found this: public ActionResult<ItemStack> onItemRightClick(ItemStack itemStackIn, World worldIn, EntityPlayer playerIn, EnumHand hand) { boolean flag = this.containedBlock == Blocks.AIR; RayTraceResult raytraceresult = this.rayTrace(worldIn, playerIn, flag); ActionResult<ItemStack> ret = net.minecraftforge.event.ForgeEventFactory.onBucketUse(playerIn, worldIn, itemStackIn, raytraceresult); if (ret != null) return ret; if (raytraceresult == null) { return new ActionResult(EnumActionResult.PASS, itemStackIn); } else if (raytraceresult.typeOfHit != RayTraceResult.Type.BLOCK) { return new ActionResult(EnumActionResult.PASS, itemStackIn); } else { BlockPos blockpos = raytraceresult.getBlockPos(); if (!worldIn.isBlockModifiable(playerIn, blockpos)) { return new ActionResult(EnumActionResult.FAIL, itemStackIn); } else if (flag) { if (!playerIn.canPlayerEdit(blockpos.offset(raytraceresult.sideHit), raytraceresult.sideHit, itemStackIn)) { return new ActionResult(EnumActionResult.FAIL, itemStackIn); } else { IBlockState iblockstate = worldIn.getBlockState(blockpos); Material material = iblockstate.getMaterial(); if (material == Material.WATER && ((Integer)iblockstate.getValue(BlockLiquid.LEVEL)).intValue() == 0) { worldIn.setBlockState(blockpos, Blocks.AIR.getDefaultState(), 11); playerIn.addStat(StatList.getObjectUseStats(this)); playerIn.playSound(SoundEvents.ITEM_BUCKET_FILL, 1.0F, 1.0F); return new ActionResult(EnumActionResult.SUCCESS, this.fillBucket(itemStackIn, playerIn, Items.WATER_BUCKET)); } else if (material == Material.LAVA && ((Integer)iblockstate.getValue(BlockLiquid.LEVEL)).intValue() == 0) { playerIn.playSound(SoundEvents.ITEM_BUCKET_FILL_LAVA, 1.0F, 1.0F); worldIn.setBlockState(blockpos, Blocks.AIR.getDefaultState(), 11); playerIn.addStat(StatList.getObjectUseStats(this)); return new ActionResult(EnumActionResult.SUCCESS, this.fillBucket(itemStackIn, playerIn, Items.LAVA_BUCKET)); } else { return new ActionResult(EnumActionResult.FAIL, itemStackIn); } } } else { boolean flag1 = worldIn.getBlockState(blockpos).getBlock().isReplaceable(worldIn, blockpos); BlockPos blockpos1 = flag1 && raytraceresult.sideHit == EnumFacing.UP ? blockpos : blockpos.offset(raytraceresult.sideHit); if (!playerIn.canPlayerEdit(blockpos1, raytraceresult.sideHit, itemStackIn)) { return new ActionResult(EnumActionResult.FAIL, itemStackIn); } else if (this.tryPlaceContainedLiquid(playerIn, worldIn, blockpos1)) { playerIn.addStat(StatList.getObjectUseStats(this)); return !playerIn.capabilities.isCreativeMode ? new ActionResult(EnumActionResult.SUCCESS, new ItemStack(Items.BUCKET)) : new ActionResult(EnumActionResult.SUCCESS, itemStackIn); } else { return new ActionResult(EnumActionResult.FAIL, itemStackIn); } } } } The problem is that the method used is "onBucketUse", and if I replace it with "onItemRightClick", there is no the arguments "blockpos" anymore and you said that i can't use that. Can you help me a bit more please? Thank you very much
-
Yes, in fact I would like to do an item that you can use (like a flint and steel). This is my code: public EnumActionResult onItemUse(ItemStack stack, EntityPlayer playerIn, World worldIn, BlockPos pos, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ) { pos = pos.offset(facing); if ".........." { worldIn.playSound(playerIn, pos, SoundEvents.ENTITY_PLAYER_SPLASH, SoundCategory.PLAYERS, 1.0F, itemRand.nextFloat() * 0.4F + 0.8F); worldIn.spawnEntityInWorld(new EntityItem(worldIn, playerIn.posX, playerIn.posY, playerIn.posZ, new ItemStack(net.dev.premiermod.init.ModItems.speck_gold, 1))); stack.damageItem(1, playerIn); return EnumActionResult.SUCCESS; } else { return EnumActionResult.FAIL; } } And I need to fix the problem with the condition "if the block is water"
-
Ok thank you but what is the code to get the IBlockState of the block I'm facing? You said it's (World::getBlockState) but what have I to write on the line exactly? Thanks for your answers!
-
Hhmm I would like to test "if the player is facing a water block", whereas there, you get the blockstate and after? I tried this: if (worldIn.isBlockTickPending(pos, Blocks.WATER)) But it doesn't work... More help please? Thank you very much
-
Hello! I would like to know how can I "detect" if the block is water (flowing and static). if (worldIn.[??????](???)) { } So I would like to know if I can replace [?] by something to detect a water block. Thank you for your help!
-
Err... I didn't really get it... (bcs I'm French). How can I fix it?
-
I found the problem, it was in References, I didn't write the full "pathway?", so I put it into: public static final String CLIENT_PROXY = "net.dev.premiermod.proxy.ClientProxy"; public static final String SERVER_PROXY = "net.dev.premiermod.proxy.ServerProxy";
-
Thank you for your answer. I'm going to read this, but if there is no problem about packages, what is the problem? Because the ClientProxy class exists. Edit: I read the post and I changed the name; now I have this:
-
Hmm? It's weird... My question will seem stupid but how can I put a package in one? On the screen, proxy and utils are not in "net.dev.premiermod" but in "src/main/java", and I would like to put them in... Thanks for your answer! Edit: I think they are already in the package "net.dev.premiermod", no? I don't understand why it considers as the class "ClientProxy" doesn't exist!
-
The class ClientProxy exists: package proxy; public class ClientProxy extends CommonProxy { @Override public void preInit() { super.preInit(); } @Override public void init() { super.init(); } } Can you explain me please? Thank you
-
Hello! I started to make my first mod (even if I've already made one 5 years ago) so I lost my "skills" in java. I followed some tutorials on YouTube and when I want to run the game, it crashes. These are the console logs: 2018-04-22 15:12:11,378 WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream 2018-04-22 15:12:11,381 WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream [15:12:11] [main/INFO] [GradleStart]: Extra: [] [15:12:11] [main/INFO] [GradleStart]: Running with arguments: [--userProperties, {}, --assetsDir, C:/Users/antoi_000/.gradle/caches/minecraft/assets, --assetIndex, 1.10, --accessToken{REDACTED}, --version, 1.10.2, --tweakClass, net.minecraftforge.fml.common.launcher.FMLTweaker, --tweakClass, net.minecraftforge.gradle.tweakers.CoremodTweaker] [15:12:11] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker [15:12:11] [main/INFO] [LaunchWrapper]: Using primary tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker [15:12:11] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.CoremodTweaker [15:12:11] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLTweaker [15:12:11] [main/INFO] [FML]: Forge Mod Loader version 12.18.3.2185 for Minecraft 1.10.2 loading [15:12:11] [main/INFO] [FML]: Java is Java HotSpot(TM) 64-Bit Server VM, version 1.8.0_171, running on Windows 10:amd64:10.0, installed at C:\Program Files\Java\jre1.8.0_171 [15:12:11] [main/INFO] [FML]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation [15:12:11] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.CoremodTweaker [15:12:11] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.fml.relauncher.FMLCorePlugin [15:12:11] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.classloading.FMLForgePlugin [15:12:11] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker [15:12:11] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLDeobfTweaker [15:12:11] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.AccessTransformerTweaker [15:12:11] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker [15:12:11] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker [15:12:11] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper [15:12:12] [main/ERROR] [FML]: The binary patch set is missing. Either you are in a development environment, or things are not going to work! [15:12:14] [main/ERROR] [FML]: FML appears to be missing any signature data. This is not a good thing [15:12:14] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper [15:12:14] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLDeobfTweaker [15:12:15] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.AccessTransformerTweaker [15:12:15] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.TerminalTweaker [15:12:15] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.TerminalTweaker [15:12:16] [main/INFO] [LaunchWrapper]: Launching wrapped minecraft {net.minecraft.client.main.Main} 2018-04-22 15:12:17,071 WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream 2018-04-22 15:12:17,122 WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream 2018-04-22 15:12:17,126 WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream [15:12:17] [Client thread/INFO]: Setting user: Player164 [15:12:25] [Client thread/INFO]: LWJGL Version: 2.9.4 [15:12:28] [Client thread/INFO] [STDOUT]: [net.minecraftforge.fml.client.SplashProgress:start:221]: ---- Minecraft Crash Report ---- // But it works on my machine. Time: 22/04/18 15:12 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.10.2 Operating System: Windows 10 (amd64) version 10.0 Java Version: 1.8.0_171, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 52366416 bytes (49 MB) / 379584512 bytes (362 MB) up to 913833984 bytes (871 MB) JVM Flags: 0 total; IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0 FML: Loaded coremods (and transformers): GL info: ' Vendor: 'Intel' Version: '4.0.0 - Build 10.18.10.4358' Renderer: 'Intel(R) HD Graphics 4000' [15:12:28] [Client thread/INFO] [FML]: MinecraftForge v12.18.3.2185 Initialized [15:12:28] [Client thread/INFO] [FML]: Replaced 231 ore recipes [15:12:29] [Client thread/INFO] [FML]: Found 0 mods from the command line. Injecting into mod discoverer [15:12:29] [Client thread/INFO] [FML]: Searching C:\Users\antoi_000\Desktop\Minecraft\Mes mods\PremierMod\run\mods for mods [15:12:34] [Client thread/INFO] [FML]: Forge Mod Loader has identified 4 mods to load [15:12:35] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, premod] at CLIENT [15:12:35] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, premod] at SERVER [15:12:37] [Client thread/ERROR] [FML]: An error occurred trying to load a proxy into {serverSide=net.dev.proxy.SeverProxy, clientSide=net.dev.proxy.ClientProxy}.net.dev.premiermod.premiermod java.lang.ClassNotFoundException: net.dev.proxy.ClientProxy at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:191) ~[launchwrapper-1.12.jar:?] at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_171] at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_171] at net.minecraftforge.fml.common.ModClassLoader.loadClass(ModClassLoader.java:75) ~[ModClassLoader.class:?] at java.lang.Class.forName0(Native Method) ~[?:1.8.0_171] at java.lang.Class.forName(Unknown Source) ~[?:1.8.0_171] at net.minecraftforge.fml.common.ProxyInjector.inject(ProxyInjector.java:71) [ProxyInjector.class:?] at net.minecraftforge.fml.common.FMLModContainer.constructMod(FMLModContainer.java:579) [FMLModContainer.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_171] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_171] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_171] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_171] 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 net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:243) [LoadController.class:?] at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:221) [LoadController.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_171] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_171] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_171] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_171] 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 net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:145) [LoadController.class:?] at net.minecraftforge.fml.common.Loader.loadMods(Loader.java:549) [Loader.class:?] at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:218) [FMLClientHandler.class:?] at net.minecraft.client.Minecraft.startGame(Minecraft.java:477) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:386) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_171] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_171] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_171] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_171] 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 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_171] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_171] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_171] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_171] at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?] at GradleStart.main(GradleStart.java:26) [start/:?] Caused by: java.lang.NullPointerException at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:182) ~[launchwrapper-1.12.jar:?] ... 45 more [15:12:37] [Client thread/ERROR] [FML]: Fatal errors were detected during the transition from CONSTRUCTING to PREINITIALIZATION. Loading cannot continue [15:12:37] [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 UC mcp{9.19} [Minecraft Coder Pack] (minecraft.jar) UC FML{8.0.99.99} [Forge Mod Loader] (forgeSrc-1.10.2-12.18.3.2185.jar) UC Forge{12.18.3.2185} [Minecraft Forge] (forgeSrc-1.10.2-12.18.3.2185.jar) UE premod{1.0} [Premier Mod] (bin) [15:12:37] [Client thread/ERROR] [FML]: The following problems were captured during this phase [15:12:37] [Client thread/ERROR] [FML]: Caught exception from Premier Mod (premod) net.minecraftforge.fml.common.LoaderException: java.lang.ClassNotFoundException: net.dev.proxy.ClientProxy at net.minecraftforge.fml.common.ProxyInjector.inject(ProxyInjector.java:88) ~[forgeSrc-1.10.2-12.18.3.2185.jar:?] at net.minecraftforge.fml.common.FMLModContainer.constructMod(FMLModContainer.java:579) ~[forgeSrc-1.10.2-12.18.3.2185.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_171] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_171] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_171] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_171] 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 net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:243) ~[forgeSrc-1.10.2-12.18.3.2185.jar:?] at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:221) ~[forgeSrc-1.10.2-12.18.3.2185.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_171] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_171] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_171] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_171] 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 net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:145) [LoadController.class:?] at net.minecraftforge.fml.common.Loader.loadMods(Loader.java:549) [Loader.class:?] at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:218) [FMLClientHandler.class:?] at net.minecraft.client.Minecraft.startGame(Minecraft.java:477) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:386) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_171] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_171] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_171] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_171] 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 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_171] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_171] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_171] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_171] at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?] at GradleStart.main(GradleStart.java:26) [start/:?] Caused by: java.lang.ClassNotFoundException: net.dev.proxy.ClientProxy at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:191) ~[launchwrapper-1.12.jar:?] at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_171] at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_171] at net.minecraftforge.fml.common.ModClassLoader.loadClass(ModClassLoader.java:75) ~[forgeSrc-1.10.2-12.18.3.2185.jar:?] at java.lang.Class.forName0(Native Method) ~[?:1.8.0_171] at java.lang.Class.forName(Unknown Source) ~[?:1.8.0_171] at net.minecraftforge.fml.common.ProxyInjector.inject(ProxyInjector.java:71) ~[forgeSrc-1.10.2-12.18.3.2185.jar:?] ... 39 more Caused by: java.lang.NullPointerException at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:182) ~[launchwrapper-1.12.jar:?] at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_171] at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_171] at net.minecraftforge.fml.common.ModClassLoader.loadClass(ModClassLoader.java:75) ~[forgeSrc-1.10.2-12.18.3.2185.jar:?] at java.lang.Class.forName0(Native Method) ~[?:1.8.0_171] at java.lang.Class.forName(Unknown Source) ~[?:1.8.0_171] at net.minecraftforge.fml.common.ProxyInjector.inject(ProxyInjector.java:71) ~[forgeSrc-1.10.2-12.18.3.2185.jar:?] ... 39 more [15:12:37] [Client thread/INFO] [STDOUT]: [net.minecraft.init.Bootstrap:printToSYSOUT:649]: ---- Minecraft Crash Report ---- // Why did you do that? Time: 22/04/18 15:12 Description: There was a severe problem during mod loading that has caused the game to fail net.minecraftforge.fml.common.LoaderExceptionModCrash: Caught exception from Premier Mod (premod) Caused by: net.minecraftforge.fml.common.LoaderException: java.lang.ClassNotFoundException: net.dev.proxy.ClientProxy at net.minecraftforge.fml.common.ProxyInjector.inject(ProxyInjector.java:88) at net.minecraftforge.fml.common.FMLModContainer.constructMod(FMLModContainer.java:579) 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 net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:243) at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:221) 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 net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:145) at net.minecraftforge.fml.common.Loader.loadMods(Loader.java:549) at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:218) at net.minecraft.client.Minecraft.startGame(Minecraft.java:477) at net.minecraft.client.Minecraft.run(Minecraft.java:386) at net.minecraft.client.main.Main.main(Main.java:118) 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 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.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) at GradleStart.main(GradleStart.java:26) Caused by: java.lang.ClassNotFoundException: net.dev.proxy.ClientProxy at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:191) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at net.minecraftforge.fml.common.ModClassLoader.loadClass(ModClassLoader.java:75) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at net.minecraftforge.fml.common.ProxyInjector.inject(ProxyInjector.java:71) ... 39 more Caused by: java.lang.NullPointerException at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:182) ... 45 more A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- System Details -- Details: Minecraft Version: 1.10.2 Operating System: Windows 10 (amd64) version 10.0 Java Version: 1.8.0_171, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 203002928 bytes (193 MB) / 497549312 bytes (474 MB) up to 913833984 bytes (871 MB) JVM Flags: 0 total; IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0 FML: MCP 9.32 Powered by Forge 12.18.3.2185 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 UC mcp{9.19} [Minecraft Coder Pack] (minecraft.jar) UC FML{8.0.99.99} [Forge Mod Loader] (forgeSrc-1.10.2-12.18.3.2185.jar) UC Forge{12.18.3.2185} [Minecraft Forge] (forgeSrc-1.10.2-12.18.3.2185.jar) UE premod{1.0} [Premier Mod] (bin) Loaded coremods (and transformers): GL info: ' Vendor: 'Intel' Version: '4.0.0 - Build 10.18.10.4358' Renderer: 'Intel(R) HD Graphics 4000' [15:12:37] [Client thread/INFO] [STDOUT]: [net.minecraft.init.Bootstrap:printToSYSOUT:649]: #@!@# Game crashed! Crash report saved to: #@!@# C:\Users\antoi_000\Desktop\Minecraft\Mes mods\PremierMod\run\.\crash-reports\crash-2018-04-22_15.12.37-client.txt I think it's a problem about client proxy, so i watched forums but I can't find the error. This is the code of the main class: package net.dev.premiermod; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.SidedProxy; import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; import net.minecraftforge.fml.common.event.FMLInitializationEvent; import utils.References; @Mod(modid= utils.References.MODID, name= utils.References.NAME, version= utils.References.VERSION) public class premiermod { @SidedProxy(clientSide=utils.References.CLIENT_PROXY, serverSide=utils.References.SERVER_PROXY) public static proxy.CommonProxy proxy; @Mod.Instance(References.MODID) public static premiermod instance; @Mod.EventHandler public void preInit(FMLPreInitializationEvent event) { proxy.preInit(); } public void init(FMLInitializationEvent event) { proxy.init(); } } Yes, I know, I made a commonproxy whereas it doesn't make sense... Thanks for the people who will help me! (I'm French)