Jump to content
  • Home
  • Files
  • Docs
Topics
  • All Content

  • This Topic
  • This Forum

  • Advanced Search
  • Existing user? Sign In  

    Sign In



    • Not recommended on shared computers


    • Forgot your password?

  • Sign Up
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • [1.11.2] How to update chunk
The update for 1.13 is being worked on - please be patient. (Updated 02/14/19)
Sign in to follow this  
Followers 1
WildHeart

[1.11.2] How to update chunk

Started by WildHeart, July 14, 2018

21 posts in this topic

WildHeart    0

WildHeart

WildHeart    0

  • Creeper Killer
  • WildHeart
  • Members
  • 0
  • 209 posts
  • Report post
Posted July 14, 2018 (edited)

Hi, how to update the chunk if it was unloaded?

Edited July 14, 2018 by WildHeart

Share this post


Link to post
Share on other sites

jabelar    584

jabelar

jabelar    584

  • Reality Controller
  • jabelar
  • Members
  • 584
  • 3266 posts
  • Report post
Posted July 14, 2018

What problem are you trying to solve?

Share this post


Link to post
Share on other sites

WildHeart    0

WildHeart

WildHeart    0

  • Creeper Killer
  • WildHeart
  • Members
  • 0
  • 209 posts
  • Report post
Posted July 15, 2018

I have a mod that has a mechanism, this mechanism is enabled when it loads your chunk, but I need to remove it as on my server logs are created. It doesn't mention ChunkEvent.Unload / Load or ForgeChunkManger. So, I need more ways of loading the chunk which I don't know. Thanks!

Share this post


Link to post
Share on other sites

diesieben07    6103

diesieben07

diesieben07    6103

  • Reality Controller
  • diesieben07
  • Forum Team
  • 6103
  • 40198 posts
  • Report post
Posted July 15, 2018

Accessing a block in an unloaded chunk (through World#getBlockState for example) will load that chunk (and then immediately unload it, since it is not needed). However you should avoid doing this.

 

6 hours ago, WildHeart said:

I have a mod that has a mechanism, this mechanism is enabled when it loads your chunk, but I need to remove it as on my server logs are created.

I have no idea what this is supposed to mean. A server always creates log files. Please clarify.

Share this post


Link to post
Share on other sites

WildHeart    0

WildHeart

WildHeart    0

  • Creeper Killer
  • WildHeart
  • Members
  • 0
  • 209 posts
  • Report post
Posted July 15, 2018
1 minute ago, diesieben07 said:

Accessing a block in an unloaded chunk (through World#getBlockState for example) will load that chunk (and then immediately unload it, since it is not needed). However you should avoid doing this.

 

I have no idea what this is supposed to mean. A server always creates log files. Please clarify.

Oh, sry, it's a stupid translator. "I have a mod that has a mechanism, this mechanism loads chunk when is enabled". I know that it is possible to load the chunk using method getChunkFromChunkCoords, but what else like this can cause a сhunk loading or tileEntities update in the vicinity?

Share this post


Link to post
Share on other sites

diesieben07    6103

diesieben07

diesieben07    6103

  • Reality Controller
  • diesieben07
  • Forum Team
  • 6103
  • 40198 posts
  • Report post
Posted July 15, 2018

You want to keep chunks loaded, regardless of players being nearby? Like various chunkloader blocks from various mods do? Look at ForgeChunkManager.

Share this post


Link to post
Share on other sites

WildHeart    0

WildHeart

WildHeart    0

  • Creeper Killer
  • WildHeart
  • Members
  • 0
  • 209 posts
  • Report post
Posted July 15, 2018

Not exactly. I know chunk loaders: ForgeChunManager, ChunkEvent.Load/Unload. But there are still vanilla ways I don't know about. That's what I'm asking.

Share this post


Link to post
Share on other sites

diesieben07    6103

diesieben07

diesieben07    6103

  • Reality Controller
  • diesieben07
  • Forum Team
  • 6103
  • 40198 posts
  • Report post
Posted July 15, 2018

I have no idea what you are asking.
Please state the concrete problem you are trying to solve.

Share this post


Link to post
Share on other sites

WildHeart    0

WildHeart

WildHeart    0

  • Creeper Killer
  • WildHeart
  • Members
  • 0
  • 209 posts
  • Report post
Posted July 15, 2018

How to update tileEntity when the player is not in the vicinity?

Share this post


Link to post
Share on other sites

diesieben07    6103

diesieben07

diesieben07    6103

  • Reality Controller
  • diesieben07
  • Forum Team
  • 6103
  • 40198 posts
  • Report post
Posted July 15, 2018

Define "update". Do you want ITickable#update to be called on your TileEntity? Do you want to change data in the TileEntity? If so, how often and why?

Share this post


Link to post
Share on other sites

WildHeart    0

WildHeart

WildHeart    0

  • Creeper Killer
  • WildHeart
  • Members
  • 0
  • 209 posts
  • Report post
Posted July 15, 2018

I want to disable this in mod. It is necessary not only in one tileEntity but also in the nearest in a chunk

Share this post


Link to post
Share on other sites

diesieben07    6103

diesieben07

diesieben07    6103

  • Reality Controller
  • diesieben07
  • Forum Team
  • 6103
  • 40198 posts
  • Report post
Posted July 15, 2018

You want to disable... what? Stop being vague, please.

 

7 minutes ago, WildHeart said:

It is necessary not only in one tileEntity but also in the nearest in a chunk

This is not even a complete sentence. What is necessary? Why?

Share this post


Link to post
Share on other sites

WildHeart    0

WildHeart

WildHeart    0

  • Creeper Killer
  • WildHeart
  • Members
  • 0
  • 209 posts
  • Report post
Posted July 15, 2018

I want to disable loading chunks in mod. 

Share this post


Link to post
Share on other sites

diesieben07    6103

diesieben07

diesieben07    6103

  • Reality Controller
  • diesieben07
  • Forum Team
  • 6103
  • 40198 posts
  • Report post
Posted July 15, 2018
9 minutes ago, WildHeart said:

I want to disable loading chunks in mod. 

That is not possible. Do you want there to just be void when the player get's near such a chunk`?

Share this post


Link to post
Share on other sites

Legenes    3

Legenes

Legenes    3

  • Stone Miner
  • Legenes
  • Members
  • 3
  • 87 posts
  • Report post
Posted July 15, 2018

I think he's trying to say that: "My Entity is keeping the chunk loaded, and I don't want it to do that. How can I make it to be loaded only, if the player is within X chunks?"

Share this post


Link to post
Share on other sites

WildHeart    0

WildHeart

WildHeart    0

  • Creeper Killer
  • WildHeart
  • Members
  • 0
  • 209 posts
  • Report post
Posted July 15, 2018 (edited)
Just now, Legenes said:

I think he's trying to say that: "My Entity is keeping the chunk loaded, and I don't want it to do that. How can I make it to be loaded only, if the player is within X chunks?"

Yes, thank u) But not entity, it's tile

Edited July 15, 2018 by WildHeart

Share this post


Link to post
Share on other sites

diesieben07    6103

diesieben07

diesieben07    6103

  • Reality Controller
  • diesieben07
  • Forum Team
  • 6103
  • 40198 posts
  • Report post
Posted July 15, 2018 (edited)
1 minute ago, Legenes said:

I think he's trying to say that: "My Entity is keeping the chunk loaded, and I don't want it to do that. How can I make it to be loaded only, if the player is within X chunks?"

Entities do not do that by default.

@WildHeart If this is the case, then you are doing something to keep the chunk loaded. Stop doing whatever this is (you have not posted any code, so no more help can be provided).

Edited July 15, 2018 by diesieben07

Share this post


Link to post
Share on other sites

WildHeart    0

WildHeart

WildHeart    0

  • Creeper Killer
  • WildHeart
  • Members
  • 0
  • 209 posts
  • Report post
Posted July 15, 2018
Just now, diesieben07 said:

Entities do not do that by default.

@WildHeart If this is the case, then you are doing something to keep the chunk loaded. Stop doing whatever this is.

Not entity, this is tileEntity

Share this post


Link to post
Share on other sites

diesieben07    6103

diesieben07

diesieben07    6103

  • Reality Controller
  • diesieben07
  • Forum Team
  • 6103
  • 40198 posts
  • Report post
Posted July 15, 2018

Same answer. TileEntities also do not keep chunks loaded by default.

Share this post


Link to post
Share on other sites

WildHeart    0

WildHeart

WildHeart    0

  • Creeper Killer
  • WildHeart
  • Members
  • 0
  • 209 posts
  • Report post
Posted July 15, 2018
1 minute ago, diesieben07 said:

Same answer. TileEntities also do not keep chunks loaded by default.

I know, but what can be in it that can cause?

Share this post


Link to post
Share on other sites

diesieben07    6103

diesieben07

diesieben07    6103

  • Reality Controller
  • diesieben07
  • Forum Team
  • 6103
  • 40198 posts
  • Report post
Posted July 15, 2018 (edited)
4 minutes ago, diesieben07 said:

Stop doing whatever this is (you have not posted any code, so no more help can be provided).

 

Edited July 15, 2018 by diesieben07

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
Followers 1
Go To Topic Listing Modder Support

  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • DaemonUmbra
      Forge not Loading Mods

      By DaemonUmbra · Posted 39 minutes ago

      Please don't hijack threads, make your own.
    • DaemonUmbra
      Help please, Forge keeps crashing

      By DaemonUmbra · Posted 40 minutes ago

      Please read my signature.
    • teakori
      Help please, Forge keeps crashing

      By teakori · Posted 1 hour ago

      9Minecraft is where I get them usually but some are off of curseforge
    • BRDNYT
      Forge not Loading Mods

      By BRDNYT · Posted 2 hours ago

      @DaemonUmbra I have the same problem (not loading mods) downloading Forge for 1.13.2 from MinecraftForge.net. Here is my most recent .log: Pastebin. It says it is missing .toml files and that OptiFine and VoxelMap are invalid mods.
    • Kalman98
      [SOLVED][1.12.2] Send custom CPacketChatMessage to server?

      By Kalman98 · Posted 2 hours ago

      The code has now been ported to use ReflectionHelper. Thanks @Cardiboo! Here is the new solution (note that I wrote the code for 1.8.9, I believe it is the same or very similar on current versions): Field c01MessageField = ReflectionHelper.findField(C01PacketChatMessage.class, "message", "field_149440_a"); c01MessageField.setAccessible(true); C01PacketChatMessage packet = new C01PacketChatMessage(); try { ReflectionFields.c01MessageField.set(packet, msg); } catch (IllegalAccessException e) { TFSChat.logger.error("Error setting message length, sticking with 100.", e); packet = new C01PacketChatMessage(msg); }     If more examples are needed for any future help-seekers, my full (1.8.9) source code is here: https://gitlab.com/Kalman98/256chat   I am sorry to have devolved this thread back to 1.8. The code really is very close to the modern stuff, at least. 🙂
  • Topics

    • prickasso1
      3
      Forge not Loading Mods

      By prickasso1
      Started 9 hours ago

    • teakori
      3
      Help please, Forge keeps crashing

      By teakori
      Started 3 hours ago

    • Kalman98
      4
      [SOLVED][1.12.2] Send custom CPacketChatMessage to server?

      By Kalman98
      Started Thursday at 10:53 PM

    • 20LeeBrian1
      11
      I can't run forge jar file

      By 20LeeBrian1
      Started Yesterday at 03:53 AM

    • SorenCabral
      27
      Custom PlayerRender/ModelBiped/ArmorLayers - 1.12.2

      By SorenCabral
      Started Friday at 03:28 AM

  • Who's Online (See full list)

    • Toma™
    • MoreThanHidden
    • gamemaster200015
    • LexManos
    • rulebreaker
    • WolfHybrid23
    • Choonster
    • V0idWa1k3r
    • Cadiboo
    • T-Dark
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • [1.11.2] How to update chunk
  • Theme
  • Contact Us

Copyright © 2017 ForgeDevelopment LLC Powered by Invision Community