-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Complete the construction and rendering of the multi-block structure of the altar - Complete the craft of the altar
- Loading branch information
1 parent
5784339
commit 1f0117a
Showing
37 changed files
with
1,991 additions
and
36 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
64 changes: 64 additions & 0 deletions
64
src/main/java/com/github/tartaricacid/touhoulittlemaid/api/block/IMultiBlock.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,64 @@ | ||
package com.github.tartaricacid.touhoulittlemaid.api.block; | ||
|
||
import net.minecraft.block.BlockState; | ||
import net.minecraft.util.Direction; | ||
import net.minecraft.util.math.BlockPos; | ||
import net.minecraft.world.World; | ||
import net.minecraft.world.gen.feature.template.Template; | ||
import net.minecraft.world.server.ServerWorld; | ||
|
||
public interface IMultiBlock { | ||
/** | ||
* 触发的构建多方块结构时,点击的方块是否为核心方块 | ||
* | ||
* @param blockState 点击的方块 | ||
* @return 是否为核心方块 | ||
*/ | ||
boolean isCoreBlock(BlockState blockState); | ||
|
||
/** | ||
* 触发的构建多方块结构时,朝向是否正确 | ||
* | ||
* @param direction 朝向 | ||
* @return 是否为合法的触发方向 | ||
*/ | ||
boolean directionIsSuitable(Direction direction); | ||
|
||
/** | ||
* 获取多方块结构的中心点 | ||
* | ||
* @param direction 朝向 | ||
* @return 多方块结构的中心点 | ||
*/ | ||
BlockPos getCenterPos(Direction direction); | ||
|
||
/** | ||
* 获取多方块结构模板 | ||
* | ||
* @param world 世界 | ||
* @param direction 朝向 | ||
* @return 多方块结构模板 | ||
*/ | ||
Template getTemplate(ServerWorld world, Direction direction); | ||
|
||
/** | ||
* 是否匹配该多方块结构 | ||
* | ||
* @param world 世界实例 | ||
* @param posStart 起始坐标 | ||
* @param direction 判定匹配时的朝向,用来应用到一些具有方向的多方块结构 | ||
* @param template 结构模板 | ||
* @return 是否匹配 | ||
*/ | ||
boolean isMatch(World world, BlockPos posStart, Direction direction, Template template); | ||
|
||
/** | ||
* 修建多方块结构的逻辑 | ||
* | ||
* @param worldIn 世界实例 | ||
* @param posStart 起始坐标 | ||
* @param direction 判定匹配时的朝向,用来应用到一些具有方向的多方块结构 | ||
* @param template 结构模板 | ||
*/ | ||
void build(World worldIn, BlockPos posStart, Direction direction, Template template); | ||
} |
Oops, something went wrong.