On hide item change retexturize pipes.

This commit is contained in:
Technus 2016-11-28 14:39:34 +01:00
parent 025e338c55
commit 1e3c2a81a4
4 changed files with 13 additions and 7 deletions

View file

@ -277,7 +277,7 @@ public class GT_MetaPipeEntity_Cable extends MetaPipeEntity implements IMetaTile
}
}
}
}
}else if(GT_Client.changeDetected==4 && aBaseMetaTileEntity.isClientSide()) aBaseMetaTileEntity.issueTextureUpdate();
}
@Override
@ -301,7 +301,7 @@ public class GT_MetaPipeEntity_Cable extends MetaPipeEntity implements IMetaTile
@Override
public float getThickNess() {
if(GT_Client.hideValue==1) return 0.125F;
if(GT_Client.hideValue==1) return 0.0625F;
return mThickNess;
}

View file

@ -266,7 +266,7 @@ public class GT_MetaPipeEntity_Fluid extends MetaPipeEntity {
}
oLastReceivedFrom = mLastReceivedFrom;
}
}else if(GT_Client.changeDetected==4 && aBaseMetaTileEntity.isClientSide()) aBaseMetaTileEntity.issueTextureUpdate();
}
@Override
@ -383,7 +383,7 @@ public class GT_MetaPipeEntity_Fluid extends MetaPipeEntity {
@Override
public float getThickNess() {
if(GT_Client.hideValue==1) return 0.125F;
if(GT_Client.hideValue==1) return 0.0625F;
return mThickNess;
}
}

View file

@ -225,7 +225,7 @@ public class GT_MetaPipeEntity_Item extends MetaPipeEntity implements IMetaTileE
if (isInventoryEmpty()) mLastReceivedFrom = 6;
oLastReceivedFrom = mLastReceivedFrom;
}
}else if(GT_Client.changeDetected==4 && aBaseMetaTileEntity.isClientSide()) aBaseMetaTileEntity.issueTextureUpdate();
}
@Override
@ -314,7 +314,7 @@ public class GT_MetaPipeEntity_Item extends MetaPipeEntity implements IMetaTileE
@Override
public float getThickNess() {
if(GT_Client.hideValue==1) return 0.125F;
if(GT_Client.hideValue==1) return 0.0625F;
return mThickNess;
}
}

View file

@ -371,7 +371,12 @@ public class GT_Client extends GT_Proxy
@SubscribeEvent
public void onClientTickEvent(cpw.mods.fml.common.gameevent.TickEvent.ClientTickEvent aEvent) {
if (aEvent.phase == cpw.mods.fml.common.gameevent.TickEvent.Phase.END) {
hideValue=shouldHeldItemHideThings();
if(changeDetected>0)changeDetected--;
int newHideValue=shouldHeldItemHideThings();
if(newHideValue!=hideValue){
hideValue=newHideValue;
changeDetected=5;
}
mAnimationTick++;
if (mAnimationTick % 50L == 0L)
{mAnimationDirection = !mAnimationDirection;}
@ -540,6 +545,7 @@ public class GT_Client extends GT_Proxy
}
public static int hideValue=0;
public static int changeDetected=0;
private static int shouldHeldItemHideThings() {
try {