Skip to content

Minecraft 1.12.2 için NearlyDefault Kaynak paketi

Daha Az Sivri Varsayılan Dokular

başlangıç qwertz19281 · CurseForge
görüntülenme
12 görüntülenme
Güncellendi
Güncellendi 18.10.2026
  • 1.11 — 1.12.2
1 / 2

NearlyDefault kaynak paketi hakkında

Check out the port to newer Versions by meed223: https://www.curseforge.com/minecraft/texture-packs/almostdefault

Downloads under "Files"

NearlyDefault — ekran görüntüsü 3

Algorithm Implementation

import java.awt.image.BufferedImage; import java.io.ByteArrayInputStream; import java.io.EOFException; import java.io.File; import java.io.FileInputStream; import java.util.Arrays;

import javax.imageio.ImageIO;

public class NDP2b {

public static void main(String[] args) throws Exception { base=new File("M:/texdev/v2/vanilla/in"); o64=new File("M:/texdev/v2/vanilla/to64"); o128=new File("M:/texdev/v2/vanilla/to128"); o256=new File("M:/texdev/v2/vanilla/to256"); read.setOut(proc); proc.setOut(write); read.start();proc.start();write.start(); iter(base,""); read.fillDeath(); }

public static void iter(File dir,String sub) throws Exception { File[] farr=dir.listFiles(); for(File f : farr){ if(f.isDirectory()) { iter(f,sub+'/'+f.getName()); }else{ String sup=sub+'/'+f.getName(); //System.out.println(sup); File inf=new File(base,sup); Transo o=new Transo(sup); byte[] ii=new byte[(int) inf.length()]; FileInputStream is=new FileInputStream(inf); int po=0,poe; while(po<ii.length) { poe=is.read(ii, po, ii.length-po); if(poe==-1) { is.close(); throw new EOFException("Baum"); } po+=poe; } is.close(); o.ii=ii; read.put(o); } } }

static Object wlok=new Object();

static Taskor read=new Taskor(1) {

@Override public Object work(Object trans) {try { Transo o=(Transo)trans; //System.out.println(o.sup); o.bimg=ImageIO.read(new ByteArrayInputStream(o.ii)); return o; }catch(Exception ex) {ex.printStackTrace();return null;}}

static Taskor write=new Taskor(1) {

@Override public Object work(Object trans) {try { WTr o=(WTr)trans; ImageIO.write(o.out, "png", o.o); return null; }catch(Exception ex) {ex.printStackTrace();return null;}}

static class WTr { File o;BufferedImage out; public WTr(File a,BufferedImage b) {o=a;out=b;} }

static Taskor proc=new Taskor(0) {

@Override public Object work(Object trans) {try { Transo o=(Transo)trans; System.out.println(getName()+" "+o.sup); boolean ipar=o.sup.contains("items/"); deo(o.bimg,ipar,new File(o64,o.sup),4,3,0); deo(o.bimg,ipar,new File(o128,o.sup),8,5,1); deo(o.bimg,ipar,new File(o256,o.sup),16,9,2); return null; }catch(Exception ex) {ex.printStackTrace();return null;}}

public void deo(BufferedImage bimg, boolean ipar, File o, int scal, int cust, int obid) throws Exception { o.getParentFile().mkdirs(); BufferedImage out=ipar?parse(bimg,scal,cust,obid):parsenb(bimg,scal,cust,obid); write.put(new WTr(o,out)); }

int oR=new int3,oG=new int3,oB=new int3,oA=new int3;

  • generate median-upscaled image
  • @param in ARGB-array
  • @param outbuf @Nullable pass a array for output. Can be null. PLEASE USE RETURNED ARRAY AS OUTPUT
  • @param iw in width
  • @param ih in height
  • @param scal scale factor
  • @param cust median factor
  • @return output array

*/ public byte[] parse(byte[] in, byte[] out, int iw, int ih, int scal, int cust, int obid) { assert(in.length==(iw*ih*4)); int[] R=oR[obid],G=oG[obid],B=oB[obid],A=oA[obid]; int oh=ih*scal,ow=iw*scal,ymow,ydscalmiw,oxy,ixy; if(out==null||out.length!=ow*oh*4) {out=new byte[ow*oh*4];} for(int y=0;y<oh;y++) { ymow=y*ow; ydscalmiw=(y/scal)*iw; for(int x=0;x<ow;x++) { oxy=(ymow+x)*4; ixy=(ydscalmiw+(x/scal))*4; out[oxy]=in[ixy];out[oxy+1]=in[ixy+1];out[oxy+2]=in[ixy+2];out[oxy+3]=in[ixy+3]; } } int custq=cust*cust; int wb=((cust-1)/2); int wd=((custq-1)/2); int m=0,dpx=0,dpy=0,pps; if(A==null||A.length!=custq) { //opixel[obid]=pixel=new int[custq]; oR[obid]=R=new int[custq]; oG[obid]=G=new int[custq]; oB[obid]=B=new int[custq]; oA[obid]=A=new int[custq]; } for(int i=wb;i<ow-wb;i++){ for(int j=wb;j<oh-wb;j++){ //int ma=(img.getRGB(i, j) >> 24) & 0xff; m=0; pps=((j*ow)+i)*4; for(int k=-wb;k<=wb;k++){ dpy=(k+j)*ow; for(int l=-wb;l<=wb;l++){ //pixel[m]=img.getRGB(i+k, j+l); dpx=(dpy+i+l)*4; A[m]=out[dpx]&0xFF; R[m]=out[dpx+1]&0xFF; G[m]=out[dpx+2]&0xFF; B[m]=out[dpx+3]&0xFF; m++; } } /*for(int k=0;k<pixel.length;k++){ R[k]=(pixel[k] >> 16) & 0xFF; G[k]=(pixel[k] >> 8) & 0xFF; B[k]=(pixel[k] >> 0) & 0xFF; A[k]=(pixel[k] >> 24) & 0xff; }*/ Arrays.sort(R); Arrays.sort(G); Arrays.sort(B); Arrays.sort(A); /*img.setRGB(i,j, ((A[wd] & 0xFF) << 24) | ((R[wd] & 0xFF) << 16) | ((G[wd] & 0xFF) << 8) | ((B[wd] & 0xFF) << 0));*/ out[pps]=(byte) A[wd]; out[pps+1]=(byte) R[wd]; out[pps+2]=(byte) G[wd]; out[pps+3]=(byte) B[wd]; } } return out; }

byte ozwbuf=new byte3,ozwobuf=new byte3;

BufferedImage[] bei=new BufferedImage[3];

/*public void etchCol(byte[] zwbuf, int w, int sx, int sy, int dx, int dy) { int sp=((sy*w)+sx)*4,dp=((dy*w)+dx)*4; zwbuf[dp]=zwbuf[sp]; zwbuf[dp+1]=zwbuf[sp+1]; zwbuf[dp+2]=zwbuf[sp+2]; zwbuf[dp+3]=zwbuf[sp+3]; }*/

public void etchCol(byte[] zwbuf, int w, byte a, byte r, byte g, byte b, int dx, int dy) { int dp=((dy*w)+dx)*4; zwbuf[dp]=a; zwbuf[dp+1]=r; zwbuf[dp+2]=g; zwbuf[dp+3]=b; }

byte[] sA=new byte[8192]; byte[] sR=new byte[8192]; byte[] sG=new byte[8192]; byte[] sB=new byte[8192]; byte odA=new byte3; byte odR=new byte3; byte odG=new byte3; byte odB=new byte3;

public BufferedImage parsenb(BufferedImage in, int scal, int cust, int obid) { int iw=in.getWidth(),ih=in.getHeight(); //int iwp1=iw+1,ihp1=ih+1,iwp2=iwp1+1,ihp2=ihp1+1; int zwbufs=iw*ih*4; byte[] zwbuf=ozwbuf[obid];byte[] zwobuf=ozwobuf[obid]; if(zwbuf==null||zwbuf.length!=zwbufs) {ozwobuf[obid]=zwbuf=new byte[zwbufs];} int scany,pipo,cc; for(int y=0;y<ih;y++) { scany=y*iw; for(int x=0;x<iw;x++) { pipo=(scany+x)*4; cc=in.getRGB(x, y); zwbuf[pipo]=(byte) (cc >> 24); zwbuf[pipo+1]=(byte) (cc >> 16); zwbuf[pipo+2]=(byte) (cc >> 8); zwbuf[pipo+3]=(byte) cc; } } /*for(int y=0;y<ihp2;y++) { scany=y*iwp2; for(int x=0;x<iwp2;x++) { pipo=(scany+x)*4; if(y==0||y==ihp1||x==0||x==iwp1) { zwbuf[pipo]=(byte) (dca/ccc); zwbuf[pipo+1]=(byte) (dcr/ccc); zwbuf[pipo+2]=(byte) (dcg/ccc); zwbuf[pipo+3]=(byte) (dcb/ccc); } if(x<=1) { if(y<=1&&(x==0||y==0)) { zwbuf[pipo]=zwbuf[0]; zwbuf[pipo+1]=zwbuf[1]; zwbuf[pipo+2]=zwbuf[2]; zwbuf[pipo+3]=zwbuf[3]; } else if(y>=ihp1-1&&(x==0||y==ihp1)) { zwbuf[pipo]=zwbuf[zwbuf.length-(iwp2*4)]; zwbuf[pipo+1]=zwbuf[zwbuf.length-(iwp2*4)+1]; zwbuf[pipo+2]=zwbuf[zwbuf.length-(iwp2*4)+2]; zwbuf[pipo+3]=zwbuf[zwbuf.length-(iwp2*4)+3]; } } else if(x>=iwp1-1) { if(y<=1&&(x==iwp1||y==0)) { zwbuf[pipo]=zwbuf[(iwp2*4)]; zwbuf[pipo+1]=zwbuf[(iwp2*4)+1]; zwbuf[pipo+2]=zwbuf[(iwp2*4)+2]; zwbuf[pipo+3]=zwbuf[(iwp2*4)+3]; } else if(y>=ihp1-1&&(x==iwp1||y==ihp1)) { zwbuf[pipo]=zwbuf[zwbuf.length-4]; zwbuf[pipo+1]=zwbuf[zwbuf.length-3]; zwbuf[pipo+2]=zwbuf[zwbuf.length-2]; zwbuf[pipo+3]=zwbuf[zwbuf.length-1]; } } } }*/ zwobuf=parse(zwbuf,zwobuf,iw,ih,scal,cust,obid); int ow=iw*scal,oh=ih*scal;//,owp1=iwp1*scal,ohp1=ihp1*scal,owp2=iwp2*scal; BufferedImage o=bei[obid]; if(o==null||o.getWidth()!=ow||o.getHeight()!=oh) { o=bei[obid]=new BufferedImage(ow,oh,BufferedImage.TYPE_INT_ARGB); } int minsc,pen; for(int y=0;y<oh;y++) { scany=y*ow; minsc=((y/scal)*iw); for(int x=0;x<ow;x++) { pipo=(scany+x)*4; if(ssssescal[x%scal]) { pen=(minsc+(x/scal))*4; zwobuf[pipo]=zwbuf[pen]; zwobuf[pipo+1]=zwbuf[pen+1]; zwobuf[pipo+2]=zwbuf[pen+2]; zwobuf[pipo+3]=zwbuf[pen+3]; } o.setRGB(x, y, ((zwobuf[pipo] & 0xFF) << 24) | ((zwobuf[pipo+1] & 0xFF) << 16) | ((zwobuf[pipo+2] & 0xFF) << 8) | (zwobuf[pipo+3] & 0xFF)); } } return o; }

public BufferedImage parse(BufferedImage in, int scal, int cust, int obid) { int iw=in.getWidth(),ih=in.getHeight(); int iwp1=iw+1,ihp1=ih+1,iwp2=iwp1+1,ihp2=ihp1+1; int zwbufs=iwp2*ihp2*4; byte[] zwbuf=ozwbuf[obid];byte[] zwobuf=ozwobuf[obid]; if(zwbuf==null||zwbuf.length!=zwbufs) {ozwobuf[obid]=zwbuf=new byte[zwbufs];} int scany,pipo,cc; int ccc=0,ym1;

for(int y=1;y<ihp1;y++) { scany=y*iwp2;ym1=y-1; for(int x=1;x<iwp1;x++) { pipo=(scany+x)*4; cc=in.getRGB(x-1, ym1); zwbuf[pipo]=(byte) (cc >> 24); zwbuf[pipo+1]=(byte) (cc >> 16); zwbuf[pipo+2]=(byte) (cc >> 8); zwbuf[pipo+3]=(byte) cc; if(y==1||y==ih||x==1||x==iw) { sA[ccc]=zwbuf[pipo]; sR[ccc]=zwbuf[pipo+1]; sG[ccc]=zwbuf[pipo+2]; sB[ccc]=zwbuf[pipo+3]; ccc++; } } } byte[] dA=odA[obid];if(dA==null||dA.length!=ccc) {odA[obid]=dA=new byte[ccc];} System.arraycopy(sA, 0, dA, 0, ccc);Arrays.sort(dA); byte[] dR=odR[obid];if(dR==null||dR.length!=ccc) {odR[obid]=dR=new byte[ccc];} System.arraycopy(sR, 0, dR, 0, ccc);Arrays.sort(dR); byte[] dG=odG[obid];if(dG==null||dG.length!=ccc) {odG[obid]=dG=new byte[ccc];} System.arraycopy(sG, 0, dG, 0, ccc);Arrays.sort(dG); byte[] dB=odB[obid];if(dB==null||dB.length!=ccc) {odB[obid]=dB=new byte[ccc];} System.arraycopy(sB, 0, dB, 0, ccc);Arrays.sort(dB); /*for(int y=0;y<ihp2;y++) { scany=y*iwp2; for(int x=0;x<iwp2;x++) { pipo=(scany+x)*4; if(y==0||y==ihp1||x==0||x==iwp1) { zwbuf[pipo]=(byte) (dca/ccc); zwbuf[pipo+1]=(byte) (dcr/ccc); zwbuf[pipo+2]=(byte) (dcg/ccc); zwbuf[pipo+3]=(byte) (dcb/ccc); } if(x<=1) { if(y<=1&&(x==0||y==0)) { zwbuf[pipo]=zwbuf[0]; zwbuf[pipo+1]=zwbuf[1]; zwbuf[pipo+2]=zwbuf[2]; zwbuf[pipo+3]=zwbuf[3]; } else if(y>=ihp1-1&&(x==0||y==ihp1)) { zwbuf[pipo]=zwbuf[zwbuf.length-(iwp2*4)]; zwbuf[pipo+1]=zwbuf[zwbuf.length-(iwp2*4)+1]; zwbuf[pipo+2]=zwbuf[zwbuf.length-(iwp2*4)+2]; zwbuf[pipo+3]=zwbuf[zwbuf.length-(iwp2*4)+3]; } } else if(x>=iwp1-1) { if(y<=1&&(x==iwp1||y==0)) { zwbuf[pipo]=zwbuf[(iwp2*4)]; zwbuf[pipo+1]=zwbuf[(iwp2*4)+1]; zwbuf[pipo+2]=zwbuf[(iwp2*4)+2]; zwbuf[pipo+3]=zwbuf[(iwp2*4)+3]; } else if(y>=ihp1-1&&(x==iwp1||y==ihp1)) { zwbuf[pipo]=zwbuf[zwbuf.length-4]; zwbuf[pipo+1]=zwbuf[zwbuf.length-3]; zwbuf[pipo+2]=zwbuf[zwbuf.length-2]; zwbuf[pipo+3]=zwbuf[zwbuf.length-1]; } } } }*/ byte dcca=dA[ccc/2],dccr=dR[ccc/2],dccg=dG[ccc/2],dccb=dB[ccc/2]; for(int x=0;x<iwp2;x++) { etchCol(zwbuf,iwp2,dcca,dccr,dccg,dccb,x,0); etchCol(zwbuf,iwp2,dcca,dccr,dccg,dccb,x,ihp1); } for(int y=0;y<ihp2;y++) { etchCol(zwbuf,iwp2,dcca,dccr,dccg,dccb,0,y); etchCol(zwbuf,iwp2,dcca,dccr,dccg,dccb,iwp1,y); } zwobuf=parse(zwbuf,zwobuf,iwp2,ihp2,scal,cust,obid); int ow=iw*scal,oh=ih*scal,owp1=iwp1*scal,ohp1=ihp1*scal,owp2=iwp2*scal; BufferedImage o=bei[obid]; if(o==null||o.getWidth()!=ow||o.getHeight()!=oh) { o=bei[obid]=new BufferedImage(ow,oh,BufferedImage.TYPE_INT_ARGB); } int minsc,pen; for(int y=scal;y<ohp1;y++) { scany=y*owp2;ym1=y-scal; minsc=((y/scal)*iwp2); for(int x=scal;x<owp1;x++) { pipo=(scany+x)*4; if(ssssescal[x%scal]) { pen=(minsc+(x/scal))*4; zwobuf[pipo]=zwbuf[pen]; zwobuf[pipo+1]=zwbuf[pen+1]; zwobuf[pipo+2]=zwbuf[pen+2]; zwobuf[pipo+3]=zwbuf[pen+3]; } o.setRGB(x-scal, ym1, ((zwobuf[pipo] & 0xFF) << 24) | ((zwobuf[pipo+1] & 0xFF) << 16) | ((zwobuf[pipo+2] & 0xFF) << 8) | (zwobuf[pipo+3] & 0xFF)); } } return o; } };

static class Transo { String sup;BufferedImage bimg;byte[] ii; public Transo(String a) {sup=a;} }

public static boolean beh=false;

public static File base,o64,o128,o256;

static boolean[] sssse= new boolean[]{null,null,{{true,true},{true,true}},null, {{false,true,true,false}, {true,true,true,true}, {true,true,true,true}, {false,true,true,false}},null,null,null, {{false,false,true,true,true,true,false,false}, {false,true,true,true,true,true,true,false}, {true,true,true,true,true,true,true,true}, {true,true,true,true,true,true,true,true}, {true,true,true,true,true,true,true,true}, {true,true,true,true,true,true,true,true}, {false,true,true,true,true,true,true,false}, {false,false,true,true,true,true,false,false},},null,null,null,null,null,null,null, {{false,false,false,false,false,true,true,true,true,true,true,false,false,false,false,false}, {false,false,false,true,true,true,true,true,true,true,true,true,true,false,false,false}, {false,false,true,true,true,true,true,true,true,true,true,true,true,true,false,false}, {false,true,true,true,true,true,true,true,true,true,true,true,true,true,true,false}, {false,true,true,true,true,true,true,true,true,true,true,true,true,true,true,false}, {true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true}, {true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true}, {true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true}, {true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true}, {true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true}, {true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true}, {false,true,true,true,true,true,true,true,true,true,true,true,true,true,true,false}, {false,true,true,true,true,true,true,true,true,true,true,true,true,true,true,false}, {false,false,true,true,true,true,true,true,true,true,true,true,true,true,false,false}, {false,false,false,true,true,true,true,true,true,true,true,true,true,false,false,false}, {false,false,false,false,false,true,true,true,true,true,true,false,false,false,false,false}} }; }

NearlyDefault — ekran görüntüsü 4

NearlyDefault nasıl kurulur

With Millida Launcher

  1. Install Millida Launcher

    The launcher is free: download it at millida.net/launcher and sign in with any nickname.

  2. Click “Install” on this page

    The launcher opens and installs the resource pack for Minecraft 1.11–1.12.2 automatically.

  3. Launch the game

    A profile with it appears in the launcher: click “Play”.

Manually

  1. Download the archive

    Pick the file ND NewDefault 256x (8ecbc1e9fc691af61e0f16995ef5b097).zip (1.2 MB) for your game version. No need to unpack it.

  2. Put it in the resourcepacks folder

    The easiest way: “Options”, then “Resource Packs”, then “Open Pack Folder”, and drag the archive there.

  3. Enable the pack

    In the same window, move the pack to the right-hand “Selected” column and click “Done”.

Sürümler

Bağımlılıklarla

MinecraftYükleyiciDosyaTarihİşlemler
——v2.0.1 64x 1.139.1 MB
1.12.1—ND NewDefault 256x (8ecbc1e9fc691af61e0f16995ef5b097).zip1.2 MB

SSS

Which Minecraft versions does NearlyDefault work on?

There are files for 1.12.2, 1.12.1, 1.12, 1.11.2, 1.11.1, 1.11. The newest is 1.12.2.

How do I download NearlyDefault?

With Millida Launcher: it installs NearlyDefault into a modpack by itself, for the right game version and loader. The launcher is free.

Yorumlar

NearlyDefault için ilk puanı sen ver

Yorumlar 0

Yorum yapmak için giriş yapınGiriş yap

Benzer kaynak paketleri

Tüm kaynak paketleri

Bununla ilgili daha fazla