private void drawGlassStump(final ModelRotation modelRot, final List<BakedQuad> list) { final boolean scale = false; TextureAtlasSprite glass = RenderUtil.getSprite("crystalmod:blocks/pipe/power_plus"); float max = 11/*pixel*11.0F*/; float min = 5/*pixel*5F*/; final BlockPartFace face4 = new BlockPartFace((EnumFacing)null, 0, "", new BlockFaceUV(new float[] { min, max+4F, max, 16.0f }, 0)); final BlockPartFace face3 = new BlockPartFace((EnumFacing)null, 0, "", new BlockFaceUV(new float[] { min, max, min, 16.0f }, 0)); final BlockPartFace face2 = new BlockPartFace((EnumFacing)null, 0, "", new BlockFaceUV(new float[] { max, max, max, 16.0f }, 0)); final BlockPartFace face = new BlockPartFace((EnumFacing)null, 0, "", new BlockFaceUV(new float[] { min, max, max, 16.0f }, 0)); list.add(faceBakery.makeBakedQuad(new Vector3f(min, max, max), new Vector3f(max, max, 16.0f), face, glass, EnumFacing.UP, modelRot, (BlockPartRotation)null, scale, true)); list.add(faceBakery.makeBakedQuad(new Vector3f(min, min, max), new Vector3f(max, min, 16.0f), face4, glass, EnumFacing.DOWN, modelRot, (BlockPartRotation)null, scale, true)); list.add(faceBakery.makeBakedQuad(new Vector3f(min, min, max), new Vector3f(min, max, 16.0f), face3, glass, EnumFacing.WEST, modelRot, (BlockPartRotation)null, scale, true)); list.add(faceBakery.makeBakedQuad(new Vector3f(max, min, max), new Vector3f(max, max, 16.0f), face2, glass, EnumFacing.EAST, modelRot, (BlockPartRotation)null, scale, true)); }
public CCFinalVariant(ResourceLocation model, Optional<IModelState> state, boolean uvLock, boolean smooth, boolean gui3d, int weight, Map<String, String> textures, String textureDomain, Map<String, String> customData) { super(model == null ? new ResourceLocation("builtin/missing") : model, state.get() instanceof ModelRotation ? ((ModelRotation) state.get()) : ModelRotation.X0_Y0, uvLock, weight); this.state = state.orElse(TRSRTransformation.identity()); this.smooth = smooth; this.gui3d = gui3d; Map<String, String> newTextures = new HashMap<>(); for (Entry<String, String> entry : textures.entrySet()) { String prefixedTexture = entry.getValue(); if (!entry.getValue().contains(":")) { prefixedTexture = textureDomain + ":" + prefixedTexture; } newTextures.put(entry.getKey(), prefixedTexture); } this.textures = ImmutableMap.copyOf(newTextures); this.customData = ImmutableMap.copyOf(customData); }
private static Matrix4f getMatrix(EnumFacing facing) { switch (facing) { case DOWN: return ModelRotation.X180_Y0.getMatrix(); case UP: return ModelRotation.X0_Y0.getMatrix(); case NORTH: return ModelRotation.X90_Y0.getMatrix(); case SOUTH: return ModelRotation.X90_Y180.getMatrix(); case WEST: return ModelRotation.X90_Y270.getMatrix(); case EAST: return ModelRotation.X90_Y90.getMatrix(); default: return new Matrix4f(); } }
/** * Find appropriate transformation assuming base model is oriented to Y orthogonalAxis, positive. * This is different than the Minecraft/Forge default because I brain that way.<br><br> * * @see #getMatrixForAxisAndRotation(net.minecraft.util.EnumFacing.Axis, boolean, Rotation) for * more explanation. */ protected static Matrix4f getMatrix4f(ModelState modelState) { if(modelState.hasAxis()) { if(modelState.hasAxisRotation()) { return getMatrixForAxisAndRotation(modelState.getAxis(), modelState.isAxisInverted(), modelState.getAxisRotation()); } else { return getMatrixForAxis(modelState.getAxis(), modelState.isAxisInverted()); } } else if(modelState.hasAxisRotation()) { return getMatrixForRotation(modelState.getAxisRotation()); } else { return ForgeHooksClient.getMatrix(ModelRotation.X0_Y0); } }
/** * See {@link #getMatrixForAxisAndRotation(net.minecraft.util.EnumFacing.Axis, boolean, Rotation)} */ protected static Matrix4f getMatrixForAxis(EnumFacing.Axis axis, boolean isAxisInverted) { switch(axis) { case X: return ForgeHooksClient.getMatrix(isAxisInverted ? ModelRotation.X90_Y270 : ModelRotation.X90_Y90); case Y: return ForgeHooksClient.getMatrix(isAxisInverted ? ModelRotation.X180_Y0 : ModelRotation.X0_Y0); case Z: return ForgeHooksClient.getMatrix(isAxisInverted ? ModelRotation.X90_Y0 : ModelRotation.X270_Y0); default: return ForgeHooksClient.getMatrix(ModelRotation.X0_Y0); } }
/** * See {@link #getMatrixForAxisAndRotation(net.minecraft.util.EnumFacing.Axis, boolean, Rotation)} */ protected static Matrix4f getMatrixForRotation(Rotation rotation) { switch(rotation) { default: case ROTATE_NONE: return ForgeHooksClient.getMatrix(ModelRotation.X0_Y0); case ROTATE_90: return ForgeHooksClient.getMatrix(ModelRotation.X0_Y90); case ROTATE_180: return ForgeHooksClient.getMatrix(ModelRotation.X0_Y180); case ROTATE_270: return ForgeHooksClient.getMatrix(ModelRotation.X0_Y270); } }
@SideOnly(Side.CLIENT) private List<IBakedModel> mapRender(IBlockState state, @Nullable IBlockState paint) { List<IBakedModel> result = new ArrayList<IBakedModel>(); if (state.getValue(UP)) { result.add(PaintRegistry.getModel(IBakedModel.class, "wall_post", paint, null)); } if (state.getValue(NORTH)) { result.add(PaintRegistry.getModel(IBakedModel.class, "wall_side", paint, new UVLock(null))); } if (state.getValue(EAST)) { result.add(PaintRegistry.getModel(IBakedModel.class, "wall_side", paint, new UVLock(ModelRotation.X0_Y90))); } if (state.getValue(SOUTH)) { result.add(PaintRegistry.getModel(IBakedModel.class, "wall_side", paint, new UVLock(ModelRotation.X0_Y180))); } if (state.getValue(WEST)) { result.add(PaintRegistry.getModel(IBakedModel.class, "wall_side", paint, new UVLock(ModelRotation.X0_Y270))); } return result; }
@SideOnly(Side.CLIENT) private List<IBakedModel> mapRender(IBlockState state, @Nullable IBlockState paint) { List<IBakedModel> result = new ArrayList<IBakedModel>(); result.add(PaintRegistry.getModel(IBakedModel.class, "fence_post", paint, null)); if (state.getValue(BlockFence.NORTH)) { result.add(PaintRegistry.getModel(IBakedModel.class, "fence_side", paint, new UVLock(null))); } if (state.getValue(BlockFence.EAST)) { result.add(PaintRegistry.getModel(IBakedModel.class, "fence_side", paint, new UVLock(ModelRotation.X0_Y90))); } if (state.getValue(BlockFence.SOUTH)) { result.add(PaintRegistry.getModel(IBakedModel.class, "fence_side", paint, new UVLock(ModelRotation.X0_Y180))); } if (state.getValue(BlockFence.WEST)) { result.add(PaintRegistry.getModel(IBakedModel.class, "fence_side", paint, new UVLock(ModelRotation.X0_Y270))); } return result; }
@Override public IBakedModel bake(IModelState state, VertexFormat format, Function<ResourceLocation, TextureAtlasSprite> bakedTextureGetter) { IBakedModel[] connections = new IBakedModel[6]; IBakedModel[] endings = new IBakedModel[6]; IBakedModel[] nodeSides = new IBakedModel[6]; //IBakedModel node = null; // d u n s w e ModelRotation[] rotations = new ModelRotation[] { ModelRotation.X90_Y0, ModelRotation.X270_Y0, ModelRotation.X0_Y0, ModelRotation.X0_Y180, ModelRotation.X0_Y270, ModelRotation.X0_Y90 }; try { IModel nodeSideModel = ModelLoaderRegistry.getModel(new ResourceLocation(Etheric.MODID, "block/pipe_node_side")); IModel connectionModel = ModelLoaderRegistry .getModel(new ResourceLocation(Etheric.MODID, "block/pipe_connection")); IModel endingModel = ModelLoaderRegistry.getModel(new ResourceLocation(Etheric.MODID, "block/pipe_end")); //node = nodeModel.bake(new TRSRTransformation(ModelRotation.X0_Y0), DefaultVertexFormats.BLOCK, // ModelLoader.defaultTextureGetter()); for (int i = 0; i < connections.length; i++) { connections[i] = connectionModel.bake(new TRSRTransformation(rotations[i]), DefaultVertexFormats.BLOCK, ModelLoader.defaultTextureGetter()); endings[i] = endingModel.bake(new TRSRTransformation(rotations[i]), DefaultVertexFormats.BLOCK, ModelLoader.defaultTextureGetter()); nodeSides[i] = nodeSideModel.bake(new TRSRTransformation(rotations[i]), DefaultVertexFormats.BLOCK, ModelLoader.defaultTextureGetter()); } } catch (Exception e) { Etheric.logger.warn(e.getMessage()); } if (connections[0] == null) { return ModelLoaderRegistry.getMissingModel().bake(state, format, bakedTextureGetter); } return new BakedPipeModel(nodeSides, connections, endings); }
public static BakedQuad makeBakedQuad(EnumFacing p_makeBakedQuad_0_, TextureAtlasSprite p_makeBakedQuad_1_, int p_makeBakedQuad_2_) { Vector3f vector3f = new Vector3f(0.0F, 0.0F, 0.0F); Vector3f vector3f1 = new Vector3f(16.0F, 16.0F, 16.0F); BlockFaceUV blockfaceuv = new BlockFaceUV(new float[] {0.0F, 0.0F, 16.0F, 16.0F}, 0); BlockPartFace blockpartface = new BlockPartFace(p_makeBakedQuad_0_, p_makeBakedQuad_2_, "#" + p_makeBakedQuad_0_.getName(), blockfaceuv); ModelRotation modelrotation = ModelRotation.X0_Y0; BlockPartRotation blockpartrotation = null; boolean flag = false; boolean flag1 = true; FaceBakery facebakery = new FaceBakery(); BakedQuad bakedquad = facebakery.makeBakedQuad(vector3f, vector3f1, blockpartface, p_makeBakedQuad_1_, p_makeBakedQuad_0_, modelrotation, blockpartrotation, flag, flag1); return bakedquad; }
public static Matrix4f getMatrix(ModelRotation modelRotation) { Matrix4f ret = new Matrix4f(TRSRTransformation.toVecmath(modelRotation.getMatrix4d())), tmp = new Matrix4f(); tmp.setIdentity(); tmp.m03 = tmp.m13 = tmp.m23 = .5f; ret.mul(tmp, ret); tmp.invert(); //tmp.m03 = tmp.m13 = tmp.m23 = -.5f; ret.mul(tmp); return ret; }
public ForgeVariant(ResourceLocation model, IModelState state, boolean uvLock, boolean smooth, boolean gui3d, int weight, ImmutableMap<String, String> textures, ImmutableMap<String, SubModel> parts, ImmutableMap<String, String> customData) { super(model == null ? new ResourceLocation("builtin/missing") : model, state instanceof ModelRotation ? (ModelRotation)state : ModelRotation.X0_Y0, uvLock, weight); this.textures = textures; this.parts = parts; this.customData = customData; this.state = state; this.smooth = smooth; this.gui3d = gui3d; }
@SideOnly(Side.CLIENT) public static Matrix4f getMatrix(EnumFacing facing) { switch(facing) { case DOWN: return ModelRotation.X90_Y0.getMatrix(); case UP: return ModelRotation.X270_Y0.getMatrix(); case NORTH: return TRSRTransformation.identity.matrix; case SOUTH: return ModelRotation.X0_Y180.getMatrix(); case WEST: return ModelRotation.X0_Y270.getMatrix(); case EAST: return ModelRotation.X0_Y90.getMatrix(); default: return new Matrix4f(); } }
public int rotateVertex(Vector3f p_188011_1_, EnumFacing p_188011_2_, int p_188011_3_, net.minecraftforge.common.model.ITransformation p_188011_4_) { if (p_188011_4_ == ModelRotation.X0_Y0) { return p_188011_3_; } else { net.minecraftforge.client.ForgeHooksClient.transform(p_188011_1_, p_188011_4_.getMatrix()); return p_188011_4_.rotate(p_188011_2_, p_188011_3_); } }
public CCFinalMultiVariant(CCVariant baseVariant, String textureDomain, Map<String, CCVariant> subModels) { super(baseVariant.model == null ? new ResourceLocation("builtin/missing") : baseVariant.model, baseVariant.state.get() instanceof ModelRotation ? ((ModelRotation) baseVariant.state.get()) : ModelRotation.X0_Y0, baseVariant.uvLock.orElse(false), baseVariant.weight.orElse(1)); state = baseVariant.state.get(); this.baseVariant = makeFinalVariant(baseVariant, textureDomain); this.baseProperties = new ModelProperties(baseVariant.smooth.orElse(true), baseVariant.gui3d.orElse(true)); for (CCVariant subModel : subModels.values()) { finalVariants.add(makeFinalVariant(baseVariant.copy().with(subModel), textureDomain)); } }
private static Variant makeFinalVariant(CCVariant variant, String textureDomain) { boolean uvLock = variant.uvLock.orElse(false); boolean smooth = variant.smooth.orElse(true); boolean gui3d = variant.gui3d.orElse(true); int weight = variant.weight.orElse(1); if (variant.hasModel() && !variant.hasTextures() && !variant.hasCustomData() && variant.state.get() instanceof ModelRotation) { return new Variant(variant.model, ((ModelRotation) variant.state.get()), uvLock, weight); } else { return new CCFinalVariant(variant.model, variant.state, uvLock, smooth, gui3d, weight, variant.textures, textureDomain, variant.customData); } }
/** Adds the quads for the given model with given rotation to the list. */ protected void addQuads(List<BakedQuad> list, IModel model, int yRotate, IBlockState state, EnumFacing side, long rand) { if (model == null) { return; } TRSRTransformation transform = new TRSRTransformation(ModelRotation .getModelRotation(0, yRotate)); IBakedModel baked = model.bake(transform, this.format, this.textureGetter); list.addAll(baked.getQuads(state, side, rand)); }
private static Matrix4f getMatrix(EnumFacing facing){ switch(facing){ case NORTH: return ModelRotation.X0_Y0.getMatrix(); case SOUTH: return ModelRotation.X0_Y180.getMatrix(); case WEST: return ModelRotation.X0_Y270.getMatrix(); case EAST: return ModelRotation.X0_Y90.getMatrix(); default: return new Matrix4f(); } }
private static String modelRotationToJson(ModelRotation m) { final Matcher matcher = namePattern.matcher(m.name()); Preconditions.checkState(matcher.matches()); final String x = matcher.group(1); final String y = matcher.group(2); List<String> result = Lists.newArrayList(); if (!x.equals("0")) result.add("\"x\": " + x); if (!y.equals("0")) result.add("\"y\": " + y); return Joiner.on(", ").join(result); }
private static Multimap<Orientation, ModelRotation> calculateVanillaRotations(Map<Matrix3f, Orientation> fromMatrix) { final Multimap<Orientation, ModelRotation> toVanilla = HashMultimap.create(); for (ModelRotation rot : ModelRotation.values()) { final Matrix4f rotMatrix = TRSRTransformation.toVecmath(rot.getMatrix4d()); final Matrix3f key = roundAndReduceMatrixElements(rotMatrix); final Orientation orientation = fromMatrix.get(key); Preconditions.checkNotNull(orientation, rot); toVanilla.put(orientation, rot); } return toVanilla; }
@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); }
@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; } }
@SideOnly(Side.CLIENT) private IBakedModel mapRender(IBlockState state, @Nullable IBlockState paint, EnumFacing facing) { ModelRotation rot; switch (facing) { case EAST: rot = ModelRotation.X0_Y90; break; case NORTH: rot = null; break; case SOUTH: rot = ModelRotation.X0_Y180; break; case WEST: rot = ModelRotation.X0_Y270; break; default: return null; } if (state.getValue(BlockPressurePlateWeighted.POWER) > 0) { return PaintRegistry.getModel(IBakedModel.class, "pressure_plate_down", paint, rot); } else { return PaintRegistry.getModel(IBakedModel.class, "pressure_plate_up", paint, rot); } }
private static BakedQuad makeBakedQuad(BlockPart p_makeBakedQuad_0_, BlockPartFace p_makeBakedQuad_1_, TextureAtlasSprite p_makeBakedQuad_2_, EnumFacing p_makeBakedQuad_3_, ModelRotation p_makeBakedQuad_4_, boolean p_makeBakedQuad_5_) { FaceBakery facebakery = new FaceBakery(); return facebakery.makeBakedQuad(p_makeBakedQuad_0_.positionFrom, p_makeBakedQuad_0_.positionTo, p_makeBakedQuad_1_, p_makeBakedQuad_2_, p_makeBakedQuad_3_, p_makeBakedQuad_4_, p_makeBakedQuad_0_.partRotation, p_makeBakedQuad_5_, p_makeBakedQuad_0_.shade); }
public IModelState getDefaultState() { return ModelRotation.X0_Y0; }
@SideOnly(Side.CLIENT) public TRSRTransformation(ModelRotation rotation) { this(rotation.getMatrix()); }
public BakedQuad makeBakedQuad(Vector3f posFrom, Vector3f posTo, BlockPartFace face, TextureAtlasSprite sprite, EnumFacing facing, ModelRotation modelRotationIn, @Nullable BlockPartRotation partRotation, boolean uvLocked) { return makeBakedQuad(posFrom, posTo, face, sprite, facing, (net.minecraftforge.common.model.ITransformation)modelRotationIn, partRotation, uvLocked, getFaceShadeColor(facing)); }
public BakedQuad makeBakedQuad(Vector3f posFrom, Vector3f posTo, BlockPartFace face, TextureAtlasSprite sprite, EnumFacing facing, ModelRotation modelRotationIn, @Nullable BlockPartRotation partRotation, boolean uvLocked, int color) { return makeBakedQuad(posFrom, posTo, face, sprite, facing, (net.minecraftforge.common.model.ITransformation)modelRotationIn, partRotation, uvLocked, color); }
public int rotateVertex(Vector3f p_188011_1_, EnumFacing p_188011_2_, int p_188011_3_, ModelRotation p_188011_4_) { return rotateVertex(p_188011_1_, p_188011_2_, p_188011_3_, (net.minecraftforge.common.model.ITransformation)p_188011_4_); }
private static void addUvRotation(ModelRotation p_188013_0_, EnumFacing p_188013_1_, CustomModelUtil.Rotation p_188013_2_) { UV_ROTATIONS[getIndex(p_188013_0_, p_188013_1_)] = p_188013_2_; }
private static int getIndex(ModelRotation p_188014_0_, EnumFacing p_188014_1_) { return ModelRotation.values().length * p_188014_1_.ordinal() + p_188014_0_.ordinal(); }
@SideOnly(Side.CLIENT) @Override public void addQuads(FaceBakery faceBakery, List<BakedQuad> list, EnumFacing dir){ ModelRotation modelRot = ModelRotation.X0_Y0; switch (dir.ordinal()) { case 0: { modelRot = ModelRotation.X270_Y0; break; } case 1: { modelRot = ModelRotation.X90_Y0; break; } case 2: { modelRot = ModelRotation.X180_Y0; break; } case 3: { modelRot = ModelRotation.X0_Y0; break; } case 4: { modelRot = ModelRotation.X0_Y90; break; } case 5: { modelRot = ModelRotation.X0_Y270; break; } } final BlockFaceUV uv = new BlockFaceUV(new float[] { 0.0f, 0.0f, 16.0f, 16.0f }, 0); final BlockPartFace face = new BlockPartFace((EnumFacing)null, 0, "", uv); final TextureAtlasSprite iron = ModelPipeBaked.getIronSprite(); TextureAtlasSprite spriteLapis = RenderUtil.getSprite("minecraft:blocks/iron_block"); list.add(faceBakery.makeBakedQuad(new Vector3f(2.0f, 14.0f, 12f), new Vector3f(14.0f, 14.0f, 13f), face, iron, EnumFacing.UP, modelRot, (BlockPartRotation)null, true, true)); list.add(faceBakery.makeBakedQuad(new Vector3f(2.0f, 2.0f, 12f), new Vector3f(14.0f, 2.0f, 13f), face, iron, EnumFacing.DOWN, modelRot, (BlockPartRotation)null, true, true)); list.add(faceBakery.makeBakedQuad(new Vector3f(2.0f, 2.0f, 12f), new Vector3f(14.0f, 14.0f, 13f), face, iron, EnumFacing.NORTH, modelRot, (BlockPartRotation)null, true, true)); list.add(faceBakery.makeBakedQuad(new Vector3f(2.0f, 2.0f, 12f), new Vector3f(14.0f, 14.0f, 13.0f), face, iron, EnumFacing.SOUTH, modelRot, (BlockPartRotation)null, true, true)); list.add(faceBakery.makeBakedQuad(new Vector3f(2.0f, 2.0f, 12f), new Vector3f(2.0f, 14.0f, 13f), face, iron, EnumFacing.WEST, modelRot, (BlockPartRotation)null, true, true)); list.add(faceBakery.makeBakedQuad(new Vector3f(14.0f, 2.0f, 12f), new Vector3f(14.0f, 14.0f, 13f), face, iron, EnumFacing.EAST, modelRot, (BlockPartRotation)null, true, true)); list.add(faceBakery.makeBakedQuad(new Vector3f(3.0f, 13.0f, 13.0f), new Vector3f(13.0f, 13.0f, 14.5f), face, iron, EnumFacing.UP, modelRot, (BlockPartRotation)null, true, true)); list.add(faceBakery.makeBakedQuad(new Vector3f(3.0f, 3.0f, 13.0f), new Vector3f(13.0f, 3.0f, 14.5f), face, iron, EnumFacing.DOWN, modelRot, (BlockPartRotation)null, true, true)); list.add(faceBakery.makeBakedQuad(new Vector3f(3.0f, 3.0f, 13.0f), new Vector3f(13.0f, 13.0f, 14.5f), face, iron, EnumFacing.NORTH, modelRot, (BlockPartRotation)null, true, true)); list.add(faceBakery.makeBakedQuad(new Vector3f(3.0f, 3.0f, 13.0f), new Vector3f(13.0f, 13.0f, 14.5f), face, iron, EnumFacing.SOUTH, modelRot, (BlockPartRotation)null, true, true)); list.add(faceBakery.makeBakedQuad(new Vector3f(3.0f, 3.0f, 13.0f), new Vector3f(3.0f, 13.0f, 14.5f), face, iron, EnumFacing.WEST, modelRot, (BlockPartRotation)null, true, true)); list.add(faceBakery.makeBakedQuad(new Vector3f(13.0f, 3.0f, 13.0f), new Vector3f(13.0f, 13.0f, 14.5f), face, iron, EnumFacing.EAST, modelRot, (BlockPartRotation)null, true, true)); list.add(faceBakery.makeBakedQuad(new Vector3f(4.0f, 12.0f, 14.5f), new Vector3f(12.0f, 12.0f, 16.0f), face, iron, EnumFacing.UP, modelRot, (BlockPartRotation)null, true, true)); list.add(faceBakery.makeBakedQuad(new Vector3f(4.0f, 4.0f, 14.5f), new Vector3f(12.0f, 4.0f, 16.0f), face, iron, EnumFacing.DOWN, modelRot, (BlockPartRotation)null, true, true)); list.add(faceBakery.makeBakedQuad(new Vector3f(4.0f, 4.0f, 14.5f), new Vector3f(12.0f, 12.0f, 16.0f), face, iron, EnumFacing.NORTH, modelRot, (BlockPartRotation)null, true, true)); list.add(faceBakery.makeBakedQuad(new Vector3f(4.0f, 4.0f, 14.5f), new Vector3f(12.0f, 12.0f, 16.0f), face, spriteLapis, EnumFacing.SOUTH, modelRot, (BlockPartRotation)null, true, true)); list.add(faceBakery.makeBakedQuad(new Vector3f(4.0f, 4.0f, 14.5f), new Vector3f(4.0f, 12.0f, 16.0f), face, iron, EnumFacing.WEST, modelRot, (BlockPartRotation)null, true, true)); list.add(faceBakery.makeBakedQuad(new Vector3f(12.0f, 4.0f, 14.5f), new Vector3f(12.0f, 12.0f, 16.0f), face, iron, EnumFacing.EAST, modelRot, (BlockPartRotation)null, true, true)); }
@SideOnly(Side.CLIENT) @Override public void addQuads(FaceBakery faceBakery, List<BakedQuad> list, EnumFacing dir){ ModelRotation modelRot = ModelRotation.X0_Y0; switch (dir.ordinal()) { case 0: { modelRot = ModelRotation.X270_Y0; break; } case 1: { modelRot = ModelRotation.X90_Y0; break; } case 2: { modelRot = ModelRotation.X180_Y0; break; } case 3: { modelRot = ModelRotation.X0_Y0; break; } case 4: { modelRot = ModelRotation.X0_Y90; break; } case 5: { modelRot = ModelRotation.X0_Y270; break; } } final BlockFaceUV uv = new BlockFaceUV(new float[] { 0.0f, 0.0f, 16.0f, 16.0f }, 0); final BlockPartFace face = new BlockPartFace((EnumFacing)null, 0, "", uv); final TextureAtlasSprite iron = ModelPipeBaked.getIronSprite(); TextureAtlasSprite spriteLapis = Minecraft.getMinecraft().getTextureMapBlocks().getAtlasSprite("minecraft:blocks/redstone_block"); if(spriteLapis == null){ spriteLapis = RenderUtil.getMissingSprite(); } list.add(faceBakery.makeBakedQuad(new Vector3f(4.0f, 12.0f, 12.0f), new Vector3f(12.0f, 12.0f, 13.0f), face, iron, EnumFacing.UP, modelRot, (BlockPartRotation)null, true, true)); list.add(faceBakery.makeBakedQuad(new Vector3f(4.0f, 4.0f, 12.0f), new Vector3f(12.0f, 4.0f, 13.0f), face, iron, EnumFacing.DOWN, modelRot, (BlockPartRotation)null, true, true)); list.add(faceBakery.makeBakedQuad(new Vector3f(4.0f, 4.0f, 12.0f), new Vector3f(12.0f, 12.0f, 13.0f), face, iron, EnumFacing.NORTH, modelRot, (BlockPartRotation)null, true, true)); list.add(faceBakery.makeBakedQuad(new Vector3f(4.0f, 4.0f, 12.0f), new Vector3f(12.0f, 12.0f, 13.0f), face, iron, EnumFacing.SOUTH, modelRot, (BlockPartRotation)null, true, true)); list.add(faceBakery.makeBakedQuad(new Vector3f(4.0f, 4.0f, 12.0f), new Vector3f(4.0f, 12.0f, 13.0f), face, iron, EnumFacing.WEST, modelRot, (BlockPartRotation)null, true, true)); list.add(faceBakery.makeBakedQuad(new Vector3f(12.0f, 4.0f, 12.0f), new Vector3f(12.0f, 12.0f, 13.0f), face, iron, EnumFacing.EAST, modelRot, (BlockPartRotation)null, true, true)); list.add(faceBakery.makeBakedQuad(new Vector3f(3.0f, 13.0f, 13.0f), new Vector3f(13.0f, 13.0f, 14.5f), face, iron, EnumFacing.UP, modelRot, (BlockPartRotation)null, true, true)); list.add(faceBakery.makeBakedQuad(new Vector3f(3.0f, 3.0f, 13.0f), new Vector3f(13.0f, 3.0f, 14.5f), face, iron, EnumFacing.DOWN, modelRot, (BlockPartRotation)null, true, true)); list.add(faceBakery.makeBakedQuad(new Vector3f(3.0f, 3.0f, 13.0f), new Vector3f(13.0f, 13.0f, 14.5f), face, iron, EnumFacing.NORTH, modelRot, (BlockPartRotation)null, true, true)); list.add(faceBakery.makeBakedQuad(new Vector3f(3.0f, 3.0f, 13.0f), new Vector3f(13.0f, 13.0f, 14.5f), face, spriteLapis, EnumFacing.SOUTH, modelRot, (BlockPartRotation)null, true, true)); list.add(faceBakery.makeBakedQuad(new Vector3f(3.0f, 3.0f, 13.0f), new Vector3f(3.0f, 13.0f, 14.5f), face, iron, EnumFacing.WEST, modelRot, (BlockPartRotation)null, true, true)); list.add(faceBakery.makeBakedQuad(new Vector3f(13.0f, 3.0f, 13.0f), new Vector3f(13.0f, 13.0f, 14.5f), face, iron, EnumFacing.EAST, modelRot, (BlockPartRotation)null, true, true)); list.add(faceBakery.makeBakedQuad(new Vector3f(2.0f, 14.0f, 14.5f), new Vector3f(14.0f, 14.0f, 16.0f), face, iron, EnumFacing.UP, modelRot, (BlockPartRotation)null, true, true)); list.add(faceBakery.makeBakedQuad(new Vector3f(2.0f, 2.0f, 14.5f), new Vector3f(14.0f, 2.0f, 16.0f), face, iron, EnumFacing.DOWN, modelRot, (BlockPartRotation)null, true, true)); list.add(faceBakery.makeBakedQuad(new Vector3f(2.0f, 2.0f, 14.5f), new Vector3f(14.0f, 14.0f, 16.0f), face, iron, EnumFacing.NORTH, modelRot, (BlockPartRotation)null, true, true)); list.add(faceBakery.makeBakedQuad(new Vector3f(2.0f, 2.0f, 14.5f), new Vector3f(14.0f, 14.0f, 16.0f), face, spriteLapis, EnumFacing.SOUTH, modelRot, (BlockPartRotation)null, true, true)); list.add(faceBakery.makeBakedQuad(new Vector3f(2.0f, 2.0f, 14.5f), new Vector3f(2.0f, 14.0f, 16.0f), face, iron, EnumFacing.WEST, modelRot, (BlockPartRotation)null, true, true)); list.add(faceBakery.makeBakedQuad(new Vector3f(14.0f, 2.0f, 14.5f), new Vector3f(14.0f, 14.0f, 16.0f), face, iron, EnumFacing.EAST, modelRot, (BlockPartRotation)null, true, true)); }
@SideOnly(Side.CLIENT) @Override public void addQuads(FaceBakery faceBakery, List<BakedQuad> list, EnumFacing dir){ ModelRotation modelRot = ModelRotation.X0_Y0; switch (dir.ordinal()) { case 0: { modelRot = ModelRotation.X270_Y0; break; } case 1: { modelRot = ModelRotation.X90_Y0; break; } case 2: { modelRot = ModelRotation.X180_Y0; break; } case 3: { modelRot = ModelRotation.X0_Y0; break; } case 4: { modelRot = ModelRotation.X0_Y90; break; } case 5: { modelRot = ModelRotation.X0_Y270; break; } } final BlockFaceUV uv = new BlockFaceUV(new float[] { 0.0f, 0.0f, 16.0f, 16.0f }, 0); final BlockPartFace face = new BlockPartFace((EnumFacing)null, 0, "", uv); final TextureAtlasSprite iron = ModelPipeBaked.getIronSprite(); TextureAtlasSprite spriteLapis = RenderUtil.getSprite("crystalmod:blocks/pipe/attachment/import"); list.add(faceBakery.makeBakedQuad(new Vector3f(4.0f, 12.0f, 12.0f), new Vector3f(12.0f, 12.0f, 13.0f), face, iron, EnumFacing.UP, modelRot, (BlockPartRotation)null, true, true)); list.add(faceBakery.makeBakedQuad(new Vector3f(4.0f, 4.0f, 12.0f), new Vector3f(12.0f, 4.0f, 13.0f), face, iron, EnumFacing.DOWN, modelRot, (BlockPartRotation)null, true, true)); list.add(faceBakery.makeBakedQuad(new Vector3f(4.0f, 4.0f, 12.0f), new Vector3f(12.0f, 12.0f, 13.0f), face, iron, EnumFacing.NORTH, modelRot, (BlockPartRotation)null, true, true)); list.add(faceBakery.makeBakedQuad(new Vector3f(4.0f, 4.0f, 12.0f), new Vector3f(12.0f, 12.0f, 13.0f), face, iron, EnumFacing.SOUTH, modelRot, (BlockPartRotation)null, true, true)); list.add(faceBakery.makeBakedQuad(new Vector3f(4.0f, 4.0f, 12.0f), new Vector3f(4.0f, 12.0f, 13.0f), face, iron, EnumFacing.WEST, modelRot, (BlockPartRotation)null, true, true)); list.add(faceBakery.makeBakedQuad(new Vector3f(12.0f, 4.0f, 12.0f), new Vector3f(12.0f, 12.0f, 13.0f), face, iron, EnumFacing.EAST, modelRot, (BlockPartRotation)null, true, true)); list.add(faceBakery.makeBakedQuad(new Vector3f(3.0f, 13.0f, 13.0f), new Vector3f(13.0f, 13.0f, 14.5f), face, iron, EnumFacing.UP, modelRot, (BlockPartRotation)null, true, true)); list.add(faceBakery.makeBakedQuad(new Vector3f(3.0f, 3.0f, 13.0f), new Vector3f(13.0f, 3.0f, 14.5f), face, iron, EnumFacing.DOWN, modelRot, (BlockPartRotation)null, true, true)); list.add(faceBakery.makeBakedQuad(new Vector3f(3.0f, 3.0f, 13.0f), new Vector3f(13.0f, 13.0f, 14.5f), face, iron, EnumFacing.NORTH, modelRot, (BlockPartRotation)null, true, true)); list.add(faceBakery.makeBakedQuad(new Vector3f(3.0f, 3.0f, 13.0f), new Vector3f(13.0f, 13.0f, 14.5f), face, spriteLapis, EnumFacing.SOUTH, modelRot, (BlockPartRotation)null, true, true)); list.add(faceBakery.makeBakedQuad(new Vector3f(3.0f, 3.0f, 13.0f), new Vector3f(3.0f, 13.0f, 14.5f), face, iron, EnumFacing.WEST, modelRot, (BlockPartRotation)null, true, true)); list.add(faceBakery.makeBakedQuad(new Vector3f(13.0f, 3.0f, 13.0f), new Vector3f(13.0f, 13.0f, 14.5f), face, iron, EnumFacing.EAST, modelRot, (BlockPartRotation)null, true, true)); list.add(faceBakery.makeBakedQuad(new Vector3f(2.0f, 14.0f, 14.5f), new Vector3f(14.0f, 14.0f, 16.0f), face, iron, EnumFacing.UP, modelRot, (BlockPartRotation)null, true, true)); list.add(faceBakery.makeBakedQuad(new Vector3f(2.0f, 2.0f, 14.5f), new Vector3f(14.0f, 2.0f, 16.0f), face, iron, EnumFacing.DOWN, modelRot, (BlockPartRotation)null, true, true)); list.add(faceBakery.makeBakedQuad(new Vector3f(2.0f, 2.0f, 14.5f), new Vector3f(14.0f, 14.0f, 16.0f), face, iron, EnumFacing.NORTH, modelRot, (BlockPartRotation)null, true, true)); list.add(faceBakery.makeBakedQuad(new Vector3f(2.0f, 2.0f, 14.5f), new Vector3f(14.0f, 14.0f, 16.0f), face, spriteLapis, EnumFacing.SOUTH, modelRot, (BlockPartRotation)null, true, true)); list.add(faceBakery.makeBakedQuad(new Vector3f(2.0f, 2.0f, 14.5f), new Vector3f(2.0f, 14.0f, 16.0f), face, iron, EnumFacing.WEST, modelRot, (BlockPartRotation)null, true, true)); list.add(faceBakery.makeBakedQuad(new Vector3f(14.0f, 2.0f, 14.5f), new Vector3f(14.0f, 14.0f, 16.0f), face, iron, EnumFacing.EAST, modelRot, (BlockPartRotation)null, true, true)); }
private void renderIronCap(final FakeState state, final int dir, final List<BakedQuad> list) { ModelRotation modelRot = ModelRotation.X0_Y0; switch (dir) { case 0: { modelRot = ModelRotation.X270_Y0; break; } case 1: { modelRot = ModelRotation.X90_Y0; break; } case 2: { modelRot = ModelRotation.X180_Y0; break; } case 3: { modelRot = ModelRotation.X0_Y0; break; } case 4: { modelRot = ModelRotation.X0_Y90; break; } case 5: { modelRot = ModelRotation.X0_Y270; break; } } //modelRot = ModelRotation.X0_Y0; final BlockFaceUV uv = new BlockFaceUV(new float[] { 0.0f, 0.0f, 16.0f, 16.0f }, 0); final BlockPartFace face = new BlockPartFace((EnumFacing)null, 0, "", uv); final BlockFaceUV uv270 = new BlockFaceUV(new float[] { 0.0f, 0.0f, 16.0f, 16.0f }, 270); final BlockPartFace face270 = new BlockPartFace((EnumFacing)null, 0, "", uv270); final BlockFaceUV uv90 = new BlockFaceUV(new float[] { 0.0f, 0.0f, 16.0f, 16.0f }, 90); final BlockPartFace face90 = new BlockPartFace((EnumFacing)null, 0, "", uv90); final BlockFaceUV uv180 = new BlockFaceUV(new float[] { 0.0f, 0.0f, 16.0f, 16.0f }, 180); final BlockPartFace face180 = new BlockPartFace((EnumFacing)null, 0, "", uv180); TextureAtlasSprite iron = RenderUtil.getSprite("crystalmod:blocks/pipe/iron_cap"); TextureAtlasSprite spriteLapis = RenderUtil.getSprite("crystalmod:blocks/pipe/io_out"); TextureAtlasSprite spriteRedstone = RenderUtil.getSprite("crystalmod:blocks/pipe/io_in"); TextureAtlasSprite spriteQuartz = RenderUtil.getSprite("crystalmod:blocks/pipe/io_inout"); boolean scale = false; if(state !=null && state.pipe !=null && state.pipe.getPipeType() !=null){ if(!state.pipe.getPipeType().useIOTextures()){ spriteRedstone = iron; spriteLapis = iron; spriteQuartz = iron; scale = true; } } ConnectionMode mode = (state !=null && state.pipe !=null) ? state.pipe.getConnectionMode(EnumFacing.getFront(dir)) : ConnectionMode.DISABLED; TextureAtlasSprite modeSprite = mode == ConnectionMode.IN_OUT ? spriteQuartz : mode == ConnectionMode.OUTPUT ? spriteRedstone : mode == ConnectionMode.INPUT ? spriteLapis : iron; if(mode != ConnectionMode.DISABLED){ list.add(faceBakery.makeBakedQuad(new Vector3f(3.0f, 13.0f, 14.0f), new Vector3f(13.0f, 13.0f, 15.0f), face180, modeSprite, EnumFacing.UP, modelRot, (BlockPartRotation)null, scale, true)); list.add(faceBakery.makeBakedQuad(new Vector3f(3.0f, 3.0f, 14.0f), new Vector3f(13.0f, 3.0f, 15.0f), face, modeSprite, EnumFacing.DOWN, modelRot, (BlockPartRotation)null, scale, true)); list.add(faceBakery.makeBakedQuad(new Vector3f(3.0f, 3.0f, 14.0f), new Vector3f(13.0f, 13.0f, 15.0f), face, iron, EnumFacing.NORTH, modelRot, (BlockPartRotation)null, true, true)); list.add(faceBakery.makeBakedQuad(new Vector3f(3.0f, 3.0f, 14.0f), new Vector3f(13.0f, 13.0f, 15.0f), face, iron, EnumFacing.SOUTH, modelRot, (BlockPartRotation)null, true, true)); list.add(faceBakery.makeBakedQuad(new Vector3f(3.0f, 3.0f, 14.0f), new Vector3f(3.0f, 13.0f, 15.0f), face90, modeSprite, EnumFacing.WEST, modelRot, (BlockPartRotation)null, scale, true)); list.add(faceBakery.makeBakedQuad(new Vector3f(13.0f, 3.0f, 14.0f), new Vector3f(13.0f, 13.0f, 15.0f), face270, modeSprite, EnumFacing.EAST, modelRot, (BlockPartRotation)null, scale, true)); list.add(faceBakery.makeBakedQuad(new Vector3f(2.0f, 14.0f, 15.0f), new Vector3f(14.0f, 14.0f, 16.0f), face, iron, EnumFacing.UP, modelRot, (BlockPartRotation)null, true, true)); list.add(faceBakery.makeBakedQuad(new Vector3f(2.0f, 2.0f, 15.0f), new Vector3f(14.0f, 2.0f, 16.0f), face, iron, EnumFacing.DOWN, modelRot, (BlockPartRotation)null, true, true)); list.add(faceBakery.makeBakedQuad(new Vector3f(2.0f, 2.0f, 15.0f), new Vector3f(14.0f, 14.0f, 16.0f), face, iron, EnumFacing.NORTH, modelRot, (BlockPartRotation)null, true, true)); list.add(faceBakery.makeBakedQuad(new Vector3f(2.0f, 2.0f, 15.0f), new Vector3f(14.0f, 14.0f, 16.0f), face, iron, EnumFacing.SOUTH, modelRot, (BlockPartRotation)null, true, true)); list.add(faceBakery.makeBakedQuad(new Vector3f(2.0f, 2.0f, 15.0f), new Vector3f(2.0f, 14.0f, 16.0f), face, iron, EnumFacing.WEST, modelRot, (BlockPartRotation)null, true, true)); list.add(faceBakery.makeBakedQuad(new Vector3f(14.0f, 2.0f, 15.0f), new Vector3f(14.0f, 14.0f, 16.0f), face, iron, EnumFacing.EAST, modelRot, (BlockPartRotation)null, true, true)); } }
public List<BakedQuad> getMeterQuads(EnumFacing face, int power, int maxPower){ Vector3f min = new Vector3f(2.75f,2.75f,2.75f); Vector3f max = new Vector3f(13.25f,13.25f,13.25f); String meter = "crystalmod:blocks/machine/battery/meter/"; String meterC = "crystalmod:blocks/machine/battery/meter/charged"; String meterU = "crystalmod:blocks/machine/battery/meter/uncharged"; TextureAtlasSprite meterUp = RenderUtil.getSprite(meterU); TextureAtlasSprite meterDown = RenderUtil.getSprite(meterU); TextureAtlasSprite meterSide = RenderUtil.getSprite(meter+"0"); if(power > 0){ meterDown = RenderUtil.getSprite(meterC); meterSide = RenderUtil.getSprite(meter+(Math.min(8, state.battery.getScaledEnergyStored(9)))); } if(power >= maxPower){ meterUp = RenderUtil.getSprite(meterC); } ModelRotation modelRot = ModelRotation.X0_Y0; if(face == EnumFacing.SOUTH){ modelRot = ModelRotation.X0_Y180; } if(face == EnumFacing.WEST){ modelRot = ModelRotation.X0_Y270; } if(face == EnumFacing.EAST){ modelRot = ModelRotation.X0_Y90; } if(face == EnumFacing.UP){ modelRot = ModelRotation.X270_Y0; } if(face == EnumFacing.DOWN){ modelRot = ModelRotation.X90_Y0; } BlockFaceUV uvMeter = new BlockFaceUV(new float[] { 4f,4f,12f,12f }, 0); BlockPartFace meterFace = new BlockPartFace((EnumFacing)null, 0, "", uvMeter); List<BakedQuad> list = Lists.newArrayList(); list.add(faceBakery.makeBakedQuad(min, max, meterFace, meterUp, EnumFacing.UP, modelRot, (BlockPartRotation)null, false, true)); list.add(faceBakery.makeBakedQuad(min, max, meterFace, meterDown, EnumFacing.DOWN, modelRot, (BlockPartRotation)null, false, true)); list.add(faceBakery.makeBakedQuad(min, max, meterFace, meterSide, EnumFacing.NORTH, modelRot, (BlockPartRotation)null, false, true)); list.add(faceBakery.makeBakedQuad(min, max, meterFace, meterSide, EnumFacing.SOUTH, modelRot, (BlockPartRotation)null, false, true)); list.add(faceBakery.makeBakedQuad(min, max, meterFace, meterSide, EnumFacing.WEST, modelRot, (BlockPartRotation)null, false, true)); list.add(faceBakery.makeBakedQuad(min, max, meterFace, meterSide, EnumFacing.EAST, modelRot, (BlockPartRotation)null, false, true)); return list; }
private static Matrix4f getMatrix(TerminalFacing facing, boolean mirror) { if (mirror) { switch (facing) { case DOWN_EAST: return ModelRotation.X270_Y270.getMatrix(); case DOWN_NORTH: return ModelRotation.X270_Y180.getMatrix(); case DOWN_SOUTH: return ModelRotation.X270_Y0.getMatrix(); case DOWN_WEST: return ModelRotation.X270_Y90.getMatrix(); case EAST: return ModelRotation.X0_Y90.getMatrix(); case NORTH: return ModelRotation.X0_Y0.getMatrix(); case SOUTH: return ModelRotation.X0_Y180.getMatrix(); case UP_EAST: return ModelRotation.X90_Y270.getMatrix(); case UP_NORTH: return ModelRotation.X90_Y180.getMatrix(); case UP_SOUTH: return ModelRotation.X90_Y0.getMatrix(); case UP_WEST: return ModelRotation.X90_Y90.getMatrix(); case WEST: return ModelRotation.X0_Y270.getMatrix(); default: return new Matrix4f(); } } else { switch (facing) { case DOWN_EAST: return ModelRotation.X270_Y270.getMatrix(); case DOWN_NORTH: return ModelRotation.X270_Y180.getMatrix(); case DOWN_SOUTH: return ModelRotation.X270_Y0.getMatrix(); case DOWN_WEST: return ModelRotation.X270_Y90.getMatrix(); case EAST: return ModelRotation.X0_Y270.getMatrix(); case NORTH: return ModelRotation.X0_Y180.getMatrix(); case SOUTH: return ModelRotation.X0_Y0.getMatrix(); case UP_EAST: return ModelRotation.X90_Y270.getMatrix(); case UP_NORTH: return ModelRotation.X90_Y180.getMatrix(); case UP_SOUTH: return ModelRotation.X90_Y0.getMatrix(); case UP_WEST: return ModelRotation.X90_Y90.getMatrix(); case WEST: return ModelRotation.X0_Y90.getMatrix(); default: return new Matrix4f(); } } }
private static Matrix4f getMatrix(TerminalFacing facing, boolean mirror) { if (mirror) { switch (facing) { case DOWN_EAST: return ModelRotation.X270_Y270.getMatrix(); case DOWN_NORTH: return ModelRotation.X270_Y180.getMatrix(); case DOWN_SOUTH: return ModelRotation.X270_Y0.getMatrix(); case DOWN_WEST: return ModelRotation.X270_Y90.getMatrix(); case EAST: return ModelRotation.X0_Y90.getMatrix(); case NORTH: return ModelRotation.X0_Y0.getMatrix(); case SOUTH: return ModelRotation.X0_Y180.getMatrix(); case UP_EAST: return ModelRotation.X90_Y270.getMatrix(); case UP_NORTH: return ModelRotation.X90_Y180.getMatrix(); case UP_SOUTH: return ModelRotation.X90_Y0.getMatrix(); case UP_WEST: return ModelRotation.X90_Y90.getMatrix(); case WEST: return ModelRotation.X0_Y270.getMatrix(); default: return new Matrix4f(); } } else { switch (facing) { case DOWN_EAST: return ModelRotation.X180_Y90.getMatrix(); case DOWN_NORTH: return ModelRotation.X180_Y0.getMatrix(); case DOWN_SOUTH: return ModelRotation.X180_Y180.getMatrix(); case DOWN_WEST: return ModelRotation.X180_Y270.getMatrix(); case EAST: return ModelRotation.X270_Y270.getMatrix(); case NORTH: return ModelRotation.X270_Y180.getMatrix(); case SOUTH: return ModelRotation.X270_Y0.getMatrix(); case UP_EAST: return ModelRotation.X0_Y90.getMatrix(); case UP_NORTH: return ModelRotation.X0_Y0.getMatrix(); case UP_SOUTH: return ModelRotation.X0_Y180.getMatrix(); case UP_WEST: return ModelRotation.X0_Y270.getMatrix(); case WEST: return ModelRotation.X270_Y90.getMatrix(); default: return new Matrix4f(); } } }