@SideOnly(Side.CLIENT)
private IBakedModel mapRender(IBlockState state, @Nullable IBlockState paint) {
EnumFacing facing = state.getValue(FACING);
Boolean open = state.getValue(OPEN);
DoorHalf half = state.getValue(HALF);
String model;
ModelRotation modelState;
if (open) {
model = "trapdoor_open";
switch (facing) {
case EAST:
modelState = ModelRotation.X0_Y90;
break;
case SOUTH:
modelState = ModelRotation.X0_Y180;
break;
case WEST:
modelState = ModelRotation.X0_Y270;
break;
default:
modelState = null;
}
} else if (half == DoorHalf.TOP) {
model = "trapdoor_top";
modelState = null;
} else {
model = "trapdoor_bottom";
modelState = null;
}
return PaintRegistry.getModel(IBakedModel.class, model, paint, modelState);
}
BlockPaintedTrapDoor.java 文件源码
java
阅读 15
收藏 0
点赞 0
评论 0
项目:EnderIO
作者:
评论列表
文章目录