-
Notifications
You must be signed in to change notification settings - Fork 54
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
Showing
68 changed files
with
1,101 additions
and
340 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package cn.nukkit.block; | ||
|
||
import cn.nukkit.item.Item; | ||
import cn.nukkit.item.ItemBlock; | ||
import cn.nukkit.utils.BlockColor; | ||
|
||
public abstract class BlockFroglight extends BlockSolidMeta { | ||
|
||
protected BlockFroglight(int meta) { | ||
super(meta); | ||
} | ||
|
||
@Override | ||
public double getResistance() { | ||
return 0.3; | ||
} | ||
|
||
@Override | ||
public double getHardness() { | ||
return 0.3; | ||
} | ||
|
||
@Override | ||
public int getLightLevel() { | ||
return 15; | ||
} | ||
|
||
@Override | ||
public BlockColor getColor() { | ||
return BlockColor.WHITE_BLOCK_COLOR; | ||
} | ||
|
||
@Override | ||
public Item toItem() { | ||
return new ItemBlock(Block.get(this.getId(), 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package cn.nukkit.block; | ||
|
||
public class BlockFroglightOchre extends BlockFroglight { | ||
|
||
public BlockFroglightOchre() { | ||
this(0); | ||
} | ||
|
||
public BlockFroglightOchre(int meta) { | ||
super(meta); | ||
} | ||
|
||
@Override | ||
public String getName() { | ||
return "Ochre Froglight"; | ||
} | ||
|
||
@Override | ||
public int getId() { | ||
return OCHRE_FROGLIGHT; | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
src/main/java/cn/nukkit/block/BlockFroglightPearlescent.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,22 @@ | ||
package cn.nukkit.block; | ||
|
||
public class BlockFroglightPearlescent extends BlockFroglight { | ||
|
||
public BlockFroglightPearlescent() { | ||
this(0); | ||
} | ||
|
||
public BlockFroglightPearlescent(int meta) { | ||
super(meta); | ||
} | ||
|
||
@Override | ||
public String getName() { | ||
return "Pearlescent Froglight"; | ||
} | ||
|
||
@Override | ||
public int getId() { | ||
return PEARLESCENT_FROGLIGHT; | ||
} | ||
} |
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,22 @@ | ||
package cn.nukkit.block; | ||
|
||
public class BlockFroglightVerdant extends BlockFroglight { | ||
|
||
public BlockFroglightVerdant() { | ||
this(0); | ||
} | ||
|
||
public BlockFroglightVerdant(int meta) { | ||
super(meta); | ||
} | ||
|
||
@Override | ||
public String getName() { | ||
return "Verdant Froglight"; | ||
} | ||
|
||
@Override | ||
public int getId() { | ||
return VERDANT_FROGLIGHT; | ||
} | ||
} |
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,45 @@ | ||
package cn.nukkit.block; | ||
|
||
import cn.nukkit.Player; | ||
import cn.nukkit.item.Item; | ||
import cn.nukkit.math.BlockFace; | ||
|
||
public class BlockFrogspawn extends BlockFlowable { | ||
|
||
public BlockFrogspawn() { | ||
this(0); | ||
} | ||
|
||
public BlockFrogspawn(int meta) { | ||
super(0); | ||
} | ||
|
||
@Override | ||
public int getId() { | ||
return FROG_SPAWN; | ||
} | ||
|
||
@Override | ||
public String getName() { | ||
return "Frogspawn"; | ||
} | ||
|
||
@Override | ||
public Item[] getDrops(Item item) { | ||
return new Item[0]; | ||
} | ||
|
||
@Override | ||
public int getDropExp() { | ||
return 1; | ||
} | ||
|
||
@Override | ||
public boolean place(Item item, Block block, Block target, BlockFace face, double fx, double fy, double fz, Player player) { | ||
Block up; | ||
if (!(block instanceof BlockWater) || !((up = block.up()) instanceof BlockAir)) { | ||
return false; | ||
} | ||
return this.getLevel().setBlock(up, this, true, true); | ||
} | ||
} |
Oops, something went wrong.