Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[1.7.10] Show item durability bar


grand_mind1
 Share

Recommended Posts

Hi, I'm trying to make an item that can store "energy". I'd like the item to have a durability bar that displays how much energy it currently stores. I've tried to use showDurabilityBar() and getDurabilityForDisplay(), however it seems that the durability bar displays the opposite of what it should. (i.e. the bar is completely green when the item is empty and empty when the item is full)

Here is an example of what I mean:

http://i.imgur.com/U2byBbA.png

The item on the left is empty and the item on the right is full.

This is the code I have for the durability bar:

    @Override
    public boolean showDurabilityBar(ItemStack itemStack)
    {
        return true;
    }

    @Override
    public double getDurabilityForDisplay(ItemStack itemStack)
    {
        if (itemStack.getTagCompound() == null || !itemStack.getTagCompound().hasKey("Energy"))
        {
            itemStack.stackTagCompound = new NBTTagCompound();
            itemStack.getTagCompound().setInteger("Energy", 0);
        }

        return itemStack.getTagCompound().getInteger("Energy") / 80000;
    }

According to the documentation for getDurabilityForDisplay(), you are to pass 1 for 100% durability and 0 for 0%. I thought that this is what this would accomplish, but I must have done something wrong.

Thanks! :D

Link to comment
Share on other sites

Yeah, sorry, I meant to say that. 80k should be a full item. I got the items from the creative menu. This is the code I used to add the full item to the menu, if it is relevant:

    @Override
    public void getSubItems(Item item, CreativeTabs creativeTabs, List list)
    {
            list.add(new ItemStack(this, 1));
            ItemStack fullEnergy = new ItemStack(this, 1);
            this.setEnergyStored(fullEnergy, 80000);
            list.add(fullEnergy);
    }

setEnergyStored() just manipulates the NBT value used to store the amount of energy.

Link to comment
Share on other sites

Yes,

    /**
     * Queries the percentage of the 'Durability' bar that should be drawn.
     * 
     * @param stack The current ItemStack
     * @return 1.0 for 100% 0 for 0%
     */
    public double getDurabilityForDisplay(ItemStack stack)
    {
        return (double)stack.getItemDamageForDisplay() / (double)stack.getMaxDamage();
    }

  (default implementation of stack.getItemDamageForDisplay() just gives stack.itemDamage)

So this means that the javadoc is inverted.

 

And  how it is used:

                int j1 = (int)Math.round(13.0D - health * 13.0D);
                int k = (int)Math.round(255.0D - health * 255.0D);
                GL11.glDisable(GL11.GL_LIGHTING);
                GL11.glDisable(GL11.GL_DEPTH_TEST);
                GL11.glDisable(GL11.GL_TEXTURE_2D);
                GL11.glDisable(GL11.GL_ALPHA_TEST);
                GL11.glDisable(GL11.GL_BLEND);
                Tessellator tessellator = Tessellator.instance;
                int l = 255 - k << 16 | k << 8;
                int i1 = (255 - k) / 4 << 16 | 16128;
                this.renderQuad(tessellator, p_94148_4_ + 2, p_94148_5_ + 13, 13, 2, 0);
                this.renderQuad(tessellator, p_94148_4_ + 2, p_94148_5_ + 13, 12, 1, i1);
                this.renderQuad(tessellator, p_94148_4_ + 2, p_94148_5_ + 13, j1, 1, l);
                GL11.glEnable(GL11.GL_BLEND);
                GL11.glEnable(GL11.GL_ALPHA_TEST);
                GL11.glEnable(GL11.GL_TEXTURE_2D);
                GL11.glEnable(GL11.GL_LIGHTING);
                GL11.glEnable(GL11.GL_DEPTH_TEST);
                GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);

I. Stellarium for Minecraft: Configurable Universe for Minecraft! (WIP)

II. Stellar Sky, Better Star Rendering&Sky Utility mod, had separated from Stellarium.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share



  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • [05dic.2021 14:15:01.428] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher running: args [--username, Khada, --version, 1.17.1-forge-37.0.95, --gameDir, C:\Users\Khada\AppData\Roaming\.minecraft, --assetsDir, C:\Users\Khada\AppData\Roaming\.minecraft\assets, --assetIndex, 1.17, --uuid, 9608e0fd413340908cb072ee9bb0b635, --accessToken, ????????, --userType, mojang, --versionType, release, --width, 925, --height, 530, --launchTarget, forgeclient, --fml.forgeVersion, 37.0.95, --fml.mcVersion, 1.17.1, --fml.forgeGroup, net.minecraftforge, --fml.mcpVersion, 20210706.113038] [05dic.2021 14:15:01.436] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher 9.0.7+91+master.8569cdf starting: java version 16.0.1 by Microsoft [05dic.2021 14:15:01.614] [main/INFO] [mixin/]: SpongePowered MIXIN Subsystem Version=0.8.4 Source=union:/C:/Users/Khada/AppData/Roaming/.minecraft/libraries/org/spongepowered/mixin/0.8.4/mixin-0.8.4.jar%2318! Service=ModLauncher Env=CLIENT [05dic.2021 14:15:03.902] [main/INFO] [cpw.mods.modlauncher.LaunchServiceHandler/MODLAUNCHER]: Launching target 'forgeclient' with arguments [--version, 1.17.1-forge-37.0.95, --gameDir, C:\Users\Khada\AppData\Roaming\.minecraft, --assetsDir, C:\Users\Khada\AppData\Roaming\.minecraft\assets, --uuid, 9608e0fd413340908cb072ee9bb0b635, --username, Khada, --assetIndex, 1.17, --accessToken, ????????, --userType, mojang, --versionType, release, --width, 925, --height, 530] [14:15:13] [Render thread/WARN]: Assets URL 'union:/C:/Users/Khada/AppData/Roaming/.minecraft/libraries/net/minecraft/client/1.17.1-20210706.113038/client-1.17.1-20210706.113038-srg.jar%2362!/assets/.mcassetsroot' uses unexpected schema [14:15:13] [Render thread/WARN]: Assets URL 'union:/C:/Users/Khada/AppData/Roaming/.minecraft/libraries/net/minecraft/client/1.17.1-20210706.113038/client-1.17.1-20210706.113038-srg.jar%2362!/data/.mcassetsroot' uses unexpected schema [05dic.2021 14:15:13.314] [Render thread/INFO] [com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService/]: Environment: authHost='https://authserver.mojang.com', accountsHost='https://api.mojang.com', sessionHost='https://sessionserver.mojang.com', servicesHost='https://api.minecraftservices.com', name='PROD' [14:15:14] [Render thread/ERROR]: Failed to verify authentication com.mojang.authlib.exceptions.InvalidCredentialsException: Status: 401     at com.mojang.authlib.exceptions.MinecraftClientHttpException.toAuthenticationException(MinecraftClientHttpException.java:56) ~[authlib-2.3.31.jar%2342!:?]     at com.mojang.authlib.yggdrasil.YggdrasilSocialInteractionsService.checkPrivileges(YggdrasilSocialInteractionsService.java:112) ~[authlib-2.3.31.jar%2342!:?]     at com.mojang.authlib.yggdrasil.YggdrasilSocialInteractionsService.<init>(YggdrasilSocialInteractionsService.java:42) ~[authlib-2.3.31.jar%2342!:?]     at com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService.createSocialInteractionsService(YggdrasilAuthenticationService.java:151) ~[authlib-2.3.31.jar%2342!:?]     at net.minecraft.client.Minecraft.m_91130_(Minecraft.java:601) ~[client-1.17.1-20210706.113038-srg.jar%2362!:?]     at net.minecraft.client.Minecraft.<init>(Minecraft.java:404) ~[client-1.17.1-20210706.113038-srg.jar%2362!:?]     at net.minecraft.client.main.Main.main(Main.java:151) ~[client-1.17.1-20210706.113038-srg.jar%2362!:?]     at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]     at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78) ~[?:?]     at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]     at java.lang.reflect.Method.invoke(Method.java:567) ~[?:?]     at net.minecraftforge.fml.loading.targets.CommonClientLaunchHandler.lambda$launchService$0(CommonClientLaunchHandler.java:45) ~[fmlloader-1.17.1-37.0.95.jar%2322!:?]     at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-9.0.7.jar%235!:?]     at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53) [modlauncher-9.0.7.jar%235!:?]     at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71) [modlauncher-9.0.7.jar%235!:?]     at cpw.mods.modlauncher.Launcher.run(Launcher.java:106) [modlauncher-9.0.7.jar%235!:?]     at cpw.mods.modlauncher.Launcher.main(Launcher.java:77) [modlauncher-9.0.7.jar%235!:?]     at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26) [modlauncher-9.0.7.jar%235!:?]     at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23) [modlauncher-9.0.7.jar%235!:?]     at cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:90) [bootstraplauncher-0.1.17.jar:?] Caused by: com.mojang.authlib.exceptions.MinecraftClientHttpException: Status: 401     at com.mojang.authlib.minecraft.client.MinecraftClient.readInputStream(MinecraftClient.java:77) ~[authlib-2.3.31.jar%2342!:?]     at com.mojang.authlib.minecraft.client.MinecraftClient.get(MinecraftClient.java:47) ~[authlib-2.3.31.jar%2342!:?]     at com.mojang.authlib.yggdrasil.YggdrasilSocialInteractionsService.checkPrivileges(YggdrasilSocialInteractionsService.java:104) ~[authlib-2.3.31.jar%2342!:?]     ... 18 more [14:15:14] [Render thread/INFO]: Setting user: Khada [14:15:14] [Render thread/INFO]: Backend library: LWJGL version 3.2.2 SNAPSHOT [14:15:16] [modloading-worker-2/INFO]: Here we go! Launching Dungeon Crawl 2.3.2... [14:15:16] [modloading-worker-1/INFO]: Forge mod loading, version 37.0.95, for MC 1.17.1 with MCP 20210706.113038 [14:15:16] [modloading-worker-1/INFO]: MinecraftForge v37.0.95 Initialized [14:15:16] [modloading-worker-0/INFO]: Registered the class com.tiviacz.travelersbackpack.fluids.effects.WaterEffect as a FluidEffect for Water with the ID 0 [14:15:16] [modloading-worker-0/INFO]: Registered the class com.tiviacz.travelersbackpack.fluids.effects.LavaEffect as a FluidEffect for Lava with the ID 1 [14:15:17] [modloading-worker-3/INFO]: Skipped compatibility for mod immersiveengineering. [05dic.2021 14:15:21.084] [Render thread/INFO] [com.mojang.text2speech.NarratorWindows/]: Narrator library for x64 successfully loaded [14:15:21] [Render thread/INFO]: Reloading ResourceManager: Mod Resources, Default, 1.17.zip [14:15:21] [Worker-Main-6/INFO]: Common Setup [14:15:21] [Worker-Main-6/INFO]: Whitelisted Dimensions: [14:15:21] [Worker-Main-6/INFO]: minecraft:overworld [05dic.2021 14:15:21.933] [Forge Version Check/INFO] [net.minecraftforge.fml.VersionChecker/]: [forge] Starting version check at https://files.minecraftforge.net/net/minecraftforge/forge/promotions_slim.json [05dic.2021 14:15:22.763] [Forge Version Check/INFO] [net.minecraftforge.fml.VersionChecker/]: [forge] Found status: OUTDATED Current: 37.0.95 Target: 37.1.0 [05dic.2021 14:15:22.763] [Forge Version Check/INFO] [net.minecraftforge.fml.VersionChecker/]: [twilightforest] Starting version check at https://raw.githubusercontent.com/TeamTwilight/twilightforest/1.17.x/update.json [05dic.2021 14:15:23.061] [Forge Version Check/INFO] [net.minecraftforge.fml.VersionChecker/]: [twilightforest] Found status: BETA Current: 4.0.849 Target: null [05dic.2021 14:15:23.062] [Forge Version Check/INFO] [net.minecraftforge.fml.VersionChecker/]: [travelersbackpack] Starting version check at https://gist.githubusercontent.com/Tiviacz1337/906937677aa472285dff9d6c2a189d5e/raw [05dic.2021 14:15:23.308] [Forge Version Check/INFO] [net.minecraftforge.fml.VersionChecker/]: [travelersbackpack] Found status: OUTDATED Current: 6.0.3 Target: 6.0.5 [14:15:34] [Render thread/INFO]: Registering Structure Piece Types [14:15:34] [Worker-Main-4/WARN]: Unused frames in sprite minecraft:entity/conduit/wind: [22, 23, 24, 25, 26, 27, 28, 29, 30, 31] [14:15:34] [Worker-Main-5/WARN]: Unused frames in sprite minecraft:entity/conduit/wind_vertical: [22, 23, 24, 25, 26, 27, 28, 29, 30, 31] [14:15:37] [Render thread/INFO]: OpenAL initialized. [14:15:37] [Render thread/INFO]: Sound engine started [14:15:37] [Render thread/INFO]: Created: 2048x1024x4 minecraft:textures/atlas/blocks.png-atlas [14:15:37] [Render thread/INFO]: Created: 512x256x4 minecraft:textures/atlas/signs.png-atlas [14:15:37] [Render thread/INFO]: Created: 1024x1024x4 minecraft:textures/atlas/shield_patterns.png-atlas [14:15:37] [Render thread/INFO]: Created: 1024x1024x4 minecraft:textures/atlas/banner_patterns.png-atlas [14:15:37] [Render thread/INFO]: Created: 1024x512x4 minecraft:textures/atlas/chest.png-atlas [14:15:37] [Render thread/INFO]: Created: 1024x512x4 minecraft:textures/atlas/beds.png-atlas [14:15:37] [Render thread/INFO]: Created: 1024x512x4 minecraft:textures/atlas/shulker_boxes.png-atlas [14:15:40] [Render thread/INFO]: Created: 512x512x0 minecraft:textures/atlas/particles.png-atlas [14:15:40] [Render thread/INFO]: Created: 512x512x0 minecraft:textures/atlas/paintings.png-atlas [14:15:40] [Render thread/INFO]: Created: 256x256x0 minecraft:textures/atlas/mob_effects.png-atlas [14:15:48] [Realms Notification Availability checker #1/INFO]: Could not authorize you against Realms server: Invalid session id [14:16:22] [Render thread/INFO]: Connecting to 192.168.1.6, 52745 [14:16:24] [Downloader 0/WARN]: Error al iniciar sesión: Sesión no válida (prueba a reiniciar el juego y el lanzador) [14:16:25] [Render thread/INFO]: Injecting existing registry data into this CLIENT instance [14:16:26] [Netty Client IO #0/INFO]: Connected to a modded server. [05dic.2021 14:16:28.915] [Render thread/INFO] [com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService/]: Environment: authHost='https://authserver.mojang.com', accountsHost='https://api.mojang.com', sessionHost='https://sessionserver.mojang.com', servicesHost='https://api.minecraftservices.com', name='PROD' [14:16:28] [Render thread/FATAL]: Error executing task on Client java.util.NoSuchElementException: packet_handler     at io.netty.channel.DefaultChannelPipeline.getContextOrDie(DefaultChannelPipeline.java:1119) ~[netty-all-4.1.25.Final.jar%2332!:4.1.25.Final]     at io.netty.channel.DefaultChannelPipeline.addBefore(DefaultChannelPipeline.java:260) ~[netty-all-4.1.25.Final.jar%2332!:4.1.25.Final]     at io.netty.channel.DefaultChannelPipeline.addBefore(DefaultChannelPipeline.java:249) ~[netty-all-4.1.25.Final.jar%2332!:4.1.25.Final]     at net.minecraftforge.network.NetworkFilters.lambda$injectIfNecessary$1(NetworkFilters.java:48) ~[forge-1.17.1-37.0.95-universal.jar%2366!:?]     at com.google.common.collect.RegularImmutableMap.forEach(RegularImmutableMap.java:146) ~[guava-21.0.jar%2320!:?]     at net.minecraftforge.network.NetworkFilters.injectIfNecessary(NetworkFilters.java:44) ~[forge-1.17.1-37.0.95-universal.jar%2366!:?]     at net.minecraftforge.fmllegacy.network.NetworkHooks.sendMCRegistryPackets(NetworkHooks.java:121) ~[forge-1.17.1-37.0.95-universal.jar%2366!:?]     at net.minecraft.client.multiplayer.ClientPacketListener.m_5998_(ClientPacketListener.java:374) ~[client-1.17.1-20210706.113038-srg.jar%2362!:?]     at net.minecraft.network.protocol.game.ClientboundLoginPacket.m_5797_(SourceFile:100) ~[client-1.17.1-20210706.113038-srg.jar%2362!:?]     at net.minecraft.network.protocol.game.ClientboundLoginPacket.m_5797_(SourceFile:18) ~[client-1.17.1-20210706.113038-srg.jar%2362!:?]     at net.minecraft.network.protocol.PacketUtils.m_131356_(SourceFile:21) ~[client-1.17.1-20210706.113038-srg.jar%2362!:?]     at net.minecraft.util.thread.BlockableEventLoop.m_6367_(SourceFile:151) ~[client-1.17.1-20210706.113038-srg.jar%2362!:?]     at net.minecraft.util.thread.ReentrantBlockableEventLoop.m_6367_(SourceFile:23) ~[client-1.17.1-20210706.113038-srg.jar%2362!:?]     at net.minecraft.util.thread.BlockableEventLoop.m_7245_(SourceFile:125) ~[client-1.17.1-20210706.113038-srg.jar%2362!:?]     at net.minecraft.util.thread.BlockableEventLoop.m_18699_(SourceFile:110) ~[client-1.17.1-20210706.113038-srg.jar%2362!:?]     at net.minecraft.client.Minecraft.m_91383_(Minecraft.java:1009) ~[client-1.17.1-20210706.113038-srg.jar%2362!:?]     at net.minecraft.client.Minecraft.m_91374_(Minecraft.java:659) ~[client-1.17.1-20210706.113038-srg.jar%2362!:?]     at net.minecraft.client.main.Main.main(Main.java:186) ~[client-1.17.1-20210706.113038-srg.jar%2362!:?]     at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]     at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78) ~[?:?]     at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]     at java.lang.reflect.Method.invoke(Method.java:567) ~[?:?]     at net.minecraftforge.fml.loading.targets.CommonClientLaunchHandler.lambda$launchService$0(CommonClientLaunchHandler.java:45) ~[fmlloader-1.17.1-37.0.95.jar%2322!:?]     at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-9.0.7.jar%235!:?]     at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53) [modlauncher-9.0.7.jar%235!:?]     at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71) [modlauncher-9.0.7.jar%235!:?]     at cpw.mods.modlauncher.Launcher.run(Launcher.java:106) [modlauncher-9.0.7.jar%235!:?]     at cpw.mods.modlauncher.Launcher.main(Launcher.java:77) [modlauncher-9.0.7.jar%235!:?]     at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26) [modlauncher-9.0.7.jar%235!:?]     at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23) [modlauncher-9.0.7.jar%235!:?]     at cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:90) [bootstraplauncher-0.1.17.jar:?] [14:16:34] [Render thread/INFO]: Connecting to 192.168.1.6, 52745 [14:16:35] [Downloader 0/WARN]: Error al iniciar sesión: Sesión no válida (prueba a reiniciar el juego y el lanzador) [14:16:36] [Render thread/INFO]: Injecting existing registry data into this CLIENT instance [14:16:37] [Netty Client IO #1/INFO]: Connected to a modded server. [05dic.2021 14:16:39.528] [Render thread/INFO] [com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService/]: Environment: authHost='https://authserver.mojang.com', accountsHost='https://api.mojang.com', sessionHost='https://sessionserver.mojang.com', servicesHost='https://api.minecraftservices.com', name='PROD' [14:16:39] [Render thread/FATAL]: Error executing task on Client java.util.NoSuchElementException: packet_handler     at io.netty.channel.DefaultChannelPipeline.getContextOrDie(DefaultChannelPipeline.java:1119) ~[netty-all-4.1.25.Final.jar%2332!:4.1.25.Final]     at io.netty.channel.DefaultChannelPipeline.addBefore(DefaultChannelPipeline.java:260) ~[netty-all-4.1.25.Final.jar%2332!:4.1.25.Final]     at io.netty.channel.DefaultChannelPipeline.addBefore(DefaultChannelPipeline.java:249) ~[netty-all-4.1.25.Final.jar%2332!:4.1.25.Final]     at net.minecraftforge.network.NetworkFilters.lambda$injectIfNecessary$1(NetworkFilters.java:48) ~[forge-1.17.1-37.0.95-universal.jar%2366!:?]     at com.google.common.collect.RegularImmutableMap.forEach(RegularImmutableMap.java:146) ~[guava-21.0.jar%2320!:?]     at net.minecraftforge.network.NetworkFilters.injectIfNecessary(NetworkFilters.java:44) ~[forge-1.17.1-37.0.95-universal.jar%2366!:?]     at net.minecraftforge.fmllegacy.network.NetworkHooks.sendMCRegistryPackets(NetworkHooks.java:121) ~[forge-1.17.1-37.0.95-universal.jar%2366!:?]     at net.minecraft.client.multiplayer.ClientPacketListener.m_5998_(ClientPacketListener.java:374) ~[client-1.17.1-20210706.113038-srg.jar%2362!:?]     at net.minecraft.network.protocol.game.ClientboundLoginPacket.m_5797_(SourceFile:100) ~[client-1.17.1-20210706.113038-srg.jar%2362!:?]     at net.minecraft.network.protocol.game.ClientboundLoginPacket.m_5797_(SourceFile:18) ~[client-1.17.1-20210706.113038-srg.jar%2362!:?]     at net.minecraft.network.protocol.PacketUtils.m_131356_(SourceFile:21) ~[client-1.17.1-20210706.113038-srg.jar%2362!:?]     at net.minecraft.util.thread.BlockableEventLoop.m_6367_(SourceFile:151) ~[client-1.17.1-20210706.113038-srg.jar%2362!:?]     at net.minecraft.util.thread.ReentrantBlockableEventLoop.m_6367_(SourceFile:23) ~[client-1.17.1-20210706.113038-srg.jar%2362!:?]     at net.minecraft.util.thread.BlockableEventLoop.m_7245_(SourceFile:125) ~[client-1.17.1-20210706.113038-srg.jar%2362!:?]     at net.minecraft.util.thread.BlockableEventLoop.m_18699_(SourceFile:110) ~[client-1.17.1-20210706.113038-srg.jar%2362!:?]     at net.minecraft.client.Minecraft.m_91383_(Minecraft.java:1009) ~[client-1.17.1-20210706.113038-srg.jar%2362!:?]     at net.minecraft.client.Minecraft.m_91374_(Minecraft.java:659) ~[client-1.17.1-20210706.113038-srg.jar%2362!:?]     at net.minecraft.client.main.Main.main(Main.java:186) ~[client-1.17.1-20210706.113038-srg.jar%2362!:?]     at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]     at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78) ~[?:?]     at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]     at java.lang.reflect.Method.invoke(Method.java:567) ~[?:?]     at net.minecraftforge.fml.loading.targets.CommonClientLaunchHandler.lambda$launchService$0(CommonClientLaunchHandler.java:45) ~[fmlloader-1.17.1-37.0.95.jar%2322!:?]     at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-9.0.7.jar%235!:?]     at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53) [modlauncher-9.0.7.jar%235!:?]     at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71) [modlauncher-9.0.7.jar%235!:?]     at cpw.mods.modlauncher.Launcher.run(Launcher.java:106) [modlauncher-9.0.7.jar%235!:?]     at cpw.mods.modlauncher.Launcher.main(Launcher.java:77) [modlauncher-9.0.7.jar%235!:?]     at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26) [modlauncher-9.0.7.jar%235!:?]     at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23) [modlauncher-9.0.7.jar%235!:?]     at cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:90) [bootstraplauncher-0.1.17.jar:?] [14:16:51] [Render thread/INFO]: Connecting to 192.168.1.6, 52745 [14:16:51] [Downloader 0/WARN]: Error al iniciar sesión: Sesión no válida (prueba a reiniciar el juego y el lanzador) [14:16:52] [Render thread/INFO]: Injecting existing registry data into this CLIENT instance [14:16:53] [Netty Client IO #2/INFO]: Connected to a modded server. [05dic.2021 14:16:55.584] [Render thread/INFO] [com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService/]: Environment: authHost='https://authserver.mojang.com', accountsHost='https://api.mojang.com', sessionHost='https://sessionserver.mojang.com', servicesHost='https://api.minecraftservices.com', name='PROD' [14:16:55] [Render thread/FATAL]: Error executing task on Client java.util.NoSuchElementException: packet_handler     at io.netty.channel.DefaultChannelPipeline.getContextOrDie(DefaultChannelPipeline.java:1119) ~[netty-all-4.1.25.Final.jar%2332!:4.1.25.Final]     at io.netty.channel.DefaultChannelPipeline.addBefore(DefaultChannelPipeline.java:260) ~[netty-all-4.1.25.Final.jar%2332!:4.1.25.Final]     at io.netty.channel.DefaultChannelPipeline.addBefore(DefaultChannelPipeline.java:249) ~[netty-all-4.1.25.Final.jar%2332!:4.1.25.Final]     at net.minecraftforge.network.NetworkFilters.lambda$injectIfNecessary$1(NetworkFilters.java:48) ~[forge-1.17.1-37.0.95-universal.jar%2366!:?]     at com.google.common.collect.RegularImmutableMap.forEach(RegularImmutableMap.java:146) ~[guava-21.0.jar%2320!:?]     at net.minecraftforge.network.NetworkFilters.injectIfNecessary(NetworkFilters.java:44) ~[forge-1.17.1-37.0.95-universal.jar%2366!:?]     at net.minecraftforge.fmllegacy.network.NetworkHooks.sendMCRegistryPackets(NetworkHooks.java:121) ~[forge-1.17.1-37.0.95-universal.jar%2366!:?]     at net.minecraft.client.multiplayer.ClientPacketListener.m_5998_(ClientPacketListener.java:374) ~[client-1.17.1-20210706.113038-srg.jar%2362!:?]     at net.minecraft.network.protocol.game.ClientboundLoginPacket.m_5797_(SourceFile:100) ~[client-1.17.1-20210706.113038-srg.jar%2362!:?]     at net.minecraft.network.protocol.game.ClientboundLoginPacket.m_5797_(SourceFile:18) ~[client-1.17.1-20210706.113038-srg.jar%2362!:?]     at net.minecraft.network.protocol.PacketUtils.m_131356_(SourceFile:21) ~[client-1.17.1-20210706.113038-srg.jar%2362!:?]     at net.minecraft.util.thread.BlockableEventLoop.m_6367_(SourceFile:151) ~[client-1.17.1-20210706.113038-srg.jar%2362!:?]     at net.minecraft.util.thread.ReentrantBlockableEventLoop.m_6367_(SourceFile:23) ~[client-1.17.1-20210706.113038-srg.jar%2362!:?]     at net.minecraft.util.thread.BlockableEventLoop.m_7245_(SourceFile:125) ~[client-1.17.1-20210706.113038-srg.jar%2362!:?]     at net.minecraft.util.thread.BlockableEventLoop.m_18699_(SourceFile:110) ~[client-1.17.1-20210706.113038-srg.jar%2362!:?]     at net.minecraft.client.Minecraft.m_91383_(Minecraft.java:1009) ~[client-1.17.1-20210706.113038-srg.jar%2362!:?]     at net.minecraft.client.Minecraft.m_91374_(Minecraft.java:659) ~[client-1.17.1-20210706.113038-srg.jar%2362!:?]     at net.minecraft.client.main.Main.main(Main.java:186) ~[client-1.17.1-20210706.113038-srg.jar%2362!:?]     at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]     at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78) ~[?:?]     at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]     at java.lang.reflect.Method.invoke(Method.java:567) ~[?:?]     at net.minecraftforge.fml.loading.targets.CommonClientLaunchHandler.lambda$launchService$0(CommonClientLaunchHandler.java:45) ~[fmlloader-1.17.1-37.0.95.jar%2322!:?]     at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-9.0.7.jar%235!:?]     at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53) [modlauncher-9.0.7.jar%235!:?]     at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71) [modlauncher-9.0.7.jar%235!:?]     at cpw.mods.modlauncher.Launcher.run(Launcher.java:106) [modlauncher-9.0.7.jar%235!:?]     at cpw.mods.modlauncher.Launcher.main(Launcher.java:77) [modlauncher-9.0.7.jar%235!:?]     at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26) [modlauncher-9.0.7.jar%235!:?]     at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23) [modlauncher-9.0.7.jar%235!:?]     at cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:90) [bootstraplauncher-0.1.17.jar:?] [14:18:26] [Render thread/INFO]: Connecting to 192.168.1.6, 52745 [14:18:27] [Downloader 1/WARN]: Error al iniciar sesión: Sesión no válida (prueba a reiniciar el juego y el lanzador) [14:18:28] [Render thread/INFO]: Injecting existing registry data into this CLIENT instance [14:18:29] [Netty Client IO #3/INFO]: Connected to a modded server. [05dic.2021 14:18:31.070] [Render thread/INFO] [com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService/]: Environment: authHost='https://authserver.mojang.com', accountsHost='https://api.mojang.com', sessionHost='https://sessionserver.mojang.com', servicesHost='https://api.minecraftservices.com', name='PROD' [14:18:31] [Render thread/FATAL]: Error executing task on Client java.util.NoSuchElementException: packet_handler     at io.netty.channel.DefaultChannelPipeline.getContextOrDie(DefaultChannelPipeline.java:1119) ~[netty-all-4.1.25.Final.jar%2332!:4.1.25.Final]     at io.netty.channel.DefaultChannelPipeline.addBefore(DefaultChannelPipeline.java:260) ~[netty-all-4.1.25.Final.jar%2332!:4.1.25.Final]     at io.netty.channel.DefaultChannelPipeline.addBefore(DefaultChannelPipeline.java:249) ~[netty-all-4.1.25.Final.jar%2332!:4.1.25.Final]     at net.minecraftforge.network.NetworkFilters.lambda$injectIfNecessary$1(NetworkFilters.java:48) ~[forge-1.17.1-37.0.95-universal.jar%2366!:?]     at com.google.common.collect.RegularImmutableMap.forEach(RegularImmutableMap.java:146) ~[guava-21.0.jar%2320!:?]     at net.minecraftforge.network.NetworkFilters.injectIfNecessary(NetworkFilters.java:44) ~[forge-1.17.1-37.0.95-universal.jar%2366!:?]     at net.minecraftforge.fmllegacy.network.NetworkHooks.sendMCRegistryPackets(NetworkHooks.java:121) ~[forge-1.17.1-37.0.95-universal.jar%2366!:?]     at net.minecraft.client.multiplayer.ClientPacketListener.m_5998_(ClientPacketListener.java:374) ~[client-1.17.1-20210706.113038-srg.jar%2362!:?]     at net.minecraft.network.protocol.game.ClientboundLoginPacket.m_5797_(SourceFile:100) ~[client-1.17.1-20210706.113038-srg.jar%2362!:?]     at net.minecraft.network.protocol.game.ClientboundLoginPacket.m_5797_(SourceFile:18) ~[client-1.17.1-20210706.113038-srg.jar%2362!:?]     at net.minecraft.network.protocol.PacketUtils.m_131356_(SourceFile:21) ~[client-1.17.1-20210706.113038-srg.jar%2362!:?]     at net.minecraft.util.thread.BlockableEventLoop.m_6367_(SourceFile:151) ~[client-1.17.1-20210706.113038-srg.jar%2362!:?]     at net.minecraft.util.thread.ReentrantBlockableEventLoop.m_6367_(SourceFile:23) ~[client-1.17.1-20210706.113038-srg.jar%2362!:?]     at net.minecraft.util.thread.BlockableEventLoop.m_7245_(SourceFile:125) ~[client-1.17.1-20210706.113038-srg.jar%2362!:?]     at net.minecraft.util.thread.BlockableEventLoop.m_18699_(SourceFile:110) ~[client-1.17.1-20210706.113038-srg.jar%2362!:?]     at net.minecraft.client.Minecraft.m_91383_(Minecraft.java:1009) ~[client-1.17.1-20210706.113038-srg.jar%2362!:?]     at net.minecraft.client.Minecraft.m_91374_(Minecraft.java:659) ~[client-1.17.1-20210706.113038-srg.jar%2362!:?]     at net.minecraft.client.main.Main.main(Main.java:186) ~[client-1.17.1-20210706.113038-srg.jar%2362!:?]     at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]     at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78) ~[?:?]     at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]     at java.lang.reflect.Method.invoke(Method.java:567) ~[?:?]     at net.minecraftforge.fml.loading.targets.CommonClientLaunchHandler.lambda$launchService$0(CommonClientLaunchHandler.java:45) ~[fmlloader-1.17.1-37.0.95.jar%2322!:?]     at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-9.0.7.jar%235!:?]     at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53) [modlauncher-9.0.7.jar%235!:?]     at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71) [modlauncher-9.0.7.jar%235!:?]     at cpw.mods.modlauncher.Launcher.run(Launcher.java:106) [modlauncher-9.0.7.jar%235!:?]     at cpw.mods.modlauncher.Launcher.main(Launcher.java:77) [modlauncher-9.0.7.jar%235!:?]     at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26) [modlauncher-9.0.7.jar%235!:?]     at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23) [modlauncher-9.0.7.jar%235!:?]     at cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:90) [bootstraplauncher-0.1.17.jar:?] [14:18:45] [Render thread/INFO]: Connecting to 192.168.1.6, 52745 [14:18:46] [Downloader 1/WARN]: Error al iniciar sesión: Sesión no válida (prueba a reiniciar el juego y el lanzador) [14:18:47] [Render thread/INFO]: Injecting existing registry data into this CLIENT instance [14:18:48] [Netty Client IO #4/INFO]: Connected to a modded server. [05dic.2021 14:18:50.052] [Render thread/INFO] [com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService/]: Environment: authHost='https://authserver.mojang.com', accountsHost='https://api.mojang.com', sessionHost='https://sessionserver.mojang.com', servicesHost='https://api.minecraftservices.com', name='PROD' [14:18:50] [Render thread/FATAL]: Error executing task on Client java.util.NoSuchElementException: packet_handler     at io.netty.channel.DefaultChannelPipeline.getContextOrDie(DefaultChannelPipeline.java:1119) ~[netty-all-4.1.25.Final.jar%2332!:4.1.25.Final]     at io.netty.channel.DefaultChannelPipeline.addBefore(DefaultChannelPipeline.java:260) ~[netty-all-4.1.25.Final.jar%2332!:4.1.25.Final]     at io.netty.channel.DefaultChannelPipeline.addBefore(DefaultChannelPipeline.java:249) ~[netty-all-4.1.25.Final.jar%2332!:4.1.25.Final]     at net.minecraftforge.network.NetworkFilters.lambda$injectIfNecessary$1(NetworkFilters.java:48) ~[forge-1.17.1-37.0.95-universal.jar%2366!:?]     at com.google.common.collect.RegularImmutableMap.forEach(RegularImmutableMap.java:146) ~[guava-21.0.jar%2320!:?]     at net.minecraftforge.network.NetworkFilters.injectIfNecessary(NetworkFilters.java:44) ~[forge-1.17.1-37.0.95-universal.jar%2366!:?]     at net.minecraftforge.fmllegacy.network.NetworkHooks.sendMCRegistryPackets(NetworkHooks.java:121) ~[forge-1.17.1-37.0.95-universal.jar%2366!:?]     at net.minecraft.client.multiplayer.ClientPacketListener.m_5998_(ClientPacketListener.java:374) ~[client-1.17.1-20210706.113038-srg.jar%2362!:?]     at net.minecraft.network.protocol.game.ClientboundLoginPacket.m_5797_(SourceFile:100) ~[client-1.17.1-20210706.113038-srg.jar%2362!:?]     at net.minecraft.network.protocol.game.ClientboundLoginPacket.m_5797_(SourceFile:18) ~[client-1.17.1-20210706.113038-srg.jar%2362!:?]     at net.minecraft.network.protocol.PacketUtils.m_131356_(SourceFile:21) ~[client-1.17.1-20210706.113038-srg.jar%2362!:?]     at net.minecraft.util.thread.BlockableEventLoop.m_6367_(SourceFile:151) ~[client-1.17.1-20210706.113038-srg.jar%2362!:?]     at net.minecraft.util.thread.ReentrantBlockableEventLoop.m_6367_(SourceFile:23) ~[client-1.17.1-20210706.113038-srg.jar%2362!:?]     at net.minecraft.util.thread.BlockableEventLoop.m_7245_(SourceFile:125) ~[client-1.17.1-20210706.113038-srg.jar%2362!:?]     at net.minecraft.util.thread.BlockableEventLoop.m_18699_(SourceFile:110) ~[client-1.17.1-20210706.113038-srg.jar%2362!:?]     at net.minecraft.client.Minecraft.m_91383_(Minecraft.java:1009) ~[client-1.17.1-20210706.113038-srg.jar%2362!:?]     at net.minecraft.client.Minecraft.m_91374_(Minecraft.java:659) ~[client-1.17.1-20210706.113038-srg.jar%2362!:?]     at net.minecraft.client.main.Main.main(Main.java:186) ~[client-1.17.1-20210706.113038-srg.jar%2362!:?]     at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]     at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78) ~[?:?]     at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]     at java.lang.reflect.Method.invoke(Method.java:567) ~[?:?]     at net.minecraftforge.fml.loading.targets.CommonClientLaunchHandler.lambda$launchService$0(CommonClientLaunchHandler.java:45) ~[fmlloader-1.17.1-37.0.95.jar%2322!:?]     at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-9.0.7.jar%235!:?]     at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53) [modlauncher-9.0.7.jar%235!:?]     at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71) [modlauncher-9.0.7.jar%235!:?]     at cpw.mods.modlauncher.Launcher.run(Launcher.java:106) [modlauncher-9.0.7.jar%235!:?]     at cpw.mods.modlauncher.Launcher.main(Launcher.java:77) [modlauncher-9.0.7.jar%235!:?]     at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26) [modlauncher-9.0.7.jar%235!:?]     at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23) [modlauncher-9.0.7.jar%235!:?]     at cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:90) [bootstraplauncher-0.1.17.jar:?] [14:20:32] [Render thread/INFO]: Connecting to 192.168.1.6, 52745 [14:20:33] [Downloader 2/WARN]: Error al iniciar sesión: Sesión no válida (prueba a reiniciar el juego y el lanzador) [14:20:34] [Render thread/INFO]: Injecting existing registry data into this CLIENT instance [14:20:35] [Netty Client IO #5/INFO]: Connected to a modded server. [05dic.2021 14:20:37.178] [Render thread/INFO] [com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService/]: Environment: authHost='https://authserver.mojang.com', accountsHost='https://api.mojang.com', sessionHost='https://sessionserver.mojang.com', servicesHost='https://api.minecraftservices.com', name='PROD' [14:20:38] [Render thread/INFO]: Loaded 213 advancements [14:21:22] [Render thread/INFO]: Stopping!         This is?
    • Update... I still can't figure it out. So, since the blockmodels are super custom while the blockstates and item models are your average ones, I have come up with the idea of only doing datagen for those two and just referencing the pre-made blockmodels which I will put into a subfolder of the models/block directory. It will still be a little bit of pain, but at least my resources folder will stay organized which was my original goal.  
  • Topics

  • Who's Online (See full list)

×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.