Search in sources :

Example 6 with ItemTransformVec3f

use of net.minecraft.client.renderer.block.model.ItemTransformVec3f in project BuildCraft by BuildCraft.

the class ModelItemSimple method def.

private static ItemTransformVec3f def(float rx, float ry, float rz, float tx, float ty, float tz, float scale) {
    Vector3f rot = new Vector3f(rx, ry, rz);
    Vector3f translate = new Vector3f(tx / 16f, ty / 16f, tz / 16f);
    return new ItemTransformVec3f(rot, translate, new Vector3f(scale, scale, scale));
}
Also used : Vector3f(org.lwjgl.util.vector.Vector3f) ItemTransformVec3f(net.minecraft.client.renderer.block.model.ItemTransformVec3f)

Example 7 with ItemTransformVec3f

use of net.minecraft.client.renderer.block.model.ItemTransformVec3f in project BuildCraft by BuildCraft.

the class ModelItemSimple method translate.

private static ItemTransformVec3f translate(ItemTransformVec3f from, double dx, double dy, double dz) {
    Vector3f nTranslation = new Vector3f(from.translation);
    nTranslation.translate((float) dx, (float) dy, (float) dz);
    return new ItemTransformVec3f(from.rotation, nTranslation, from.scale);
}
Also used : Vector3f(org.lwjgl.util.vector.Vector3f) ItemTransformVec3f(net.minecraft.client.renderer.block.model.ItemTransformVec3f)

Aggregations

ItemTransformVec3f (net.minecraft.client.renderer.block.model.ItemTransformVec3f)7 Vector3f (org.lwjgl.util.vector.Vector3f)5 ItemCameraTransforms (net.minecraft.client.renderer.block.model.ItemCameraTransforms)2 IOException (java.io.IOException)1 InputStreamReader (java.io.InputStreamReader)1 TransformType (net.minecraft.client.renderer.block.model.ItemCameraTransforms.TransformType)1 ModelBlock (net.minecraft.client.renderer.block.model.ModelBlock)1 ModelResourceLocation (net.minecraft.client.renderer.block.model.ModelResourceLocation)1 IResource (net.minecraft.client.resources.IResource)1 ResourceLocation (net.minecraft.util.ResourceLocation)1 TRSRTransformation (net.minecraftforge.common.model.TRSRTransformation)1 SubscribeEvent (net.minecraftforge.fml.common.eventhandler.SubscribeEvent)1 SideOnly (net.minecraftforge.fml.relauncher.SideOnly)1