Skip to content

Instantly share code, notes, and snippets.

Created January 19, 2016 22:33
override def getExtendedState(state: IBlockState, world: IBlockAccess,
pos: BlockPos): IBlockState = {
state match {
case extended: IExtendedBlockState =>
val rot = this.getRotation(state, world, pos)
extended.withProperty(OBJModel.OBJProperty.instance,
new OBJState(Lists.newArrayList(OBJModel.Group.ALL), true,
new TRSRTransformation(
new Vector3f(),
{
// gigaherz> quat is (cos, ax*sin, ay*sin, az*sin)
val quat = new Quat4f()
quat.set(new AxisAngle4f(1, 0, 0, rot.x_f()))
quat.set(new AxisAngle4f(0, 1, 0, rot.y_f()))
quat.set(new AxisAngle4f(0, 0, 1, rot.z_f()))
quat
},
new Vector3f(), new Quat4f())))
case _ => state
}
}
def getRotation(state: IBlockState, world: IBlockAccess, pos: BlockPos): V3O = {
new V3O(0, 0, 0)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment