-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
966d628
commit 5ba39bd
Showing
12 changed files
with
399 additions
and
251 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
54 changes: 54 additions & 0 deletions
54
server/src/main/java/cn/nukkit/block/BlockDoubleSlabRedSandstone.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,54 @@ | ||
package cn.nukkit.block; | ||
|
||
import cn.nukkit.item.Item; | ||
import cn.nukkit.item.ItemTool; | ||
|
||
/** | ||
* Created by CreeperFace on 26. 11. 2016. | ||
*/ | ||
public class BlockDoubleSlabRedSandstone extends BlockSolid { | ||
|
||
public BlockDoubleSlabRedSandstone() { | ||
this(0); | ||
} | ||
|
||
public BlockDoubleSlabRedSandstone(int meta) { | ||
super(meta); | ||
} | ||
|
||
@Override | ||
public int getId() { | ||
return DOUBLE_SLAB; | ||
} | ||
|
||
@Override | ||
public double getResistance() { | ||
return 30; | ||
} | ||
|
||
@Override | ||
public double getHardness() { | ||
return 2; | ||
} | ||
|
||
@Override | ||
public int getToolType() { | ||
return ItemTool.TYPE_PICKAXE; | ||
} | ||
|
||
@Override | ||
public String getName() { | ||
return "Red Sandstone Double Slab"; | ||
} | ||
|
||
@Override | ||
public int[][] getDrops(Item item) { | ||
if (item.isPickaxe() && item.getTier() >= ItemTool.TIER_WOODEN) { | ||
return new int[][]{ | ||
{Item.RED_SANDSTONE_SLAB, this.meta & 0x07, 2} | ||
}; | ||
} else { | ||
return new int[0][0]; | ||
} | ||
} | ||
} |
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
46 changes: 46 additions & 0 deletions
46
server/src/main/java/cn/nukkit/block/BlockRedSandstone.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,46 @@ | ||
package cn.nukkit.block; | ||
|
||
import cn.nukkit.item.Item; | ||
import cn.nukkit.item.ItemTool; | ||
|
||
/** | ||
* Created by CreeperFace on 26. 11. 2016. | ||
*/ | ||
public class BlockRedSandstone extends BlockSandstone { | ||
|
||
public BlockRedSandstone() { | ||
this(0); | ||
} | ||
|
||
public BlockRedSandstone(int meta) { | ||
super(meta); | ||
} | ||
|
||
@Override | ||
public int getId() { | ||
return RED_SANDSTONE; | ||
} | ||
|
||
@Override | ||
public String getName() { | ||
String[] names = new String[]{ | ||
"Red Sandstone", | ||
"Chiseled Red Sandstone", | ||
"Smooth Red Sandstone", | ||
"" | ||
}; | ||
|
||
return names[this.meta & 0x03]; | ||
} | ||
|
||
@Override | ||
public int[][] getDrops(Item item) { | ||
if (item.isPickaxe() && item.getTier() >= ItemTool.TIER_WOODEN) { | ||
return new int[][]{ | ||
{Item.RED_SANDSTONE, this.meta & 0x03, 1} | ||
}; | ||
} else { | ||
return new int[0][0]; | ||
} | ||
} | ||
} |
Oops, something went wrong.