-
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.
tinkers' ores fix, add scstone(rotarycraft)
- Loading branch information
Showing
27 changed files
with
817 additions
and
23 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,58 @@ | ||
package ExAstris.Block; | ||
|
||
import ExAstris.Data.BlockData; | ||
import ExAstris.Data.ModData; | ||
import cpw.mods.fml.relauncher.Side; | ||
import cpw.mods.fml.relauncher.SideOnly; | ||
import net.minecraft.block.Block; | ||
import net.minecraft.block.material.Material; | ||
import net.minecraft.client.renderer.texture.IIconRegister; | ||
import net.minecraft.creativetab.CreativeTabs; | ||
import net.minecraft.util.IIcon; | ||
|
||
public class BlockRotaryApiary extends Block { | ||
public static IIcon topIcon; | ||
public static IIcon bottomIcon; | ||
public static IIcon sideIcon1; | ||
public static IIcon sideIcon2; | ||
|
||
public BlockRotaryApiary() { | ||
|
||
super(Material.iron); | ||
setHardness(0.8f); | ||
setStepSound(soundTypeStone); | ||
setCreativeTab(CreativeTabs.tabBlock); | ||
} | ||
|
||
@Override | ||
public String getUnlocalizedName() | ||
{ | ||
return ModData.ID + "." + BlockData.ROTARY_APIARY_UNLOCALIZED_NAME; | ||
} | ||
|
||
@Override | ||
public void registerBlockIcons(IIconRegister register) | ||
{ | ||
topIcon = register.registerIcon(ModData.TEXTURE_LOCATION + ":RotaryApiary1"); | ||
bottomIcon = register.registerIcon(ModData.TEXTURE_LOCATION + ":RotaryApiary0"); | ||
sideIcon1 = register.registerIcon(ModData.TEXTURE_LOCATION + ":RotaryApiary2"); | ||
sideIcon2 = register.registerIcon(ModData.TEXTURE_LOCATION + ":RotaryApiary3"); | ||
blockIcon = sideIcon1; | ||
} | ||
|
||
@Override | ||
@SideOnly(Side.CLIENT) | ||
public IIcon getIcon(int side, int meta) | ||
{ | ||
switch(side) | ||
{ | ||
case 0: | ||
return bottomIcon; | ||
case 1: | ||
return topIcon; | ||
case 2: | ||
return sideIcon1; | ||
} | ||
return sideIcon2; | ||
} | ||
} |
77 changes: 77 additions & 0 deletions
77
src/main/java/ExAstris/Block/BlockStronglyCompressedStone.java
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,77 @@ | ||
package ExAstris.Block; | ||
|
||
import java.util.List; | ||
|
||
import cpw.mods.fml.common.registry.GameRegistry; | ||
import cpw.mods.fml.relauncher.Side; | ||
import cpw.mods.fml.relauncher.SideOnly; | ||
import ExAstris.Block.TileEntity.TileEntityStronglyCompressedStone; | ||
import ExAstris.Data.BlockData; | ||
import ExAstris.Data.ModData; | ||
import net.minecraft.block.BlockContainer; | ||
import net.minecraft.block.material.Material; | ||
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.tileentity.TileEntity; | ||
import net.minecraft.util.IIcon; | ||
import net.minecraft.world.World; | ||
|
||
public class BlockStronglyCompressedStone extends BlockContainer { | ||
private IIcon[] icon; | ||
public BlockStronglyCompressedStone() { | ||
super(Material.iron); | ||
setHardness(50.0f); | ||
setHarvestLevel("pickaxe", 3); | ||
setResistance(6000.0f); | ||
setCreativeTab(CreativeTabs.tabBlock); | ||
|
||
GameRegistry.registerTileEntity(TileEntityStronglyCompressedStone.class, this.getUnlocalizedName()); | ||
} | ||
|
||
@Override | ||
public void registerBlockIcons(IIconRegister register) | ||
{ | ||
icon = new IIcon[4]; | ||
|
||
for (int i = 0; i < icon.length; i++) | ||
{ | ||
icon[i] = register.registerIcon(ModData.ID+":scstone" + 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 < 4; i++) { | ||
subItems.add(new ItemStack(item, 1, i)); | ||
} | ||
} | ||
|
||
@Override | ||
public int damageDropped (int meta) | ||
{ | ||
return meta; | ||
} | ||
|
||
@Override | ||
public String getUnlocalizedName() | ||
{ | ||
return ModData.ID + "." + BlockData.STRONGLY_COMPRESSED_STONE_UNLOCALIZED_NAME; | ||
} | ||
|
||
@Override | ||
public TileEntity createNewTileEntity(World p_149915_1_, int meta) { | ||
return new TileEntityStronglyCompressedStone(meta); | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
src/main/java/ExAstris/Block/ItemBlock/ItemBlockRotaryApiary.java
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,25 @@ | ||
package ExAstris.Block.ItemBlock; | ||
|
||
import net.minecraft.block.Block; | ||
import net.minecraft.item.ItemBlock; | ||
import net.minecraft.item.ItemStack; | ||
import ExAstris.Data.BlockData; | ||
import ExAstris.Data.ModData; | ||
|
||
public class ItemBlockRotaryApiary extends ItemBlock { | ||
public ItemBlockRotaryApiary(Block block) { | ||
super(block); | ||
setHasSubtypes(true); | ||
} | ||
|
||
public String getUnlocalizedName(ItemStack itemstack) | ||
{ | ||
return ModData.ID + "." + BlockData.ROTARY_APIARY_UNLOCALIZED_NAME; | ||
} | ||
|
||
@Override | ||
public int getMetadata(int meta) | ||
{ | ||
return meta; | ||
} | ||
} |
27 changes: 27 additions & 0 deletions
27
src/main/java/ExAstris/Block/ItemBlock/ItemBlockStronglyCompressedStone.java
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,27 @@ | ||
package ExAstris.Block.ItemBlock; | ||
|
||
import ExAstris.Data.BlockData; | ||
import ExAstris.Data.ModData; | ||
import net.minecraft.block.Block; | ||
import net.minecraft.item.ItemBlock; | ||
import net.minecraft.item.ItemStack; | ||
|
||
public class ItemBlockStronglyCompressedStone extends ItemBlock{ | ||
public ItemBlockStronglyCompressedStone(Block block) | ||
{ | ||
super(block); | ||
setHasSubtypes(true); | ||
} | ||
|
||
@Override | ||
public String getUnlocalizedName(ItemStack item) | ||
{ | ||
return ModData.ID + "." + BlockData.STRONGLY_COMPRESSED_STONE_UNLOCALIZED_NAME + item.getItemDamage(); | ||
} | ||
|
||
@Override | ||
public int getMetadata (int meta) | ||
{ | ||
return meta; | ||
} | ||
} |
Oops, something went wrong.