Merge pull request #684 from TarzanBuzzyMan/patch-3

Update oil to use 1.5 texturing
This commit is contained in:
Flow86 2013-03-28 02:00:55 -07:00
commit f355eec9a4
6 changed files with 67 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 4 KiB

View file

@ -0,0 +1,32 @@
0*2
1*2
2*2
3*2
4*2
5*2
6*2
7*2
8*2
9*2
10*2
11*2
12*2
13*2
14*2
15*2
16*2
17*2
18*2
19*2
20*2
21*2
22*2
23*2
24*2
25*2
26*2
27*2
28*2
29*2
30*2
31*2

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

View file

@ -11,9 +11,14 @@ package buildcraft.energy;
import java.util.Random; import java.util.Random;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.BlockFluid; import net.minecraft.block.BlockFluid;
import net.minecraft.block.material.Material; import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.util.Icon;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.liquids.ILiquid; import net.minecraftforge.liquids.ILiquid;
import buildcraft.BuildCraftCore; import buildcraft.BuildCraftCore;
@ -25,6 +30,9 @@ public class BlockOilFlowing extends BlockFluid implements ILiquid {
boolean isOptimalFlowDirection[] = new boolean[4]; boolean isOptimalFlowDirection[] = new boolean[4];
int flowCost[] = new int[4]; int flowCost[] = new int[4];
@SideOnly(Side.CLIENT)
private Icon[] field_94425_a;
public BlockOilFlowing(int i, Material material) { public BlockOilFlowing(int i, Material material) {
super(i, material); super(i, material);
@ -258,4 +266,16 @@ public class BlockOilFlowing extends BlockFluid implements ILiquid {
return true; return true;
} }
@Override
@SideOnly(Side.CLIENT)
public void registerIcons(IconRegister iconRegister){
this.field_94425_a = new Icon[] {iconRegister.registerIcon("buildcraft:oil"), iconRegister.registerIcon("buildcraft:oil_flow")};
}
@Override
@SideOnly(Side.CLIENT)
public Icon getBlockTextureFromSideAndMetadata(int par1, int par2) {
return par1 != 0 && par1 != 1 ? this.field_94425_a[1] : this.field_94425_a[0];
}
} }

View file

@ -18,6 +18,9 @@ import buildcraft.BuildCraftEnergy;
public class BlockOilStill extends BlockStationary implements ILiquid { public class BlockOilStill extends BlockStationary implements ILiquid {
@SideOnly(Side.CLIENT)
private Icon[] field_94425_a;
public BlockOilStill(int i, Material material) { public BlockOilStill(int i, Material material) {
super(i, material); super(i, material);
@ -50,4 +53,16 @@ public class BlockOilStill extends BlockStationary implements ILiquid {
return true; return true;
} }
@Override
@SideOnly(Side.CLIENT)
public void registerIcons(IconRegister iconRegister){
this.field_94425_a = new Icon[] {iconRegister.registerIcon("buildcraft:oil"), iconRegister.registerIcon("buildcraft:oil_flow")};
}
@Override
@SideOnly(Side.CLIENT)
public Icon getBlockTextureFromSideAndMetadata(int par1, int par2) {
return par1 != 0 && par1 != 1 ? this.field_94425_a[1] : this.field_94425_a[0];
}
} }