-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Synchronize some nkx block updates (#320)
- Loading branch information
Showing
144 changed files
with
2,905 additions
and
785 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
Large diffs are not rendered by default.
Oops, something went wrong.
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,95 @@ | ||
package cn.nukkit.block; | ||
|
||
import cn.nukkit.item.Item; | ||
import cn.nukkit.item.ItemTool; | ||
import cn.nukkit.level.Position; | ||
import cn.nukkit.math.AxisAlignedBB; | ||
|
||
public class BlockAzalea extends BlockTransparent { | ||
|
||
public BlockAzalea() { | ||
// Does nothing | ||
} | ||
|
||
@Override | ||
public String getName() { | ||
return "Azalea"; | ||
} | ||
|
||
@Override | ||
public int getId() { | ||
return AZALEA; | ||
} | ||
|
||
@Override | ||
public boolean canPlaceOn(Block floor, Position pos) { | ||
// Azaleas can be placed on grass blocks, dirt, coarse dirt, rooted dirt, podzol, moss blocks, farmland, mud, muddy mangrove roots and clay. | ||
switch (floor.getId()) { | ||
case GRASS: | ||
case DIRT: | ||
case ROOTED_DIRT: | ||
case PODZOL: | ||
case MOSS_BLOCK: | ||
case FARMLAND: | ||
case MUD: | ||
case CLAY_BLOCK: | ||
return true; | ||
} | ||
return false; | ||
} | ||
|
||
@Override | ||
public int getToolType() { | ||
return ItemTool.TYPE_NONE; | ||
} | ||
|
||
@Override | ||
public boolean canHarvestWithHand() { | ||
return true; | ||
} | ||
|
||
@Override | ||
public boolean canBeClimbed() { | ||
return true; | ||
} | ||
|
||
@Override | ||
public boolean canBePushed() { | ||
return false; | ||
} | ||
|
||
@Override | ||
public boolean canBeFlowedInto() { | ||
return true; | ||
} | ||
|
||
@Override | ||
public boolean canPassThrough() { | ||
return true; | ||
} | ||
|
||
@Override | ||
public double getHardness() { | ||
return 0; | ||
} | ||
|
||
@Override | ||
public double getResistance() { | ||
return 0; | ||
} | ||
|
||
@Override | ||
public boolean isSolid() { | ||
return false; | ||
} | ||
|
||
@Override | ||
protected AxisAlignedBB recalculateBoundingBox() { | ||
return null; | ||
} | ||
|
||
@Override | ||
public Item[] getDrops(Item item) { | ||
return Item.EMPTY_ARRAY; | ||
} | ||
} |
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,17 @@ | ||
package cn.nukkit.block; | ||
|
||
public class BlockAzaleaFlowering extends BlockAzalea { | ||
|
||
public BlockAzaleaFlowering() { | ||
} | ||
|
||
@Override | ||
public String getName() { | ||
return "Flowering Azalea"; | ||
} | ||
|
||
@Override | ||
public int getId() { | ||
return FLOWERING_AZALEA; | ||
} | ||
} |
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
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.