Posted October 31, 20168 yr Hello, First post Anyways, I was wondering how I could render a line from a block to block. Sorta of like a laser beam. Any help would be awesome and also a mini explanation the new Tessellator in 1.8.8. Thanks!
October 31, 20168 yr Take a look here https://github.com/Draco18s/HarderStuff/blob/master/src/main/java/com/draco18s/hazards/client/HazardsClientEventHandler.java#L138 There's a lot of custom logic going on, but it's there to figure out which two blocks to draw the line between, in what color, and some slight height offsets so that no z-fighting occurs. Actual drawing occurs in a separate function down on line 371. Do note that the Tessellator has changed recently, so you may need to do some conversions. 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.
November 1, 20168 yr Hi The new Tessellator and WorldRenderer (now VertexBuffer) are nearly identical to the old ones, the methods have just moved around a bit. Vanilla code in TileEntityRenderers will show you the new syntax. Draco's code will show you how to translate correctly and draw the line. -TGG
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.