mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-21 04:32:18 +00:00
Fixed some rendering issues.
Fixed wireless chargers continuous drain.
This commit is contained in:
1 parent
98ae9db25e
commit
76c256d18a
4 files changed
+7
-7
No files matched your search
@@ -1,6 +1,7 @@
|
||||
package crazypants.enderio.machine.farm;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.OpenGlHelper;
|
||||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.init.Blocks;
|
||||
|
||||
+2
-2
@@ -57,9 +57,9 @@ public class TranslatedCubeRenderer {
|
||||
v.xyz.sub(xyz);
|
||||
xform.apply(v);
|
||||
if(!enableLighting) {
|
||||
v.brightness = -1;
|
||||
v.brightness = 15 << 20 | 15 << 4;
|
||||
float col = RenderUtil.getColorMultiplierForFace(face);
|
||||
v.color = new Vector4f(col,col,col,1);
|
||||
v.color = new Vector4f(col,col,col,1);
|
||||
v.normal = null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ public class GuiCapacitorBank extends GuiContainerBase {
|
||||
|
||||
protected static final int CONFIG_ID = 377996104;
|
||||
|
||||
private static final int POWER_X = 8 + 21;
|
||||
private static final int POWER_X = 8;
|
||||
private static final int POWER_Y = 9;
|
||||
private static final int POWER_WIDTH = 10;
|
||||
private static final int POWER_HEIGHT = 68;
|
||||
|
||||
@@ -55,7 +55,7 @@ public class TileWirelessCharger extends TileEntityEio implements IInternalPower
|
||||
if(stored > 0) {
|
||||
storedEnergy += stored;
|
||||
storedEnergy = Math.min(storedEnergy, MAX_ENERGY_STORED_MJ);
|
||||
if(stored == MAX_ENERGY_STORED_MJ) {
|
||||
if(stored > (MAX_ENERGY_STORED_MJ - 2)) {
|
||||
powerHandler.configure(0, 0, 0, 0);
|
||||
} else {
|
||||
powerHandler.configure(0, MAX_ENERGY_IN, 0, MAX_ENERGY_IN);
|
||||
@@ -129,13 +129,12 @@ public class TileWirelessCharger extends TileEntityEio implements IInternalPower
|
||||
}
|
||||
|
||||
@Override
|
||||
public int receiveEnergy(ForgeDirection from, int maxReceive, boolean simulate) {
|
||||
|
||||
public int receiveEnergy(ForgeDirection from, int maxReceive, boolean simulate) {
|
||||
double maxMj = Math.min(maxReceive / 10, MAX_ENERGY_IN);
|
||||
double canRecieve = Math.min(MAX_ENERGY_STORED_MJ - storedEnergy, maxMj);
|
||||
int canRecieveRF = (int)(canRecieve * 10);
|
||||
if(!simulate) {
|
||||
storedEnergy += (canRecieveRF / 10);
|
||||
storedEnergy += (canRecieveRF / 10f);
|
||||
}
|
||||
return canRecieveRF;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user