Jump to content

DavidTriphon

Members
  • Posts

    24
  • Joined

  • Last visited

Converted

  • Gender
    Male
  • Personal Text
    I lurk a lot.

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

DavidTriphon's Achievements

Tree Puncher

Tree Puncher (2/8)

-1

Reputation

  1. TL;DR: I want to make floating spaceships in the air and space like in Space Engineers. I think I can achieve that by rendering extra dimensions and moving around the space instead of the blocks. I'm trying to render two client worlds at the same time but when I run an extra instance of WorldRenderer, I only see particles from the original dim, and the blocks and sky from the extra dim. See the video for what that looks like. I have a GitHub repo link. Q: How can I get two worlds to properly render at the same time without preventing the other from being seen? I'm open to being told that I should create a different plan to achieve this. I need some help from someone who is very familiar with the vanilla render pipeline in WorldRenderer and GameRenderer. Here's what I'm trying to achieve: What I want is grid structures that can be interacted with in the same way that the world is interacted with. I want these structures to be free from the rigid grid of the overworld chunks and be able to freely move and rotate, similar to what you might see in other blocky games with physics, like Space Engineers or StarMade. I want these structures to be able to travel far away enough into the sky that eventually any player inside them is no longer loaded in the overworld, or by some other condition. I would ideally like to make this transition seamless, so that while the player is on one of these structures approaching the overworld in a planet like sense, the world begins to load once they get close to the ground. And then if they leave the structure, they are in the overworld and can travel far enough away from the structure that it unloads while they're still in the overworld. Basically a rocket ship that preloads itself and its destination, and has proper physics. My current plan for trying to implement this is to abuse dimensions as a gridspace for the structures, and load the chunks from other dimensions under certain conditions and then render those dimensions at the same time as the overworld to make it look like the structures in the extra dimension exist in the overworld. I should then be able to set the renderview entity position and other factors in order to translate the structure in view in relation to other, effectively allowing it to move. The reason I am trying to render two worlds at the same time is because it's the first step in my imagined plan to achieve this functionality: I expect the implementation to take me through the following stages of experimentation and development: 1. Implement being able to render a second ClientWorld at the same time without massive render impairments. <-- What I am currently working on 2. Get the server to properly track which extra dimensions and which of their chunks should rendered and loaded for players when they aren't in that dimension. 3. Add the ability to render the extra worlds in different rotations and positions. 4. Add conditions that control when extra worlds and which of their chunks should be loaded 5. Manage hot switching the client worlds so that transitioning out of the overworld while in a structure doesn't cause "change dimension" load times since the chunk data is supposedly already loaded 6, and further. Implement physics for the blocks in the bodies to detect collision between dimensions. Create a dimension space to track positions of these "structure dimensions". Add transition conditions so that extra dimensions are sometimes loaded or unloaded, not all the time or never. What I have managed so far: I have managed to make a setup that preserves the last ClientWorld that the player was in beyond that world's lifetime for testing purposes. I have AT'ed vanilla enough that I have a second WorldRenderer that I call updateCameraAndRender() on to try to render the preserved ClientWorld. I call the method during the event RenderWorldLastEvent which is fired right after vanilla finishes running updateCameraAndRender() on the normal WorldRenderer instance. This produces some interesting results. I've manually managed the state memory during my second WorldRenderer call so that it doesn't absolutely crash and burn , and I can easily turn this effect on or off without side effects to the renderer when the modded code is off. What I wanted was to render both worlds at the same time, but what I am getting is only seeing the blocks of the previous world and it's sky, but the particles that I see are rendered from the original world. There's a video of what that looks like below. Because I'm seeing particles being rendered from the original natural world while looking at the blocks and sky of the fake world, I know that it isn't due to render call order. But I'm still confused what render calls are preventing this from working. I'm trying to figure out if I missed something or if I need to try to recreate my own worldrenderer that is able to draw my multiple worlds at once in a single ordered sequence rather than one call to a unique WorldRenderer for each world. If you want to look at my code here's the repo: https://github.com/DavidTriphon/MinersSpaceProgram Video:
  2. I'm sorry, but I'm not sure what you're trying to say. Are you responding to my first post asking about how to make a gradle configuration? Are you saying that I need to create a class named GradleStart in my run folder? And what is a 'Use' classpath? I should note that I have everything working now, I can build the example mod successfully and it works when I put it in a local test game, so I don't think I actually need to mess with Gradle anymore.
  3. I appear to have managed to get gradlew genIntellijRuns to work because I made the critical mistake of running it while I had intellij open. I found that critical piece of information here. I managed to make it work by exiting Intellij, opening command prompt and cd'ing to my project directory, and then running gradlew genIntellijRuns, rather than running it from my intellij project terminal. I hope this helps you Master_Chief.
  4. Apologies for necro'ing this, but I'm having the same issue, and have no idea how to make a launch configuration without screwing it up. It doesn't help that I've never known what gradle does. I've tried googling it but I'm having difficulty finding better explanation than "It's a build tool that uses tasks". How can I create a configuration that does what it needs to without screwing it up? I've been following the directions on the forge documentation setup and it says specifically to use genIntellijRuns. Should that get updated to reflect your answer here?
  5. @pWn3d The discussion forum is more like the forum for modder support meta discussion, i.e. discussing modder support. If you actually want modder support, and you can't find the resources you need, you should go to the modder support forum. Even if you're asking where to find what you need, that goes in support, because the goal of the question is to help you figure out what to do for your mod. This thread was made to discuss what could be done to help the status of modding resources. Edit: Thanks ben, I'll be sure to do that.
  6. Alright, got it. Ideas, usefulness of methods, not code. Also, if I doubt that I've been using a method properly, like if I worry that I formatted my registry names incorrectly, and I was going to write on what things are affected by registry name and what are affected by unlocalized names (since people still mess that up), where would I ask to to make sure I'm right before I start? Or should I just wait for comments on my PR?
  7. What if a tutorial supplied examples from the base minecraft/forge code? Would it be alright to encourage users to scour the code libraries for themselves by only showing examples from code in the libraries to help explain to them what a method does or is supposed to be used for?
  8. Should I bother posting a 1.9.4 tutorial of what I've learned on the tutorial subforum? Would it help anyone? I would love it if someone more experienced than I could point out where I'm doing something wrong.
  9. Huh, last I knew, the Forge Documentation was the official stuff. I didn't even know about the github wiki. I apologize for bringing up the topic again. I looked through the first page of discussion and didn't see anything on this topic, so I thought I might bring it up. Like I said, I only came back a few weeks ago. I like your idea, but I feel that will require more than 2 people. It's certainly a lot of time. Also I would love to help, but I don't think I'm anywhere near certified. Wouldn't some mod developers who have actually produced something be more helpful? Or are they already too busy between real life and modding? I mean, if you want my help, I will certainly give it. I wouldn't mind learning along the way. Also, do tell me about hooks, I don't think I've heard that term before. If I'm doing something wrong with my code organization/design, I want to know about it.
  10. So let me set this straight as far as I can see. We have a problem, and all our solutions to the problem are broken. There are tons of people who want to start learning how to program mods using forge, but because they don't know how, they start looking for guides. They look for resources (or don't at all, we can't really help that), fail to find what they want, and then they go to the forums asking for help. The problem is that many of these questions have been asked before. That, and many of the kids are about as bad at telling us they know Java as they are at convincing the barkeep that they're over 21. Alright, well, what was wrong with the resources that they found? Why are they asking for personal help, when there's a wiki, a million bazillion tutorials, and a forge documentation site? So what's the first thing we see when we go to the forums? "TUTORIALS: A place for all Minecraft Forge related tutorials" Awesome! Plain and direct. Straight to the point. That's where I'll get help! I'm sure I'll find what I need! *click* ... That person is now about as confused as Mark Hamill was when he figured out how many lines he had in the new Star Wars movie. That site is a MESS. The only way you even find anything with text on it that resembles a tutorial is through google! There's no logical way to navigate that site. Period. It's an web developer's worst nightmare. Thankfully, there are a couple of pages that are at least still somewhat useful, like the ore dictionary name page, or reasons not to make your mod a coremod. Alright, moving on. What about tutorials? People love tutorials, you can follow along, hands on, and figure out how to code in forge by yourself! Wonderful! Doesn't everybody love hands on learning? Getting all interactive and figuring out what you did wrong and then fixing it? What? You don't? You only want to copy the code? No, that's not how... wait.. what are you doing... stop... THAt makes no SENNSE! I'm sure the mods can think of a few tutorials that they wish had never popped up on the internet to teach such bad code design structure or horrible ways to get around the forge methods that are actually supplied for people to use. There's so many, and they're either way out of date and using deprecated methods that are only reserved for other methods to call, or they're teaching people to make extra classes for all their methods/using one class for the entire mod. And if there are ever any experienced Java programmers who happen to come around, or maybe some students who actually paid attention in they Java class, they know to look for documentation. Documentation is great! It tells you what all the methods do and what purpose they have. It's like an actual wiki. Well, Forge's site isn't exactly like a wiki, it's more like a guide for a bunch of different features. But have you seen it? It's great! It makes sense! It's written by the people who know exactly why every design decision was made! It's... Incomplete. And there is where we have our problem. Every source of information available is broken, bad, or incomplete. I know. I spent that last 2 weeks trying to learn how to properly register my blocks, items, and item blocks, and then properly register my ModelResourceLocations and then properly format all my block model .json files! I could probably write a small tutorial on how to start! Though it would probably be bad! Because all that was all I had to go off of! Now where am I at? Struggling to find a basic list of all the things I need to do just to create a TileEntity for a block! These things are supposed to be basic! I know you guys! Your biggest problems are coding the logic or optimizing for your mods, not making blocks and base files! I understand Java programming. I know how to structure all my class files. I know if methods should be static and private or public. I know when to use bounded type parameters. I know when to extend my classes and when to create an implementation. So why should this be so hard? People should not have to browse the modder support forum multiple times a day so that people can have their questions answered. Is there any way that we can improve the state of any of these resources? Reconfigure and reformat the wiki? Add some quality controlled articles to the documentation? Maybe create some tutorials for the modder support's tutorial subforum and make it as visible as the wiki link? I would LOVE to help on ANY of these, IF I KNEW WHAT TO WRITE. /rant. I hope I didn't irritate any mods too much...
  11. I'll begin researching those. Thanks for the heads up.
  12. Hello again, After spending that last week and a half finalizing my understanding of the item and block registration and render loader functions, I'd love to learn about how extended blockstates work. I see the term used on the forge documentation, but its section hasn't been written yet. I'd love to learn how it works, since I can't seem to easily find any up to date resources through google. I'd like to add a block that is made up of 8 smaller cubes, and they fill up as rocks are placed into the various spaces. This would affect the hitbox for the block and the model shown. I know how to use make models use sub-models based on variants, but I can't make it store more than 4 boolean values, due to the 4 bit nature of metadata. Is there any reasonable way to get around that using extended block states? Would this require having multiple blocks in the same space like I have seen other architecture themed mods do? Any help, advice, or links to useful material is appreciated.
  13. Oh, one question I forgot to ask, do the defines in the build.gradle file go in dependencies { or something else?
  14. Yeah, I'm also running eclipse, I think that the run directory is the same for everything though and mine is default to run just because it's probably changed since 1.7.10 to free up the 'actually for eclipse' folder. Oops, I meant the "replace" in your first post reply, posted here: Which now that I quote you, I see that you just used teletype "<tt>replace</tt>". Okay, now onto the actually important stuff: Hmm! This makes sense, I wonder why the FML devs opt for the other order on the documentation. I guess it's not stringent or absolutely necessary, so I think I'll follow your lead. I had to read that about 10 times, but I get it now. So in my main mod class, I would want to change ... : @Mod(modid = CubularExpansion.MODID, version = CubularExpansion.VERSION, acceptedMinecraftVersions = CubularExpansion.ACCEPTED_VERSIONS) public class CubularExpansion { // STATIC CONSTANTS public static final String MODID = "cubex"; public static final String NAME = "Cubular Expansion Mod"; public static final String VERSION = "1.9.4-0.0.1.0"; public static final String ACCEPTED_VERSIONS = "1.9.4"; ... } to ... @Mod(modid = CubularExpansion.MODID, version = CubularExpansion.VERSION, acceptedMinecraftVersions = CubularExpansion.ACCEPTED_VERSIONS) public class CubularExpansion { // STATIC CONSTANTS public static final String MODID = "cubex"; public static final String NAME = "Cubular Expansion Mod"; public static final String VERSION = "@mcVersion-@apiVersion-@cubexVersion"; public static final String ACCEPTED_VERSIONS = "@mcVersion"; // only if I wanted it to only work for the current version ... } I would probably separate mcVersion from cubexVersion and any other mod or api versions I had in my gradle then. I'm already seeing all the advantages of replacing those @variables in my code while programming multiple mods. Oh, and if I put "@mcVersion" in my mcmod.info file, it would also replace that, correct? This is very interesting, very interesting indeed. You've helped me a lot today, thanks for spending time helping me with this. I greatly appreciate it! Thought, your last comment does make me begin to think: If I had an API (which I currently don't), I would probably want to separate it and all my other mods into separate gits, so that for each version I could test it on top of a lib of any version of my API or other mods. I'm thinking that I'm going to keep the mcVersion in the version for my mods in case I ever decide to keep support for multiple mc versions of a mod. However, if I use separate gits for each mod, then that would mean I would have to keep them in different project spaces, right? Suddenly another question comes to mind: If I need to make libraries from my other projects, and I have a different build.gradle for a different project, will it overwrite the @version's in that library, or are libraries created from compiled code? like what is generated in the bin folder? I'm going to have to think about this much more later, I must have spent more than an hour writing this. XP
  15. Okay, so after taking some time to stare at your code, I think I understand the syntax, but I'm not quite sure how this unifies the numbers. The minecraft portion and the replace command would go something like this I think for me: minecraft { version = "1.9.4-12.17.0.1976" runDir = "run" replace "{@version:cubex}":cubexVersion } I assume that runDir might need to be changed to eclipse? Or do you have your project structured differently? If I change runDir does that change the directory that the game save runs in? I don't know if that would break my compiling completely or not matter at all. I am using 1.9.4 (quickly adds it to the title). The last time I did anything in 1.7.10 was when I was first modding before I had even taken a java class, I was self-teaching myself through the oracle tutorials, so I don't remember any of that. Oh, and of course my defines would probably look like this, since I only have one mod (going by the shortened name of "cubex"). def mcVersion = "1.9.4-" def majorModVersion = "0" def apiModVersion = "0" def minorModVersion = "1" def cubexPatchVersion = "0" def cubexVersion = mcVersion+majorModVersion+"."+apiModVersion+"."+minorModVersion+"."+cubexPatchVersion So... how much of this did I get right and how much of it is wrong? Oh, and what exactly does replace replace? Does it only replace the text in my mcmod.info file, or does it override the constant version supplied to @mod in my mod class? Also, thanks for changing that "gradle" earlier to Monaco font. I wouldn't have known that was an available font for in line code if you hadn't done it. I'll be doing that more in the future.
×
×
  • Create New...

Important Information

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