/
IServantLogic.java
41 lines (32 loc) · 1.06 KB
/
IServantLogic.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
package slimeknights.mantle.multiblock;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
public interface IServantLogic
{
BlockPos getMasterPosition();
/** The block should already have a valid master */
void notifyMasterOfChange();
/** Checks if this block can be tied to this master
*
* @param master
* @param world the world of master
* @param pos position of master
* @return whether the servant can be tied to this master
*/
boolean setPotentialMaster(IMasterLogic master, World world, BlockPos pos);
/** Used to set and verify that this is the block's master
*
* @param master
* @param world
* @param pos position of master
* @return Is this block tied to this master?
*/
boolean verifyMaster(IMasterLogic master, World world, BlockPos pos);
/** Exactly what it says on the tin
*
* @param master
* @param world
* @param pos position of master
*/
void invalidateMaster(IMasterLogic master, World world, BlockPos pos);
}