-
Notifications
You must be signed in to change notification settings - Fork 14
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
41 changed files
with
1,079 additions
and
109 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
24 changes: 24 additions & 0 deletions
24
api/src/main/java/org/allaymc/api/block/component/BlockTntBaseComponent.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,24 @@ | ||
package org.allaymc.api.block.component; | ||
|
||
import org.allaymc.api.block.dto.BlockStateWithPos; | ||
|
||
/** | ||
* @author daoge_cmd | ||
*/ | ||
public interface BlockTntBaseComponent extends BlockBaseComponent { | ||
|
||
/** | ||
* @see #prime(BlockStateWithPos, int) | ||
*/ | ||
default void prime(BlockStateWithPos blockStateWithPos) { | ||
this.prime(blockStateWithPos, 80); | ||
} | ||
|
||
/** | ||
* Prime the TNT at specified pos. | ||
* | ||
* @param blockStateWithPos the tnt to prime. | ||
* @param fuse the fuse of the tnt. | ||
*/ | ||
void prime(BlockStateWithPos blockStateWithPos, int fuse); | ||
} |
3 changes: 2 additions & 1 deletion
3
api/src/main/java/org/allaymc/api/block/interfaces/BlockTntBehavior.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,6 +1,7 @@ | ||
package org.allaymc.api.block.interfaces; | ||
|
||
import org.allaymc.api.block.BlockBehavior; | ||
import org.allaymc.api.block.component.BlockTntBaseComponent; | ||
|
||
public interface BlockTntBehavior extends BlockBehavior { | ||
public interface BlockTntBehavior extends BlockBehavior, BlockTntBaseComponent { | ||
} |
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
20 changes: 20 additions & 0 deletions
20
api/src/main/java/org/allaymc/api/entity/component/EntityTntBaseComponent.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,20 @@ | ||
package org.allaymc.api.entity.component; | ||
|
||
/** | ||
* @author daoge_cmd | ||
*/ | ||
public interface EntityTntBaseComponent extends EntityBaseComponent { | ||
/** | ||
* Get the fuse of the tnt entity. | ||
* | ||
* @return the fuse of the tnt entity. | ||
*/ | ||
int getFuse(); | ||
|
||
/** | ||
* Set the fuse of the tnt entity. | ||
* | ||
* @param fuse the fuse of the tnt entity. | ||
*/ | ||
void setFuse(int fuse); | ||
} |
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
3 changes: 2 additions & 1 deletion
3
api/src/main/java/org/allaymc/api/entity/interfaces/EntityTnt.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,7 +1,8 @@ | ||
package org.allaymc.api.entity.interfaces; | ||
|
||
import org.allaymc.api.entity.Entity; | ||
import org.allaymc.api.entity.component.EntityTntBaseComponent; | ||
|
||
public interface EntityTnt extends Entity { | ||
public interface EntityTnt extends Entity, EntityTntBaseComponent { | ||
|
||
} |
Oops, something went wrong.