mirror of
https://github.com/TicTicBoooom-Mods/MasterfulMachinery.git
synced 2026-01-18 16:37:23 +01:00
Fixed Botania and Energy Port Bar direction. TODO: Fix the rest of the bars when I know how to fill the ports Xd
Fixed a render bug with overlapping on the structure Generator Boundary Box rendering. TODO: Box disappears at certain angles. Fisher's first commit :)
This commit is contained in:
@@ -52,12 +52,21 @@ public class StructureGenTileEntityRenderer extends TileEntityRenderer<Structure
|
||||
matrixStackIn.push();
|
||||
Matrix4f mat = matrixStackIn.getLast().getMatrix();
|
||||
|
||||
int x = Math.min(pos1.getX(), pos2.getX());
|
||||
int y = Math.min(pos1.getY(), pos2.getY());
|
||||
int z = Math.min(pos1.getZ(), pos2.getZ());
|
||||
int dx = Math.max(pos1.getX(), pos2.getX()) + 1;
|
||||
int dy = Math.max(pos1.getY(), pos2.getY()) + 1;
|
||||
int dz = Math.max(pos1.getZ(), pos2.getZ()) + 1;
|
||||
float x = Math.min(pos1.getX(), pos2.getX());
|
||||
float y = Math.min(pos1.getY(), pos2.getY());
|
||||
float z = Math.min(pos1.getZ(), pos2.getZ());
|
||||
float dx = Math.max(pos1.getX(), pos2.getX()) + 1;
|
||||
float dy = Math.max(pos1.getY(), pos2.getY()) + 1;
|
||||
float dz = Math.max(pos1.getZ(), pos2.getZ()) + 1;
|
||||
float xAdjust = addWiggleRoom(x,dx);
|
||||
x = x+xAdjust;
|
||||
dx = dx+(xAdjust*-1);
|
||||
float yAdjust = addWiggleRoom(y,dy);
|
||||
y = y+yAdjust;
|
||||
dy = dy+(yAdjust*-1);
|
||||
float zAdjust = addWiggleRoom(z,dz);
|
||||
z = z+zAdjust;
|
||||
dz = dz+(zAdjust*-1);
|
||||
|
||||
int R = 255, G = 255, B = 255, A = 70;
|
||||
builder.pos(mat, x , y, z).color(R, G, B, A).endVertex();
|
||||
@@ -93,4 +102,11 @@ public class StructureGenTileEntityRenderer extends TileEntityRenderer<Structure
|
||||
matrixStackIn.pop();
|
||||
}
|
||||
}
|
||||
|
||||
private float addWiggleRoom(float coordOne, float coordTwo) {
|
||||
if(coordOne > coordTwo) {
|
||||
return 0.05f;
|
||||
}
|
||||
return -0.05f;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -67,7 +67,8 @@ public class EnergyPortStorage extends PortStorage {
|
||||
if (inv.getMaxEnergyStored() > 0) {
|
||||
amount = (float)inv.getEnergyStored() / inv.getMaxEnergyStored();
|
||||
}
|
||||
screen.blit(stack, left + barOffsetX, top + barOffsetY, 193, 18, 18, (int) (108 * amount));
|
||||
//screen.blit(stack, left + barOffsetX, top + barOffsetY, 193, 18, 18, (int) (108 * amount));
|
||||
screen.blit(stack, left + barOffsetX, top + barOffsetY + 108 - (int) (108*amount), 193, 18, 18, (int) (108*amount)-1);
|
||||
AbstractGui.drawString(stack, Minecraft.getInstance().fontRenderer,Math.round((float)10000 * amount) / 100.f + "%", left + 30, top + 60, 0xfefefe);
|
||||
AbstractGui.drawString(stack, Minecraft.getInstance().fontRenderer, inv.getEnergyStored() + "FE", left + 30, top + 80, 0xfefefe);
|
||||
}
|
||||
|
||||
@@ -73,7 +73,7 @@ public class ManaPortStorage extends PortStorage {
|
||||
if (inv.getMaxManaStored() > 0) {
|
||||
amount = (float)inv.getManaStored() / inv.getMaxManaStored();
|
||||
}
|
||||
screen.blit(stack, left + barOffsetX, top + barOffsetY, 193, 18, 18, (int) (108 * amount));
|
||||
screen.blit(stack, left + barOffsetX, top + barOffsetY + 108 - (int) (108*amount), 193, 18, 18, (int) (108*amount)-1);
|
||||
AbstractGui.drawString(stack, Minecraft.getInstance().fontRenderer, inv.getManaStored() + " Mana", left + 30, top + 60, 0xfefefe);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
#Sat Jul 17 00:12:57 BST 2021
|
||||
VERSION_CODE=658
|
||||
#Thu Aug 19 17:18:09 EDT 2021
|
||||
VERSION_CODE=718
|
||||
|
||||
Reference in New Issue
Block a user