public static IBakedModel duplicateModel(IBakedModel p_duplicateModel_0_) { List list = duplicateQuadList(p_duplicateModel_0_.getGeneralQuads()); EnumFacing[] aenumfacing = EnumFacing.VALUES; List list1 = new ArrayList(); for (int i = 0; i < aenumfacing.length; ++i) { EnumFacing enumfacing = aenumfacing[i]; List list2 = p_duplicateModel_0_.getFaceQuads(enumfacing); List list3 = duplicateQuadList(list2); list1.add(list3); } SimpleBakedModel simplebakedmodel = new SimpleBakedModel(list, list1, p_duplicateModel_0_.isAmbientOcclusion(), p_duplicateModel_0_.isGui3d(), p_duplicateModel_0_.getParticleTexture(), p_duplicateModel_0_.getItemCameraTransforms()); return simplebakedmodel; }
public static IBakedModel makeModelCube(TextureAtlasSprite p_makeModelCube_0_, int p_makeModelCube_1_) { List list = new ArrayList(); EnumFacing[] aenumfacing = EnumFacing.VALUES; List list1 = new ArrayList(aenumfacing.length); for (int i = 0; i < aenumfacing.length; ++i) { EnumFacing enumfacing = aenumfacing[i]; List list2 = new ArrayList(); list2.add(makeBakedQuad(enumfacing, p_makeModelCube_0_, p_makeModelCube_1_)); list1.add(list2); } IBakedModel ibakedmodel = new SimpleBakedModel(list, list1, true, true, p_makeModelCube_0_, ItemCameraTransforms.DEFAULT); return ibakedmodel; }
public static IBakedModel makeModelCube(TextureAtlasSprite p_makeModelCube_0_, int p_makeModelCube_1_) { List list = new ArrayList(); EnumFacing[] aenumfacing = EnumFacing.values(); List list1 = new ArrayList(aenumfacing.length); for (int i = 0; i < aenumfacing.length; ++i) { EnumFacing enumfacing = aenumfacing[i]; List list2 = new ArrayList(); list2.add(makeBakedQuad(enumfacing, p_makeModelCube_0_, p_makeModelCube_1_)); list1.add(list2); } IBakedModel ibakedmodel = new SimpleBakedModel(list, list1, true, true, p_makeModelCube_0_, ItemCameraTransforms.DEFAULT); return ibakedmodel; }
public void renderBlockDamage(IBlockState state, BlockPos pos, TextureAtlasSprite texture, IBlockAccess blockAccess) { Block block = state.getBlock(); int i = block.getRenderType(); if (i == 3) { state = block.getActualState(state, blockAccess, pos); IBakedModel ibakedmodel = this.blockModelShapes.getModelForState(state); IBakedModel ibakedmodel1 = (new SimpleBakedModel.Builder(ibakedmodel, texture)).makeBakedModel(); this.blockModelRenderer.renderModel(blockAccess, ibakedmodel1, state, pos, Tessellator.getInstance().getWorldRenderer()); } }
public void renderBlockDamage(IBlockState state, BlockPos pos, TextureAtlasSprite texture, IBlockAccess blockAccess) { Block block = state.getBlock(); int i = block.getRenderType(); if (i == 3) { state = block.getActualState(state, blockAccess, pos); IBakedModel ibakedmodel = this.blockModelShapes.getModelForState(state); if (Reflector.ISmartBlockModel.isInstance(ibakedmodel)) { IBlockState iblockstate = (IBlockState)Reflector.call(block, Reflector.ForgeBlock_getExtendedState, new Object[] {state, blockAccess, pos}); for (EnumWorldBlockLayer enumworldblocklayer : EnumWorldBlockLayer.values()) { if (Reflector.callBoolean(block, Reflector.ForgeBlock_canRenderInLayer, new Object[] {enumworldblocklayer})) { Reflector.callVoid(Reflector.ForgeHooksClient_setRenderLayer, new Object[] {enumworldblocklayer}); IBakedModel ibakedmodel2 = (IBakedModel)Reflector.call(ibakedmodel, Reflector.ISmartBlockModel_handleBlockState, new Object[] {iblockstate}); IBakedModel ibakedmodel3 = (new SimpleBakedModel.Builder(ibakedmodel2, texture)).makeBakedModel(); this.blockModelRenderer.renderModel(blockAccess, ibakedmodel3, state, pos, Tessellator.getInstance().getWorldRenderer()); } } return; } IBakedModel ibakedmodel1 = (new SimpleBakedModel.Builder(ibakedmodel, texture)).makeBakedModel(); this.blockModelRenderer.renderModel(blockAccess, ibakedmodel1, state, pos, Tessellator.getInstance().getWorldRenderer()); } }
protected IBakedModel bakeModel(ModelBlockWrapper modelBlockIn, ITransformation modelRotationIn, boolean uvLocked, TextureAtlasSprite texture) { TextureAtlasSprite textureatlassprite = texture; //TextureAtlasSprite textureatlassprite = textureGetter.apply(textureLocation); SimpleBakedModel.Builder builder = (new SimpleBakedModel.Builder(this, textureatlassprite)).setTexture(textureatlassprite); Iterator iterator = modelBlockIn.getElements().iterator(); for(BlockPart blockpart : (List<BlockPart>)modelBlockIn.getElements()) { for(EnumFacing enumfacing : ((Map<EnumFacing, BlockPartFace>)blockpart.mapFaces).keySet()) { BlockPartFace blockpartface = (BlockPartFace)blockpart.mapFaces.get(enumfacing); TextureAtlasSprite textureatlassprite1 = texture; if (blockpartface.cullFace == null || !net.minecraftforge.client.model.TRSRTransformation.isInteger(modelRotationIn.getMatrix())) { builder.addGeneralQuad(this.makeBakedQuad(blockpart, blockpartface, textureatlassprite1, enumfacing, modelRotationIn, uvLocked)); } else { builder.addFaceQuad(modelRotationIn.rotate(blockpartface.cullFace), this.makeBakedQuad(blockpart, blockpartface, textureatlassprite1, enumfacing, modelRotationIn, uvLocked)); } } } return builder.makeBakedModel(); }
public IBakedModel bake(IBakedModel source) { return new SimpleBakedModel(quads, empty_faces, false, true, source.getParticleTexture(), source.getItemCameraTransforms()); }