initial commit
This commit is contained in:
parent
3c9ee26b06
commit
22186c33b9
1458 changed files with 282792 additions and 0 deletions
31
java/src/game/item/ItemPiston.java
Executable file
31
java/src/game/item/ItemPiston.java
Executable file
|
@ -0,0 +1,31 @@
|
|||
package game.item;
|
||||
|
||||
import game.block.Block;
|
||||
import game.init.Blocks;
|
||||
import game.renderer.blockmodel.ModelBlock;
|
||||
|
||||
public class ItemPiston extends ItemBlock
|
||||
{
|
||||
public ItemPiston(Block block)
|
||||
{
|
||||
super(block);
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts the given ItemStack damage value into a metadata value to be placed in the world when this Item is
|
||||
* placed as a Block (mostly used with ItemBlocks).
|
||||
*/
|
||||
public int getMetadata(int damage)
|
||||
{
|
||||
return 7;
|
||||
}
|
||||
|
||||
public boolean isMagnetic() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public ModelBlock getModel(String name, int meta) {
|
||||
return new ModelBlock(new ModelBlock("piston_side").add().nswe().d("piston_bottom").u("piston_top" + (this.block ==
|
||||
Blocks.sticky_piston ? "_sticky" : "")), this.getTransform());
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue