Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
reobf committed Mar 28, 2024
1 parent 1ded322 commit 47f63e1
Show file tree
Hide file tree
Showing 22 changed files with 444 additions and 71 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ catch (Exception ignored) {

// Pulls version first from the VERSION env and then git tag
String identifiedVersion = null
String versionOverride = '0.0.5'
String versionOverride = '0.0.6'
try {
// Produce a version based on the tag, or for branches something like 0.2.2-configurable-maven-and-extras.38+43090270b6-dirty
if (versionOverride == null) {
Expand Down
24 changes: 21 additions & 3 deletions src/main/java/reobf/proghatches/eucrafting/BlockEUInterface.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
Expand All @@ -50,7 +51,12 @@ public class BlockEUInterface extends AEBaseTileBlock{



@Override
private IIcon back;
private IIcon arr;



@Override
protected boolean hasCustomRotation() {
return true;
}
Expand All @@ -61,6 +67,18 @@ protected void customRotateBlock(final IOrientable rotatable, final ForgeDirecti
((TileInterface) rotatable).setSide(axis);
}
}
@Override@SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister i) {
super.registerBlockIcons(i);
this.blockIcon = i.registerIcon("proghatches:eu_interface");
this.back = i.registerIcon("proghatches:eu_interface_a");
this.arr = i.registerIcon("proghatches:eu_interface_arrow");

}@Override
public String getTextureName() {

return "proghatches:eu_interface";
}

@Override
@SideOnly(Side.CLIENT)
Expand All @@ -78,9 +96,9 @@ public boolean renderInWorld(final BlockEUInterface block, final IBlockAccess wo
final BlockRenderInfo info = block.getRendererInstance();

if (ti != null && ti.getForward() != ForgeDirection.UNKNOWN) {
final IIcon side = FCPartsTexture.BlockFluidInterfaceAlternate_Arrow.getIcon();
final IIcon side = arr;
info.setTemporaryRenderIcons(
FCPartsTexture.BlockInterfaceAlternate.getIcon(),
back,
block.getIcon(0, 0),
side,
side,
Expand Down
1 change: 1 addition & 0 deletions src/main/java/reobf/proghatches/eucrafting/IEUSource.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ public EUSource(final IGrid g) {


public long inject(ISource s,long amp,long v){
if(amp==0){return 0;}
//long v=s.getVoltage(); //use actual voltage
long[] a=new long[]{amp};
cache.get(s.getVoltage()).stream().map(d->{
Expand Down
29 changes: 29 additions & 0 deletions src/main/java/reobf/proghatches/eucrafting/ItemEUToken.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,20 @@

import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
import reobf.proghatches.util.ProghatchesUtil;

public class ItemEUToken extends Item{
private IIcon bound;





@SuppressWarnings({ "rawtypes", "unchecked" })
@SideOnly(Side.CLIENT)
@Override
Expand All @@ -30,6 +38,27 @@ public void addInformation(ItemStack p_77624_1_, EntityPlayer p_77624_2_, List p
});

}

@SideOnly(Side.CLIENT)
@Override
public IIcon getIconFromDamage( int d) {
if(d==1){


return bound;}
return itemIcon;
}@SideOnly(Side.CLIENT)
@Override
public void registerIcons(IIconRegister register) {

this.itemIcon=register.registerIcon("proghatches:eu");
this.bound=register.registerIcon("proghatches:eu_bound");
}





@Override
public String getUnlocalizedName(ItemStack stack) {
if(stack.getItemDamage()==1){
Expand Down
18 changes: 9 additions & 9 deletions src/main/java/reobf/proghatches/eucrafting/PartEUSource.java
Original file line number Diff line number Diff line change
Expand Up @@ -120,14 +120,14 @@ public void renderInventory(final IPartRenderHelper rh, final RenderBlocks rende
sideTexture);
rh.renderInventoryBox(renderer);

rh.setInvColor(this.getColor().whiteVariant);
rh.renderInventoryFace(this.getFrontBright(), ForgeDirection.SOUTH, renderer);
// rh.setInvColor(this.getColor().whiteVariant);
// rh.renderInventoryFace(this.getFrontBright(), ForgeDirection.SOUTH, renderer);

rh.setInvColor(this.getColor().mediumVariant);
rh.renderInventoryFace(this.getFrontBright(), ForgeDirection.SOUTH, renderer);

rh.setInvColor(this.getColor().blackVariant);
rh.renderInventoryFace(this.getFrontColored(), ForgeDirection.SOUTH, renderer);
// rh.setInvColor(this.getColor().blackVariant);
// rh.renderInventoryFace(this.getFrontColored(), ForgeDirection.SOUTH, renderer);

rh.setBounds(4, 4, 13, 12, 12, 14);
rh.renderInventoryBox(renderer);
Expand Down Expand Up @@ -170,14 +170,14 @@ public void renderStatic(final int x, final int y, final int z, final IPartRende
renderer.uvRotateBottom = renderer.uvRotateEast = renderer.uvRotateNorth = renderer.uvRotateSouth = renderer.uvRotateTop = renderer.uvRotateWest = this
.getSpin();

Tessellator.instance.setColorOpaque_I(this.getColor().whiteVariant);
rh.renderFace(x, y, z, this.getFrontBright(), ForgeDirection.SOUTH, renderer);
// Tessellator.instance.setColorOpaque_I(this.getColor().whiteVariant);
// rh.renderFace(x, y, z, this.getFrontBright(), ForgeDirection.SOUTH, renderer);

Tessellator.instance.setColorOpaque_I(this.getColor().mediumVariant);
rh.renderFace(x, y, z, this.getFrontBright(), ForgeDirection.SOUTH, renderer);

Tessellator.instance.setColorOpaque_I(this.getColor().blackVariant);
rh.renderFace(x, y, z, this.getFrontColored(), ForgeDirection.SOUTH, renderer);
// Tessellator.instance.setColorOpaque_I(this.getColor().blackVariant);
// rh.renderFace(x, y, z, this.getFrontColored(), ForgeDirection.SOUTH, renderer);

renderer.uvRotateBottom = renderer.uvRotateEast = renderer.uvRotateNorth = renderer.uvRotateSouth = renderer.uvRotateTop = renderer.uvRotateWest = 0;

Expand Down Expand Up @@ -236,7 +236,7 @@ private int getSpin() {

public static void registerIcons(IIconRegister _iconRegister) {

a=_iconRegister.registerIcon("sss");
a=_iconRegister.registerIcon("proghatches:eu_interface");
}


Expand Down
Loading

0 comments on commit 47f63e1

Please sign in to comment.