当前位置: 首页>>代码示例>>Java>>正文


Java ModelRotation.X270_Y0属性代码示例

本文整理汇总了Java中net.minecraft.client.renderer.block.model.ModelRotation.X270_Y0属性的典型用法代码示例。如果您正苦于以下问题:Java ModelRotation.X270_Y0属性的具体用法?Java ModelRotation.X270_Y0怎么用?Java ModelRotation.X270_Y0使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在net.minecraft.client.renderer.block.model.ModelRotation的用法示例。


在下文中一共展示了ModelRotation.X270_Y0属性的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: bake

@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);
}
 
开发者ID:the-realest-stu,项目名称:Etheric,代码行数:37,代码来源:PipeModel.java

示例2: addQuads

@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));
       
	
}
 
开发者ID:Alec-WAM,项目名称:CrystalMod,代码行数:61,代码来源:AttachmentEStorageExport.java

示例3: addQuads

@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));
}
 
开发者ID:Alec-WAM,项目名称:CrystalMod,代码行数:60,代码来源:AttachmentEStorageSensor.java

示例4: addQuads

@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));
}
 
开发者ID:Alec-WAM,项目名称:CrystalMod,代码行数:57,代码来源:AttachmentEStorageImport.java

示例5: renderIronCap

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));
    }
}
 
开发者ID:Alec-WAM,项目名称:CrystalMod,代码行数:79,代码来源:ModelPipeBaked.java

示例6: getMeterQuads

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;
  }
 
开发者ID:Alec-WAM,项目名称:CrystalMod,代码行数:49,代码来源:ModelBattery.java


注:本文中的net.minecraft.client.renderer.block.model.ModelRotation.X270_Y0属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。