Jump to content

Probably not Possible - Getting a world reference


Draco18s

Recommended Posts

Alright, I'm trying to do something cool (dealing with rendering), but the problem is that in order to do what I want, I need a world object (that is, I'm going to be rendering a location to a texture).

 

Problem is that at the code entry point for the rendering, there's no passed world object.  I have a dimension ID as well as position and look vector, but no world.

 

And no, I don't have a player object either.  Just a handful of strings and integers, none of which are particularly useful.

 

Thoughts?

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

I'm using this as part of an API package for another mod.  They expose a section for rendering some effects on a specific GUI screen--what I'm trying to do is a future-goal as it is, the mod author just hasn't figured out how they want to send the world information to do this rendering yet, thought I'd take a stab at it.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

This might help

http://greyminecraftcoder.blogspot.com.au/2013/10/client-side-class-linkage-map.html

http://greyminecraftcoder.blogspot.com.au/2013/10/server-side-class-linkage-map.html

WorldClient is probably easy

WorldServer might be harder if you can't tell what world the player is in

 

I have a dimension ID of the location to render, which is not going to be the dimension that the player is currently in 95% of the time.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

Can't you spawn a fake entity and teleport it to the dimension? Since you have the dimension ID you should be able to do that.

You will probably have to have some "camera" entity or whatever there anyways to project the view, so it might work?

If you guys dont get it.. then well ya.. try harder...

Link to comment
Share on other sites

...is a complete waste of rendering power.

 

Because seeing where a portal-like-object is going to take you before you go is a waste. :U

 

Can't you spawn a fake entity and teleport it to the dimension? Since you have the dimension ID you should be able to do that.

You will probably have to have some "camera" entity or whatever there anyways to project the view, so it might work?

 

Hmm.  Wouldn't I need a world to spawn the object into first?

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

Hi

 

Hmmm that sounds pretty ambitious.  I had a quick look through NetClientHandler.handleRespawn() and it looks like you would have a lot of work to do in order to set up the second world properly, and I'm not sure that you could actually happily co-exist two WorldClients at the same time.

 

You might be able to get the effect you want if you actually teleport the player to the new dimension but "freeze" the game from updating or somehow prevent the player from appearing in the world or interacting with it, until they "commit" to the teleport.

 

-TGG

 

 

Link to comment
Share on other sites

...is a complete waste of rendering power.

 

Because seeing where a portal-like-object is going to take you before you go is a waste. :U

Indeed. The client do not have any information about the other dimensions before going in because it is a waste.

Imagine you have that second entity in the other world. You'll need to forward every packets from that entity, and rebuild the rendering process for each client being forwarded.

 

Anyway...you can use DimensionManager#getWorld(int) to get a world object from its dimension id.

Link to comment
Share on other sites

and rebuild the rendering process for each client being forwarded.

 

It'd actually be "one client" most of the time, as it's not drawing the result in the world, but rather in a GUI.

But yes, that does pretty much account for the work that needs to be done.

 

Hmmm that sounds pretty ambitious. 

 

You might be able to get the effect you want if you actually teleport the player to the new dimension but "freeze" the game from updating or somehow prevent the player from appearing in the world or interacting with it, until they "commit" to the teleport.

 

May or may not work.  Imagine if the link destination is entirely covered in lava....

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

Teleport them to a safe place in the new world, then change their rendering viewpoint to correspond to the portal location?

 

Define "safe place" that doesn't involve modifying the blocks that are already there.  Keep in mind that "sky exposure" is potentially deadly.

 

In any case, I think I have a solution.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

Earlier test:

width=800 height=449http://s18.postimg.org/5leo4j8ih/2013_11_08_13_35_01.png[/img]

Render occurred before the client had block and weather data, so all it managed to screenshot was the dimension's two suns.

 

But it totally worked.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

Mystcraft?

 

Yup.  I'm doing a plugin.

 

Working on increasing my texture size.  64x64 is just NOT enough.  But that means breaking the data into smaller packets.  >..x

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

Custom packet with an array woukd help you.

 

PACKET SIZE is the limiting factor, not what KIND of packet.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

Hi

 

During my browsings I have noticed something called FMLPacket which splits its data into packets of 32000 bytes and reassembles at the other end.

 

That's all I know (didn't look further) but it might be of interest to you?

 

-TGG

 

I'll take a look.  I do have my system fully functional using 4 packets right now (the first one locks in data editing until the fourth one from a matching source comes through) and other than some positioning data getting corrupted slightly between "saving the result" and "loading it from disc to send back to the client" things are working.

(As in, the destination is getting offset by 1 block, preventing the server from locating the existing render)

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

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.



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Turning the Tables: My Journey to Reclaim Stolen Bitcoins with Expert Help. When my Bitcoin wallet was hacked and my entire cryptocurrency portfolio was stolen, I felt utterly devastated and hopeless. Having worked hard to build up my digital assets, the sudden loss was gut-wrenching. It felt like my financial future had been ripped away in an instant, leaving me overwhelmed by a sense of betrayal and despair. In my search for help, I discovered TECH CYBER FORCE Recovery, a renowned cybersecurity firm specializing in cryptocurrency recovery. I was met with professionalism and empathy from my first contact with them. The team demonstrated a steadfast commitment to helping me retrieve my stolen Bitcoins. They understood the emotional toll of my situation and approached my case with genuine concern. TECH CYBER FORCE Recovery swung into action immediately, leveraging its extensive expertise in blockchain forensics and hacker tracking techniques. Their process was meticulous. They analyzed my transaction history, followed the digital trail left by the hackers, and worked diligently to pinpoint the location of the stolen funds. I was impressed by their technical prowess; they employed advanced cryptographic methods and strategic negotiations with the perpetrators, all while keeping me informed about their progress. The recovery process was complex and fraught with challenges. However, the tenacity displayed by the team was truly awe-inspiring. They navigated cryptocurrency crime's murky and ever-evolving landscape with skill and determination. After a series of strategic moves, they managed to recover the majority of my Bitcoins successfully.  
    • I removed giacomos_hud, oculus, (dont know what you mean with iris), enhanced_boss_bars, epicfight and essential.  Server still doesnt want to boot. new logs after removing: https://pastebin.com/LuM2PFtN I dont quite understand the "server side" and "client side" difference..
    • There are client side only mods in your server files   Remove giacomos_hud, oculus, iris, enhanced_boss_bars and epicfight You can keep these mods in your client Maybe also remove essentials
    • Here is my Log with java 17: https://pastebin.com/RPdWSjwq
    • Been working on creating a server for this mod, but i keep getting this error over and over again.  I have tried updating/changing the Forge launcher, Removing/replacing the ops.json and whitelist.json folders, and removing certain mods. Crash report log: https://pastebin.com/Bu046cVq Debug.log https://pastebin.com/7hKm40ke Latest.log https://pastebin.com/nCRLUH3b any help would be great thanks!
  • Topics

×
×
  • Create New...

Important Information

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