Jump to content

Recommended Posts

Posted
55 minutes ago, Mambo_Dancer said:

when im placing my InfusionAltar my another entity, that should hovering above is stucks to me 

What?

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.

Posted
1 minute ago, Draco18s said:

What?

ive got a bit of progress, now its hovering properly, but all particles are disapearing when i am looking on this block, and when i place >2 of this blocks only 2 blocks are rendering with TESR

Posted

You are rendering your item outside the pushed matrix. Move it to be rendered inside of it.

TESR's are also singletons. There is only one TESR that does the work for rendering every single tile-entity that it is bound to. If there are several loaded at the same time, then you need to compensate the rotation, either by using a variable from the TE itself, or any other "outside" data, otherwise it'll speed up by +1x times for each tile.

I would also recommend that you start to undo whatever you rendered after you are done. "Artifacts" are a type of behaviour when rendering isn't stopped once you think it has, and starts interfering with other's rendering. OpenGL artifacts are annoying and hard to track down. GLStateManager helps out a bit, but in the end artifacts shouldn't exist.

An example of "undoing" would be to translate your TESR to where you want it, render the item, then translate again with negative values, to reset it. This goes for every action you do with OpenGL.


I have a TESR that spins in all axii, as well as bobbing up and down here. You can take a look and see where your code differentiates. Do note, I'm calling other methods as well so a pure copy/paste will lead to unintended behaviour.

Also previously known as eAndPi.

"Pi, is there a station coming up where we can board your train of thought?" -Kronnn

Published Mods: Underworld

Handy links: Vic_'s Forge events Own WIP Tutorials.

Posted
11 minutes ago, Matryoshika said:

You are rendering your item outside the pushed matrix. Move it to be rendered inside of it.

TESR's are also singletons. There is only one TESR that does the work for rendering every single tile-entity that it is bound to. If there are several loaded at the same time, then you need to compensate the rotation, either by using a variable from the TE itself, or any other "outside" data, otherwise it'll speed up by +1x times for each tile.

I would also recommend that you start to undo whatever you rendered after you are done. "Artifacts" are a type of behaviour when rendering isn't stopped once you think it has, and starts interfering with other's rendering. OpenGL artifacts are annoying and hard to track down. GLStateManager helps out a bit, but in the end artifacts shouldn't exist.

An example of "undoing" would be to translate your TESR to where you want it, render the item, then translate again with negative values, to reset it. This goes for every action you do with OpenGL.


I have a TESR that spins in all axii, as well as bobbing up and down here. You can take a look and see where your code differentiates. Do note, I'm calling other methods as well so a pure copy/paste will lead to unintended behaviour.

thanks alot, but most of it seems to be hard to understand coz im a beginner, i will appreciate any help with undoing as example

Posted
36 minutes ago, Matryoshika said:

You are rendering your item outside the pushed matrix. Move it to be rendered inside of it.

TESR's are also singletons. There is only one TESR that does the work for rendering every single tile-entity that it is bound to. If there are several loaded at the same time, then you need to compensate the rotation, either by using a variable from the TE itself, or any other "outside" data, otherwise it'll speed up by +1x times for each tile.

I would also recommend that you start to undo whatever you rendered after you are done. "Artifacts" are a type of behaviour when rendering isn't stopped once you think it has, and starts interfering with other's rendering. OpenGL artifacts are annoying and hard to track down. GLStateManager helps out a bit, but in the end artifacts shouldn't exist.

An example of "undoing" would be to translate your TESR to where you want it, render the item, then translate again with negative values, to reset it. This goes for every action you do with OpenGL.


I have a TESR that spins in all axii, as well as bobbing up and down here. You can take a look and see where your code differentiates. Do note, I'm calling other methods as well so a pure copy/paste will lead to unintended behaviour.

Still cant get rid of no particles, moved to inside matrix (x=0,y=0.4,z=0) and trouble still in

Posted
54 minutes ago, Matryoshika said:

You are rendering your item outside the pushed matrix. Move it to be rendered inside of it.

TESR's are also singletons. There is only one TESR that does the work for rendering every single tile-entity that it is bound to. If there are several loaded at the same time, then you need to compensate the rotation, either by using a variable from the TE itself, or any other "outside" data, otherwise it'll speed up by +1x times for each tile.

I would also recommend that you start to undo whatever you rendered after you are done. "Artifacts" are a type of behaviour when rendering isn't stopped once you think it has, and starts interfering with other's rendering. OpenGL artifacts are annoying and hard to track down. GLStateManager helps out a bit, but in the end artifacts shouldn't exist.

An example of "undoing" would be to translate your TESR to where you want it, render the item, then translate again with negative values, to reset it. This goes for every action you do with OpenGL.


I have a TESR that spins in all axii, as well as bobbing up and down here. You can take a look and see where your code differentiates. Do note, I'm calling other methods as well so a pure copy/paste will lead to unintended behaviour.

and i will be very happy if you help me with that fast rotation, cant get rid of it too((

Posted
  1. You are constantly creating a new EntityItem every frame. These will stack up, and just cause excessive cleanup for the GarbageCollector (which cleans up used memory).
    Declare a final EntityItem outside the method and just reference whenever you want to render.
  2. You are completely missing a pushMatrix call.
  3. You need to revert the rotation & the translation after you have rendered the EntityItem 

An example of reverting the rotation would be as I did in my code I linked earlier
 

    	GlStateManager.rotate(angle, 1, 1, 1); //Rotating everything
    	renderBody(te, x, y, z, partialTicks, destroyStage); //render the thing
    	GlStateManager.rotate(-angle, 1, 1, 1); //reverting the rotation with an equal but negative angle

 

If you want to use the same logic as I do for calculating the angle, then instead of multiplying by 100 (what you changed) you should divide by a larger number than 40 (what I used).

Also previously known as eAndPi.

"Pi, is there a station coming up where we can board your train of thought?" -Kronnn

Published Mods: Underworld

Handy links: Vic_'s Forge events Own WIP Tutorials.

Posted
Just now, Matryoshika said:
  1. You are constantly creating a new EntityItem every frame. These will stack up, and just cause excessive cleanup for the GarbageCollector (which cleans up used memory).
    Declare a final EntityItem outside the method and just reference whenever you want to render.
  2. You are completely missing a pushMatrix call.
  3. You need to revert the rotation & the translation after you have rendered the EntityItem 

An example of reverting the rotation would be as I did in my code I linked earlier
 


    	GlStateManager.rotate(angle, 1, 1, 1); //Rotating everything
    	renderBody(te, x, y, z, partialTicks, destroyStage); //render the thing
    	GlStateManager.rotate(-angle, 1, 1, 1); //reverting the rotation with an equal but negative angle

 

If you want to use the same logic as I do for calculating the angle (but slow it down), then instead of multiplying by 100 (what you changed) you should divide by a larger number than 40 (what I used).

 

Also previously known as eAndPi.

"Pi, is there a station coming up where we can board your train of thought?" -Kronnn

Published Mods: Underworld

Handy links: Vic_'s Forge events Own WIP Tutorials.

Posted
9 minutes ago, Matryoshika said:

 

so changed all, but renderBody is missing (changed to entityItem - my infusionthing ) but doesnt want to work. Im missing smthng,yes? (in my mind and skill lel)

Posted (edited)
13 minutes ago, Matryoshika said:

GlStateManager.rotate(angle, 1, 1, 1); //Rotating everything

renderBody(te, x, y, z, partialTicks, destroyStage); //render the thing

GlStateManager.rotate(-angle, 1, 1, 1); //reverting the rotation with an equal but negative angle

This is what pushMatrix and popMatrix do.

GLStateManager.pushMatrix();
GlStateManager.rotate(angle, 1, 1, 1); //Rotating everything
renderBody(te, x, y, z, partialTicks, destroyStage); //render the thing
GLStateManager.popMatrix(); //undo to the last pushMatrix

 

 

Edited by Draco18s

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.

Posted
17 minutes ago, Matryoshika said:

 

so it worked, particularry, it doesnt want to rotate, and i have annoying name hovering above block when u lookng on block (container.infusionaltar) tried to look where it is called but my mission failed)
i do not know about forge modding so much stuff, could you recommend me some stuff where i can learn more about? thanks for help btw

Posted (edited)
On 12-3-2018 at 10:47 PM, Mambo_Dancer said:

so it worked, particularry, it doesnt want to rotate, and i have annoying name hovering above block when u lookng on block (container.infusionaltar) tried to look where it is called but my mission failed)
i do not know about forge modding so much stuff, could you recommend me some stuff where i can learn more about? thanks for help btw

Heya, i have taken a quick look at your TESR and you are setting the value in the render method, I would recommenced you to do this for example in the update method in your tileEntity (to update the value) and make setters and getters for that value in your tile.

So then you can call this from your TESR.

But you should also take care of the latency.

Example to explain better :P :

tile.getModelAngle() * partialTickTime  <- if you are actually rotating the model

and if the data (angle) doesn't change you give it just the tile.getModelAngle()

 

real example : 

float rotation = tile.isModelRotating() ? tile.getModelAngle() + (tile.getModelAngle() - tile.getModelPrevAngle()) *partialTickTime : tile.getModelPrevAngle() + ( tile.getModelAngle() - tile.getModelPrevAngle());
GlStateManager.rotate(rotation, 0, 0, 1);

 

Hope this helps you somehow.

 

(NOTE: TESR is as far as i know multi-threaded meaning the same render method is called in "independent" threads so your "angle" in the TESR will have different values, cuss the different threads don't share there values/data to each other.

So your rotation will always be broke.

And the render method is only called when the player is actually looking at the block/tile, so is not rotating which is fine if it's just for aesthetic purpose ) 

 

Greets Sir_titi

Edited by sir_titi

Always looking for new challenges, and happy to help the people where ever I can

Posted
3 minutes ago, sir_titi said:

(NOTE: TESR is as far as i know multi-threaded meaning the same render method is called in "independent" threads so your "angle" in the TESR will have different values, cuss the different threads don't share there values/data to each other.

What? This is literally nonsense.

"Two instances of the class" and "two threads" are completely and utterly different concepts.

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.

Posted
1 minute ago, Draco18s said:

What? This is literally nonsense.

"Two instances of the class" and "two threads" are completely and utterly different concepts.

Wait what do you mean?

Sorry me for being stupid :P

Always looking for new challenges, and happy to help the people where ever I can

Posted
46 minutes ago, sir_titi said:

Wait what do you mean?

Sorry me for being stupid :P

https://en.wikipedia.org/wiki/Multithreading_(computer_architecture)

 

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.

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

    • When I first heard about Bitcoin back in 2018, I was skeptical. The idea of a decentralized, digital currency seemed too good to be true. But I was intrigued as I learned more about the technology behind it and its potential. I started small, investing just a few hundred dollars, dipping my toes into the cryptocurrency waters. At first, it was exhilarating to watch the value of my investment grow exponentially. I felt like I was part of the future, an early adopter of this revolutionary new asset. But that euphoria was short-lived. One day, I logged into my digital wallet only to find it empty - my Bitcoin had vanished without a trace. It turned out that the online exchange I had trusted had been hacked, and my funds were stolen. I was devastated, both financially and emotionally. All the potential I had seen in Bitcoin was tainted by the harsh reality that with decentralization came a lack of regulation and oversight. My hard-earned money was gone, lost to the ether of the digital world. This experience taught me a painful lesson about the price of trust in the uncharted territory of cryptocurrency. While the technology holds incredible promise, the risks can be catastrophic if you don't approach it with extreme caution. My Bitcoin investment gamble had failed, and I was left to pick up the pieces, wiser but poorer for having placed my faith in the wrong hands. My sincere appreciation goes to MUYERN TRUST HACKER. You are my hero in recovering my lost funds. Send a direct m a i l ( muyerntrusted ( @ ) mail-me ( . )c o m ) or message on whats app : + 1 ( 4-4-0 ) ( 3 -3 -5 ) ( 0-2-0-5 )
    • You could try posting a log (if there is no log at all, it may be the launcher you are using, the FAQ may have info on how to enable the log) as described in the FAQ, however this will probably need to be reported to/remedied by the mod author.
    • So me and a couple of friends are playing with a shitpost mod pack and one of the mods in the pack is corail tombstone and for some reason there is a problem with it, where on death to fire the player will get kicked out of the server and the tombstone will not spawn basically deleting an entire inventory, it doesn't matter what type of fire it is, whether it's from vanilla fire/lava, or from modded fire like ice&fire/lycanites and it's common enough to where everyone on the server has experienced at least once or twice and it doesn't give any crash log. a solution to this would be much appreciated thank you!
    • It is 1.12.2 - I have no idea if there is a 1.12 pack
×
×
  • Create New...

Important Information

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