Jump to content

Bektor

Forge Modder
  • Posts

    852
  • Joined

  • Last visited

Everything posted by Bektor

  1. Hi, since it's been a really long time where I last did anything with models in Minecraft I'm wondering what is the best way of modelling tile entity models and entity models in Forge 1.8.9. And what is the best way to animate them? Thx in advance. Bektor
  2. Ok, figured it out now.
  3. Hi, I'm wondering how I can compare the OpenGL version which the player uses with the one I specified? Thx in advance. Bektor
  4. Ok, thx for the answers. So where can I use Java 8 specific things in terms of modding efficient?
  5. Hi, after I've finally found a bit of motivation I've just worked me through the basics of Java 8 lambda expressions and functional interfaces. After some thinking about it I'm now wondering: Is it possible to use Java 8 features for Minecraft Mods? Are they there usefull? Where can they be used? How efficient are they there? I'm basically asking because I wasn't able to found one project I'm working on in modding and outside of modding where I need lambda expressions and functional interfaces. It would also be nice if someone answers these questions also for Java 8 streams, even if I don't know them now. Without having a reason to use them I've just got no motivation to learn them. Thx in advance. Bektor
  6. Hi, it's nothing about your problem, but I would recommend you to write package names small and class names capitalized. in German: Es hat zwar nichts mit deinem Problem zu tun, aber ich würde dir empfehlen deine Klassenamen groß zu schreiben und Packetnamen klein. (siehe Java Code Conventions) http://www.oracle.com/technetwork/java/codeconventions-135099.html http://docstore.mik.ua/orelly/java-ent/jnut/ch07_01.htm Second thing: You can change: [...] import de.Granator.craftablethings.items.silberfischbakterie; [...] to this: import de.Granator.craftablethings.items.*; Then you don't have a few hundred lines of imports, instead you have just this one line and everything in this package gets imported. But be carefull when using this, could get you in trouble for example when having two classes with the same name from different packages and both are imported. (in German: Dann hast du statt einige hundert Zeilen an Imports nur noch eine einzige, welche alle Klassen des einen Packages importiert. Rest siehe Englischer Text. ) To your problem, I wasn't able to find anything which is obviously wrong.
  7. Ok, thx. This helped a lot. It's working now: Just made a list which stores all blocks in one direction (at first just one block). While going through this list more blocks will be added and finally when a specific value is reached it switches the direction, does there the same and when all directions are finished it stops. To not double check a block I made a second list which stores all checked blocks and the first list checks this list before adding a new block to it. (all blocks in the first list will be checked) (the complete logic is in a while loop which checks if the list contains blocks or not)
  8. Thx for the answer. Well, I thought asking the neighbor block would be a good idea because I have to check like 5 blocks in +x direction and 5 in -x direction etc. So there is a value which tells how long you can build with this block a line in the air when its supported on one side before it collapses because it got to long. The check with the y-level: I thought here of something like this: https://upload.wikimedia.org/wikipedia/commons/c/c7/St_Marys_Church,_Radnage,_Bucks,_England_15th_century_tie-beam_roof.jpg So with doing such things you can build the whole thing a bit longer. Thats why doing multiply y-checks. To your code: I think for reading it a few comments and better variable names would be nice. (not just one letter for a variable) What do you mean with this?:
  9. exactly (just a part of a small block physics system I'm working on)
  10. Hi, I've got a small problem with some solid checks. What should be checked: if block under StartBlock is solid if neighbor blocks on xz axis are solid and the neighbor blocks around them on the xz axis if block under neighbor block is solid and the block under this block if the neighbor blocks are connected to the StartBlock or a neighbor block who is conncected to the StartBlock or a neighbor blocks which is connected to a neighbor block which is connected to StartBlock and so on This mechanism should automatically stop after a specific number of checks on the y axis. (it should never check if a block is above a block, so only y--, never y++) And it should automatically stop when a specific number of blocks in the x or z direction was scanned. So check for example 5 blocks in +x direction, 5 blocks in -x direction, 5 blocks in +z direction, 5 in -z direction and 25 blocks under them. (stop checking under block xyz when block xyz is not solid) (please don't tell me that this can be done with recursion, thats how far I got ) Thx in advance. Bektor
  11. Thx for the answer. Any idea how to generate a bit more realistic and smooth terrain? And if I got the noise value, how to generate the terrain with it. I know that Minecraft and mods like RTG got hundred of lines of code just for generating terrain and getting the noise value. (and I understood nothing of that code.....)
  12. No one who can help me here?
  13. Ok, I'll test it out. Just asked because I know that when I want to use OpenGL 3.3 with LWJGL 3 I have to create a OpenGL Context for OpenGL 3.3 and tell it if I want backwards compatibility with OpenGL 2.x etc. or not. [or I just can create the highest OpenGL Context which is possible and make it backwards compatibility]
  14. Well, but the rain particle doesn't spawn themself in the world. Somewhere they get spawned in the world (all loaded chunks in vanilla case, except for the desert). So how can I spawn them local in an area where the weather is rain. (so just there it rains and just there the world gets darker because of rain)
  15. It seems like that Minecraft Forge can't find the ServerProxy file located there: com.escapemc.TeamMadnessMod.proxy.ServerProxy.
  16. Hi, I'm wondering if it's possible to implement local weather to my own mod. The local weather should only be used in my own dimension and not in the overworld. If it is possible, what do I need for this and how can I do this? (it would be nice if it is possible without modifying or overriding vanilla stuff, so that its running parallel ) Thx in advance. Bektor
  17. Hi, I'm wondering if it's possible to use native OpenGL 3.3 in Minecraft for my mod while Minecraft itself is using OpenGL 2.1 or so. I don't want to get everything running at OpenGL 3.3, just my own mod should use it. And if it's possible, how is it possible. (I need just a point to start.) Thx in advance. Bektor
  18. Hi, does anyone know a good tutorial about SimplexNoise or OpenSimplexNoise? And how to do that stuff then in Java.... Or maybe someone here can explain it to me. I'm asking this because I'm currently working on a mod which should generate realistic biomes but I don't know how to get stuff like the noise value..... I'm using Forge 1.8.9 with OpenSimplexNoise. I've found currently just some PerlinNoise tutorials in english..... well, I wasn't able to understand them... Best would be a german tutorial because of that complex stuff and I'm not sure how much I would understand from an english tutorial of such a complex theme (never did math stuff and any of these stuff in english ) Thx in advance. Bektor
  19. Hi, my friend got a small mod and he created a item which places a water block in the world. The problem we have now is that the water block doens't get an update, so when its placed in for example air there flows no water down to the surface. That what we tried currently. It's all done in the on right click method. Block water = Blocks.water; IBlockState state0 = water.getDefaultState(); Block playerBlock = worldIn.getBlockState(playerIn.getPosition()).getBlock(); worldIn.setBlockState(playerIn.getPosition(), state0); worldIn.notifyNeighborsOfStateChange(playerIn.getPosition(), water); worldIn.scheduleUpdate(playerIn.playerLocation, water, water.tickRate(worldIn)); worldIn.scheduleBlockUpdate(playerIn.playerLocation, water, water.tickRate(worldIn), 1); Thx in advance. Bektor
  20. Ok, I got it nearly working. For testing purpose I decided to use lava. Thats how it looks so far, but there is one problem. Is there a way to remove the lava which is over the one block air level? My current code: for(int x = 0; x < 16; ++x) { for(int z = 0; z < 16; ++z) { BiomeBase biomeBase = (BiomeBase)baseBiome[x * 16 + z]; biomeBase.replaceBlocksForBiome(chunkX * 16 + x, chunkZ * 16 + z, blocks, state, baseBiome, noise); for(int y = 255; y >= 0; --y) { if(y <= this.random.nextInt(4)) { primer.setBlockState((chunkX * 16 + x) & 15, y, (chunkZ * 16 + z) & 15, Blocks.bedrock.getDefaultState()); primer.setBlockState((chunkX * 16 + x) & 15, y + 1, (chunkZ * 16 + z) & 15, Blocks.lava.getDefaultState()); primer.setBlockState((chunkX * 16 + x) & 15, y + 2, (chunkZ * 16 + z) & 15, Blocks.lava.getDefaultState()); primer.setBlockState((chunkX * 16 + x) & 15, y + 3, (chunkZ * 16 + z) & 15, Blocks.lava.getDefaultState()); primer.setBlockState((chunkX * 16 + x) & 15, y + 4, (chunkZ * 16 + z) & 15, Blocks.lava.getDefaultState()); primer.setBlockState((chunkX * 16 + x) & 15, y + 5, (chunkZ * 16 + z) & 15, Blocks.lava.getDefaultState()); primer.setBlockState((chunkX * 16 + x) & 15, y + 6, (chunkZ * 16 + z) & 15, Blocks.air.getDefaultState()); // doesn't remove all lava... not working if(primer.getBlockState((chunkX * 16 + x) & 15, y + 7, (chunkZ * 16 + z) & 15) == Blocks.lava.getDefaultState()) primer.setBlockState((chunkX * 16 + x) & 15, y + 7, (chunkZ * 16 + z) & 15, Blocks.air.getDefaultState()); else if(primer.getBlockState((chunkX * 16 + x) & 15, y + 8, (chunkZ * 16 + z) & 15) == Blocks.lava.getDefaultState()) primer.setBlockState((chunkX * 16 + x) & 15, y + 8, (chunkZ * 16 + z) & 15, Blocks.air.getDefaultState()); else if(primer.getBlockState((chunkX * 16 + x) & 15, y + 9, (chunkZ * 16 + z) & 15) == Blocks.lava.getDefaultState()) primer.setBlockState((chunkX * 16 + x) & 15, y + 9, (chunkZ * 16 + z) & 15, Blocks.air.getDefaultState()); else if(primer.getBlockState((chunkX * 16 + x) & 15, y + 10, (chunkZ * 16 + z) & 15) == Blocks.lava.getDefaultState()) primer.setBlockState((chunkX * 16 + x) & 15, y + 10, (chunkZ * 16 + z) & 15, Blocks.air.getDefaultState()); else if(primer.getBlockState((chunkX * 16 + x) & 15, y + 11, (chunkZ * 16 + z) & 15) == Blocks.lava.getDefaultState()) primer.setBlockState((chunkX * 16 + x) & 15, y + 11, (chunkZ * 16 + z) & 15, Blocks.air.getDefaultState()); else if(primer.getBlockState((chunkX * 16 + x) & 15, y + 12, (chunkZ * 16 + z) & 15) == Blocks.lava.getDefaultState()) primer.setBlockState((chunkX * 16 + x) & 15, y + 12, (chunkZ * 16 + z) & 15, Blocks.air.getDefaultState()); else if(primer.getBlockState((chunkX * 16 + x) & 15, y + 13, (chunkZ * 16 + z) & 15) == Blocks.lava.getDefaultState()) primer.setBlockState((chunkX * 16 + x) & 15, y + 13, (chunkZ * 16 + z) & 15, Blocks.air.getDefaultState()); else if(primer.getBlockState((chunkX * 16 + x) & 15, y + 14, (chunkZ * 16 + z) & 15) == Blocks.lava.getDefaultState()) primer.setBlockState((chunkX * 16 + x) & 15, y + 14, (chunkZ * 16 + z) & 15, Blocks.air.getDefaultState()); } } } } So everything above y + 6 should not generate the lava spots. (lava lakes are ok, but thats a future task for me) Bektor
  21. Ok, thx. Now its mostly working..... I just broke MC down to 2FPS because I wanted to generate over the bedrock something else like which is generated like the bedrock..... Any idea how my code must look to generate in (java) level 256 bedrock and in (java) 255 for example dirt?
  22. Well, Minecraft uses basically an outdated OpenGL and an outdated LWJGL (Minecraft uses version 2, version 3 is up to date) DirectX3D isn't available with LWJGL and only running on Windows. Minecraft runs on Windows, Linux and Mac, so that would not be possible. And just because someone would write Minecraft in C++ it would not be more performant because of the fact it would be written in C++. It's no problem to get a C++ Minecraft running at the same performance like the Java one. It's no problem to get DirectX running at the same performance like outdated OpenGL does. Everything depens on how good the code is written and on how up-to date the technics which are used are. CUDA runs from that what I know only on NVIDIA cards, so no Intel intregrated graphics and no AMD cards. It doesn't matter which programming language and API you use, you can always get a bad performance and always a good performance.
  23. Ah, ok. Just thought I can use it for that purpose, too, because some mods do it [MC 1.7.10]. So how is the chunk provider doing this? Everytime when I search for "bedrock" in the "ChunkProviderGenerate" from Mojang I can't find it. And "replaceBlocksForBiome" is a method inside of the chunk provider.
×
×
  • Create New...

Important Information

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