Замена предмета при клике

Версия Minecraft
1.12.2
1,031
19
87
Как при клике предметом заменить его на другой?
 
1,031
19
87
В самом предмете. Пробовал:
Java:
@Override
     public ItemStack onItemUseFinish(ItemStack stack, World worldIn, EntityLivingBase entityLiving) {
        
            super.onItemUseFinish(stack, worldIn, entityLiving);
            
            return new ItemStack(ExcaliburCraftItems.EXCALIBUR);
            
     }
Но не работает.
 
1,031
19
87
Ты должен уменьшить стак и положить в инвентарь необходимый предмет
Ну я пытался сделать как в классе супа... А как стаком делать? (не орудувал нем как такого)
 
1,031
19
87
Этого сета нету
Java:
setItemInHand(hand,<itemStack>)
Сделал так:
Java:
public class ItemRustySword extends Item {
  
    public ItemRustySword() {
      
        this.setCreativeTab(CreativeTabs.MISC);
        this.setMaxStackSize(1);
        this.setRegistryName("excaliburcraft", "rusty_sword");
        this.setUnlocalizedName("sword.rusty");
      
    }
  
    @Override
    @SideOnly(Side.CLIENT)
    public void addInformation(ItemStack stack, @Nullable World worldIn, List<String> tooltip, ITooltipFlag flagIn) {
      
        tooltip.add("This is a very syrange rusty sword...");
      
    }
  
    public EnumRarity getRarity(ItemStack stack) {
      
        return UtilItems.SIMPLE;
      
    }
  
    public ActionResult<ItemStack> onItemRightClick(World world, EntityPlayer player, EnumHand hand) {
      
        if(!world.isRemote) {
      
            ItemStack itemstack = player.getHeldItem(hand);

            world.playSound((EntityPlayer)null, player.posX, player.posY, player.posZ, SoundEvents.BLOCK_ENCHANTMENT_TABLE_USE, SoundCategory.NEUTRAL, 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F));
            player.addStat(StatList.getObjectUseStats(this));
            player.sendMessage(new TextComponentString("Your strong, %s".replace("%s", player.getName())));
            player.setHeldItem(hand, new ItemStack(ExcaliburCraftItems.EXCALIBUR));
          
            return new ActionResult<ItemStack>(EnumActionResult.SUCCESS, itemstack);
          
        }
      
        return null;
          
     }

}
Но при клике предметом в мире вылетает краш:
Код:
Working Directory: C:\Users\LeyxorCheysen\Documents\GitHub\ExcaliburCraft
Gradle User Home: C:\Users\LeyxorCheysen\.gradle
Gradle Distribution: Gradle wrapper from target build
Gradle Version: 2.14
Java Home: C:\Program Files\Java\jdk1.8.0_181
JVM Arguments: None
Program Arguments: None
Build Scans Enabled: false
Offline Mode Enabled: false
Gradle Tasks: runClient

This mapping 'snapshot_20171003' was designed for MC 1.12! Use at your own peril.
:deobfCompileDummyTask
:deobfProvidedDummyTask
:sourceApiJava UP-TO-DATE
:compileApiJava UP-TO-DATE
:processApiResources UP-TO-DATE
:apiClasses UP-TO-DATE
:sourceMainJava
:compileJava
:processResources
:classes
:jar
:getVersionJson
:extractNatives SKIPPED
:extractUserdev UP-TO-DATE
:getAssetIndex UP-TO-DATE
:getAssets
Current status: 218/1305   16%
Current status: 440/1305   33%
Current status: 664/1305   50%
Current status: 941/1305   72%
Current status: 1101/1305   84%
:makeStart
:runClient
2018-08-23 22:35:48,859 main WARN Disabling terminal, you're running in an unsupported environment.
[22:35:49] [main/INFO] [GradleStart]: Extra: []
[22:35:49] [main/INFO] [GradleStart]: Running with arguments: [--userProperties, {}, --assetsDir, C:/Users/LeyxorCheysen/.gradle/caches/minecraft/assets, --assetIndex, 1.12, --accessToken{REDACTED}, --version, 1.12.2, --tweakClass, net.minecraftforge.fml.common.launcher.FMLTweaker, --tweakClass, net.minecraftforge.gradle.tweakers.CoremodTweaker]
[22:35:49] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker
[22:35:49] [main/INFO] [LaunchWrapper]: Using primary tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker
[22:35:49] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.CoremodTweaker
[22:35:49] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLTweaker
[22:35:49] [main/INFO] [FML]: Forge Mod Loader version 14.23.4.2705 for Minecraft 1.12.2 loading
[22:35:49] [main/INFO] [FML]: Java is Java HotSpot(TM) 64-Bit Server VM, version 1.8.0_181, running on Windows 7:amd64:6.1, installed at C:\Program Files\Java\jdk1.8.0_181\jre
[22:35:49] [main/ERROR] [FML]: Apache Maven library folder was not in the format expected. Using default libraries directory.
[22:35:49] [main/ERROR] [FML]: Full: C:\Users\LeyxorCheysen\.gradle\caches\modules-2\files-2.1\org.apache.maven\maven-artifact\3.5.3\7dc72b6d6d8a6dced3d294ed54c2cc3515ade9f4\maven-artifact-3.5.3.jar
[22:35:49] [main/ERROR] [FML]: Trimmed: c:/users/leyxorcheysen/.gradle/caches/modules-2/files-2.1/org.apache.maven/maven-artifact/3.5.3/
[22:35:49] [main/INFO] [FML]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation
[22:35:49] [main/INFO] [FML]: Ignoring missing certificate for coremod FMLCorePlugin (net.minecraftforge.fml.relauncher.FMLCorePlugin), we are in deobf and it's a forge core plugin
[22:35:49] [main/INFO] [FML]: Ignoring missing certificate for coremod FMLForgePlugin (net.minecraftforge.classloading.FMLForgePlugin), we are in deobf and it's a forge core plugin
[22:35:49] [main/INFO] [FML]: Searching C:\Users\LeyxorCheysen\Documents\GitHub\ExcaliburCraft\run\.\mods for mods
[22:35:49] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.CoremodTweaker
[22:35:49] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.fml.relauncher.FMLCorePlugin
[22:35:49] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.classloading.FMLForgePlugin
[22:35:49] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker
[22:35:49] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLDeobfTweaker
[22:35:49] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.AccessTransformerTweaker
[22:35:49] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker
[22:35:49] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker
[22:35:49] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper
[22:35:53] [main/ERROR] [FML]: FML appears to be missing any signature data. This is not a good thing
[22:35:53] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper
[22:35:53] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLDeobfTweaker
[22:35:55] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.AccessTransformerTweaker
[22:35:55] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.TerminalTweaker
[22:35:55] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.TerminalTweaker
[22:35:55] [main/INFO] [LaunchWrapper]: Launching wrapped minecraft {net.minecraft.client.main.Main}
[22:35:58] [main/INFO] [net.minecraft.client.Minecraft]: Setting user: Player662
[22:36:19] [main/WARN] [net.minecraft.client.settings.GameSettings]: Skipping bad option: lastServer:
[22:36:19] [main/INFO] [net.minecraft.client.Minecraft]: LWJGL Version: 2.9.4
[22:36:23] [main/INFO] [FML]: -- System Details --
Details:
    Minecraft Version: 1.12.2
    Operating System: Windows 7 (amd64) version 6.1
    Java Version: 1.8.0_181, Oracle Corporation
    Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
    Memory: 486563648 bytes (464 MB) / 738197504 bytes (704 MB) up to 1073741824 bytes (1024 MB)
    JVM Flags: 7 total; -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=16M -Xmx1G
    IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
    FML:
    Loaded coremods (and transformers):
    GL info: ' Vendor: 'Intel' Version: '4.4.0 - Build 20.19.15.4568' Renderer: 'Intel(R) HD Graphics 400'
[22:36:23] [main/INFO] [FML]: MinecraftForge v14.23.4.2705 Initialized
[22:36:23] [main/INFO] [FML]: Starts to replace vanilla recipe ingredients with ore ingredients.
[22:36:23] [main/INFO] [FML]: Replaced 1036 ore ingredients
[22:36:24] [main/INFO] [FML]: Searching C:\Users\LeyxorCheysen\Documents\GitHub\ExcaliburCraft\run\.\mods for mods
[22:36:26] [Thread-3/INFO] [FML]: Using sync timing. 200 frames of Display.update took 382473600 nanos
[22:36:28] [main/INFO] [FML]: Forge Mod Loader has identified 5 mods to load
[22:36:29] [main/INFO] [FML]: Attempting connection with missing mods [minecraft, mcp, FML, forge, excaliburcraft] at CLIENT
[22:36:29] [main/INFO] [FML]: Attempting connection with missing mods [minecraft, mcp, FML, forge, excaliburcraft] at SERVER
[22:36:32] [main/INFO] [net.minecraft.client.resources.SimpleReloadableResourceManager]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:ExcaliburCraft
[22:36:32] [main/INFO] [FML]: Processing ObjectHolder annotations
[22:36:32] [main/INFO] [FML]: Found 1168 ObjectHolder annotations
[22:36:32] [main/INFO] [FML]: Identifying ItemStackHolder annotations
[22:36:32] [main/INFO] [FML]: Found 0 ItemStackHolder annotations
[22:36:32] [main/INFO] [FML]: Configured a dormant chunk cache size of 0
[22:36:32] [Forge Version Check/INFO] [forge.VersionCheck]: [excaliburcraft] Starting version check at https://raw.githubusercontent.com/LeyxorCheysen/ExcaliburCraft/master/versions.json
[22:36:32] [main/INFO] [FML]: Applying holder lookups
[22:36:32] [main/INFO] [FML]: Holder lookups applied
[22:36:32] [main/INFO] [FML]: Applying holder lookups
[22:36:32] [main/INFO] [FML]: Holder lookups applied
[22:36:32] [main/INFO] [FML]: Applying holder lookups
[22:36:32] [main/INFO] [FML]: Holder lookups applied
[22:36:32] [main/INFO] [FML]: Applying holder lookups
[22:36:32] [main/INFO] [FML]: Holder lookups applied
[22:36:32] [main/INFO] [FML]: Injecting itemstacks
[22:36:32] [main/INFO] [FML]: Itemstack injection complete
[22:36:38] [Forge Version Check/INFO] [forge.VersionCheck]: [excaliburcraft] Found status: UP_TO_DATE Target: null
[22:36:38] [Forge Version Check/INFO] [forge.VersionCheck]: [forge] Starting version check at http://files.minecraftforge.net/maven/net/minecraftforge/forge/promotions_slim.json
[22:36:39] [Forge Version Check/INFO] [forge.VersionCheck]: [forge] Found status: UP_TO_DATE Target: null
[22:36:41] [Sound Library Loader/INFO] [net.minecraft.client.audio.SoundManager]: Starting up SoundSystem...
[22:36:42] [Thread-5/INFO] [net.minecraft.client.audio.SoundManager]: Initializing LWJGL OpenAL
[22:36:42] [Thread-5/INFO] [net.minecraft.client.audio.SoundManager]: (The LWJGL binding of OpenAL.  For more information, see http://www.lwjgl.org)
[22:36:51] [main/INFO] [FML]: Max texture size: 8192
[22:36:53] [main/INFO] [net.minecraft.client.renderer.texture.TextureMap]: Created: 512x512 textures-atlas
[22:37:00] [main/INFO] [FML]: Applying holder lookups
[22:37:00] [main/INFO] [FML]: Holder lookups applied
[22:37:00] [main/INFO] [FML]: Injecting itemstacks
[22:37:00] [main/INFO] [FML]: Itemstack injection complete
[22:37:01] [main/INFO] [FML]: Forge Mod Loader has successfully loaded 5 mods
[22:37:01] [main/WARN] [net.minecraft.client.settings.GameSettings]: Skipping bad option: lastServer:
[22:37:01] [main/INFO] [com.mojang.text2speech.NarratorWindows]: Narrator library for x64 successfully loaded
[22:37:11] [Server thread/INFO] [net.minecraft.server.integrated.IntegratedServer]: Starting integrated minecraft server version 1.12.2
[22:37:11] [Server thread/INFO] [net.minecraft.server.integrated.IntegratedServer]: Generating keypair
[22:37:11] [Server thread/INFO] [FML]: Injecting existing registry data into this server instance
[22:37:13] [Server thread/INFO] [FML]: Applying holder lookups
[22:37:13] [Server thread/INFO] [FML]: Holder lookups applied
[22:37:13] [Server thread/INFO] [FML]: Loading dimension 0 (New World) (net.minecraft.server.integrated.IntegratedServer@8aeed62)
[22:37:14] [Server thread/INFO] [net.minecraft.advancements.AdvancementList]: Loaded 488 advancements
[22:37:15] [Server thread/INFO] [FML]: Loading dimension 1 (New World) (net.minecraft.server.integrated.IntegratedServer@8aeed62)
[22:37:15] [Server thread/INFO] [FML]: Loading dimension -1 (New World) (net.minecraft.server.integrated.IntegratedServer@8aeed62)
[22:37:15] [Server thread/INFO] [net.minecraft.server.MinecraftServer]: Preparing start region for level 0
[22:37:16] [Server thread/INFO] [net.minecraft.server.MinecraftServer]: Preparing spawn area: 0%
[22:37:17] [Server thread/INFO] [net.minecraft.server.MinecraftServer]: Preparing spawn area: 42%
[22:37:19] [Server thread/INFO] [FML]: Unloading dimension -1
[22:37:19] [Server thread/INFO] [FML]: Unloading dimension 1
[22:37:19] [Server thread/INFO] [net.minecraft.server.integrated.IntegratedServer]: Changing view distance to 2, from 10
[22:37:21] [Thread-5/INFO] [net.minecraft.client.audio.SoundManager]: OpenAL initialized.
[22:37:21] [Sound Library Loader/INFO] [net.minecraft.client.audio.SoundManager]: Sound engine started
[22:37:32] [Netty Local Client IO #0/INFO] [FML]: Server protocol version 2
[22:37:32] [Netty Server IO #1/INFO] [FML]: Client protocol version 2
[22:37:32] [Netty Server IO #1/INFO] [FML]: Client attempting to join with 5 mods : [email protected],[email protected],[email protected],[email protected],[email protected]
[22:37:32] [Netty Local Client IO #0/INFO] [FML]: [Netty Local Client IO #0] Client side modded connection established
[22:37:32] [Server thread/INFO] [FML]: [Server thread] Server side modded connection established
[22:37:32] [Server thread/INFO] [net.minecraft.server.management.PlayerList]: Player662[local:E:0f4a4a92] logged in with entity id 44 at (-1031.147648833069, 4.0, -290.98284673884916)
[22:37:32] [Server thread/INFO] [net.minecraft.server.MinecraftServer]: Player662 joined the game
[22:37:35] [Server thread/INFO] [net.minecraft.server.integrated.IntegratedServer]: Saving and pausing game...
[22:37:36] [Server thread/INFO] [net.minecraft.server.MinecraftServer]: Saving chunks for level 'New World'/overworld
[22:37:36] [main/WARN] [net.minecraft.client.audio.SoundManager]: Unable to play empty soundEvent: minecraft:entity.small_slime.jump
[22:37:36] [main/WARN] [net.minecraft.client.audio.SoundManager]: Unable to play empty soundEvent: minecraft:entity.small_slime.squish
[22:37:38] [Server thread/WARN] [net.minecraft.server.MinecraftServer]: Can't keep up! Did the system time change, or is the server overloaded? Running 2940ms behind, skipping 58 tick(s)
[22:37:58] [Server thread/INFO] [net.minecraft.server.MinecraftServer]: Stopping server
[22:37:58] [Server thread/INFO] [net.minecraft.server.MinecraftServer]: Saving players
[22:37:58] [Server thread/INFO] [net.minecraft.server.MinecraftServer]: Saving worlds
[22:37:58] [Server thread/INFO] [net.minecraft.server.MinecraftServer]: Saving chunks for level 'New World'/overworld
[22:37:58] [Server thread/INFO] [FML]: Unloading dimension 0
[22:37:58] [Server thread/INFO] [FML]: Applying holder lookups
[22:37:58] [Server thread/INFO] [FML]: Holder lookups applied
[22:38:00] [main/FATAL] [net.minecraft.client.Minecraft]: Unreported exception thrown!
java.lang.NullPointerException: null
    at net.minecraft.client.multiplayer.PlayerControllerMP.processRightClick(PlayerControllerMP.java:544) ~[PlayerControllerMP.class:?]
    at net.minecraft.client.Minecraft.rightClickMouse(Minecraft.java:1710) ~[Minecraft.class:?]
    at net.minecraft.client.Minecraft.processKeyBinds(Minecraft.java:2379) ~[Minecraft.class:?]
    at net.minecraft.client.Minecraft.runTickKeyboard(Minecraft.java:2145) ~[Minecraft.class:?]
    at net.minecraft.client.Minecraft.runTick(Minecraft.java:1933) ~[Minecraft.class:?]
    at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1186) ~[Minecraft.class:?]
    at net.minecraft.client.Minecraft.run(Minecraft.java:441) [Minecraft.class:?]
    at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_181]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_181]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_181]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_181]
    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_181]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_181]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_181]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_181]
    at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?]
    at GradleStart.main(GradleStart.java:25) [start/:?]
[22:38:00] [main/INFO] [STDOUT]: [net.minecraft.init.Bootstrap:printToSYSOUT:629]: ---- Minecraft Crash Report ----
// Hi. I'm Minecraft, and I'm a crashaholic.

Time: 8/23/18 10:38 PM
Description: Unexpected error

java.lang.NullPointerException: Unexpected error
    at net.minecraft.client.multiplayer.PlayerControllerMP.processRightClick(PlayerControllerMP.java:544)
    at net.minecraft.client.Minecraft.rightClickMouse(Minecraft.java:1710)
    at net.minecraft.client.Minecraft.processKeyBinds(Minecraft.java:2379)
    at net.minecraft.client.Minecraft.runTickKeyboard(Minecraft.java:2145)
    at net.minecraft.client.Minecraft.runTick(Minecraft.java:1933)
    at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1186)
    at net.minecraft.client.Minecraft.run(Minecraft.java:441)
    at net.minecraft.client.main.Main.main(Main.java:118)
    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 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.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97)
    at GradleStart.main(GradleStart.java:25)


A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- Head --
Thread: Client thread
Stacktrace:
    at net.minecraft.client.multiplayer.PlayerControllerMP.processRightClick(PlayerControllerMP.java:544)
    at net.minecraft.client.Minecraft.rightClickMouse(Minecraft.java:1710)
    at net.minecraft.client.Minecraft.processKeyBinds(Minecraft.java:2379)
    at net.minecraft.client.Minecraft.runTickKeyboard(Minecraft.java:2145)

-- Affected level --
Details:
    Level name: MpServer
    All players: 1 total; [EntityPlayerSP['Player662'/44, l='MpServer', x=-1031.15, y=4.00, z=-290.98]]
    Chunk stats: MultiplayerChunkCache: 49, 49
    Level seed: 0
    Level generator: ID 01 - flat, ver 0. Features enabled: false
    Level generator options:
    Level spawn location: World: (-1034,4,-290), Chunk: (at 6,0,14 in -65,-19; contains blocks -1040,0,-304 to -1025,255,-289), Region: (-3,-1; contains chunks -96,-32 to -65,-1, blocks -1536,0,-512 to -1025,255,-1)
    Level time: 6062 game time, 6062 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: 6 total; [EntityItem['item.item.porkchopRaw'/18, l='MpServer', x=-1036.60, y=4.00, z=-284.34], EntityPlayerSP['Player662'/44, l='MpServer', x=-1031.15, y=4.00, z=-290.98], EntitySlime['Slime'/19, l='MpServer', x=-1038.46, y=4.00, z=-280.42], EntitySlime['Slime'/24, l='MpServer', x=-1020.62, y=5.02, z=-301.81], EntitySlime['Slime'/26, l='MpServer', x=-1017.03, y=4.42, z=-282.05], EntitySlime['Slime'/28, l='MpServer', x=-1017.71, y=4.00, z=-281.74]]
    Retry entities: 0 total; []
    Server brand: fml,forge
    Server type: Integrated singleplayer server
Stacktrace:
    at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:461)
    at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:2886)
    at net.minecraft.client.Minecraft.run(Minecraft.java:470)
    at net.minecraft.client.main.Main.main(Main.java:118)
    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 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.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97)
    at GradleStart.main(GradleStart.java:25)

-- System Details --
Details:
    Minecraft Version: 1.12.2
    Operating System: Windows 7 (amd64) version 6.1
    Java Version: 1.8.0_181, Oracle Corporation
    Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
    Memory: 473374696 bytes (451 MB) / 704643072 bytes (672 MB) up to 1073741824 bytes (1024 MB)
    JVM Flags: 7 total; -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=16M -Xmx1G
    IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
    FML: MCP 9.42 Powered by Forge 14.23.4.2705 5 mods loaded, 5 mods active
    States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored

    | State     | ID             | Version      | Source                           | Signature |
    |:--------- |:-------------- |:------------ |:-------------------------------- |:--------- |
    | UCHIJAAAA | minecraft      | 1.12.2       | minecraft.jar                    | None      |
    | UCHIJAAAA | mcp            | 9.42         | minecraft.jar                    | None      |
    | UCHIJAAAA | FML            | 8.0.99.99    | forgeSrc-1.12.2-14.23.4.2705.jar | None      |
    | UCHIJAAAA | forge          | 14.23.4.2705 | forgeSrc-1.12.2-14.23.4.2705.jar | None      |
    | UCHIJAAAA | excaliburcraft | 0.1.0        | excaliburcraft-0.1.0.jar         | None      |

    Loaded coremods (and transformers):
    GL info: ' Vendor: 'Intel' Version: '4.4.0 - Build 20.19.15.4568' Renderer: 'Intel(R) HD Graphics 400'
    Launched Version: 1.12.2
    LWJGL: 2.9.4
    OpenGL: Intel(R) HD Graphics 400 GL version 4.4.0 - Build 20.19.15.4568, Intel
    GL Caps: Using GL 1.3 multitexturing.
Using GL 1.3 texture combiners.
Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported.
Shaders are available because OpenGL 2.1 is supported.
VBOs are available because OpenGL 1.5 is supported.

    Using VBOs: Yes
    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)
    CPU: 2x Intel(R) Celeron(R) CPU N3060 @ 1.60GHz
[22:38:00] [main/INFO] [STDOUT]: [net.minecraft.init.Bootstrap:printToSYSOUT:629]: #@!@# Game crashed! Crash report saved to: #@!@# C:\Users\LeyxorCheysen\Documents\GitHub\ExcaliburCraft\run\.\crash-reports\crash-2018-08-23_22.38.00-client.txt
AL lib: (EE) alc_cleanup: 1 device not closed
:runClient FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':runClient'.
> Process 'command 'C:\Program Files\Java\jdk1.8.0_181\bin\java.exe'' finished with non-zero exit value -1

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 4 mins 15.928 secs
Ой стоп, я с ретурном протупил...:m_faceplam:
Тогда жалуется на itemstack ибо в ретурне не локальная...
 
Последнее редактирование:
1,031
19
87
Ты в конце null возвращаешь, может в этом проблема?
Внизу ответа там было, я заменил нулл на нужный ретурн, но жалуется что переменная итемстак вроде и используется но не локальная.
Либо как-то проверку !world.isRemot() как-то переделать.
 

timaxa007

Модератор
5,831
409
672
я заменил нулл на нужный ретурн
null это не нужный return для Enum'а, нужно вроде типа:
Java:
return new ActionResult<ItemStack>(EnumActionResult.SUCCESS, playerIn.getHeldItem(handIn));
или (не рекомендуеться)
Java:
return super.onItemRightClick(worldIn, playerIn, handIn);
Всё зависит от использования.
 
1,031
19
87
null это не нужный return для Enum'а, нужно вроде типа:
Java:
return new ActionResult<ItemStack>(EnumActionResult.SUCCESS, playerIn.getHeldItem(handIn));
или (не рекомендуеться)
Java:
return super.onItemRightClick(worldIn, playerIn, handIn);
Всё зависит от использования.
Всёравно при клике выбрасыват:
Код:
Working Directory: C:\Users\LeyxorCheysen\Documents\GitHub\ExcaliburCraft
Gradle User Home: C:\Users\LeyxorCheysen\.gradle
Gradle Distribution: Gradle wrapper from target build
Gradle Version: 2.14
Java Home: C:\Program Files\Java\jdk1.8.0_181
JVM Arguments: None
Program Arguments: None
Build Scans Enabled: false
Offline Mode Enabled: false
Gradle Tasks: runClient

This mapping 'snapshot_20171003' was designed for MC 1.12! Use at your own peril.
:deobfCompileDummyTask
:deobfProvidedDummyTask
:sourceApiJava UP-TO-DATE
:compileApiJava UP-TO-DATE
:processApiResources UP-TO-DATE
:apiClasses UP-TO-DATE
:sourceMainJava
:compileJava
:processResources UP-TO-DATE
:classes
:jar
:getVersionJson
:extractNatives SKIPPED
:extractUserdev UP-TO-DATE
:getAssetIndex UP-TO-DATE
:getAssets
Current status: 183/1305   14%
Current status: 402/1305   30%
Current status: 620/1305   47%
Current status: 780/1305   59%
Current status: 1045/1305   80%
Current status: 1270/1305   97%
:makeStart
:runClient
2018-08-24 11:08:16,787 main WARN Disabling terminal, you're running in an unsupported environment.
[11:08:17] [main/INFO] [GradleStart]: Extra: []
[11:08:17] [main/INFO] [GradleStart]: Running with arguments: [--userProperties, {}, --assetsDir, C:/Users/LeyxorCheysen/.gradle/caches/minecraft/assets, --assetIndex, 1.12, --accessToken{REDACTED}, --version, 1.12.2, --tweakClass, net.minecraftforge.fml.common.launcher.FMLTweaker, --tweakClass, net.minecraftforge.gradle.tweakers.CoremodTweaker]
[11:08:17] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker
[11:08:17] [main/INFO] [LaunchWrapper]: Using primary tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker
[11:08:17] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.CoremodTweaker
[11:08:17] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLTweaker
[11:08:17] [main/INFO] [FML]: Forge Mod Loader version 14.23.4.2705 for Minecraft 1.12.2 loading
[11:08:17] [main/INFO] [FML]: Java is Java HotSpot(TM) 64-Bit Server VM, version 1.8.0_181, running on Windows 7:amd64:6.1, installed at C:\Program Files\Java\jdk1.8.0_181\jre
[11:08:17] [main/ERROR] [FML]: Apache Maven library folder was not in the format expected. Using default libraries directory.
[11:08:17] [main/ERROR] [FML]: Full: C:\Users\LeyxorCheysen\.gradle\caches\modules-2\files-2.1\org.apache.maven\maven-artifact\3.5.3\7dc72b6d6d8a6dced3d294ed54c2cc3515ade9f4\maven-artifact-3.5.3.jar
[11:08:17] [main/ERROR] [FML]: Trimmed: c:/users/leyxorcheysen/.gradle/caches/modules-2/files-2.1/org.apache.maven/maven-artifact/3.5.3/
[11:08:18] [main/INFO] [FML]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation
[11:08:18] [main/INFO] [FML]: Ignoring missing certificate for coremod FMLCorePlugin (net.minecraftforge.fml.relauncher.FMLCorePlugin), we are in deobf and it's a forge core plugin
[11:08:18] [main/INFO] [FML]: Ignoring missing certificate for coremod FMLForgePlugin (net.minecraftforge.classloading.FMLForgePlugin), we are in deobf and it's a forge core plugin
[11:08:18] [main/INFO] [FML]: Searching C:\Users\LeyxorCheysen\Documents\GitHub\ExcaliburCraft\run\.\mods for mods
[11:08:18] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.CoremodTweaker
[11:08:18] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.fml.relauncher.FMLCorePlugin
[11:08:18] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.classloading.FMLForgePlugin
[11:08:18] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker
[11:08:18] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLDeobfTweaker
[11:08:18] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.AccessTransformerTweaker
[11:08:18] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker
[11:08:18] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker
[11:08:18] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper
[11:08:22] [main/ERROR] [FML]: FML appears to be missing any signature data. This is not a good thing
[11:08:22] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper
[11:08:22] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLDeobfTweaker
[11:08:23] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.AccessTransformerTweaker
[11:08:23] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.TerminalTweaker
[11:08:23] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.TerminalTweaker
[11:08:23] [main/INFO] [LaunchWrapper]: Launching wrapped minecraft {net.minecraft.client.main.Main}
[11:08:26] [main/INFO] [net.minecraft.client.Minecraft]: Setting user: Player256
[11:08:38] [main/WARN] [net.minecraft.client.settings.GameSettings]: Skipping bad option: lastServer:
[11:08:38] [main/INFO] [net.minecraft.client.Minecraft]: LWJGL Version: 2.9.4
[11:08:41] [main/INFO] [FML]: -- System Details --
Details:
    Minecraft Version: 1.12.2
    Operating System: Windows 7 (amd64) version 6.1
    Java Version: 1.8.0_181, Oracle Corporation
    Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
    Memory: 344336296 bytes (328 MB) / 536870912 bytes (512 MB) up to 1073741824 bytes (1024 MB)
    JVM Flags: 7 total; -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=16M -Xmx1G
    IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
    FML:
    Loaded coremods (and transformers):
    GL info: ' Vendor: 'Intel' Version: '4.4.0 - Build 20.19.15.4568' Renderer: 'Intel(R) HD Graphics 400'
[11:08:41] [main/INFO] [FML]: MinecraftForge v14.23.4.2705 Initialized
[11:08:41] [main/INFO] [FML]: Starts to replace vanilla recipe ingredients with ore ingredients.
[11:08:41] [main/INFO] [FML]: Replaced 1036 ore ingredients
[11:08:43] [main/INFO] [FML]: Searching C:\Users\LeyxorCheysen\Documents\GitHub\ExcaliburCraft\run\.\mods for mods
[11:08:45] [Thread-3/INFO] [FML]: Using sync timing. 200 frames of Display.update took 716647395 nanos
[11:08:46] [main/INFO] [FML]: Forge Mod Loader has identified 5 mods to load
[11:08:47] [main/INFO] [FML]: Attempting connection with missing mods [minecraft, mcp, FML, forge, excaliburcraft] at CLIENT
[11:08:47] [main/INFO] [FML]: Attempting connection with missing mods [minecraft, mcp, FML, forge, excaliburcraft] at SERVER
[11:08:49] [main/INFO] [net.minecraft.client.resources.SimpleReloadableResourceManager]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:ExcaliburCraft
[11:08:49] [main/INFO] [FML]: Processing ObjectHolder annotations
[11:08:50] [main/INFO] [FML]: Found 1168 ObjectHolder annotations
[11:08:50] [main/INFO] [FML]: Identifying ItemStackHolder annotations
[11:08:50] [main/INFO] [FML]: Found 0 ItemStackHolder annotations
[11:08:50] [main/INFO] [FML]: Configured a dormant chunk cache size of 0
[11:08:50] [main/INFO] [FML]: Applying holder lookups
[11:08:50] [main/INFO] [FML]: Holder lookups applied
[11:08:50] [main/INFO] [FML]: Applying holder lookups
[11:08:50] [main/INFO] [FML]: Holder lookups applied
[11:08:50] [main/INFO] [FML]: Applying holder lookups
[11:08:50] [main/INFO] [FML]: Holder lookups applied
[11:08:50] [main/INFO] [FML]: Applying holder lookups
[11:08:50] [main/INFO] [FML]: Holder lookups applied
[11:08:50] [main/INFO] [FML]: Injecting itemstacks
[11:08:50] [main/INFO] [FML]: Itemstack injection complete
[11:08:50] [Forge Version Check/INFO] [forge.VersionCheck]: [excaliburcraft] Starting version check at https://raw.githubusercontent.com/LeyxorCheysen/ExcaliburCraft/master/versions.json
[11:08:57] [Sound Library Loader/INFO] [net.minecraft.client.audio.SoundManager]: Starting up SoundSystem...
[11:08:58] [Thread-5/INFO] [net.minecraft.client.audio.SoundManager]: Initializing LWJGL OpenAL
[11:08:58] [Thread-5/INFO] [net.minecraft.client.audio.SoundManager]: (The LWJGL binding of OpenAL.  For more information, see http://www.lwjgl.org)
[11:08:58] [Forge Version Check/INFO] [forge.VersionCheck]: [excaliburcraft] Found status: UP_TO_DATE Target: null
[11:08:58] [Forge Version Check/INFO] [forge.VersionCheck]: [forge] Starting version check at http://files.minecraftforge.net/maven/net/minecraftforge/forge/promotions_slim.json
[11:08:59] [Forge Version Check/INFO] [forge.VersionCheck]: [forge] Found status: UP_TO_DATE Target: null
[11:09:11] [main/INFO] [FML]: Max texture size: 8192
[11:09:11] [Thread-5/INFO] [net.minecraft.client.audio.SoundManager]: OpenAL initialized.
[11:09:11] [Sound Library Loader/INFO] [net.minecraft.client.audio.SoundManager]: Sound engine started
[11:09:12] [main/INFO] [net.minecraft.client.renderer.texture.TextureMap]: Created: 512x512 textures-atlas
[11:09:19] [main/INFO] [FML]: Applying holder lookups
[11:09:19] [main/INFO] [FML]: Holder lookups applied
[11:09:19] [main/INFO] [FML]: Injecting itemstacks
[11:09:19] [main/INFO] [FML]: Itemstack injection complete
[11:09:20] [main/INFO] [FML]: Forge Mod Loader has successfully loaded 5 mods
[11:09:20] [main/WARN] [net.minecraft.client.settings.GameSettings]: Skipping bad option: lastServer:
[11:09:21] [main/INFO] [com.mojang.text2speech.NarratorWindows]: Narrator library for x64 successfully loaded
[11:09:37] [Server thread/INFO] [net.minecraft.server.integrated.IntegratedServer]: Starting integrated minecraft server version 1.12.2
[11:09:37] [Server thread/INFO] [net.minecraft.server.integrated.IntegratedServer]: Generating keypair
[11:09:37] [Server thread/INFO] [FML]: Injecting existing registry data into this server instance
[11:09:38] [Server thread/INFO] [FML]: Applying holder lookups
[11:09:38] [Server thread/INFO] [FML]: Holder lookups applied
[11:09:38] [Server thread/INFO] [FML]: Loading dimension 0 (New World) (net.minecraft.server.integrated.IntegratedServer@337bd1f9)
[11:09:39] [Server thread/INFO] [net.minecraft.advancements.AdvancementList]: Loaded 488 advancements
[11:09:39] [Server thread/INFO] [FML]: Loading dimension 1 (New World) (net.minecraft.server.integrated.IntegratedServer@337bd1f9)
[11:09:40] [Server thread/INFO] [FML]: Loading dimension -1 (New World) (net.minecraft.server.integrated.IntegratedServer@337bd1f9)
[11:09:40] [Server thread/INFO] [net.minecraft.server.MinecraftServer]: Preparing start region for level 0
[11:09:41] [Server thread/INFO] [net.minecraft.server.MinecraftServer]: Preparing spawn area: 6%
[11:09:42] [Server thread/INFO] [net.minecraft.server.MinecraftServer]: Preparing spawn area: 87%
[11:09:42] [Server thread/INFO] [FML]: Unloading dimension -1
[11:09:42] [Server thread/INFO] [FML]: Unloading dimension 1
[11:09:42] [Server thread/INFO] [net.minecraft.server.integrated.IntegratedServer]: Changing view distance to 2, from 10
[11:09:48] [Netty Local Client IO #0/INFO] [FML]: Server protocol version 2
[11:09:48] [Netty Server IO #1/INFO] [FML]: Client protocol version 2
[11:09:48] [Netty Server IO #1/INFO] [FML]: Client attempting to join with 5 mods : [email protected],[email protected],[email protected],[email protected],[email protected]
[11:09:48] [Netty Local Client IO #0/INFO] [FML]: [Netty Local Client IO #0] Client side modded connection established
[11:09:48] [Server thread/INFO] [FML]: [Server thread] Server side modded connection established
[11:09:48] [Server thread/INFO] [net.minecraft.server.management.PlayerList]: Player256[local:E:9c87e07a] logged in with entity id 47 at (-1031.147648833069, 4.0, -290.98284673884916)
[11:09:48] [Server thread/INFO] [net.minecraft.server.MinecraftServer]: Player256 joined the game
[11:09:50] [Server thread/INFO] [net.minecraft.server.integrated.IntegratedServer]: Saving and pausing game...
[11:09:51] [Server thread/INFO] [net.minecraft.server.MinecraftServer]: Saving chunks for level 'New World'/overworld
[11:09:52] [main/WARN] [net.minecraft.client.audio.SoundManager]: Unable to play empty soundEvent: minecraft:entity.small_slime.jump
[11:09:53] [main/WARN] [net.minecraft.client.audio.SoundManager]: Unable to play empty soundEvent: minecraft:entity.small_slime.squish
[11:09:59] [pool-2-thread-1/WARN] [com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService]: Couldn't look up profile properties for com.mojang.authlib.GameProfile@44e8f3de[id=37196d8f-36df-357d-b90d-2af59c6852f6,name=Player256,properties={},legacy=false]
com.mojang.authlib.exceptions.AuthenticationException: The client has sent too many requests within a certain amount of time
    at com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService.makeRequest(YggdrasilAuthenticationService.java:79) ~[YggdrasilAuthenticationService.class:?]
    at com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService.fillGameProfile(YggdrasilMinecraftSessionService.java:180) [YggdrasilMinecraftSessionService.class:?]
    at com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService$1.load(YggdrasilMinecraftSessionService.java:60) [YggdrasilMinecraftSessionService$1.class:?]
    at com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService$1.load(YggdrasilMinecraftSessionService.java:57) [YggdrasilMinecraftSessionService$1.class:?]
    at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3716) [guava-21.0.jar:?]
    at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2424) [guava-21.0.jar:?]
    at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2298) [guava-21.0.jar:?]
    at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2211) [guava-21.0.jar:?]
    at com.google.common.cache.LocalCache.get(LocalCache.java:4154) [guava-21.0.jar:?]
    at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:4158) [guava-21.0.jar:?]
    at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:5147) [guava-21.0.jar:?]
    at com.google.common.cache.LocalCache$LocalLoadingCache.getUnchecked(LocalCache.java:5153) [guava-21.0.jar:?]
    at com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService.fillProfileProperties(YggdrasilMinecraftSessionService.java:170) [YggdrasilMinecraftSessionService.class:?]
    at net.minecraft.client.Minecraft.getProfileProperties(Minecraft.java:3178) [Minecraft.class:?]
    at net.minecraft.client.resources.SkinManager$3.run(SkinManager.java:138) [SkinManager$3.class:?]
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_181]
    at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_181]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_181]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_181]
    at java.lang.Thread.run(Thread.java:748) [?:1.8.0_181]
[11:10:06] [Server thread/FATAL] [net.minecraft.server.MinecraftServer]: Error executing task
java.util.concurrent.ExecutionException: java.lang.NullPointerException
    at java.util.concurrent.FutureTask.report(FutureTask.java:122) ~[?:1.8.0_181]
    at java.util.concurrent.FutureTask.get(FutureTask.java:192) ~[?:1.8.0_181]
    at net.minecraft.util.Util.runTask(Util.java:54) [Util.class:?]
    at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:798) [MinecraftServer.class:?]
    at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:743) [MinecraftServer.class:?]
    at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:192) [IntegratedServer.class:?]
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:592) [MinecraftServer.class:?]
    at java.lang.Thread.run(Thread.java:748) [?:1.8.0_181]
Caused by: java.lang.NullPointerException
    at net.minecraft.entity.EntityLivingBase.playEquipSound(EntityLivingBase.java:555) ~[EntityLivingBase.class:?]
    at net.minecraft.entity.player.EntityPlayer.setItemStackToSlot(EntityPlayer.java:2394) ~[EntityPlayer.class:?]
    at net.minecraft.entity.EntityLivingBase.setHeldItem(EntityLivingBase.java:1832) ~[EntityLivingBase.class:?]
    at net.minecraft.server.management.PlayerInteractionManager.processRightClick(PlayerInteractionManager.java:397) ~[PlayerInteractionManager.class:?]
    at net.minecraft.network.NetHandlerPlayServer.processTryUseItem(NetHandlerPlayServer.java:794) ~[NetHandlerPlayServer.class:?]
    at net.minecraft.network.play.client.CPacketPlayerTryUseItem.processPacket(CPacketPlayerTryUseItem.java:43) ~[CPacketPlayerTryUseItem.class:?]
    at net.minecraft.network.play.client.CPacketPlayerTryUseItem.processPacket(CPacketPlayerTryUseItem.java:9) ~[CPacketPlayerTryUseItem.class:?]
    at net.minecraft.network.PacketThreadUtil$1.run(PacketThreadUtil.java:21) ~[PacketThreadUtil$1.class:?]
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:1.8.0_181]
    at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_181]
    at net.minecraft.util.Util.runTask(Util.java:53) ~[Util.class:?]
    ... 5 more
[11:10:06] [Server thread/INFO] [net.minecraft.server.MinecraftServer]: Stopping server
[11:10:06] [Server thread/INFO] [net.minecraft.server.MinecraftServer]: Saving players
[11:10:07] [Server thread/INFO] [net.minecraft.network.NetHandlerPlayServer]: Player256 lost connection: Server closed
[11:10:07] [Server thread/INFO] [net.minecraft.server.MinecraftServer]: Player256 left the game
[11:10:07] [Server thread/INFO] [net.minecraft.network.NetHandlerPlayServer]: Stopping singleplayer server as player logged out
[11:10:07] [Server thread/INFO] [net.minecraft.server.MinecraftServer]: Saving worlds
[11:10:07] [Server thread/INFO] [net.minecraft.server.MinecraftServer]: Saving chunks for level 'New World'/overworld
[11:10:07] [Server thread/INFO] [FML]: Unloading dimension 0
[11:10:07] [Server thread/INFO] [FML]: Applying holder lookups
[11:10:07] [Server thread/INFO] [FML]: Holder lookups applied
[11:10:09] [main/FATAL] [net.minecraft.client.Minecraft]: Unreported exception thrown!
java.lang.NullPointerException: null
    at net.minecraft.entity.EntityLivingBase.playEquipSound(EntityLivingBase.java:555) ~[EntityLivingBase.class:?]
    at net.minecraft.entity.player.EntityPlayer.setItemStackToSlot(EntityPlayer.java:2394) ~[EntityPlayer.class:?]
    at net.minecraft.entity.EntityLivingBase.setHeldItem(EntityLivingBase.java:1832) ~[EntityLivingBase.class:?]
    at net.minecraft.client.multiplayer.PlayerControllerMP.processRightClick(PlayerControllerMP.java:548) ~[PlayerControllerMP.class:?]
    at net.minecraft.client.Minecraft.rightClickMouse(Minecraft.java:1710) ~[Minecraft.class:?]
    at net.minecraft.client.Minecraft.processKeyBinds(Minecraft.java:2379) ~[Minecraft.class:?]
    at net.minecraft.client.Minecraft.runTickKeyboard(Minecraft.java:2145) ~[Minecraft.class:?]
    at net.minecraft.client.Minecraft.runTick(Minecraft.java:1933) ~[Minecraft.class:?]
    at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1186) ~[Minecraft.class:?]
    at net.minecraft.client.Minecraft.run(Minecraft.java:441) [Minecraft.class:?]
    at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_181]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_181]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_181]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_181]
    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_181]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_181]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_181]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_181]
    at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?]
    at GradleStart.main(GradleStart.java:25) [start/:?]
[11:10:09] [main/INFO] [STDOUT]: [net.minecraft.init.Bootstrap:printToSYSOUT:629]: ---- Minecraft Crash Report ----
// This doesn't make any sense!

Time: 8/24/18 11:10 AM
Description: Unexpected error

java.lang.NullPointerException: Unexpected error
    at net.minecraft.entity.EntityLivingBase.playEquipSound(EntityLivingBase.java:555)
    at net.minecraft.entity.player.EntityPlayer.setItemStackToSlot(EntityPlayer.java:2394)
    at net.minecraft.entity.EntityLivingBase.setHeldItem(EntityLivingBase.java:1832)
    at net.minecraft.client.multiplayer.PlayerControllerMP.processRightClick(PlayerControllerMP.java:548)
    at net.minecraft.client.Minecraft.rightClickMouse(Minecraft.java:1710)
    at net.minecraft.client.Minecraft.processKeyBinds(Minecraft.java:2379)
    at net.minecraft.client.Minecraft.runTickKeyboard(Minecraft.java:2145)
    at net.minecraft.client.Minecraft.runTick(Minecraft.java:1933)
    at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1186)
    at net.minecraft.client.Minecraft.run(Minecraft.java:441)
    at net.minecraft.client.main.Main.main(Main.java:118)
    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 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.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97)
    at GradleStart.main(GradleStart.java:25)


A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- Head --
Thread: Client thread
Stacktrace:
    at net.minecraft.entity.EntityLivingBase.playEquipSound(EntityLivingBase.java:555)
    at net.minecraft.entity.player.EntityPlayer.setItemStackToSlot(EntityPlayer.java:2394)
    at net.minecraft.entity.EntityLivingBase.setHeldItem(EntityLivingBase.java:1832)
    at net.minecraft.client.multiplayer.PlayerControllerMP.processRightClick(PlayerControllerMP.java:548)
    at net.minecraft.client.Minecraft.rightClickMouse(Minecraft.java:1710)
    at net.minecraft.client.Minecraft.processKeyBinds(Minecraft.java:2379)
    at net.minecraft.client.Minecraft.runTickKeyboard(Minecraft.java:2145)

-- Affected level --
Details:
    Level name: MpServer
    All players: 1 total; [EntityPlayerSP['Player256'/47, l='MpServer', x=-1031.15, y=4.00, z=-290.98]]
    Chunk stats: MultiplayerChunkCache: 49, 49
    Level seed: 0
    Level generator: ID 01 - flat, ver 0. Features enabled: false
    Level generator options:
    Level spawn location: World: (-1034,4,-290), Chunk: (at 6,0,14 in -65,-19; contains blocks -1040,0,-304 to -1025,255,-289), Region: (-3,-1; contains chunks -96,-32 to -65,-1, blocks -1536,0,-512 to -1025,255,-1)
    Level time: 6499 game time, 6499 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: 6 total; [EntityItem['item.item.porkchopRaw'/18, l='MpServer', x=-1036.60, y=4.00, z=-284.34], EntitySlime['Slime'/19, l='MpServer', x=-1044.85, y=4.00, z=-283.39], EntityPlayerSP['Player256'/47, l='MpServer', x=-1031.15, y=4.00, z=-290.98], EntitySlime['Slime'/23, l='MpServer', x=-1018.40, y=4.17, z=-305.66], EntitySlime['Slime'/26, l='MpServer', x=-1017.41, y=5.17, z=-281.40], EntitySlime['Slime'/27, l='MpServer', x=-1017.45, y=4.61, z=-287.28]]
    Retry entities: 0 total; []
    Server brand: fml,forge
    Server type: Integrated singleplayer server
Stacktrace:
    at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:461)
    at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:2886)
    at net.minecraft.client.Minecraft.run(Minecraft.java:470)
    at net.minecraft.client.main.Main.main(Main.java:118)
    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 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.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97)
    at GradleStart.main(GradleStart.java:25)

-- System Details --
Details:
    Minecraft Version: 1.12.2
    Operating System: Windows 7 (amd64) version 6.1
    Java Version: 1.8.0_181, Oracle Corporation
    Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
    Memory: 199626688 bytes (190 MB) / 637534208 bytes (608 MB) up to 1073741824 bytes (1024 MB)
    JVM Flags: 7 total; -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=16M -Xmx1G
    IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
    FML: MCP 9.42 Powered by Forge 14.23.4.2705 5 mods loaded, 5 mods active
    States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored

    | State     | ID             | Version      | Source                           | Signature |
    |:--------- |:-------------- |:------------ |:-------------------------------- |:--------- |
    | UCHIJAAAA | minecraft      | 1.12.2       | minecraft.jar                    | None      |
    | UCHIJAAAA | mcp            | 9.42         | minecraft.jar                    | None      |
    | UCHIJAAAA | FML            | 8.0.99.99    | forgeSrc-1.12.2-14.23.4.2705.jar | None      |
    | UCHIJAAAA | forge          | 14.23.4.2705 | forgeSrc-1.12.2-14.23.4.2705.jar | None      |
    | UCHIJAAAA | excaliburcraft | 0.1.0        | excaliburcraft-0.1.0.jar         | None      |

    Loaded coremods (and transformers):
    GL info: ' Vendor: 'Intel' Version: '4.4.0 - Build 20.19.15.4568' Renderer: 'Intel(R) HD Graphics 400'
    Launched Version: 1.12.2
    LWJGL: 2.9.4
    OpenGL: Intel(R) HD Graphics 400 GL version 4.4.0 - Build 20.19.15.4568, Intel
    GL Caps: Using GL 1.3 multitexturing.
Using GL 1.3 texture combiners.
Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported.
Shaders are available because OpenGL 2.1 is supported.
VBOs are available because OpenGL 1.5 is supported.

    Using VBOs: Yes
    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)
    CPU: 2x Intel(R) Celeron(R) CPU N3060 @ 1.60GHz
[11:10:09] [main/INFO] [STDOUT]: [net.minecraft.init.Bootstrap:printToSYSOUT:629]: #@!@# Game crashed! Crash report saved to: #@!@# C:\Users\LeyxorCheysen\Documents\GitHub\ExcaliburCraft\run\.\crash-reports\crash-2018-08-24_11.10.09-client.txt
AL lib: (EE) alc_cleanup: 1 device not closed
:runClient FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':runClient'.
> Process 'command 'C:\Program Files\Java\jdk1.8.0_181\bin\java.exe'' finished with non-zero exit value -1

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 2 mins 26.847 secs
 
1,031
19
87
Всё решил, всё работает как надо (кроме звука, он не воспроизводится теперь почему-то), при клике предмет заменяется. Кому пригодится вот как я сделал:
Java:
public ActionResult<ItemStack> onItemRightClick(World world, EntityPlayer player, EnumHand hand) {
        
        if(!world.isRemote) {
            
            world.playSound(player.posX, player.posY, player.posZ, SoundEvents.BLOCK_ENCHANTMENT_TABLE_USE, SoundCategory.PLAYERS, 1.0F, 1.0F, false);
            player.sendMessage(new TextComponentString("Your is very strong, %p".replace("%p", player.getName())));
            
        }
        
        return new ActionResult<ItemStack>(EnumActionResult.SUCCESS, new ItemStack(ExcaliburCraftItems.EXCALIBUR));
        
    }
 
Сверху