-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TConstruct Ore Structural Change. version 1.10
- Loading branch information
Showing
177 changed files
with
252 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
package ExAstris.Block; | ||
|
||
import java.util.List; | ||
|
||
import ExAstris.Data.ModData; | ||
import net.minecraft.block.BlockSand; | ||
import net.minecraft.client.renderer.texture.IIconRegister; | ||
import net.minecraft.creativetab.CreativeTabs; | ||
import net.minecraft.item.Item; | ||
import net.minecraft.item.ItemStack; | ||
import net.minecraft.util.IIcon; | ||
import cpw.mods.fml.relauncher.Side; | ||
import cpw.mods.fml.relauncher.SideOnly; | ||
|
||
public class BlockOre extends BlockSand{ | ||
|
||
@SideOnly(Side.CLIENT) | ||
private IIcon[] icon; | ||
public String Name; | ||
public BlockOre(String name) { | ||
super(); | ||
setHardness(0.4F); | ||
setStepSound(soundTypeSand); | ||
setCreativeTab(CreativeTabs.tabBlock); | ||
Name = name; | ||
} | ||
|
||
@Override | ||
public void registerBlockIcons(IIconRegister register) | ||
{ | ||
icon = new IIcon[3]; | ||
|
||
for (int i = 0; i < icon.length; i++) | ||
{ | ||
icon[i] = register.registerIcon(ModData.ID+":" + ModData.oreType[i] + "/Block" + Name + ModData.oreType[i]); | ||
} | ||
} | ||
|
||
@Override | ||
@SideOnly(Side.CLIENT) | ||
public IIcon getIcon(int side, int meta) | ||
{ | ||
return icon[meta]; | ||
} | ||
|
||
@Override | ||
@SuppressWarnings({ "rawtypes", "unchecked" }) | ||
@SideOnly(Side.CLIENT) | ||
public void getSubBlocks(Item item, CreativeTabs tabs, List subItems) | ||
{ | ||
for (int i = 0; i < 3; i++) { | ||
subItems.add(new ItemStack(item, 1, i)); | ||
} | ||
} | ||
|
||
@Override | ||
public int damageDropped (int meta) | ||
{ | ||
return meta; | ||
} | ||
|
||
|
||
@Override | ||
public String getUnlocalizedName() | ||
{ | ||
return Name; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package ExAstris.Block.ItemBlock; | ||
|
||
import ExAstris.Data.ModData; | ||
import net.minecraft.block.Block; | ||
import net.minecraft.item.ItemBlock; | ||
import net.minecraft.item.ItemStack; | ||
|
||
public class ItemBlockOre extends ItemBlock | ||
{ | ||
|
||
public ItemBlockOre(Block block) | ||
{ | ||
super(block); | ||
setHasSubtypes(true); | ||
} | ||
|
||
@Override | ||
public String getUnlocalizedName(ItemStack item) | ||
{ | ||
return ModData.ID+".block." + this.getUnlocalizedName() + ModData.oreType[item.getItemDamage()]; | ||
} | ||
|
||
@Override | ||
public int getMetadata (int meta) | ||
{ | ||
return meta; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.