Jump to content

[1.10.2] big and long structure causes the serverSide to Stuck


perromercenary00

Recommended Posts

 

im triying to create a group of structures like abandoned houses and little settlements and all this conected by a long tunel underground like 1.6km but the  longer the tunel the higther posibility serverside hangs and the games gets stuck

 

stuck: like in the client the game still runing but all the entityes freeze and there is no more terrain generation, doors and chest dont open, mi guns neither work, but you could walk and jump and move freely for the loaded section of the map but no farter than thath

 

 

whath i got,

 

* I have a block "extructuraTunel00" that on tick event create a little secciont of tunnel, of chunck size

 

* And i have a  block whith a tileEntity in it "generarTunel" and tunelTileEntity

 

the entity count onupdateTick  once it counts to 100 ticks, every two ticks move 16 blocks to a ramndom direction and create a block "extructuraTunel00" and set it to tick in onupdateTick value so it creates only a block every two ticks and this block create a secction of tunel only every two ticks after five seconds

 

this reduce the posibility of the serverside get fucked up but not avoid it,

 

im being doing test but still not know if it is becoze the tileEntity is seting like 300 blocks to tick in 700 ticks

 

or the blocks creating the little piezes of the tunel every two ticks per 600 ticks

 

or is becoze sometimes a block ticks in a chunch that yet not exist

 

or simply is a bug on the minecraft 1.10.2

you never know 

 

###############################

what do you think coulbe causing the issue ??

or there is a right way to create a large structure in minecraft (2 or 3 km long)

 

 

 

Link to comment
Share on other sites

Please speak in programming - direct.

 

You use random words that mess up everything you are trying to say.

 

* extructuraTunel00 = Block

* generarTunel = Block

* tunelTileEntity = Tile

 

Which block owns that tile? Which one generates 16x16 part of tunnel and which one does other shit? You explanation (to me) is simply too messy.

 

As to problems - as long as you make not too many replacements per tick - you are safe. But also - you can't load too many chunks in too short time, that is IO and requires some power (but rather memory). Also - be sure you are ending previous processing (remove tiles after they finish or whatever).

1.7.10 is no longer supported by forge, you are on your own.

Link to comment
Share on other sites

hele

 

the trouble is becoze what i have done is complex and also  idont speak very well the english soo lets use this video as help

 

 

long ago i end inthe conclusion than to create numerous structures the more convenient and easy way wass to make a block than spawn an extructure, and i make some blocks way it popup estructures on onBlockActivated()  or  updateTick() or  a convination of this two

 

but i notice than if i try to popup  many blocks at same time the game stuck or crash, to solve this i use tileEntityes

way soo the tile create only a block per tick and set it whith  worldIn.scheduleUpdate(pos, state.getBlock(), OnUpdateTick + 1);

 

to only popup a a block every two ticks, the village in the video works this way and it works pretty well

well now i want to create a net of tunels under the village (i have two, a sewer tunel and a mine tunel)  to conect the village whith other structures or dungeons and here is where its fuckup again.

 

 

####

for some reason the tunel causes server side to stuck, i take it  that apart and make  a tile entity only to create the tunel so i could guest whats is hapening

and notice that afirmatively is the trouble is inside the tunel, but not always happen not always stuck, and has something to be whith lenght of the tunel

in the first video i set the tunels to only spawn 160 section of 16meters and this time works pretty well but if i take it furter it stuck the server side.

 

in this test i set only the tunel tileEntity to create 500 sections of 16 meters

remenber thath  the tileE just create a block every two ticks and popup a tunel section only every two ticks

the game stucks righ after the tile entity activates,

 

soo i reduce the length of the tunnel to only 30 sections of 16Meters

and now it works

 

 

i have a teorie of the tunel secctions trying to spawn in a far away chuns than not exist in that moment and thus hanging the server but not to sure about this, if it is then it set mi plans of multiple structures interconected by tunels to the ground

 

is way i could test this right, or is a right way to create long structures even on non existent chuns ???

 

 

Link to comment
Share on other sites

1. Your 2 last videos are private.

 

2.

But also - you can't load too many chunks in too short time, that is IO and requires some power (but rather memory).

Loading chunks takes time, if you load 10 chunks/sec somewhere far away you can have problems. Besides, even if that is not the problem - you should never force generating whole thing at once.

 

Make "recursive" TileEntity.

 

You set one with e.g: "value=160" (value - number of sections left to generate). Then every, say 20 ticks make check inside that TileEntity - if next (neighbor) chunk is loaded -> place next tile entity with "value--" in next chunk and in this (current) chunk generate tunnel and remove this tileEntity. And so on to value=0.

 

This way you will get nice on-load procedural generation that will no lag.

1.7.10 is no longer supported by forge, you are on your own.

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
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

    • What MC version? What's the IP? Are any mods needed to be able to join?
    • Thank you for your answer ! Unfortunatly i have the same problem when i use setPos() public static int movingfunction(CommandContext<CommandSourceStack> context){ CommandSourceStack source = context.getSource(); if (!(source.getEntity() instanceof ServerPlayer)) { return 0; } ServerPlayer player = (ServerPlayer ) source.getEntity(); double moveSpeed = 0.5; for (int i =0; i<10000;i++) { LOGGER.info("running for the {} time", i); double x = player.getX() + player.getViewVector(1.0f).x * moveSpeed; double y = player.getY(); double z = player.getZ() + player.getViewVector(1.0f).z * moveSpeed ; Vec3 movementVec = new Vec3(x, y, z); LOGGER.info("x ={} y ={} z ={}", x, y, z); player.setPos( movementVec); } return 1; } With the logs i can see that x and z are increasing but once again my player is not moving. is there a function to use to sync the server and the client ? I also tried to use LocalPlayer instead of ServerPlayer but my code would stop when i got the object. Also i will change a bit the main topic but is there a way to similate key press ? i found KeyBinding.setKeyBindState on others post but it look like there is no more KeyBinding in 1.20   I found this code : KeyMapping.click(Minecraft.getInstance().options.keyUp.getKey()); But it doesn't seems to work   And i found this one : Minecraft.getInstance().options.keyUp.setDown(true); wich works but doesn't exactly do what i want , it doesn't release the key so for exemple i can't make him run. Minecraft.getInstance().options.keyUp.setDown(true); Minecraft.getInstance().options.keyUp.setDown(false); Minecraft.getInstance().options.keyUp.setDown(true); doesn't make him run
    • Add crash-reports with sites like https://paste.ee/ Maybe an issue with blur, essentials or cumulus_menus
    • Add the crash-report or latest.log (logs-folder) with sites like https://paste.ee/ and paste the link to it here  
  • Topics

×
×
  • Create New...

Important Information

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