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


  • Posts

  • Joined

  • Last visited


  • Gender
  • Personal Text
    I am new!

sworn's Achievements

Tree Puncher

Tree Puncher (2/8)



  1. I put this question in Off Topic, cause this isn't a minecraft related, but I'll use it as an example of my question. I was trying to find a Patter, a guide line of what you should process in the tick when you need to notify something else about a state change and that notification will cause more notifications. But when I look for Patter I can only find the Notification and Observer Patterns, and if I try to look for what to process in Tick I can only find example of how Tick works and how Graphics card update it. What do I have now: I made a Sudoku solver, it works fine. The point is, I was trying to make it run step by step, instead of solving everything at once. Sure I found tons of ways to do it, but I realized that I was "guessing" how to implement the notifications and how to make it runs step by step, something like an tick, not quite. so it works like that: I have a main update method, that will look for one number that can't be anywhere else, and it set the number. In the SetValue, the cell notify the Column, the Row and the Square that it has changed, then the Column, Row and the Square, notify everything else. So, comparing it with the Minecraft Block, when it change state, it don't simple notify everything else that notify evetything else, it has some guide line of what you do when it change and what you don't do. Same for the next block update. Does it process the notification right away when it is called, or it add it to a queue and do it in the next tick. I'm not looking for the code right now, I'm more interested in a patter, or guide line, good practices of how to approach this situation.
  2. I got this error after updating from old version of the loader to the last version. After a good hour removing/add mods to the mod folder I was pointed to the "Advanced Rocketry" mod, but, the mod by itself works fine. In the mod bug report there is a open ticket about it Ticket that relate the incompatibility with Mekanism after the forge update But not an specific mod conflict, Is something that both authors are not able to locate. Googling something about, I have found some conflicts with OptFine, which I don't have, and some Java problems. I have tested with forge, and they crash. It works only up to 2641. My crash report: https://pastebin.com/WHenSCDC Log: https://pastebin.com/L3AtsP41 Same error as the crash posted in the Advanced Rocketry bug report. I'm successfully running everything with the version:
  3. Hello. I'm starting this mod for testing. I was reading that executing commands with ICommandManager is a bad practice. My mod does only one thing, slower the timer (increasing day/night length). It's actually working. But I have some questions... Is there a better way to stop the game timer and change it manually instead of execute the game command? When I run the the mod on a server, or just "open lan", I start to see tons of "Server: Added 1 to the time". Is there a way to prevent that?
  4. Hey Jdb100, thanks for reply! I'm already done something similar. Save the generation time, and increase more 20sec, then just allow other structure after 20sec.
  5. The structure generate fine... But there it is... It is a very hard mult layer maze . Some time ago, i changed the code to generate a pilar of Obsidian in the desert biome. The result is the same... very large place with just sand, like a desert... 3 or 4 pilar of obsidian very close... Are the code running twice? I don't know... all the pilar are different, like all the mazes are different, because everything is random... private void GenerateStructure(int Xcoord, int Ycoord, int Zcoord){ int h = random.nextInt(BaseClass.ModLayer)+BaseClass.MinLayer;//w; int w = random.nextInt(BaseClass.ModWidth)+BaseClass.MinWidth;//random.nextInt(50)+10; int l = random.nextInt(BaseClass.ModLenght)+BaseClass.MinLenght; MazeGenerator generator=new MazeGenerator(h,w,l); boolean [][][] maze=generator.generate(); int MultH = random.nextInt(BaseClass.ModWallHeight)+2; int RandomJ = random.nextInt(BaseClass.ModCellLenght)+BaseClass.MinCellLenght; int RandomK = random.nextInt(BaseClass.ModCellWidth)+BaseClass.MinCellWidth; int CurrentH = 0; for(int i=0; i<maze.length;i++){ for (int i2=0;i2<MultH;i2++){ int MultJ = RandomJ; int CurrentJ = 0; for(int j=0; j<maze[i].length; j++){ for(int j2=0;j2<MultJ;j2++){ int CurrentK = RandomK; int CurrentK = 0; for(int k=0; k<maze[i][j].length; k++){ for (int k2=0;k2<CurrentK;k2++){ int J = Xcoord + j + CurrentJ; int I = Ycoord + i + CurrentH; int K = Zcoord + k + CurrentK; if(maze[i][j][k]){ world.setBlock(J, I, K, BaseClass.hardObsidian.blockID); }else{ FillCell(I, J, K); } CurrentK++; } CurrentK--; } CurrentJ++; } CurrentJ--; } CurrentH++; } CurrentH--; } } EDIT: My guess is the event generate() is called to fast, so the random method get the same results... just like this: private void test(Random r){ for (int i = 1;i<=10;i++){ System.out.println(i + " - " + r.nextInt(100)); } } 1 - 57 2 - 57 3 - 13 4 - 86 5 - 2 6 - 15 7 - 34 8 - 34 9 - 34 10 - 61 a delay of 100 milliseconds resolve this, but put this on World Gen... i think is a bad idea The pilar code with ocean biome. I move about 2min than i found 2.... move again about more 2min and found 2 again... Of course some times you find just one or with low probability to find 2. But almost every time you find one there is another one very close. OK you can say "decrase the chance some thing like 1000/2 or 2000/2", so it will become almost impossible to find, when you find it, you get 2... How the villages are started? There is alot of Village class but all render the village it's self, i don't need that. I can't find where the village are called, how minecraft decide, ok, here i going to put a village. private void GeneratePilar(){ int h = random.nextInt(50); for (int i=0;i<h;i++){ world.setBlock(chunkX, 64 + i, chunkZ, ObsidianID); } }
  6. Exactly... take a long time to generate but when reach it, generate 3 or 4 very close... this structures are very big, so when one spawn next other then it's become a mess.
  7. i don't get it.... yes i know how to make a loop. But for what?
  8. I want to generate custom structures, but get one far for the other one in ocean biome. The question is: How can i make a balanced chance to generate some structure in the world? I make this code, it's works fine. The only problem is 2 in 500 is a very low chance to generate, so it take a lot of time to get it, and when i get it, it's generate like 3 or 4 near one of other... I know the random number generation get the same number if put in a for loop withou a little time space, but i don't think put delay in WorldGen going to be a good ideia. Something like 1 structure over 20 or 30 chunks. But i don't know how to make this.
  9. Thank you "diesieben07", i gonna take a look into it!.
  10. There is any way to add more music to the game, not music disk, normal music like calm1, calm2, etc, that random play on game.
  • Create New...

Important Information

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