-
Notifications
You must be signed in to change notification settings - Fork 52
Expand file tree
/
Copy pathIFacade.java
More file actions
44 lines (38 loc) · 1.42 KB
/
IFacade.java
File metadata and controls
44 lines (38 loc) · 1.42 KB
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
42
43
44
package team.chisel.ctm.api;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import net.minecraft.block.state.IBlockState;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
/**
* To be implemented on blocks that "hide" another block inside, so connected textures can still be accomplished.
*/
public interface IFacade {
/**
* @deprecated Use {@link #getFacade(IBlockAccess, BlockPos, EnumFacing, BlockPos)}
*/
@Nonnull
@Deprecated
IBlockState getFacade(@Nonnull IBlockAccess world, @Nonnull BlockPos pos, @Nullable EnumFacing side);
/**
* Gets the blockstate this facade appears as.
*
* @param world
* {@link World}
* @param pos
* The Blocks position
* @param side
* The side being rendered, NOT the side being connected from.
* <p>
* This value can be null if no side is specified. Please handle this appropriately.
* @param connection
* The position of the block being connected to.
* @return The blockstate which your block appears as.
*/
@Nonnull
default IBlockState getFacade(@Nonnull IBlockAccess world, @Nonnull BlockPos pos, @Nullable EnumFacing side, @Nonnull BlockPos connection) {
return getFacade(world, pos, side);
}
}