@SideOnly(Side.CLIENT)
private IBakedModel mapRender(IBlockState state, @Nullable IBlockState paint) {
EnumFacing facing = state.getValue(FACING);
Boolean open = state.getValue(OPEN);
Boolean wall = state.getValue(IN_WALL);
String model;
if (wall) {
if (open) {
model = "wall_gate_open";
} else {
model = "wall_gate_closed";
}
} else {
if (open) {
model = "fence_gate_open";
} else {
model = "fence_gate_closed";
}
}
switch (facing) {
case EAST:
return PaintRegistry.getModel(IBakedModel.class, model, paint, new UVLock(ModelRotation.X0_Y270));
case NORTH:
return PaintRegistry.getModel(IBakedModel.class, model, paint, new UVLock(ModelRotation.X0_Y180));
case SOUTH:
return PaintRegistry.getModel(IBakedModel.class, model, paint, new UVLock(null));
case WEST:
return PaintRegistry.getModel(IBakedModel.class, model, paint, new UVLock(ModelRotation.X0_Y90));
default:
return null;
}
}
BlockPaintedFenceGate.java 文件源码
java
阅读 21
收藏 0
点赞 0
评论 0
项目:EnderIO
作者:
评论列表
文章目录