Tighten drawer rendering (no more glitchy seams)
No files matched your search
@@ -17,8 +17,8 @@ buildscript {
|
||||
|
||||
apply plugin: 'forge'
|
||||
|
||||
version = "1.1.3"
|
||||
group= "com.jaquadro.storagedrawers" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
|
||||
version = "1.7.10-1.1.4"
|
||||
group= "com.jaquadro.minecraft.storagedrawers" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
|
||||
archivesBaseName = "StorageDrawers"
|
||||
|
||||
minecraft {
|
||||
|
||||
|
After Width: | Height: | Size: 272 B |
|
After Width: | Height: | Size: 272 B |
|
After Width: | Height: | Size: 272 B |
|
After Width: | Height: | Size: 435 B |
|
After Width: | Height: | Size: 272 B |
|
Before Width: | Height: | Size: 577 B After Width: | Height: | Size: 566 B |
|
After Width: | Height: | Size: 379 B |
|
After Width: | Height: | Size: 272 B |
|
Before Width: | Height: | Size: 479 B |
|
After Width: | Height: | Size: 602 B |
|
Before Width: | Height: | Size: 484 B |
|
After Width: | Height: | Size: 664 B |
|
Before Width: | Height: | Size: 508 B |
|
After Width: | Height: | Size: 628 B |
|
Before Width: | Height: | Size: 485 B |
|
After Width: | Height: | Size: 392 B |
|
Before Width: | Height: | Size: 552 B |
|
After Width: | Height: | Size: 676 B |
@@ -3,7 +3,7 @@
|
||||
"modid": "StorageDrawers",
|
||||
"name": "Storage Drawers",
|
||||
"description": "Multi-drawer storage blocks for quick storage and retrieval.",
|
||||
"version": "1.1.3",
|
||||
"version": "1.1.4",
|
||||
"credits": "By jaquadro",
|
||||
"logoFile": "",
|
||||
"url": "http://www.jaquadro.com/",
|
||||
|
||||
@@ -26,7 +26,7 @@ public class StorageDrawers
|
||||
{
|
||||
public static final String MOD_ID = "StorageDrawers";
|
||||
public static final String MOD_NAME = "Storage Drawers";
|
||||
public static final String MOD_VERSION = "1.1.3";
|
||||
public static final String MOD_VERSION = "1.1.4";
|
||||
static final String SOURCE_PATH = "com.jaquadro.minecraft.storagedrawers.";
|
||||
|
||||
public static final ModBlocks blocks = new ModBlocks();
|
||||
|
||||
@@ -31,6 +31,8 @@ public class BlockCompDrawers extends BlockDrawers
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon[][] iconFrontInd;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTrim;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconSide;
|
||||
@SideOnly(Side.CLIENT)
|
||||
@@ -63,6 +65,12 @@ public class BlockCompDrawers extends BlockDrawers
|
||||
list.add(new ItemStack(item, 1, 0));
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIconTrim (int meta) {
|
||||
return iconTrim;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon (int side, int meta) {
|
||||
@@ -131,6 +139,7 @@ public class BlockCompDrawers extends BlockDrawers
|
||||
iconFrontInd[i][j] = register.registerIcon(StorageDrawers.MOD_ID + ":drawers_comp_front_" + i + "_ind" + j);
|
||||
}
|
||||
|
||||
iconTrim = register.registerIcon(StorageDrawers.MOD_ID + ":drawers_comp_trim");
|
||||
iconSide = register.registerIcon(StorageDrawers.MOD_ID + ":drawers_comp_side");
|
||||
iconSideEtched = register.registerIcon(StorageDrawers.MOD_ID + ":drawers_comp_side_2");
|
||||
}
|
||||
|
||||
@@ -49,6 +49,8 @@ public class BlockDrawers extends BlockContainer implements IExtendedBlockClickH
|
||||
private IIcon[] iconFront2;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon[] iconFront4;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon[] iconTrim;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon[] iconOverlay;
|
||||
@@ -57,7 +59,7 @@ public class BlockDrawers extends BlockContainer implements IExtendedBlockClickH
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon[] iconOverlayH;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon[] iconOverlayCross;
|
||||
private IIcon[] iconOverlayTrim;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconIndicatorOn;
|
||||
@@ -392,6 +394,12 @@ public class BlockDrawers extends BlockContainer implements IExtendedBlockClickH
|
||||
}
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIconTrim (int meta) {
|
||||
meta %= BlockWood.field_150096_a.length;
|
||||
return iconTrim[meta];
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon (int side, int meta) {
|
||||
@@ -427,6 +435,14 @@ public class BlockDrawers extends BlockContainer implements IExtendedBlockClickH
|
||||
return getIcon(blockAccess, x, y, z, side, level);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getOverlayIconTrim (int level) {
|
||||
if (level == 0)
|
||||
return null;
|
||||
|
||||
return iconOverlayTrim[level];
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIndicatorIcon (boolean on) {
|
||||
return on ? iconIndicatorOn : iconIndicatorAmber;
|
||||
@@ -453,9 +469,9 @@ public class BlockDrawers extends BlockContainer implements IExtendedBlockClickH
|
||||
TileEntityDrawersBase tile = getTileEntity(blockAccess, x, y, z);
|
||||
if (tile == null || side == tile.getDirection()) {
|
||||
if (drawerCount == 2)
|
||||
return (level > 0) ? iconOverlayH[level] : iconFront2[meta];
|
||||
return iconFront2[meta];
|
||||
else
|
||||
return (level > 0) ? iconOverlayCross[level] : iconFront4[meta];
|
||||
return iconFront4[meta];
|
||||
}
|
||||
|
||||
switch (side) {
|
||||
@@ -491,6 +507,7 @@ public class BlockDrawers extends BlockContainer implements IExtendedBlockClickH
|
||||
iconSideV = new IIcon[subtex.length];
|
||||
iconFront2 = new IIcon[subtex.length];
|
||||
iconFront4 = new IIcon[subtex.length];
|
||||
iconTrim = new IIcon[subtex.length];
|
||||
|
||||
for (int i = 0; i < subtex.length; i++) {
|
||||
iconFront2[i] = register.registerIcon(StorageDrawers.MOD_ID + ":drawers_" + subtex[i] + "_front_2");
|
||||
@@ -498,6 +515,7 @@ public class BlockDrawers extends BlockContainer implements IExtendedBlockClickH
|
||||
iconSide[i] = register.registerIcon(StorageDrawers.MOD_ID + ":drawers_" + subtex[i] + "_side");
|
||||
iconSideV[i] = register.registerIcon(StorageDrawers.MOD_ID + ":drawers_" + subtex[i] + "_side_v");
|
||||
iconSideH[i] = register.registerIcon(StorageDrawers.MOD_ID + ":drawers_" + subtex[i] + "_side_h");
|
||||
iconTrim[i] = register.registerIcon(StorageDrawers.MOD_ID + ":drawers_" + subtex[i] + "_trim");
|
||||
}
|
||||
|
||||
String[] overlays = new String[] { null, null, "iron", "gold", "obsidian", "diamond", "emerald" };
|
||||
@@ -505,13 +523,13 @@ public class BlockDrawers extends BlockContainer implements IExtendedBlockClickH
|
||||
iconOverlay = new IIcon[overlays.length];
|
||||
iconOverlayH = new IIcon[overlays.length];
|
||||
iconOverlayV = new IIcon[overlays.length];
|
||||
iconOverlayCross = new IIcon[overlays.length];
|
||||
iconOverlayTrim = new IIcon[overlays.length];
|
||||
|
||||
for (int i = 2; i < overlays.length; i++) {
|
||||
iconOverlay[i] = register.registerIcon(StorageDrawers.MOD_ID + ":overlay_" + overlays[i]);
|
||||
iconOverlayV[i] = register.registerIcon(StorageDrawers.MOD_ID + ":overlay_" + overlays[i] + "_v");
|
||||
iconOverlayH[i] = register.registerIcon(StorageDrawers.MOD_ID + ":overlay_" + overlays[i] + "_h");
|
||||
iconOverlayCross[i] = register.registerIcon(StorageDrawers.MOD_ID + ":overlay_" + overlays[i] + "_cross");
|
||||
iconOverlayTrim[i] = register.registerIcon(StorageDrawers.MOD_ID + ":overlay_" + overlays[i] + "_trim");
|
||||
}
|
||||
|
||||
iconIndicatorOff = register.registerIcon(StorageDrawers.MOD_ID + ":indicator_off");
|
||||
|
||||
@@ -70,18 +70,25 @@ public class DrawersRenderer implements ISimpleBlockRenderingHandler
|
||||
return false;
|
||||
|
||||
int side = tile.getDirection();
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
|
||||
double unit = .0625;
|
||||
boxRenderer.setUnit(unit);
|
||||
boxRenderer.setColor(ModularBoxRenderer.COLOR_WHITE);
|
||||
for (int i = 0; i < 6; i++)
|
||||
boxRenderer.setIcon(block.getIcon(world, x, y, z, i), i);
|
||||
boxRenderer.setExteriorIcon(block.getIcon(world, x, y, z, i), i);
|
||||
|
||||
boxRenderer.setCutIcon(block.getIconTrim(meta));
|
||||
boxRenderer.setInteriorIcon(block.getIconTrim(meta));
|
||||
|
||||
renderExterior(block, x, y, z, side, renderer);
|
||||
|
||||
if (tile.getLevel() > 1 && StorageDrawers.config.cache.renderStorageUpgrades) {
|
||||
for (int i = 0; i < 6; i++)
|
||||
boxRenderer.setIcon(block.getOverlayIcon(world, x, y, z, i, tile.getLevel()), i);
|
||||
boxRenderer.setExteriorIcon(block.getOverlayIcon(world, x, y, z, i, tile.getLevel()), i);
|
||||
|
||||
boxRenderer.setCutIcon(block.getOverlayIconTrim(tile.getLevel()));
|
||||
boxRenderer.setInteriorIcon(block.getOverlayIconTrim(tile.getLevel()));
|
||||
|
||||
renderExterior(block, x, y, z, side, renderer);
|
||||
}
|
||||
|
||||