aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/java/com/github/technus/tectech/entity/fx/BlockHint.java10
-rw-r--r--src/main/java/com/github/technus/tectech/thing/item/ConstructibleTriggerItem.java28
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_collider.java16
3 files changed, 32 insertions, 22 deletions
diff --git a/src/main/java/com/github/technus/tectech/entity/fx/BlockHint.java b/src/main/java/com/github/technus/tectech/entity/fx/BlockHint.java
index 779430345b..3756284e48 100644
--- a/src/main/java/com/github/technus/tectech/entity/fx/BlockHint.java
+++ b/src/main/java/com/github/technus/tectech/entity/fx/BlockHint.java
@@ -23,22 +23,17 @@ public class BlockHint extends EntityFX {
noClip = true;
particleMaxAge = 200 + TecTech.Rnd.nextInt(200);
for (int i = 0; i < 6; i++) icons[i] = block.getIcon(i, meta);
- setParticleIcon(icons[TecTech.Rnd.nextInt(6)]);
}
@Override
public void renderParticle(Tessellator tes, float subTickTime, float p_70539_3_, float p_70539_4_, float p_70539_5_, float p_70539_6_, float p_70539_7_) {
-
float size = .5f;
-
-
float X = (float) (this.prevPosX + (this.posX - this.prevPosX) * (double) subTickTime - interpPosX);
float Y = (float) (this.prevPosY + (this.posY - this.prevPosY) * (double) subTickTime - interpPosY) - size / 2;
float Z = (float) (this.prevPosZ + (this.posZ - this.prevPosZ) * (double) subTickTime - interpPosZ);
GL11.glDisable(GL11.GL_CULL_FACE);
- GL11.glEnable(GL11.GL_BLEND);
GL11.glDepthMask(false);
- tes.setColorRGBA_F(.8F, .9F, 1F, .5F);
+ tes.setColorRGBA_F(.8F, .9F, 1F, .75f);
//var8, var9 - X U
//var 10, var 11 - Y V
@@ -48,7 +43,6 @@ public class BlockHint extends EntityFX {
double U=icons[i].getMaxU();
double v=icons[i].getMinV();
double V=icons[i].getMaxV();
-
switch (i){//{DOWN, UP, NORTH, SOUTH, WEST, EAST}
case 0:
tes.addVertexWithUV(X, Y, Z + size, u, V);
@@ -88,9 +82,7 @@ public class BlockHint extends EntityFX {
break;
}
}
-
GL11.glEnable(GL11.GL_CULL_FACE);
- GL11.glDisable(GL11.GL_BLEND);
GL11.glDepthMask(true);
}
diff --git a/src/main/java/com/github/technus/tectech/thing/item/ConstructibleTriggerItem.java b/src/main/java/com/github/technus/tectech/thing/item/ConstructibleTriggerItem.java
index 638a419e19..edc6f6017b 100644
--- a/src/main/java/com/github/technus/tectech/thing/item/ConstructibleTriggerItem.java
+++ b/src/main/java/com/github/technus/tectech/thing/item/ConstructibleTriggerItem.java
@@ -33,21 +33,31 @@ public class ConstructibleTriggerItem extends Item {
@Override
public boolean onItemUseFirst(ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) {
TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ);
+ if(tTileEntity==null) return aPlayer instanceof EntityPlayerMP;
if (aPlayer instanceof EntityPlayerMP) {
- if (aPlayer.isSneaking() && aPlayer.capabilities.isCreativeMode && tTileEntity != null && tTileEntity instanceof IGregTechTileEntity) {
- IMetaTileEntity metaTE = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity();
- if (metaTE != null && metaTE instanceof iConstructible) {
- ((iConstructible) metaTE).construct(aStack.stackSize, false);
+ if (aPlayer.isSneaking() && aPlayer.capabilities.isCreativeMode) {
+ if(tTileEntity instanceof IGregTechTileEntity) {
+ IMetaTileEntity metaTE = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity();
+ if (metaTE != null && metaTE instanceof iConstructible) {
+ ((iConstructible) metaTE).construct(aStack.stackSize, false);
+ return true;
+ }
+ }else if(tTileEntity instanceof iConstructible){
+ ((iConstructible) tTileEntity).construct(aStack.stackSize, false);
return true;
}
}
}
if(aWorld.isRemote){
- if ((!aPlayer.isSneaking() || !aPlayer.capabilities.isCreativeMode) && tTileEntity != null && tTileEntity instanceof IGregTechTileEntity) {
- IMetaTileEntity metaTE = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity();
- if (metaTE != null && metaTE instanceof iConstructible) {
- ((iConstructible) metaTE).construct(aStack.stackSize, true);
- return true;
+ if ((!aPlayer.isSneaking() || !aPlayer.capabilities.isCreativeMode)) {
+ if(tTileEntity instanceof IGregTechTileEntity) {
+ IMetaTileEntity metaTE = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity();
+ if (metaTE != null && metaTE instanceof iConstructible) {
+ ((iConstructible) metaTE).construct(aStack.stackSize, true);
+ return true;
+ }
+ } else if(tTileEntity instanceof iConstructible){
+ ((iConstructible) tTileEntity).construct(aStack.stackSize,true);
}
}
}
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_collider.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_collider.java
index e2cecba047..a6c6ff4183 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_collider.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_collider.java
@@ -1,6 +1,7 @@
package com.github.technus.tectech.thing.metaTileEntity.multi;
import com.github.technus.tectech.CommonValues;
+import com.github.technus.tectech.TecTech;
import com.github.technus.tectech.thing.block.QuantumGlassBlock;
import com.github.technus.tectech.thing.casing.TT_Container_Casings;
import com.github.technus.tectech.thing.metaTileEntity.iConstructible;
@@ -14,7 +15,6 @@ import gregtech.api.objects.GT_RenderedTexture;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.EnumChatFormatting;
@@ -159,12 +159,20 @@ public class GT_MetaTileEntity_EM_collider extends GT_MetaTileEntity_MultiblockB
IGregTechTileEntity iGregTechTileEntity=getBaseMetaTileEntity();
int xDir = ForgeDirection.getOrientation(iGregTechTileEntity.getBackFacing()).offsetX*4;
int zDir = ForgeDirection.getOrientation(iGregTechTileEntity.getBackFacing()).offsetZ*4;
- if(iGregTechTileEntity.getBlockOffset(xDir,0,zDir).getMaterial() == Material.air)
- iGregTechTileEntity.getWorld().setBlock(
+ if(hintsOnly){
+ TecTech.proxy.hint_particle(iGregTechTileEntity.getWorld(),
iGregTechTileEntity.getXCoord()+xDir,
iGregTechTileEntity.getYCoord(),
iGregTechTileEntity.getZCoord()+zDir,
- Blocks.lapis_block);
+ TT_Container_Casings.sHintCasingsTT,12);
+ } else{
+ if(iGregTechTileEntity.getBlockOffset(xDir,0,zDir).getMaterial() == Material.air)
+ iGregTechTileEntity.getWorld().setBlock(
+ iGregTechTileEntity.getXCoord()+xDir,
+ iGregTechTileEntity.getYCoord(),
+ iGregTechTileEntity.getZCoord()+zDir,
+ TT_Container_Casings.sHintCasingsTT,12,2);
+ }
if ((qty & 1) == 1)
StructureBuilder(shape, blockType, blockMeta1, 11, 1, 18, iGregTechTileEntity,hintsOnly);
else