Jump to content
  • Home
  • Files
  • Docs
  • Merch
Topics
  • All Content

  • This Topic
  • This Forum

  • Advanced Search
  • Existing user? Sign In  

    Sign In



    • Not recommended on shared computers


    • Forgot your password?

  • Sign Up
  • All Activity
  • Home
  • Forge Mods
  • Mods
  • [1.6.x] [For devs] EasyTessellator!
Sign in to follow this  
Followers 0
Enkey

[1.6.x] [For devs] EasyTessellator!

By Enkey, December 17, 2013 in Mods

  • Reply to this topic
  • Start new topic

Recommended Posts

Enkey    2

Enkey

Enkey    2

  • Stone Miner
  • Enkey
  • Members
  • 2
  • 58 posts
Posted December 17, 2013

[shadow=black,right]Are you tired of rendering each face of a cube separately when using Tessellator?

Than use EasyTessellator!

[/shadow]

 

Made for 1.6.4, but probable works on earlier versions, too (let me know if you try it on some other version)

 

What does it do?

It renders all six sides of a cube with some parameters you give it with just one command!

How to use the command:

The command:

 

void renderCube(double x, double y, double z, int xDim, int yDim, int zDim, int offsetU, int offsetV, Icon icon, int flag, int textureWidth, int textureHeight)

 

Parameters:

x - x position of the block in the world + position of the cube in the block (eg. x + 0.25 means that the cube would be offset by 4 pixels on x axis)

y - same as x parameter, but for y axis

z - same as x parameter, but for z axis

xDim - dimension of the cube on x axis (in pixels) (means how big the cube will be)

yDim - dimension of the cube on y axis (in pixels) (means how big the cube will be)

zDim - dimension of the cube on z axis (in pixels) (means how big the cube will be)

offsetU - horizontal texture offset (in pixels)

offsetV - vertical texture offset (in pixels)

icon - texture to use to render the cube

flags - changes how the texture will be used (more information below)

textureWidth - the width of the texture (in pixels)

textureHeight - the height of the texture (in pixels)

 

If you are using default 16x16 texture you don't have to give the textureWidth and textureHeight parameters! ;)

 

Explanation of offsetU and offsetV:

5si6ceR.png

Img 1 (how it looks in some png texture file)

 

Flags:

0 - all sides with same texture (see Img 1 above)

1 - 1 texture for top and bottom and 1 texture for sides (like bookshelf)

YLuYVkb.png

Img 2 (the height of the top & bottom texture have to be same as zDim and the blue one as yDim)

 

2 - uses different texture for each side and when you have rotatable block you can use 3, 4 ,5 flags (rotates textures counterclockwise), but you have to change the position and dimensions of the cube yourself.

cj2EEpn.png

Img 3 - this is how it is taking the textures from the file

 

If you are rendering item the x,y,z are gonna be 0.

 

How to use:

1. Download (below)

2. Put it somewhere in your src folder

3. When rendering block, item or something with tessellator, use EasyTess.renderCube(....); (You can of course render more cubes in 1 block)

4. Done

 

Download:

https://github.com/EnkeyMC/EasyTessellator/releases (green button called "EasyTess.java")

 

GitHub Repository:

https://github.com/EnkeyMC/EasyTessellator

 

If you found some bug, have a suggestion or some problem just reply to this post!

 

Author: Enkey (in-game EnkeyMC)

  • Quote

Share this post


Link to post
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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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.

  • Insert image from URL
×
  • Desktop
  • Tablet
  • Phone
Sign in to follow this  
Followers 0
Go To Topic Listing



  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • SilviaX_92
      Forge having problem loading mods

      By SilviaX_92 · Posted 1 hour ago

      Hi DaemonUmbra, I think I was told to do that by the Pixelmon installation instruction but apparently I misunderstood the wording...   I tried and it worked! Thank you so so much you saved me from a Minecraft without Mods!   Have a wonderful day/night!
    • Draco18s
      MoonPhase help

      By Draco18s · Posted 2 hours ago

      Events don't return values. Second, I'm pretty sure getMoonPhase() is client side only.
    • GatoLeyo
      MoonPhase help

      By GatoLeyo · Posted 2 hours ago

      Im new at modding so probably this have an obvious error but plz somebody tell me how can i make this works, it is intended to return a value in relation to the moon phase       public float endWorldTick(TickEvent.WorldTickEvent event)      {         float x = 0;         if(event.side.isServer() && event.phase == TickEvent.Phase.END)          {             World world = event.world;             if(world.provider.getDimension() == 0) {                 if(world.getMoonPhase() == 1.0f)                  {                   x = 15.0f;                 }             }         }         return x;     }  
    • DaemonUmbra
      Can't see anything on minecraft menu screen except for the bottom left corner

      By DaemonUmbra · Posted 2 hours ago

      Please don't Necro old threads, if you have an issue make your own.
    • DaemonUmbra
      Forge having problem loading mods

      By DaemonUmbra · Posted 2 hours ago

      You changed "Game Directory" to your mods folder. The Game Directory is supposed to be the folder that contains the mods folder, .minecraft by default
  • Topics

    • SilviaX_92
      4
      Forge having problem loading mods

      By SilviaX_92
      Started 6 hours ago

    • GatoLeyo
      1
      MoonPhase help

      By GatoLeyo
      Started 2 hours ago

    • florgonn
      4
      Can't see anything on minecraft menu screen except for the bottom left corner

      By florgonn
      Started July 30, 2014

    • Casual
      1
      1.12.2 crash on game start

      By Casual
      Started 3 hours ago

    • PulseBeat_02
      14
      [1.12.2] Forge Crashes While Just Loading Into Loading Screen

      By PulseBeat_02
      Started December 13, 2018

  • Who's Online (See full list)

    • DavidM
    • thinkverse
  • All Activity
  • Home
  • Forge Mods
  • Mods
  • [1.6.x] [For devs] EasyTessellator!
  • Theme
  • Contact Us
  • Discord

Copyright © 2019 ForgeDevelopment LLC · Ads by Curse Powered by Invision Community