Fixed engineering table z-fighting and only tooltip on sneak
This commit is contained in:
parent
e5449e9566
commit
10ccaad88c
7 changed files with 74 additions and 69 deletions
|
@ -120,10 +120,10 @@ public class BlockDebug extends BlockRI implements IBlockInfo
|
|||
|
||||
public static enum DebugBlocks
|
||||
{
|
||||
SOURCE("UnlimitedPower", TileEntityInfSupply.class, "infSource"),
|
||||
FLUID("UnlimitedFluid", TileEntityInfFluid.class, "infFluid"),
|
||||
VOID("FluidVoid", TileEntityVoid.class, "void"),
|
||||
LOAD("PowerVampire", TileEntityInfLoad.class, "infLoad");
|
||||
SOURCE("UnlimitedPower", TileInfiniteEnergySource.class, "infSource"),
|
||||
FLUID("UnlimitedFluid", TileInfiniteFluidSource.class, "infFluid"),
|
||||
VOID("FluidVoid", TileInfiniteFluidSink.class, "void"),
|
||||
LOAD("PowerVampire", TileInfiniteEnergySink.class, "infLoad");
|
||||
public Icon icon;
|
||||
public String name;
|
||||
public String texture;
|
||||
|
|
|
@ -1,54 +0,0 @@
|
|||
package resonantinduction.core.debug;
|
||||
|
||||
import java.util.EnumSet;
|
||||
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import resonantinduction.core.prefab.tile.TileMachine;
|
||||
import universalelectricity.api.energy.EnergyStorageHandler;
|
||||
|
||||
public class TileEntityInfSupply extends TileMachine
|
||||
{
|
||||
public TileEntityInfSupply()
|
||||
{
|
||||
this.energy = new EnergyStorageHandler(Long.MAX_VALUE);
|
||||
this.energy.setMaxExtract(Long.MAX_VALUE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateEntity()
|
||||
{
|
||||
super.updateEntity();
|
||||
this.energy.setEnergy(Long.MAX_VALUE);
|
||||
this.produce();
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumSet<ForgeDirection> getOutputDirections()
|
||||
{
|
||||
return EnumSet.allOf(ForgeDirection.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumSet<ForgeDirection> getInputDirections()
|
||||
{
|
||||
return EnumSet.noneOf(ForgeDirection.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public long onReceiveEnergy(ForgeDirection from, long receive, boolean doReceive)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long onExtractEnergy(ForgeDirection from, long request, boolean doExtract)
|
||||
{
|
||||
return request;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canConnect(ForgeDirection direction)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -1,9 +1,9 @@
|
|||
package resonantinduction.core.debug;
|
||||
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import resonantinduction.core.prefab.tile.TileMachine;
|
||||
import calclavia.lib.prefab.tile.TileElectrical;
|
||||
|
||||
public class TileEntityInfLoad extends TileMachine
|
||||
public class TileInfiniteEnergySink extends TileElectrical
|
||||
{
|
||||
|
||||
@Override
|
|
@ -0,0 +1,54 @@
|
|||
package resonantinduction.core.debug;
|
||||
|
||||
import java.util.EnumSet;
|
||||
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import universalelectricity.api.energy.EnergyStorageHandler;
|
||||
import calclavia.lib.prefab.tile.TileElectrical;
|
||||
|
||||
public class TileInfiniteEnergySource extends TileElectrical
|
||||
{
|
||||
public TileInfiniteEnergySource()
|
||||
{
|
||||
this.energy = new EnergyStorageHandler(Long.MAX_VALUE);
|
||||
this.energy.setMaxExtract(Long.MAX_VALUE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateEntity()
|
||||
{
|
||||
super.updateEntity();
|
||||
this.energy.setEnergy(Long.MAX_VALUE);
|
||||
this.produce();
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumSet<ForgeDirection> getOutputDirections()
|
||||
{
|
||||
return EnumSet.allOf(ForgeDirection.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumSet<ForgeDirection> getInputDirections()
|
||||
{
|
||||
return EnumSet.noneOf(ForgeDirection.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public long onReceiveEnergy(ForgeDirection from, long receive, boolean doReceive)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long onExtractEnergy(ForgeDirection from, long request, boolean doExtract)
|
||||
{
|
||||
return request;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canConnect(ForgeDirection direction)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -2,20 +2,20 @@ package resonantinduction.core.debug;
|
|||
|
||||
import java.util.HashMap;
|
||||
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.fluids.FluidTank;
|
||||
import net.minecraftforge.fluids.FluidTankInfo;
|
||||
import net.minecraftforge.fluids.IFluidHandler;
|
||||
import calclavia.lib.prefab.tile.TileAdvanced;
|
||||
|
||||
/**
|
||||
* Designed to debug fluid devices by draining everything that comes in at one time
|
||||
*
|
||||
* @author DarkGuardsman
|
||||
*/
|
||||
public class TileEntityVoid extends TileEntity implements IFluidHandler
|
||||
public class TileInfiniteFluidSink extends TileAdvanced implements IFluidHandler
|
||||
{
|
||||
// TODO later add to this to make it actually have an ingame use other than debug
|
||||
public static HashMap<FluidStack, Long> storage = new HashMap<FluidStack, Long>();
|
|
@ -3,7 +3,6 @@ package resonantinduction.core.debug;
|
|||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ChatMessageComponent;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
|
@ -15,11 +14,12 @@ import net.minecraftforge.fluids.FluidTankInfo;
|
|||
import net.minecraftforge.fluids.IFluidHandler;
|
||||
import universalelectricity.api.vector.Vector3;
|
||||
import calclavia.lib.multiblock.fake.IBlockActivate;
|
||||
import calclavia.lib.prefab.tile.TileAdvanced;
|
||||
import calclavia.lib.utility.FluidUtility;
|
||||
|
||||
import com.builtbroken.common.lang.TextHelper.TextColor;
|
||||
|
||||
public class TileEntityInfFluid extends TileEntity implements IFluidHandler, IBlockActivate
|
||||
public class TileInfiniteFluidSource extends TileAdvanced implements IFluidHandler, IBlockActivate
|
||||
{
|
||||
FluidTank tank = new FluidTank(Integer.MAX_VALUE);
|
||||
boolean autoEmpty = false;
|
|
@ -43,12 +43,16 @@ public abstract class RenderItemOverlayTile extends TileEntitySpecialRenderer
|
|||
* Render the Crafting Matrix
|
||||
*/
|
||||
EntityPlayer player = Minecraft.getMinecraft().thePlayer;
|
||||
MovingObjectPosition objectPosition = player.rayTrace(8, 1);
|
||||
boolean isLooking = false;
|
||||
|
||||
if (objectPosition != null)
|
||||
if (player.isSneaking())
|
||||
{
|
||||
isLooking = objectPosition.blockX == tileEntity.xCoord && objectPosition.blockY == tileEntity.yCoord && objectPosition.blockZ == tileEntity.zCoord;
|
||||
MovingObjectPosition objectPosition = player.rayTrace(8, 1);
|
||||
|
||||
if (objectPosition != null)
|
||||
{
|
||||
isLooking = objectPosition.blockX == tileEntity.xCoord && objectPosition.blockY == tileEntity.yCoord && objectPosition.blockZ == tileEntity.zCoord;
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < (matrixX * matrixZ); i++)
|
||||
|
@ -135,18 +139,19 @@ public abstract class RenderItemOverlayTile extends TileEntitySpecialRenderer
|
|||
}
|
||||
|
||||
float scale = 0.03125F;
|
||||
GL11.glScalef(0.6f * scale, 0.6f * scale, 0);
|
||||
GL11.glScalef(0.6f * scale, 0.6f * scale, -0.00001f);
|
||||
GL11.glRotatef(180, 0, 0, 1);
|
||||
|
||||
TextureManager renderEngine = Minecraft.getMinecraft().renderEngine;
|
||||
|
||||
GL11.glDisable(2896);
|
||||
|
||||
if (!ForgeHooksClient.renderInventoryItem(this.renderBlocks, renderEngine, itemStack, true, 0.0F, 0.0F, 0.0F))
|
||||
{
|
||||
renderItem.renderItemIntoGUI(this.getFontRenderer(), renderEngine, itemStack, 0, 0);
|
||||
}
|
||||
GL11.glEnable(2896);
|
||||
|
||||
GL11.glEnable(2896);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue