Jump to content

Recommended Posts

Posted

Hey all! I've finished my mod and its working perfectly in single player.

I went to test it in multiplayer, and its working great there too! Until I go into my custom dimension, then my client + server crash and give this error.

 

2012-10-01 20:07:39 [sEVERE] Encountered an unexpected exception NoSuchMethodError
java.lang.NoSuchMethodError: vp.a(FI)F
at ChunkProviderDeathWorld.initializeNoiseField(ChunkProviderDeathWorld.java:247)
at ChunkProviderDeathWorld.generateTerrain(ChunkProviderDeathWorld.java:65)
at ChunkProviderDeathWorld.d(ChunkProviderDeathWorld.java:213)
at gq.c(ChunkProviderServer.java:106)
at gp.<init>(SourceFile:26)
at go.a(SourceFile:171)
at go.a(SourceFile:202)
at et.a(ServerConfigurationManager.java:127)
at et.c(ServerConfigurationManager.java:176)
at et.a(ServerConfigurationManager.java:88)
at gx.completeConnection(NetLoginHandler.java:164)
at cpw.mods.fml.common.network.FMLNetworkHandler.handleClientConnection(FMLNetworkHandler.java:149)
at cpw.mods.fml.common.network.FMLNetworkHandler.onConnectionReceivedFromClient(FMLNetworkHandler.java:109)
at gx.d(NetLoginHandler.java:149)
at gx.c(NetLoginHandler.java:51)
at fy.a(ServerListenThread.java:50)
at fx.b(SourceFile:29)
at ft.q(DedicatedServer.java:256)
at net.minecraft.server.MinecraftServer.p(MinecraftServer.java:547)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:453)
at ep.run(SourceFile:539)

Its seem to be an error with the landscape generation, I'm using Dimension API 1.6.1 and Forge 4.1.1.297.

Why does it work in SP and not in MP when I installed both the same way.

 

Help, I really need this!

 

EDIT:

This

initializeNoiseField

Seems to be the problem in the server, I dont know why.

Posted

That is because WorldChunkManager.getTemperatureAtHeight(float,int) doesn't exist on the server, and you're trying to call it.

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

Posted
  On 10/2/2012 at 9:34 AM, LexManos said:

I don't know, is there?

I've removed it, It wasn't needed and the world still looks the same, so thats fixed.

But now it gives THIS error.

[sEVERE] Encountered an unexpected exception NoSuchMethodError
java.lang.NoSuchMethodError: vk.i()F
at ChunkProviderDeathWorld.initializeNoiseField(ChunkProviderDeathWorld.java:247)
at ChunkProviderDeathWorld.generateTerrain(ChunkProviderDeathWorld.java:65)
at ChunkProviderDeathWorld.d(ChunkProviderDeathWorld.java:213)
at gq.c(ChunkProviderServer.java:106)
at gp.<init>(SourceFile:26)
at go.a(SourceFile:171)
at go.a(SourceFile:202)
at et.a(ServerConfigurationManager.java:128)
at et.c(ServerConfigurationManager.java:177)
at et.a(ServerConfigurationManager.java:89)
at gx.completeConnection(NetLoginHandler.java:164)
at cpw.mods.fml.common.network.FMLNetworkHandler.handleClientConnection(FMLNetworkHandler.java:149)
at cpw.mods.fml.common.network.FMLNetworkHandler.onConnectionReceivedFromClient(FMLNetworkHandler.java:109)
at gx.d(NetLoginHandler.java:149)
at gx.c(NetLoginHandler.java:51)
at fy.a(ServerListenThread.java:50)
at fx.b(SourceFile:29)
at ft.q(DedicatedServer.java:256)
at net.minecraft.server.MinecraftServer.p(MinecraftServer.java:547)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:453)
at ep.run(SourceFile:539)

I don't know what to do, I don't recognize these errors!

I'm like literally begging you, when this is fixed I'll never have to ask anything again, cause its done then!

 

    private double[] initializeNoiseField(double ad[], int i, int j, int k, int l, int i1, int j1)
    {
        if (ad == null)
        {
            ad = new double[l * i1 * j1];
        }

        double d = 684.41200000000003D;
        double d1 = 684.41200000000003D;
        float f1 = worldObj.getWorldChunkManager().getBiomeGenAt(i, k).getFloatRainfall();
        noise4 = noiseGen6.generateNoiseOctaves(noise4, i, k, l, j1, 1.121D, 1.121D, 0.5D);
        noise5 = noiseGen7.generateNoiseOctaves(noise5, i, k, l, j1, 200D, 200D, 0.5D);
        d *= 2D;
        noise1 = noiseGen3.generateNoiseOctaves(noise1, i, j, k, l, i1, j1, d / 80D, d1 / 160D, d / 80D);
        noise2 = noiseGen1.generateNoiseOctaves(noise2, i, j, k, l, i1, j1, d, d1, d);
        noise3 = noiseGen2.generateNoiseOctaves(noise3, i, j, k, l, i1, j1, d, d1, d);
        int k1 = 0;
        int l1 = 0;
        int i2 = 16 / l;

        for (int j2 = 0; j2 < l; j2++)
        {
            int k2 = j2 * i2 + i2 / 2;

            for (int l2 = 0; l2 < j1; l2++)
            {
                int i3 = l2 * i2 + i2 / 2;
                float f3 = f1;
                double d2 = 1.0D - (double)f3;
                d2 *= d2;
                d2 *= d2;
                d2 = 1.0D - d2;
                double d3 = (noise4[l1] + 256D) / 512D;
                d3 *= d2;

                if (d3 > 1.0D)
                {
                    d3 = 1.0D;
                }

                double d4 = noise5[l1] / 8000D;

                if (d4 < 0.0D)
                {
                    d4 = -d4 * 0.29999999999999999D;
                }

                d4 = d4 * 3D - 2D;

                if (d4 > 1.0D)
                {
                    d4 = 1.0D;
                }

                d4 /= 8D;
                d4 = 0.0D;

                if (d3 < 0.0D)
                {
                    d3 = 0.0D;
                }

                d3 += 0.5D;
                d4 = (d4 * (double)i1) / 16D;
                l1++;
                double d5 = (double)i1 / 2D;

                for (int j3 = 0; j3 < i1; j3++)
                {
                    double d6 = 0.0D;
                    double d7 = (((double)j3 - d5) * 8D) / d3;

                    if (d7 < 0.0D)
                    {
                        d7 *= -1D;
                    }

                    double d8 = noise2[k1] / 512D;
                    double d9 = noise3[k1] / 512D;
                    double d10 = (noise1[k1] / 10D + 1.0D) / 2D;

                    if (d10 < 0.0D)
                    {
                        d6 = d8;
                    }
                    else if (d10 > 1.0D)
                    {
                        d6 = d9;
                    }
                    else
                    {
                        d6 = d8 + (d9 - d8) * d10;
                    }

                    d6 -= 8D;
                    int k3 = 32;

                    if (j3 > i1 - k3)
                    {
                        double d11 = (float)(j3 - (i1 - k3)) / ((float)k3 - 1.0F);
                        d6 = d6 * (1.0D - d11) + -30D * d11;
                    }

                    k3 = 8;

                    if (j3 < k3)
                    {
                        double d12 = (float)(k3 - j3) / ((float)k3 - 1.0F);
                        d6 = d6 * (1.0D - d12) + -30D * d12;
                    }

                    ad[k1] = d6;
                    k1++;
                }
            }
        }

        return ad;
    }

 

This is my initializeNoiseField in my ChunkProvider.

Posted

I don't exactly know, but is this method also available for the server?

.getFloatRainfall()

in:

float f1 = worldObj.getWorldChunkManager().getBiomeGenAt(i, k).getFloatRainfall();

 

Try to outcomment it or use an actual number like 1F or so. If it's working then, you know what's the problem then.

Don't ask for support per PM! They'll get ignored! | If a post helped you, click the "Thank You" button at the top right corner of said post! |

mah twitter

  Quote

This thread makes me sad because people just post copy-paste-ready code when it's obvious that the OP has little to no programming experience. This is not how learning works.

Posted

Debug your crap as a dedi server and you'll get more usefull information.

There is no reason you should be getting these errors at the obfed state, you should be catching them before you reobf.

I setup the eclipse workspace with debug configurations for a reason.

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

Posted
  On 10/3/2012 at 12:44 AM, LexManos said:

Debug your crap as a dedi server and you'll get more usefull information.

There is no reason you should be getting these errors at the obfed state, you should be catching them before you reobf.

I setup the eclipse workspace with debug configurations for a reason.

 

When I debugged my "Crap", It didnt help a thing, same error, giving the same location.

 

I need to find a replacement method, but I can't seem to get one. The method is really needed to generate my world.

Posted
  On 10/3/2012 at 3:35 PM, GigaNova said:

  Quote

Debug your crap as a dedi server and you'll get more usefull information.

There is no reason you should be getting these errors at the obfed state, you should be catching them before you reobf.

I setup the eclipse workspace with debug configurations for a reason.

 

When I debugged my "Crap", It didnt help a thing, same error, giving the same location.

 

I need to find a replacement method, but I can't seem to get one. The method is really needed to generate my world.

 

Did you try my response?

Don't ask for support per PM! They'll get ignored! | If a post helped you, click the "Thank You" button at the top right corner of said post! |

mah twitter

  Quote

This thread makes me sad because people just post copy-paste-ready code when it's obvious that the OP has little to no programming experience. This is not how learning works.

Posted
  On 10/3/2012 at 5:33 PM, SanAndreasP said:

  Quote

  Quote

Debug your crap as a dedi server and you'll get more usefull information.

There is no reason you should be getting these errors at the obfed state, you should be catching them before you reobf.

I setup the eclipse workspace with debug configurations for a reason.

 

When I debugged my "Crap", It didnt help a thing, same error, giving the same location.

 

I need to find a replacement method, but I can't seem to get one. The method is really needed to generate my world.

 

Did you try my response?

 

I tried that, but then F3 gave errors because F1 was undifined, and when commenting F3 other vars would get errors and so on.

Can I replace this with something else, not the same function but something must give the same outcome?

Posted
  On 10/3/2012 at 6:09 PM, GigaNova said:

  Quote

  Quote

  Quote

Debug your crap as a dedi server and you'll get more usefull information.

There is no reason you should be getting these errors at the obfed state, you should be catching them before you reobf.

I setup the eclipse workspace with debug configurations for a reason.

 

When I debugged my "Crap", It didnt help a thing, same error, giving the same location.

 

I need to find a replacement method, but I can't seem to get one. The method is really needed to generate my world.

 

Did you try my response?

 

I tried that, but then F3 gave errors because F1 was undifined, and when commenting F3 other vars would get errors and so on.

Can I replace this with something else, not the same function but something must give the same outcome?

 

Give F1 an actual number like 1F or so and try that.

Don't ask for support per PM! They'll get ignored! | If a post helped you, click the "Thank You" button at the top right corner of said post! |

mah twitter

  Quote

This thread makes me sad because people just post copy-paste-ready code when it's obvious that the OP has little to no programming experience. This is not how learning works.

Posted
  On 10/3/2012 at 6:27 PM, SanAndreasP said:

Give F1 an actual number like 1F or so and try that.

 

2 Errors:

 

at  float 1F = worldObj.getWorldChunkManager().getBiomeGenAt(i, k).getFloatRainfall();

Syntax error on token "1F", invalid VariableDecloratorID

 

at  float f3 = f1;

  Quote
F1 cannot be resolved as a variable
Posted
  On 10/3/2012 at 6:34 PM, GigaNova said:

  Quote

Give F1 an actual number like 1F or so and try that.

 

2 Errors:

 

at  float 1F = worldObj.getWorldChunkManager().getBiomeGenAt(i, k).getFloatRainfall();

Syntax error on token "1F", invalid VariableDecloratorID

 

at  float f3 = f1;

  Quote
F1 cannot be resolved as a variable

 

You don't call the variable 1f, but you assign the value 1f to it, like = 1f;

You can't have variables starting with a number...

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
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Cracked Launchers are not supported
    • After some time minecraft crashes with an error. Here is the log https://drive.google.com/file/d/1o-2R6KZaC8sxjtLaw5qj0A-GkG_SuoB5/view?usp=sharing
    • The specific issue is that items in my inventory wont stack properly. For instance, if I punch a tree down to collect wood, the first block I collected goes to my hand. So when I punch the second block of wood to collect it, it drops, but instead of stacking with the piece of wood already in my hand, it goes to the second slot in my hotbar instead. Another example is that I'll get some dirt, and then when I'm placing it down later I'll accidentally place a block where I don't want it. When I harvest it again, it doesn't go back to the stack that it came from on my hotbar, where it should have gone, but rather into my inventory. That means that if my inventory is full, then the dirt wont be picked up even though there should be space available in the stack I'm holding. The forge version I'm using is 40.3.0, for java 1.18.2. I'll leave the mods I'm using here, and I'd appreciate it if anybody can point me in the right direction in regards to figuring out how to fix this. I forgot to mention that I think it only happens on my server but I&#39;m not entirely sure. PLEASE HELP ME! LIST OF THE MODS. aaa_particles Adorn AdvancementPlaques AI-Improvements AkashicTome alexsdelight alexsmobs AmbientSounds amwplushies Animalistic another_furniture AppleSkin Aquaculture aquamirae architectury artifacts Atlas-Lib AutoLeveling AutoRegLib auudio balm betterfpsdist biggerstacks biomancy BiomesOPlenty blockui blueprint Bookshelf born_in_chaos Botania braincell BrassAmberBattleTowers brutalbosses camera CasinoCraft cfm (MrCrayfish’s Furniture Mod) chat_heads citadel cloth-config Clumps CMDCam CNB cobweb collective comforts convenientcurioscontainer cookingforblockheads coroutil CosmeticArmorReworked CozyHome CrabbersDelight crashexploitfixer crashutilities Create CreativeCore creeperoverhaul cristellib crittersandcompanions Croptopia CroptopiaAdditions CullLessLeaves curios curiouslanterns curiouslights Curses' Naturals CustomNPCs CyclopsCore dannys_expansion decocraft Decoration Mod DecorationDelightRefurbished Decorative Blocks Disenchanting DistantHorizons doubledoors DramaticDoors drippyloadingscreen durabilitytooltip dynamic-fps dynamiclights DynamicTrees DynamicTreesBOP DynamicTreesPlus Easy Dungeons EasyAnvils EasyMagic easy_npc eatinganimation ecologics effective_fg elevatorid embeddium emotecraft enchantlimiter EnchantmentDescriptions EnderMail engineersdecor entityculling entity_model_features entity_texture_features epicfight EvilCraft exlinefurniture expandability explosiveenhancement factory-blocks fairylights fancymenu FancyVideo FarmersDelight fast-ip-ping FastSuite ferritecore finsandtails FixMySpawnR Forge Middle Ages fossil FpsReducer2 furnish GamingDeco geckolib goblintraders goldenfood goodall H.e.b habitat harvest-with-ease hexerei hole_filler huge-structure-blocks HunterIllager iammusicplayer Iceberg illuminations immersive_paintings incubation infinitybuttons inventoryhud InventoryProfilesNext invocore ItemBorders itemzoom Jade jei (Just Enough Items) JetAndEliasArmors journeymap JRFTL justzoom kiwiboi Kobolds konkrete kotlinforforge lazydfu LegendaryTooltips libIPN lightspeed lmft lodestone LongNbtKiller LuckPerms Lucky77 MagmaMonsters malum ManyIdeasCore ManyIdeasDoors marbledsarsenal marg mcw-furniture mcw-lights mcw-paths mcw-stairs mcw-trapdoors mcw-windows meetyourfight melody memoryleakfix Mimic minecraft-comes-alive MineTraps minibosses MmmMmmMmmMmm MOAdecor (ART, BATH, COOKERY, GARDEN, HOLIDAYS, LIGHTS, SCIENCE) MobCatcher modonomicon mods_optimizer morehitboxes mowziesmobs MutantMonsters mysticalworld naturalist NaturesAura neapolitan NekosEnchantedBooks neoncraft2 nerb nifty NightConfigFixes nightlights nocube's_villagers_sell_animals NoSeeNoTick notenoughanimations obscure_api oculus oresabovediamonds otyacraftengine Paraglider Patchouli physics-mod Pillagers Gun PizzaCraft placeableitems Placebo player-animation-lib pneumaticcraft-repressurized polymorph PrettyPipes Prism projectbrazier Psychadelic-Chemistry PuzzlesLib realmrpg_imps_and_demons RecipesLibrary reeves-furniture RegionsUnexplored restrictedportals revive-me Scary_Mobs_And_Bosses selene shetiphiancore ShoulderSurfing smoothboot
    • Hi everyone, I'm currently developing a Forge 1.21 mod for Minecraft and I want to display a custom HUD overlay for a minigame. My goal: When the game starts, all players should see an item/block icon (from the base game, not a custom texture) plus its name/text in the HUD – similar to how the bossbar overlay works. The HUD should appear centered above the hotbar (or at a similar prominent spot), and update dynamically (icon and name change as the target item changes). What I've tried: I looked at many online tutorials and several GitHub repos (e.g. SeasonHUD, MiniHUD), but most of them use NeoForge or Forge versions <1.20 that provide the IGuiOverlay API (e.g. implements IGuiOverlay, RegisterGuiOverlaysEvent). In Forge 1.21, it seems that neither IGuiOverlay nor RegisterGuiOverlaysEvent exist anymore – at least, I can't import them and they are missing from the docs and code completion. I tried using RenderLevelStageEvent as a workaround but it is probably not intended for custom HUDs. I am not using NeoForge, and switching the project to NeoForge is currently not an option for me. I tried to look at the original minecraft source code to see how elements like hearts, hotbar etc are drawn on the screen but I am too new to Minecraft modding to understand. What I'm looking for: What is the correct way to add a custom HUD element (icon + text) in Forge 1.21, given that the previous overlay API is missing? Is there a new recommended event, callback, or method in Forge 1.21 for custom HUD overlays, or is everyone just using a workaround? Is there a minimal open-source example repo for Forge 1.21 that demonstrates a working HUD overlay without relying on NeoForge or deprecated Forge APIs? My ideal solution: Centered HUD element with an in-game item/block icon (from the base game's assets, e.g. a diamond or any ItemStack / Item) and its name as text, with a transparent background rectangle. It should be visible to the players when the mini game is running. Easy to update the item (e.g. static variable or other method), so it can change dynamically during the game. Any help, code snippets, or up-to-date references would be really appreciated! If this is simply not possible right now in Forge 1.21, it would also help to know that for sure. Thank you very much in advance!
  • Topics

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.