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


Java ModelRotation.X0_Y0属性代码示例

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


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

示例1: CCFinalVariant

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);
}
 
开发者ID:TheCBProject,项目名称:CodeChickenLib,代码行数:17,代码来源:CCFinalVariant.java

示例2: 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

示例3: makeBakedQuad

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;
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:14,代码来源:BlockModelUtils.java

示例4: ForgeVariant

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;
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:10,代码来源:BlockStateLoader.java

示例5: rotateVertex

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

示例6: CCFinalMultiVariant

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));
    }
}
 
开发者ID:TheCBProject,项目名称:CodeChickenLib,代码行数:9,代码来源:CCFinalMultiVariant.java

示例7: getDefaultState

public IModelState getDefaultState()
{
    return ModelRotation.X0_Y0;
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:4,代码来源:ModelLoader.java

示例8: 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

示例9: 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

示例10: 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

示例11: 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

示例12: 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

示例13: loadModel

@Alpha
@Override
public IModel loadModel(ResourceLocation resourceLocation) throws Exception {
	try {
		ModelResourceLocation modelLocation;
		if (resourceLocation instanceof ModelResourceLocation)
			modelLocation = (ModelResourceLocation) resourceLocation;
		else
			return null;
		if (!modelLocation.getVariant().equals("inventory") && !modelLocation.getResourcePath().endsWith("_loc")) {
			List<Variant> list = Lists.newLinkedList();
			ModelRotation rotation = ModelRotation.X0_Y0;
			switch (Tool.get(modelLocation.getVariant(), "facing=([a-z]*)")) {
				case "east":
					rotation = ModelRotation.X0_Y270;
					break;
				case "north":
					rotation = ModelRotation.X0_Y180;
					break;
				case "west":
					rotation = ModelRotation.X0_Y90;
					break;
			}
			list.add(new Variant(new ModelResourceLocation(modelLocation.getResourceDomain() + ":" +
					modelLocation.getResourcePath() + "_loc", modelLocation.getVariant()),
					rotation, false, 1));
			VariantList variantList = new VariantList(list);
			return new ModelLoader.WeightedRandomModel(modelLocation, variantList);
		}
		modelLocation = new ModelResourceLocation(modelLocation.getResourceDomain() + 
				modelLocation.getResourcePath().replace("_loc", ""), modelLocation.getVariant());
		String name = modelLocation.getVariant().contains("part=head") ? "head" : "foot";
		String rely = Tool.isEmptyOr(Tool.get(modelLocation.getVariant(), "rely=([a-z]*)"), "null");
		try (IResource resource = Minecraft.getMinecraft().getResourceManager()
					.getResource(new ResourceLocation("skin:models/wardrobe_" + rely + "_" + name + ".json"))) {
			String json = Joiner.on('\n').join(IOUtils.readLines(resource.getInputStream(), Charsets.UTF_8));
			try (Reader reader = new StringReader(WoodType.conversion.apply(json, Tool.get(
					modelLocation.getResourcePath(), "_(.*?_T_.*?_T_[0-9]*_T_.*?_T_.*?_T_[0-9]*)")))) {
				ModelBlock modelBlock = ModelBlock.deserialize(reader);
				return modelLocation.getVariant().equals("inventory") ? new ItemLayerModel(modelBlock) :
					ModelLoader.VanillaLoader.INSTANCE.getLoader().new VanillaModelWrapper(modelLocation,
							modelBlock, false, ModelBlockAnimation.defaultModelBlockAnimation);
			}
		}
	} catch (Exception e) {
		e.printStackTrace();
		throw e;
	}
}
 
开发者ID:NekoCaffeine,项目名称:Alchemy,代码行数:49,代码来源:WardrobeModelLoader.java

示例14: getDefaultState

@Override
public IModelState getDefaultState()
{
    return ModelRotation.X0_Y0;
}
 
开发者ID:maruohon,项目名称:enderutilities,代码行数:5,代码来源:BakedModelInserter.java


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