Merge branch 'rv1' of https://bitbucket.org/AlgorithmX2/appliedenergistics2 into rv2
This commit is contained in:
@@ -4,9 +4,11 @@ import java.io.IOException;
|
||||
import java.text.DecimalFormat;
|
||||
import java.text.ParseException;
|
||||
import java.util.Collection;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
@@ -67,7 +69,8 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
static public boolean switchingGuis;
|
||||
private boolean subGui;
|
||||
|
||||
public AEBaseGui(Container container) {
|
||||
public AEBaseGui(Container container)
|
||||
{
|
||||
super( container );
|
||||
subGui = switchingGuis;
|
||||
switchingGuis = false;
|
||||
@@ -158,6 +161,8 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
@Override
|
||||
protected void mouseClicked(int xCoord, int yCoord, int btn)
|
||||
{
|
||||
drag_click.clear();
|
||||
|
||||
if ( btn == 1 )
|
||||
{
|
||||
for (Object o : this.buttonList)
|
||||
@@ -170,6 +175,7 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
super.mouseClicked( xCoord, yCoord, btn );
|
||||
}
|
||||
|
||||
@@ -178,6 +184,9 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
ItemStack dbl_whichItem;
|
||||
Slot bl_clicked;
|
||||
|
||||
// dragy
|
||||
Set<Slot> drag_click = new HashSet();
|
||||
|
||||
@Override
|
||||
protected void handleMouseClick(Slot slot, int slotIdx, int ctrlDown, int key)
|
||||
{
|
||||
@@ -188,6 +197,9 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
InventoryAction action = null;
|
||||
action = ctrlDown == 1 ? InventoryAction.SPLIT_OR_PLACESINGLE : InventoryAction.PICKUP_OR_SETDOWN;
|
||||
|
||||
if ( drag_click.size() > 1 )
|
||||
return;
|
||||
|
||||
if ( action != null )
|
||||
{
|
||||
try
|
||||
@@ -417,14 +429,22 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
|
||||
if ( slot instanceof SlotFake && itemstack != null )
|
||||
{
|
||||
try
|
||||
drag_click.add( slot );
|
||||
if ( drag_click.size() > 1 )
|
||||
{
|
||||
PacketInventoryAction p = new PacketInventoryAction( InventoryAction.PICKUP_OR_SETDOWN, slot.slotNumber, 0 );
|
||||
NetworkHandler.instance.sendToServer( p );
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
AELog.error( e );
|
||||
try
|
||||
{
|
||||
for (Slot dr : drag_click)
|
||||
{
|
||||
PacketInventoryAction p = new PacketInventoryAction( c == 0 ? InventoryAction.PICKUP_OR_SETDOWN : InventoryAction.PLACE_SINGLE,
|
||||
dr.slotNumber, 0 );
|
||||
NetworkHandler.instance.sendToServer( p );
|
||||
}
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
AELog.error( e );
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -41,10 +41,58 @@ public class SpatialSkyRender extends IRenderHandler
|
||||
fade /= 1000;
|
||||
fade = 0.15f * (1.0f - Math.abs( (fade - 1.0f) * (fade - 1.0f) ));
|
||||
|
||||
if ( fade > 0.0f )
|
||||
{
|
||||
GL11.glPushAttrib( GL11.GL_ALL_ATTRIB_BITS );
|
||||
GL11.glPushAttrib( GL11.GL_ALL_ATTRIB_BITS );
|
||||
|
||||
GL11.glDisable(GL11.GL_FOG);
|
||||
GL11.glDisable(GL11.GL_ALPHA_TEST);
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
GL11.glDepthMask(false);
|
||||
GL11.glColor4f( 0.0f, 0.0f, 0.0f, 1.0f );
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
|
||||
for (int i = 0; i < 6; ++i)
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
|
||||
if (i == 1)
|
||||
{
|
||||
GL11.glRotatef(90.0F, 1.0F, 0.0F, 0.0F);
|
||||
}
|
||||
|
||||
if (i == 2)
|
||||
{
|
||||
GL11.glRotatef(-90.0F, 1.0F, 0.0F, 0.0F);
|
||||
}
|
||||
|
||||
if (i == 3)
|
||||
{
|
||||
GL11.glRotatef(180.0F, 1.0F, 0.0F, 0.0F);
|
||||
}
|
||||
|
||||
if (i == 4)
|
||||
{
|
||||
GL11.glRotatef(90.0F, 0.0F, 0.0F, 1.0F);
|
||||
}
|
||||
|
||||
if (i == 5)
|
||||
{
|
||||
GL11.glRotatef(-90.0F, 0.0F, 0.0F, 1.0F);
|
||||
}
|
||||
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setColorOpaque_I(0);
|
||||
tessellator.addVertexWithUV(-100.0D, -100.0D, -100.0D, 0.0D, 0.0D);
|
||||
tessellator.addVertexWithUV(-100.0D, -100.0D, 100.0D, 0.0D, 16.0D);
|
||||
tessellator.addVertexWithUV(100.0D, -100.0D, 100.0D, 16.0D, 16.0D);
|
||||
tessellator.addVertexWithUV(100.0D, -100.0D, -100.0D, 16.0D, 0.0D);
|
||||
tessellator.draw();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
GL11.glDepthMask(true);
|
||||
|
||||
if ( fade > 0.0f )
|
||||
{
|
||||
GL11.glDisable( GL11.GL_FOG );
|
||||
GL11.glDisable( GL11.GL_ALPHA_TEST );
|
||||
GL11.glEnable( GL11.GL_BLEND );
|
||||
@@ -52,7 +100,6 @@ public class SpatialSkyRender extends IRenderHandler
|
||||
GL11.glEnable( GL11.GL_FOG );
|
||||
GL11.glDisable( GL11.GL_FOG );
|
||||
GL11.glDisable( GL11.GL_ALPHA_TEST );
|
||||
GL11.glEnable( GL11.GL_BLEND );
|
||||
GL11.glDisable( GL11.GL_TEXTURE_2D );
|
||||
OpenGlHelper.glBlendFunc( 770, 771, 1, 0 );
|
||||
RenderHelper.disableStandardItemLighting();
|
||||
@@ -60,9 +107,11 @@ public class SpatialSkyRender extends IRenderHandler
|
||||
|
||||
GL11.glColor4f( fade, fade, fade, 1.0f );
|
||||
GL11.glCallList( dspList );
|
||||
GL11.glPopAttrib();
|
||||
}
|
||||
|
||||
GL11.glPopAttrib();
|
||||
|
||||
GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
|
||||
}
|
||||
|
||||
private void renderTwinkles()
|
||||
|
||||
Reference in New Issue
Block a user