Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
part 2 of conversion to multiItemBlock
- Loading branch information
Showing
24 changed files
with
93 additions
and
335 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
minecraft_version=1.6.4 | ||
forge_version=9.11.1.964 | ||
mantle_version=a2891a | ||
mantle_version=2e4958 | ||
FMP_version=1.0.0.211 | ||
CCLIB_version=1.0.0.44 | ||
NEI_version=1.6.1.8 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,19 @@ | ||
package tconstruct.items.blocks; | ||
|
||
import mantle.blocks.abstracts.MultiItemBlock; | ||
import net.minecraft.item.ItemBlock; | ||
import net.minecraft.item.ItemStack; | ||
import net.minecraft.util.MathHelper; | ||
|
||
public class SearedSlabItem extends ItemBlock | ||
public class SearedSlabItem extends MultiItemBlock | ||
{ | ||
public static final String blockType[] = { "brick", "stone", "cobble", "paver", "road", "fancy", "square", "creeper" }; | ||
public static final String blockTypes[] = { "brick", "stone", "cobble", "paver", "road", "fancy", "square", "creeper" }; | ||
|
||
public SearedSlabItem(int id) | ||
{ | ||
super(id); | ||
super(id, "block.searedstone.slab", blockTypes); | ||
setMaxDamage(0); | ||
setHasSubtypes(true); | ||
} | ||
|
||
public int getMetadata (int meta) | ||
{ | ||
return meta; | ||
} | ||
|
||
public String getUnlocalizedName (ItemStack itemstack) | ||
{ | ||
int pos = MathHelper.clamp_int(itemstack.getItemDamage(), 0, blockType.length - 1); | ||
return (new StringBuilder()).append("block.searedstone.slab.").append(blockType[pos]).toString(); | ||
} | ||
} |
20 changes: 4 additions & 16 deletions
20
src/main/java/tconstruct/items/blocks/SearedTableItemBlock.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 |
---|---|---|
@@ -1,28 +1,16 @@ | ||
package tconstruct.items.blocks; | ||
|
||
import net.minecraft.item.ItemBlock; | ||
import net.minecraft.item.ItemStack; | ||
import net.minecraft.util.MathHelper; | ||
import mantle.blocks.abstracts.MultiItemBlock; | ||
|
||
public class SearedTableItemBlock extends ItemBlock | ||
public class SearedTableItemBlock extends MultiItemBlock | ||
{ | ||
public static final String blockType[] = { "Table", "Faucet", "Basin" }; | ||
public static final String blockTypes[] = { "Table", "Faucet", "Basin" }; | ||
|
||
public SearedTableItemBlock(int id) | ||
{ | ||
super(id); | ||
super(id, "SearedBlock", blockTypes); | ||
setMaxDamage(0); | ||
setHasSubtypes(true); | ||
} | ||
|
||
public int getMetadata (int meta) | ||
{ | ||
return meta; | ||
} | ||
|
||
public String getUnlocalizedName (ItemStack itemstack) | ||
{ | ||
int pos = MathHelper.clamp_int(itemstack.getItemDamage(), 0, blockType.length - 1); | ||
return (new StringBuilder()).append("SearedBlock.").append(blockType[pos]).toString(); | ||
} | ||
} |
25 changes: 4 additions & 21 deletions
25
src/main/java/tconstruct/items/blocks/SlimeGelItemBlock.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 |
---|---|---|
@@ -1,33 +1,16 @@ | ||
package tconstruct.items.blocks; | ||
|
||
import java.util.List; | ||
import mantle.blocks.abstracts.MultiItemBlock; | ||
|
||
import cpw.mods.fml.relauncher.Side; | ||
import cpw.mods.fml.relauncher.SideOnly; | ||
import net.minecraft.entity.player.EntityPlayer; | ||
import net.minecraft.item.ItemBlock; | ||
import net.minecraft.item.ItemStack; | ||
import net.minecraft.util.MathHelper; | ||
|
||
public class SlimeGelItemBlock extends ItemBlock | ||
public class SlimeGelItemBlock extends MultiItemBlock | ||
{ | ||
public static final String blockType[] = { "blue", "green", "purple", "magma", "yellow", "red", "metal" }; | ||
public static final String blockTypes[] = { "blue", "green", "purple", "magma", "yellow", "red", "metal" }; | ||
|
||
public SlimeGelItemBlock(int id) | ||
{ | ||
super(id); | ||
super(id, "block.slime.congealed", blockTypes); | ||
setMaxDamage(0); | ||
setHasSubtypes(true); | ||
} | ||
|
||
public int getMetadata (int meta) | ||
{ | ||
return meta; | ||
} | ||
|
||
public String getUnlocalizedName (ItemStack itemstack) | ||
{ | ||
int pos = MathHelper.clamp_int(itemstack.getItemDamage(), 0, blockType.length - 1); | ||
return (new StringBuilder()).append("block.slime.congealed.").append(blockType[pos]).toString(); | ||
} | ||
} |
Oops, something went wrong.