Jump to content

Recommended Posts

Posted

Hey all,

I'm wondering if there's a way to forceload a chunk instantly in 1.18.2.  I'm updating an older mod from 1.16, and in that version of the game I was able to do so just by calling

serverWorld.forceChunk(chunkPos.x, chunkPos.z, false);

which would then enable me to access the Chunk at that location and get a list of the entities inside it (which is my end goal here as well).  However, although in 1.18 I still have the ability to call

serverLevel.setChunkForced(chunkPos.x, chunkPos.z, false);

it no longer seems to load the chunk immediately, but instead (from my understanding) submits a ticket to load it on the next tick.  This is problematic for my use case, as my goal is to load the chunk, access an entity within it, and then deload the chunk on completion, which I can no longer do in a single tick with this method.  LevelChunks also don't seem to contain a list of entities anymore in 1.18, and seem to have less automated functions connected to them, which could I suppose also be the source of my issue.

Is there a way to load a chunk instantaneously from its coordinates and immediately access the entities within it?

Posted
37 minutes ago, Xoroshio said:

Just call level.getChunk(x, y);

After that you can get the entities. Dont worry about the return value, the method loads the chunk.

Huh, well that's more straightforward than I expected.  Good to know, thanks!

Entity here is still coming back null, though.  Do I need to retrieve the entity differently?  Right now I'm doing it like this-

serverLevel.getChunk(chunkPos.x, chunkPos.z);
Entity entity = serverLevel.getEntity(uuidIn);

 

Posted
3 hours ago, Xoroshio said:

Ahhhh idk. Been awhile. How do you know the entity is in the chunk.

I'm saving and storing the position at a different point.  I know it's accurate in my testing cases because I'm also displaying the entity's coordinates, and if I manually teleport to them I can verify the entity is there.

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

    • mousetweaks is a client-side-only mod Remove it from your server, keep it in your client   If there are further issues, add the new crash-report with sites like https://mclo.gs/ Maybe there are more client side mods
    • I recently used forge 1.7.10 to try and make a server for a custom modpack, but everytime I get to the point where I boot up the server I get his consistent error. I'm completely new to this so I tried remaking the server and mod folder a few times assuming a hard reset would fix it, it didn't. So I'm now looking for specific mods that might be the problem or if I'm missing a dependent or something. For the time being I have been looking for mods that might be causing this issue and I can't pinpoint as to what it might be. I have a hunch it has something to do with Ars Magica 2 because of the EntityClientPlayerMP but considering there are a bunch of magic mods I can't say for certain.  If anyone does think it's Ars Magica 2, is there any way to save the mod? I really don't want to have to lose it. Sorry in advance if the formatting for this post sucks, I didn't have a pastebin before making this. Crash Log: ---- Minecraft Crash Report ---- // Surprise! Haha. Well, this is awkward. Time: 1/9/25 5:46 AM Description: Exception in server tick loop cpw.mods.fml.common.LoaderException: java.lang.NoClassDefFoundError: net/minecraft/client/entity/EntityClientPlayerMP     at cpw.mods.fml.common.LoadController.transition(LoadController.java:163)     at cpw.mods.fml.common.Loader.initializeMods(Loader.java:739)     at cpw.mods.fml.server.FMLServerHandler.finishServerLoading(FMLServerHandler.java:97)     at cpw.mods.fml.common.FMLCommonHandler.onServerStarted(FMLCommonHandler.java:319)     at net.minecraft.server.dedicated.DedicatedServer.func_71197_b(DedicatedServer.java:210)     at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:387)     at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:685) Caused by: java.lang.NoClassDefFoundError: net/minecraft/client/entity/EntityClientPlayerMP     at yalter.mousetweaks.loaders.MouseTweaksForge.init(Unknown Source)     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)     at java.lang.reflect.Method.invoke(Unknown Source)     at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:532)     at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)     at java.lang.reflect.Method.invoke(Unknown Source)     at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)     at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)     at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)     at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)     at com.google.common.eventbus.EventBus.post(EventBus.java:275)     at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:212)     at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:190)     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)     at java.lang.reflect.Method.invoke(Unknown Source)     at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)     at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)     at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)     at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)     at com.google.common.eventbus.EventBus.post(EventBus.java:275)     at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:119)     at cpw.mods.fml.common.Loader.initializeMods(Loader.java:737)     ... 5 more Caused by: java.lang.ClassNotFoundException: net.minecraft.client.entity.EntityClientPlayerMP     at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:191)     at java.lang.ClassLoader.loadClass(Unknown Source)     at java.lang.ClassLoader.loadClass(Unknown Source)     ... 32 more Caused by: java.lang.ArrayIndexOutOfBoundsException A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- System Details -- Details:     Minecraft Version: 1.7.10     Operating System: Windows 11 (amd64) version 10.0     Java Version: 1.8.0_431, Oracle Corporation     Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation     Memory: 3558558672 bytes (3393 MB) / 3946840064 bytes (3764 MB) up to 9544663040 bytes (9102 MB)     JVM Flags: 1 total; -Xmx10G     AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used     IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0     FML: MCP v9.05 FML v7.10.99.99 Minecraft Forge 10.13.4.1614 103 mods loaded, 103 mods active     States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored     UCHI    mcp{9.05} [Minecraft Coder Pack] (minecraft.jar)      UCHI    FML{7.10.99.99} [Forge Mod Loader] (forge-1.7.10-10.13.4.1614-1.7.10-universal.jar)      UCHI    Forge{10.13.4.1614} [Minecraft Forge] (forge-1.7.10-10.13.4.1614-1.7.10-universal.jar)      UCHI    AM2-Preloader{0.0.3} [AMCore] (minecraft.jar)      UCHI    CodeChickenCore{1.0.7.48} [CodeChicken Core] (minecraft.jar)      UCHI    NotEnoughItems{1.0.5.120} [Not Enough Items] (NotEnoughItems-1.7.10-1.0.5.120-universal.jar)      UCHI    ThaumicTinkerer-preloader{0.1} [Thaumic Tinkerer Core] (minecraft.jar)      UCHI    WitchingGadgetsCore{1.1.10} [Witching Gadgets Core] (minecraft.jar)      UCHI    OpenModsCore{0.10.1} [OpenModsCore] (minecraft.jar)      UCHI    <CoFH ASM>{000} [CoFH ASM] (minecraft.jar)      UCHI    sapmanpack{2.7.2} [SanAndreasPs Manager Pack CORE edition] (SAPManPack-1.7.10-2.7.2.jar)      UCHI    FastCraft{1.25} [FastCraft] (fastcraft-1.25.jar)      UCHI    ExtendedPotions{1.2} [Extended Potions] (ExtendedPotions-MC1.7.10-1.2.jar)      UCHI    securitycraft{v1.8.13} [SecurityCraft] ([1.7.10] SecurityCraft v1.8.13.jar)      UCHI    AccidentallyCircumstantialEvents{1.12.11} [Accidentally Circumstantial Events] (accidentallycircumstantialevents-1.12.11.jar)      UCHI    Baubles{1.0.1.10} [Baubles] (Baubles-1.7.10-1.0.1.10.jar)      UCHI    adventurebackpack{1.7.10-0.8b} [Adventure Backpack] (adventurebackpack-1.7.10-0.8c.jar)      UCHI    aether_legacy{v1.1.2.5} [The Aether] (aether-1.7.10-v1.1.2.5.jar)      UCHI    AnimationAPI{1.2.4} [AnimationAPI] (AnimationAPI-1.7.10-1.2.4.jar)      UCHI    arsmagica2{1.4.0.009} [Ars Magica 2] (AM2-1.4.0.011-LE.jar)      UCHI    AM2PlantFix{1.0} [Ars Magica 2 Plant Fix] (AM2PlantFix-1.0.jar)      UCHI    AncientWarfare{3.0.1-beta-MC1.7.10} [Ancient Warfare Core] (ancientwarfare-3.0.1-beta-MC1.7.10-FULL.jar)      UCHI    CoFHCore{1.7.10R3.1.4} [CoFH Core] (CoFHCore-[1.7.10]3.1.4-329.jar)      UCHI    AncientWarfareAutomation{3.0.1-beta-MC1.7.10} [Ancient Warfare Automation] (ancientwarfare-3.0.1-beta-MC1.7.10-FULL.jar)      UCHI    AncientWarfareModeler{3.0.1-beta-MC1.7.10} [Ancient Warfare Model Editor] (ancientwarfare-3.0.1-beta-MC1.7.10-FULL.jar)      UCHI    AncientWarfareStructure{3.0.1-beta-MC1.7.10} [Ancient Warfare Structures] (ancientwarfare-3.0.1-beta-MC1.7.10-FULL.jar)      UCHI    AncientWarfareNEIPlugin{3.0.1-beta-MC1.7.10} [Ancient Warfare NEI Plugin] (ancientwarfare-3.0.1-beta-MC1.7.10-FULL.jar)      UCHI    AncientWarfareNpc{3.0.1-beta-MC1.7.10} [Ancient Warfare NPCs] (ancientwarfare-3.0.1-beta-MC1.7.10-FULL.jar)      UCHI    antiqueatlas{4.4.4} [Antique Atlas] (antiqueatlas-1.7.10-4.4.4.jar)      UCHI    AppleCore{3.1.1} [AppleCore] (AppleCore-mc1.7.10-3.1.1.jar)      UCHI    ArchimedesShips{1.7.10 v1.7.1} [Archimedes' Ships] (ArchimedesShips-1.7.1.jar)      UCHI    ATG{0.10.0} [Alternate Terrain Generation] (ATG-1.7.10-0.12.0.jar)      UCHI    aura{unspecified} [Aura Cascade] (AuraCascade-557.jar)      UCHI    Thaumcraft{4.2.3.5} [Thaumcraft] (Thaumcraft-1.7.10-4.2.3.5.jar)      UCHI    Waila{1.5.10} [Waila] (Waila-1.5.10_1.7.10.jar)      UCHI    Automagy{0.28.2} [Automagy] (Automagy-1.7.10-0.28.2.jar)      UCHI    BiblioCraft{1.11.7} [BiblioCraft] (BiblioCraft[v1.11.7][MC1.7.10].jar)      UCHI    BiomesOPlenty{2.1.0} [Biomes O' Plenty] (BiomesOPlenty-1.7.10-2.1.0.1889-universal.jar)      UCHI    bleach_kd{1.4.6} [LittleBreadLoaf's Bleach Mod] (Bleach_KD-1.4.6-1.7.10.jar)      UCHI    AWWayofTime{v1.3.3} [Blood Magic: Alchemical Wizardry] (BloodMagic-1.7.10-1.3.3-17.jar)      UCHI    Botania{r1.8-249} [Botania] (Botania r1.8-249.jar)      UCHI    TwilightForest{2.4.3} [The Twilight Forest] (TwilightForest-2.4.3.jar)      UCHI    chisel{2.5.1.44} [Chisel 2] (Chisel2-2.5.1.44.jar)      UCHI    CarpentersBlocks{3.3.8.2} [Carpenter's Blocks] (Carpenter's Blocks v3.3.8.2 - MC 1.7.10.jar)      UCHI    chococraft{4.1.5} [Clienthax's ChocoCraft] (ChocoCraft-4.1.5.jar)      UCHI    claysoldiers{2.0.0-beta.2} [Clay Soldiers Mod] (ClaySoldiersMod-1.7.10-2.0.0-beta.2.jar)      UCHI    cosmeticarmorreworked{1.7.10-v7} [CosmeticArmorReworked] (CosmeticArmorReworked-1.7.10-v7.jar)      UCHI    CustomSpawner{3.3.0} [DrZhark's CustomSpawner] (CustomMobSpawner 3.3.0.zip)      UCHI    customnpcs{1.7.10d} [CustomNpcs] (CustomNPCs_1.7.10d(29oct17).jar)      UCHI    menagerie{1.0} [menagerie] (dark_menagerie-1.7.10-beta-3.1a.jar)      UCHI    DisenchanterMod{1.6} [Disenchanter] (DisenchanterMod-[1.7.10]1.6.jar)      UCHI    DragonMounts{r41-1.7.10} [Dragon Mounts] (DragonMounts-r41-1.7.10.jar)      UCHI    MoCreatures{6.3.1} [DrZhark's Mo'Creatures Mod] (DrZharks MoCreatures Mod v6.3.1.zip)      UCHI    ThaumicTinkerer{unspecified} [Thaumic Tinkerer] (ThaumicTinkerer-2.5-1.7.10-164.jar)      UCHI    ForbiddenMagic{1.7.10-0.575} [Forbidden Magic] (Forbidden Magic-1.7.10-0.575.jar)      UCHI    MineTweaker3{3.0.10} [MineTweaker 3] (MineTweaker3-1.7.10-3.0.10B.jar)      UCHI    FTBL{1.0.18.2} [FTBLib] (FTBLib-1.7.10-1.0.18.3.jar)      UCHI    FTBU{1.0.18.2} [FTBUtilities] (FTBUtilities-1.7.10-1.0.18.3.jar)      UCHI    gadomancy{1.0.7.3} [Gadomancy] (gadomancy-1.7.10-1.0.7.3.jar)      UCHI    gravestone{0.7.10.3} [Gravestone] (GraveStone Mod 0.7.10.3.jar)      UCHI    GrimoireOfGaia{1.0.0} [Grimoire of Gaia 3] (GrimoireOfGaia3-1.7.10-1.2.7.jar)      UCHI    guideapi{1.7.10-1.0.1-20} [Guide-API] (Guide-API-1.7.10-1.0.1-20.jar)      UCHI    HardcoreQuesting{4.4.4} [Hardcore Questing Mode] (HQM-The Journey-4.4.4.jar)      UCHI    ImLookingAtBlood{1.1} [I'm Looking At Blood] (ImLookingAtBlood-1.7.2-1.1a.jar)      UCHI    inventorytweaks{1.59-dev-152-cf6e263} [Inventory Tweaks] (InventoryTweaks-1.59-dev-152.jar)      UCHI    IronChest{6.0.62.742} [Iron Chest] (ironchest-1.7.10-6.0.62.742-universal.jar)      UCHI    JABBA{1.2.2} [JABBA] (Jabba-1.2.2_1.7.10.jar)      UCHI    launchgui{1.7.10-2.0-18} [LaunchGUI] (LaunchGui-1.7.10-2.0-18-client.jar)      UCHI    magicalcrops{4.0.0_PUBLIC_BETA_4b} [Magical Crops: Core] (magicalcrops-4.0.0_PUBLIC_BETA_5.jar)      UCHI    magicalcropsarmour{4.0.0_PUBLIC_BETA_4} [Magical Crops: Armoury] (magicalcropsarmoury-4.0.0_PUBLIC_BETA_4.jar)      UCHI    RadixCore{2.1.3} [RadixCore] (RadixCore-1.7.10-2.1.3-universal.jar)      UCHI    MCA{1.7.10-5.2.2} [Minecraft Comes Alive] (MCA-1.7.10-5.2.2-universal.jar)      UCHI    modtweaker2{0.9.6} [Mod Tweaker 2] (ModTweaker2-0.9.6.jar)      UCHI    Morpheus{1.7.10-1.6.21} [Morpheus] (Morpheus-1.7.10-1.6.21.jar)      UCHE    MouseTweaks{2.4.4} [Mouse Tweaks] (MouseTweaks-2.4.4-mc1.7.10.jar)      UCHI    cfm{3.4.7} [ 9MrCrayfish's Furniture Mod] (MrCrayfishFurnitureModv3.4.7(1.7.10).jar)      UCHI    Mystcraft{0.12.3.04} [Mystcraft] (mystcraft-1.7.10-0.12.3.04.jar)      UCHI    netherportalfix{1.0} [Nether Portal Fix] (netherportalfix-mc1.7.10-1.1.0.jar)      UCHI    OpenMods{0.10.1} [OpenMods] (OpenModsLib-1.7.10-0.10.1.jar)      UCHI    OpenBlocks{1.6} [OpenBlocks] (OpenBlocks-1.7.10-1.6.jar)      UCHI    clayspawn{1.7.10b} [Pam's Clayspawn] (Pam's Clay Spawn 1.7.10b.jar)      UCHI    harvestcraft{1.7.10j} [Pam's HarvestCraft] (Pam's HarvestCraft 1.7.10Lb.jar)      UCHI    Quadrum{1.2.0} [Quadrum] (Quadrum-1.7.10-1.2.0.B13-universal.jar)      UCHI    Roguelike{1.5.0} [Roguelike Dungeons] (roguelike-1.7.10-1.5.0b.jar)      UCHI    Sanguimancy{1.7.10-1.1.9-35} [Sanguimancy] (Sanguimancy-1.7.10-1.1.9-35.jar)      UCHI    StorageDrawers{1.7.10-1.10.9} [Storage Drawers] (StorageDrawers-1.7.10-1.10.9.jar)      UCHI    TCBotaniaExoflame{1.0} [TCBotaniaExoflame] (TCBotaniaExoflame-1.7.10-1.4.jar)      UCHI    tcinventoryscan{1.0.11} [TC Inventory Scanning] (tcinventoryscan-mc1.7.10-1.0.11.jar)      UCHI    tcnodetracker{1.1.2} [TC Node Tracker] (tcnodetracker-1.7.10-1.1.2.jar)      UCHI    thaumcraftneiplugin{@VERSION@} [Thaumcraft NEI Plugin] (thaumcraftneiplugin-1.7.10-1.7a.jar)      UCHI    thaumicdyes{1.10.5} [Thaumic Dyes] (Thaumic-Dyes-[1.7.10] 1.10.5-0.jar)      UCHI    ThaumicExploration{0.6.0} [Thaumic Exploration] (ThaumicExploration-1.7.10-1.1-53.jar)      UCHI    ThaumicHorizons{1.7.0} [ThaumicHorizons] (ThaumicHorizons-1.7.0.jar)      UCHI    thaumicinfusion{4.32} [Thaumic Infusion] (ThaumicInfusion-4.32.jar)      UCHI    TravellersGear{1.16.6} [Traveller's Gear] (TravellersGear-1.7.10-1.16.6.jar)      UCHI    wawla{1.3.1} [What Are We Looking At] (Wawla-1.0.5.120.jar)      UCHI    waystones{1.0.12} [Waystones] (Waystones-mc1.7.10-1.0.12.jar)      UCHI    weaponmod{v1.14.3} [Balkon's WeaponMod] (weaponmod-1.14.3.jar)      UCHI    witchery{0.24.1} [Witchery] (witchery-1.7.10-0.24.1.jar)      UCHI    WitchingGadgets{1.1.10} [Witching Gadgets] (WitchingGadgets-1.7.10-1.1.10.jar)      UCHI    wolfarmor{1.3.0} [Wolf Armor and Storage] (wolfarmor-1.3.0.1.jar)      UCHI    yampst{1.3.5} [YAMPST] (Yampst-Simply Magic-1.0.0.jar)      UCHI    aobd{2.9.2} [Another One Bites The Dust] (AOBD-2.9.2.jar)      OpenModsLib class transformers: [stencil_patches:ENABLED],[movement_callback:ENABLED],[player_damage_hook:FINISHED],[map_gen_fix:FINISHED],[gl_capabilities_hook:ENABLED],[player_render_hook:ENABLED]     Class transformer null safety: found misbehaving transformers: me.guichaguri.betterfps.transformers.MathTransformer(me.guichaguri.betterfps.transformers.MathTransformer@25032123) returned non-null result: 0,me.guichaguri.betterfps.transformers.EventTransformer(me.guichaguri.betterfps.transformers.EventTransformer@c2bfe72) returned non-null result: 0     CoFHCore: -[1.7.10]3.1.4-329     Profiler Position: N/A (disabled)     Is Modded: Definitely; Server brand changed to 'fml,forge'     Type: Dedicated Server (map_server.txt)
    • I'm saving and storing the position at a different point.  I know it's accurate in my testing cases because I'm also displaying the entity's coordinates, and if I manually teleport to them I can verify the entity is there.
    • Ahhhh idk. Been awhile. How do you know the entity is in the chunk.
    • repo https://github.com/DiglisTheIII/EldenCraft-2.1 not really sure what to do at this point. any help would be great
  • Topics

×
×
  • Create New...

Important Information

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