This repository has been archived by the owner on May 14, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #100 from Shynixn/development
Merge changes to Master --release
- Loading branch information
Showing
44 changed files
with
835 additions
and
122 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
39 changes: 39 additions & 0 deletions
39
...ib-api/src/main/java/com/github/shynixn/structureblocklib/api/entity/StructureEntity.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,39 @@ | ||
package com.github.shynixn.structureblocklib.api.entity; | ||
|
||
import java.util.Optional; | ||
import java.util.function.Consumer; | ||
|
||
/** | ||
* Represents an entity stored in a structure. | ||
*/ | ||
public interface StructureEntity<Entity, Location> { | ||
/** | ||
* Tries to spawn an entity from the stored nbt data at the given location. | ||
* | ||
* @param location Target {@link Location}. | ||
* @return A valid entity or empty optional. | ||
*/ | ||
Optional<Entity> spawnEntity(Location location); | ||
|
||
/** | ||
* Generates a virtual entity, which is not added to the world but the data | ||
* can be extracted. This entity is destroyed after peeking. | ||
* | ||
* @return A valid entity or empty optional. | ||
*/ | ||
Optional<Entity> getEntity(); | ||
|
||
/** | ||
* Gets the relative source location inside the structure. | ||
* | ||
* @return {@link Location}. | ||
*/ | ||
Location getSourceLocation(); | ||
|
||
/** | ||
* Gets the nbt data of the stored entity in string format. | ||
* | ||
* @return NBT data. | ||
*/ | ||
String getNbtData(); | ||
} |
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.