Some class renaming, move TextureSubmap to API and improve its methods

This commit is contained in:
tterrag1098 committed 2015-04-23 17:31:25 -04:00
1 parent c2fa40d57e
commit d50f2c9da5
36 files changed
+373 -294

No files matched your search

@@ -1,6 +1,7 @@
package com.cricketcraft.chisel.client.render;
import com.cricketcraft.chisel.api.client.CTM;
import com.cricketcraft.chisel.api.client.TextureSubmap;
import net.minecraft.block.Block;
import net.minecraft.client.renderer.RenderBlocks;
@@ -246,7 +247,17 @@ public class RenderBlocksCTM extends RenderBlocks {
}
void side(SubSide side, int iconIndex) {
IIcon icon = iconIndex >= 16 ? submapSmall.icons[iconIndex - 16] : submap.icons[iconIndex];
IIcon icon;
TextureSubmap map;
if (iconIndex >= 16) {
iconIndex -= 16;
map = submapSmall;
} else {
map = submap;
}
int x = iconIndex % map.getWidth();
int y = iconIndex / map.getHeight();
icon = map.getSubIcon(x, y);
double umax = icon.getMaxU();
double umin = icon.getMinU();