2018-12-25 15:20:44 +00:00
|
|
|
package net.shadowfacts.simplemultipart.multipart.entity;
|
|
|
|
|
2018-12-28 02:55:51 +00:00
|
|
|
import net.shadowfacts.simplemultipart.container.MultipartContainer;
|
2018-12-25 15:20:44 +00:00
|
|
|
import net.shadowfacts.simplemultipart.multipart.MultipartState;
|
|
|
|
|
|
|
|
/**
|
2018-12-28 18:10:59 +00:00
|
|
|
* An interface to be applied to {@link net.shadowfacts.simplemultipart.multipart.Multipart}s that have entities.
|
|
|
|
*
|
|
|
|
* Analogous to {@link net.minecraft.block.BlockEntityProvider}.
|
|
|
|
*
|
2018-12-25 15:20:44 +00:00
|
|
|
* @author shadowfacts
|
2018-12-28 18:10:59 +00:00
|
|
|
* @since 0.1.0
|
2018-12-25 15:20:44 +00:00
|
|
|
*/
|
|
|
|
public interface MultipartEntityProvider {
|
|
|
|
|
2018-12-28 18:10:59 +00:00
|
|
|
/**
|
|
|
|
* Creates a new multipart entity for this part.
|
|
|
|
*
|
|
|
|
* @param state The state of this part.
|
|
|
|
* @param container The container this part is in.
|
|
|
|
* @return The new entity. {@code null} if there should not be an entity in this instance.
|
|
|
|
*/
|
2018-12-25 15:20:44 +00:00
|
|
|
/*@Nullable*/
|
2018-12-25 15:30:46 +00:00
|
|
|
MultipartEntity createMultipartEntity(MultipartState state, MultipartContainer container);
|
2018-12-25 15:20:44 +00:00
|
|
|
|
|
|
|
}
|