Add support for shade=false models, switch light/fire blocks over to use

it
This commit is contained in:
Mike Primm 2022-02-05 18:24:38 -06:00
parent 102f3d06f0
commit b237c49798
12 changed files with 125 additions and 83 deletions

View file

@ -317,6 +317,7 @@ public class HDBlockModels {
double[] to = new double[3]; double[] to = new double[3];
double xrot = 0, yrot = 0, zrot = 0; double xrot = 0, yrot = 0, zrot = 0;
double xrotorig = 8, yrotorig = 8, zrotorig = 8; double xrotorig = 8, yrotorig = 8, zrotorig = 8;
boolean shade = true;
ArrayList<ModelBoxSide> sides = new ArrayList<ModelBoxSide>(); ArrayList<ModelBoxSide> sides = new ArrayList<ModelBoxSide>();
}; };
@ -916,12 +917,15 @@ public class HDBlockModels {
String[] prms = av[1].split(":"); String[] prms = av[1].split(":");
ModelBox box = new ModelBox(); ModelBox box = new ModelBox();
if (prms.length > 0) { // Handle from (from-x/y/z) if (prms.length > 0) { // Handle from (from-x/y/z or from-x/y/z/shadow)
String[] xyz = prms[0].split("/"); String[] xyz = prms[0].split("/");
if (xyz.length == 3) { if ((xyz.length == 3) || (xyz.length == 4)) {
box.from[0] = Double.parseDouble(xyz[0]); box.from[0] = Double.parseDouble(xyz[0]);
box.from[1] = Double.parseDouble(xyz[1]); box.from[1] = Double.parseDouble(xyz[1]);
box.from[2] = Double.parseDouble(xyz[2]); box.from[2] = Double.parseDouble(xyz[2]);
if ((xyz.length >= 4) && (xyz[3].equals("false"))) {
box.shade = false;
}
} }
else { else {
Log.severe("Invalid modellist FROM value (" + prms[0] + " at line " + lineNum); Log.severe("Invalid modellist FROM value (" + prms[0] + " at line " + lineNum);
@ -1004,7 +1008,7 @@ public class HDBlockModels {
for (ModelBox bl : boxes) { for (ModelBox bl : boxes) {
// Loop through faces // Loop through faces
for (ModelBoxSide side : bl.sides) { for (ModelBoxSide side : bl.sides) {
PatchDefinition patch = pdf.getModelFace(bl.from, bl.to, side.side, side.uv, side.rot, side.textureid); PatchDefinition patch = pdf.getModelFace(bl.from, bl.to, side.side, side.uv, side.rot, bl.shade, side.textureid);
if (patch != null) { if (patch != null) {
// If any rotations, apply them here // If any rotations, apply them here
if ((bl.xrot != 0) || (bl.yrot != 0) || (bl.zrot != 0)) { if ((bl.xrot != 0) || (bl.yrot != 0) || (bl.zrot != 0)) {

View file

@ -53,6 +53,10 @@ public interface HDPerspectiveState {
* @return y coordinate * @return y coordinate
*/ */
int getPixelY(); int getPixelY();
/**
* Get current patch shade setting (false = no shadows)
*/
boolean getShade();
/** /**
* Return submodel alpha value (-1 if no submodel rendered) * Return submodel alpha value (-1 if no submodel rendered)
* @return alpha value * @return alpha value

View file

@ -128,12 +128,14 @@ public class IsoHDPerspective implements HDPerspective {
double patch_t[] = new double[2*HDBlockModels.getMaxPatchCount()]; double patch_t[] = new double[2*HDBlockModels.getMaxPatchCount()];
double patch_u[] = new double[2*HDBlockModels.getMaxPatchCount()]; double patch_u[] = new double[2*HDBlockModels.getMaxPatchCount()];
double patch_v[] = new double[2*HDBlockModels.getMaxPatchCount()]; double patch_v[] = new double[2*HDBlockModels.getMaxPatchCount()];
boolean patch_shade[] = new boolean[2*HDBlockModels.getMaxPatchCount()];
BlockStep patch_step[] = new BlockStep[2*HDBlockModels.getMaxPatchCount()]; BlockStep patch_step[] = new BlockStep[2*HDBlockModels.getMaxPatchCount()];
int patch_id[] = new int[2*HDBlockModels.getMaxPatchCount()]; int patch_id[] = new int[2*HDBlockModels.getMaxPatchCount()];
int cur_patch = -1; int cur_patch = -1;
double cur_patch_u; double cur_patch_u;
double cur_patch_v; double cur_patch_v;
double cur_patch_t; double cur_patch_t;
boolean cur_shade;
int[] subblock_xyz = new int[3]; int[] subblock_xyz = new int[3];
final MapIterator mapiter; final MapIterator mapiter;
@ -452,6 +454,7 @@ public class IsoHDPerspective implements HDPerspective {
patch_t[hitcnt] = t; patch_t[hitcnt] = t;
patch_u[hitcnt] = u; patch_u[hitcnt] = u;
patch_v[hitcnt] = v; patch_v[hitcnt] = v;
patch_shade[hitcnt] = pd.shade;
patch_id[hitcnt] = pd.textureindex; patch_id[hitcnt] = pd.textureindex;
if(det > 0) { if(det > 0) {
patch_step[hitcnt] = pd.step.opposite(); patch_step[hitcnt] = pd.step.opposite();
@ -514,6 +517,7 @@ public class IsoHDPerspective implements HDPerspective {
cur_patch = patch_id[best_patch]; /* Mark this as current patch */ cur_patch = patch_id[best_patch]; /* Mark this as current patch */
cur_patch_u = patch_u[best_patch]; cur_patch_u = patch_u[best_patch];
cur_patch_v = patch_v[best_patch]; cur_patch_v = patch_v[best_patch];
cur_shade = patch_shade[best_patch];
laststep = patch_step[best_patch]; laststep = patch_step[best_patch];
cur_patch_t = best_t; cur_patch_t = best_t;
// If the water patch, switch to water state and patch index // If the water patch, switch to water state and patch index
@ -905,7 +909,7 @@ public class IsoHDPerspective implements HDPerspective {
* Get current texture index * Get current texture index
*/ */
@Override @Override
public int getTextureIndex() { public final int getTextureIndex() {
return cur_patch; return cur_patch;
} }
@ -913,7 +917,7 @@ public class IsoHDPerspective implements HDPerspective {
* Get current U of patch intercept * Get current U of patch intercept
*/ */
@Override @Override
public double getPatchU() { public final double getPatchU() {
return cur_patch_u; return cur_patch_u;
} }
@ -921,10 +925,19 @@ public class IsoHDPerspective implements HDPerspective {
* Get current V of patch intercept * Get current V of patch intercept
*/ */
@Override @Override
public double getPatchV() { public final double getPatchV() {
return cur_patch_v; return cur_patch_v;
} }
/** /**
* Get current patch noShadow setting (true = no shadows/lighting)
*/
@Override
public final boolean getShade() {
// Shade if shade set OR not patch
return cur_shade || (cur_patch < 0); /* If patch hit */
}
/**
* Light level cache * Light level cache
* @param index of light level (0-3) * @param index of light level (0-3)
*/ */

View file

@ -217,8 +217,8 @@ public class ShadowHDLighting extends DefaultHDLighting {
/* Apply lighting to given pixel colors (1 outcolor if normal, 2 if night/day) */ /* Apply lighting to given pixel colors (1 outcolor if normal, 2 if night/day) */
public void applyLighting(HDPerspectiveState ps, HDShaderState ss, Color incolor, Color[] outcolor) { public void applyLighting(HDPerspectiveState ps, HDShaderState ss, Color incolor, Color[] outcolor) {
int[] shadowscale = null; int[] shadowscale = null;
if(smooth) { if (smooth && ps.getShade()) {
shadowscale = ss.getLightingTable(); shadowscale = ss.getLightingTable();
if (shadowscale == null) { if (shadowscale == null) {
shadowscale = defLightingTable; shadowscale = defLightingTable;

View file

@ -202,50 +202,52 @@ public class TexturePackHDShader implements HDShader {
if (c.getAlpha() > 0) { if (c.getAlpha() > 0) {
/* Scale brightness depending upon face */ /* Scale brightness depending upon face */
if (this.lightingTable != null) { if (ps.getShade()) {
switch(ps.getLastBlockStep()) { if (this.lightingTable != null) {
case X_MINUS: switch (ps.getLastBlockStep()) {
case X_PLUS: case X_MINUS:
/* 60% brightness */ case X_PLUS:
c.blendColor(0xFF999999); /* 60% brightness */
break; c.blendColor(0xFF999999);
case Y_MINUS: break;
// 95% for even case Y_MINUS:
if((mapiter.getY() & 0x01) == 0) { // 95% for even
c.blendColor(0xFFF3F3F3); if((mapiter.getY() & 0x01) == 0) {
} c.blendColor(0xFFF3F3F3);
break; }
case Y_PLUS: break;
/* 50%*/ case Y_PLUS:
c.blendColor(0xFF808080); /* 50%*/
break; c.blendColor(0xFF808080);
case Z_MINUS: break;
case Z_PLUS: case Z_MINUS:
default: case Z_PLUS:
/* 80%*/ default:
c.blendColor(0xFFCDCDCD); /* 80%*/
break; c.blendColor(0xFFCDCDCD);
} break;
} }
else { }
switch(ps.getLastBlockStep()) { else {
case X_MINUS: switch (ps.getLastBlockStep()) {
case X_PLUS: case X_MINUS:
/* 60% brightness */ case X_PLUS:
c.blendColor(0xFFA0A0A0); /* 60% brightness */
break; c.blendColor(0xFFA0A0A0);
case Y_MINUS: break;
case Y_PLUS: case Y_MINUS:
/* 85% brightness for even, 90% for even*/ case Y_PLUS:
if((mapiter.getY() & 0x01) == 0) /* 85% brightness for even, 90% for even*/
c.blendColor(0xFFD9D9D9); if((mapiter.getY() & 0x01) == 0)
else c.blendColor(0xFFD9D9D9);
c.blendColor(0xFFE6E6E6); else
break; c.blendColor(0xFFE6E6E6);
default: break;
break; default:
} break;
} }
}
}
/* Handle light level, if needed */ /* Handle light level, if needed */
lighting.applyLighting(ps, this, c, tmpcolor); lighting.applyLighting(ps, this, c, tmpcolor);
/* If grid scale, add it */ /* If grid scale, add it */

View file

@ -223,8 +223,8 @@ public class ModModelDefinitionImpl implements ModModelDefinition {
return id; return id;
} }
public String getModelFacePatchID(double[] from, double[] to, BlockSide face, double[] uv, ModelBlockModel.SideRotation rot, int textureid) { public String getModelFacePatchID(double[] from, double[] to, BlockSide face, double[] uv, ModelBlockModel.SideRotation rot, boolean shade, int textureid) {
PatchDefinition pd = pdf.getModelFace(from, to, face, uv, rot, textureid); PatchDefinition pd = pdf.getModelFace(from, to, face, uv, rot, shade, textureid);
if (pd == null) if (pd == null)
return null; // Invalid patch return null; // Invalid patch
for (int i = 0; i < blkPatch.size(); i++) { for (int i = 0; i < blkPatch.size(); i++) {

View file

@ -19,6 +19,7 @@ public class ModelBlockModelImpl extends BlockModelImpl implements ModelBlockMod
private double[] from = { 0, 0, 0 }; private double[] from = { 0, 0, 0 };
private double[] to = { 16, 16, 16 }; private double[] to = { 16, 16, 16 };
private double xrot = 0, yrot = 0, zrot = 0; private double xrot = 0, yrot = 0, zrot = 0;
private boolean shade;
@Override @Override
public void addBlockSide(BlockSide side, double[] uv, SideRotation rot, int textureid) { public void addBlockSide(BlockSide side, double[] uv, SideRotation rot, int textureid) {
ModelSide ms = new ModelSide(); ModelSide ms = new ModelSide();
@ -85,7 +86,11 @@ public class ModelBlockModelImpl extends BlockModelImpl implements ModelBlockMod
} }
else { else {
for (ModelBlockImpl mb: boxes) { for (ModelBlockImpl mb: boxes) {
line += String.format(",box=%f/%f/%f:%f/%f/%f", mb.from[0], mb.from[1], mb.from[2], mb.to[0], mb.to[1], mb.to[2]); line += String.format(",box=%f/%f/%f", mb.from[0], mb.from[1], mb.from[2]);
if (!mb.shade) { // if shade=false
line += "/false";
}
line += String.format(":%f/%f/%f", mb.to[0], mb.to[1], mb.to[2]);
if ((mb.xrot != 0) || (mb.yrot != 0) || (mb.zrot != 0)) { // If needed, add rotation if ((mb.xrot != 0) || (mb.yrot != 0) || (mb.zrot != 0)) { // If needed, add rotation
line += String.format("/%f/%f/%f", mb.xrot, mb.yrot, mb.zrot); line += String.format("/%f/%f/%f", mb.xrot, mb.yrot, mb.zrot);
} }
@ -134,13 +139,17 @@ public class ModelBlockModelImpl extends BlockModelImpl implements ModelBlockMod
* @param xrot - degrees of rotation of block around X * @param xrot - degrees of rotation of block around X
* @param yrot - degrees of rotation of block around Y * @param yrot - degrees of rotation of block around Y
* @param zrot - degrees of rotation of block around Z * @param zrot - degrees of rotation of block around Z
* @param shade - shade setting for model
* @return model block to add faces to * @return model block to add faces to
*/ */
public ModelBlock addModelBlock(double[] from, double[] to, double xrot, double yrot, double zrot) { @Override
public ModelBlock addModelBlock(double[] from, double[] to, double xrot, double yrot, double zrot,
boolean shade) {
ModelBlockImpl mbi = new ModelBlockImpl(); ModelBlockImpl mbi = new ModelBlockImpl();
if (from != null) { mbi.from[0] = from[0]; mbi.from[1] = from[1]; mbi.from[2] = from[2]; } if (from != null) { mbi.from[0] = from[0]; mbi.from[1] = from[1]; mbi.from[2] = from[2]; }
if (to != null) { mbi.to[0] = to[0]; mbi.to[1] = to[1]; mbi.to[2] = to[2]; } if (to != null) { mbi.to[0] = to[0]; mbi.to[1] = to[1]; mbi.to[2] = to[2]; }
mbi.xrot = xrot; mbi.yrot = yrot; mbi.zrot = zrot; mbi.xrot = xrot; mbi.yrot = yrot; mbi.zrot = zrot;
mbi.shade = shade;
boxes.add(mbi); boxes.add(mbi);
return mbi; return mbi;
} }

View file

@ -29,6 +29,7 @@ public class PatchDefinition implements RenderPatch {
public SideVisible sidevis; /* Which side is visible */ public SideVisible sidevis; /* Which side is visible */
public int textureindex; public int textureindex;
public BlockStep step; /* Best approximation of orientation of surface, from top (positive determinent) */ public BlockStep step; /* Best approximation of orientation of surface, from top (positive determinent) */
public boolean shade; // If false, patch is not shaded
private int hc; private int hc;
/* Offset vector of middle of block */ /* Offset vector of middle of block */
private static final Vector3D offsetCenter = new Vector3D(0.5,0.5,0.5); private static final Vector3D offsetCenter = new Vector3D(0.5,0.5,0.5);
@ -45,6 +46,7 @@ public class PatchDefinition implements RenderPatch {
v = new Vector3D(); v = new Vector3D();
sidevis = SideVisible.BOTH; sidevis = SideVisible.BOTH;
textureindex = 0; textureindex = 0;
shade = true;
update(); update();
} }
PatchDefinition(PatchDefinition pd) { PatchDefinition(PatchDefinition pd) {
@ -68,6 +70,7 @@ public class PatchDefinition implements RenderPatch {
this.sidevis = pd.sidevis; this.sidevis = pd.sidevis;
this.textureindex = pd.textureindex; this.textureindex = pd.textureindex;
this.step = pd.step; this.step = pd.step;
this.shade = pd.shade;
this.hc = pd.hc; this.hc = pd.hc;
} }
/** /**
@ -110,6 +113,7 @@ public class PatchDefinition implements RenderPatch {
vmaxatumax = orig.vmaxatumax; vmaxatumax = orig.vmaxatumax;
vminatumax = orig.vminatumax; vminatumax = orig.vminatumax;
sidevis = orig.sidevis; sidevis = orig.sidevis;
shade = orig.shade;
this.textureindex = (textureindex < 0) ? orig.textureindex : textureindex; this.textureindex = (textureindex < 0) ? orig.textureindex : textureindex;
u = new Vector3D(); u = new Vector3D();
v = new Vector3D(); v = new Vector3D();
@ -291,7 +295,8 @@ public class PatchDefinition implements RenderPatch {
(umin == p.umin) && (umax == p.umax) && (umin == p.umin) && (umax == p.umax) &&
(vmin == p.vmin) && (vmax == p.vmax) && (vmin == p.vmin) && (vmax == p.vmax) &&
(vmaxatumax == p.vmaxatumax) && (vmaxatumax == p.vmaxatumax) &&
(vminatumax == p.vminatumax) && (sidevis == p.sidevis)) { (vminatumax == p.vminatumax) && (sidevis == p.sidevis) &&
(shade == p.shade)) {
return true; return true;
} }
} }
@ -307,8 +312,8 @@ public class PatchDefinition implements RenderPatch {
} }
@Override @Override
public String toString() { public String toString() {
return String.format("xyz0=%f/%f/%f,xyzU=%f/%f/%f,xyzV=%f/%f/%f,minU=%f,maxU=%f,vMin=%f/%f,vmax=%f/%f,side=%s,txtidx=%d", return String.format("xyz0=%f/%f/%f,xyzU=%f/%f/%f,xyzV=%f/%f/%f,minU=%f,maxU=%f,vMin=%f/%f,vmax=%f/%f,side=%s,txtidx=%d,shade=%b",
x0, y0, z0, xu, yu, zu, xv, yv, zv, umin, umax, vmin, vminatumax, vmax, vmaxatumax, sidevis, textureindex); x0, y0, z0, xu, yu, zu, xv, yv, zv, umin, umax, vmin, vminatumax, vmax, vmaxatumax, sidevis, textureindex, shade);
} }
// //
@ -324,9 +329,11 @@ public class PatchDefinition implements RenderPatch {
// @param face - which face (determines use of xyz-min vs xyz-max // @param face - which face (determines use of xyz-min vs xyz-max
// @param uv - bounds on UV (umin, vmin, umax, vmax): if undefined, default based on face range (minecraft UV is relative to top left corner of texture) // @param uv - bounds on UV (umin, vmin, umax, vmax): if undefined, default based on face range (minecraft UV is relative to top left corner of texture)
// @param rot - texture rotation (default 0 - DEG0, DEG90, DEG180, DEG270) // @param rot - texture rotation (default 0 - DEG0, DEG90, DEG180, DEG270)
// @param shade - if false, no shadows on patch
// @param textureid - texture ID // @param textureid - texture ID
public void updateModelFace(double[] from, double[] to, BlockSide face, double[] uv, ModelBlockModel.SideRotation rot, int textureid) { public void updateModelFace(double[] from, double[] to, BlockSide face, double[] uv, ModelBlockModel.SideRotation rot, boolean shade, int textureid) {
if (rot == null) rot = ModelBlockModel.SideRotation.DEG0; if (rot == null) rot = ModelBlockModel.SideRotation.DEG0;
this.shade = shade;
// Compute corners of the face // Compute corners of the face
Vector3D lowleft; Vector3D lowleft;
Vector3D lowright; Vector3D lowright;

View file

@ -64,10 +64,10 @@ public class PatchDefinitionFactory implements RenderPatchFactory {
} }
} }
public PatchDefinition getModelFace(double[] from, double[] to, BlockSide face, double[] uv, ModelBlockModel.SideRotation rot, int textureid) { public PatchDefinition getModelFace(double[] from, double[] to, BlockSide face, double[] uv, ModelBlockModel.SideRotation rot, boolean shade, int textureid) {
synchronized(lock) { synchronized(lock) {
lookup.updateModelFace(from, to, face, uv, rot, textureid); lookup.updateModelFace(from, to, face, uv, rot, shade, textureid);
if(lookup.validate() == false) if(lookup.validate() == false)
return null; return null;
PatchDefinition pd2 = patches.get(lookup); /* See if in cache already */ PatchDefinition pd2 = patches.get(lookup); /* See if in cache already */

View file

@ -216,9 +216,9 @@ boxblock:id=snow,data=6,ymax=0.875
# Torch # Torch
# Redstone torch # Redstone torch
modellist:id=torch,id=redstone_torch,box=7/0/7:9/10/9:d/0/7/13/9/15:u/0/7/6/9/8,box=7/0/0:9/16/16:w/0:e/0,box=0/0/7:16/16/9:n/0:s/0 modellist:id=torch,id=redstone_torch,box=7/0/7/false:9/10/9:d/0/7/13/9/15:u/0/7/6/9/8,box=7/0/0/false:9/16/16:w/0:e/0,box=0/0/7/false:16/16/9:n/0:s/0
# Wall Torch # Wall Torch
modellist:id=wall_torch,state=facing:east,box=-1/3.5/7:1/13.5/9/0/0/-22.5/0/3.5/8:d/0/7/13/9/15,u/0/7/6/9/8,box=-1/3.5/0:1/19.5/16/0/0/-22.5/0/3.5/8:w/0:e/0,box=-8/3.5/7:8/19.5/9/0/0/-22.5/0/3.5/8:n/0:s/0 modellist:id=wall_torch,state=facing:east,box=-1/3.5/7/false:1/13.5/9/0/0/-22.5/0/3.5/8:d/0/7/13/9/15,u/0/7/6/9/8,box=-1/3.5/0/false:1/19.5/16/0/0/-22.5/0/3.5/8:w/0:e/0,box=-8/3.5/7/false:8/19.5/9/0/0/-22.5/0/3.5/8:n/0:s/0
patchblock:id=wall_torch,state=facing:north patchblock:id=wall_torch,state=facing:north
patchrotate:id=wall_torch,state=facing:east,roty=270 patchrotate:id=wall_torch,state=facing:east,roty=270
patchblock:id=wall_torch,state=facing:south patchblock:id=wall_torch,state=facing:south
@ -424,7 +424,8 @@ ignore-updates:id=redstone_wire
[-1.13.2]patchblock:id=sign,data=22-23,patch0=SignFront@67,patch1=SignBack@67,patch2=SignTop@67,patch3=SignBottom@67,patch4=SignLeft@67,patch5=SignRight@67,patch6=PostFront@67,patch7=PostBack@67,patch8=PostLeft@67,patch9=PostRight@67 [-1.13.2]patchblock:id=sign,data=22-23,patch0=SignFront@67,patch1=SignBack@67,patch2=SignTop@67,patch3=SignBottom@67,patch4=SignLeft@67,patch5=SignRight@67,patch6=PostFront@67,patch7=PostBack@67,patch8=PostLeft@67,patch9=PostRight@67
[1.14-]patchblock:id=oak_sign,id=spruce_sign,id=birch_sign,id=acacia_sign,id=jungle_sign,id=dark_oak_sign,data=22-23,patch0=SignFront@67,patch1=SignBack@67,patch2=SignTop@67,patch3=SignBottom@67,patch4=SignLeft@67,patch5=SignRight@67,patch6=PostFront@67,patch7=PostBack@67,patch8=PostLeft@67,patch9=PostRight@67 [1.14-]patchblock:id=oak_sign,id=spruce_sign,id=birch_sign,id=acacia_sign,id=jungle_sign,id=dark_oak_sign,data=22-23,patch0=SignFront@67,patch1=SignBack@67,patch2=SignTop@67,patch3=SignBottom@67,patch4=SignLeft@67,patch5=SignRight@67,patch6=PostFront@67,patch7=PostBack@67,patch8=PostLeft@67,patch9=PostRight@67
# Fire # Fire
patchblock:id=fire,patch0=VertX0,patch1=VertX0@90,patch2=VertX0@180,patch3=VertX0@270,patch4=SlopeXUpZTop675,patch5=SlopeXUpZTop675@90,patch6=SlopeXUpZTop675@180,patch4=SlopeXUpZTop675@270 modellist:id=fire,box=0/0/8.8/false:16/16/8.8/-22.5/0/0:s/0/0/0/16/16,box=0/0/7.2/false:16/16/7.2/22.5/0/0:n/0/0/0/16/16,box=8.8/0/0/false:8.8/16/16/0/0/-22/5:w/0/0/0/16/16,box=7.2/0/0/false:7.2/16/16/0/0/22.5:e/0/0/0/16/16,box=0/0/0.01/false:16/16/0.01:s/0/0/0/16/16:n/0/0/0/16/16,box=0/0/0.01/false:16/16/0.01/0/90/0:s/0/0/0/16/16:n/0/0/0/16/16,box=0/0/0.01/false:16/16/0.01/0/180/0:s/0/0/0/16/16:n/0/0/0/16/16,box=0/0/0.01/false:16/16/0.01/0/270/0:s/0/0/0/16/16:n/0/0/0/16/16
# Bed - head - pointing west # Bed - head - pointing west
block:id=white_bed,id=orange_bed,id=magenta_bed,id=light_blue_bed,id=yellow_bed,id=lime_bed,id=pink_bed,id=gray_bed,id=light_gray_bed,id=cyan_bed,id=purple_bed,id=blue_bed,id=brown_bed,id=green_bed,id=red_bed,id=black_bed,data=8,scale=16 block:id=white_bed,id=orange_bed,id=magenta_bed,id=light_blue_bed,id=yellow_bed,id=lime_bed,id=pink_bed,id=gray_bed,id=light_gray_bed,id=cyan_bed,id=purple_bed,id=blue_bed,id=brown_bed,id=green_bed,id=red_bed,id=black_bed,data=8,scale=16
layer:0,1,2 layer:0,1,2
@ -1356,22 +1357,19 @@ patchblock:id=bubble_column
# Cut sandstone slab # Cut sandstone slab
[1.14-]boxblock:id=smooth_stone_slab,id=cut_sandstone_slab,id=cut_red_sandstone_slab,state=type:top,ymin=0.5 [1.14-]boxblock:id=smooth_stone_slab,id=cut_sandstone_slab,id=cut_red_sandstone_slab,state=type:top,ymin=0.5
[1.14-]boxblock:id=smooth_stone_slab,id=cut_sandstone_slab,id=cut_red_sandstone_slab,state=type:bottom,ymax=0.5 [1.14-]boxblock:id=smooth_stone_slab,id=cut_sandstone_slab,id=cut_red_sandstone_slab,state=type:bottom,ymax=0.5
# Bamboo
[1.14-]boxblock:id=bamboo,data=0-5,xmin=0.4275,xmax=0.5625,zmin=0.4275,zmax=0.5625
[1.14-]boxblock:id=bamboo,data=6-11,xmin=0.38,xmax=0.62,zmin=0.38,zmax=0.62
# Bamboo (bamboo_stalk, bamboo_small_leaves, bamboo_large_leaves # Bamboo (bamboo_stalk, bamboo_small_leaves, bamboo_large_leaves
[1.14-]modellist:id=bamboo,state=age:0/leaves:none/stage:0,box=7/0/7:9/16/9:d/0/13/4/15/6:u/0/13/0/15/2:n/0/0/0/2/16:s/0/0/0/2/16:w/0/0/0/2/16:e/0/0/0/2/16 [1.14-]modellist:id=bamboo,state=age:0/leaves:none/stage:0,box=7/0/7:9/16/9:d/0/13/4/15/6:u/0/13/0/15/2:n/0/0/0/2/16:s/0/0/0/2/16:w/0/0/0/2/16:e/0/0/0/2/16
[1.14-]modellist:id=bamboo,state=age:0/leaves:none/stage:1,box=7/0/7:9/16/9:d/0/13/4/15/6:u/0/13/0/15/2:n/0/3/0/5/16:s/0/3/0/5/16:w/0/3/0/5/16:e/0/3/0/5/16 [1.14-]modellist:id=bamboo,state=age:0/leaves:none/stage:1,box=7/0/7:9/16/9:d/0/13/4/15/6:u/0/13/0/15/2:n/0/3/0/5/16:s/0/3/0/5/16:w/0/3/0/5/16:e/0/3/0/5/16
[1.14-]modellist:id=bamboo,state=age:0/leaves:small/stage:0,box=7/0/7:9/16/9:d/0/13/4/15/6:u/0/13/0/15/2:n/0/0/0/2/16:s/0/0/0/2/16:w/0/0/0/2/16:e/0/0/0/2/16,box=0.8/0/8:15.2/16/8:n/1/0/0/16/16:s/1/0/0/16/16,box=8/0/0.8:8/16/15.2:w/1/0/0/16/16:e/1/0/0/16/16 [1.14-]modellist:id=bamboo,state=age:0/leaves:small/stage:0,box=7/0/7:9/16/9:d/0/13/4/15/6:u/0/13/0/15/2:n/0/0/0/2/16:s/0/0/0/2/16:w/0/0/0/2/16:e/0/0/0/2/16,box=0.8/0/8/false:15.2/16/8:n/1/0/0/16/16:s/1/0/0/16/16,box=8/0/0.8/false:8/16/15.2:w/1/0/0/16/16:e/1/0/0/16/16
[1.14-]modellist:id=bamboo,state=age:0/leaves:small/stage:1,box=7/0/7:9/16/9:d/0/13/4/15/6:u/0/13/0/15/2:n/0/3/0/5/16:s/0/3/0/5/16:w/0/3/0/5/16:e/0/3/0/5/16,box=0.8/0/8:15.2/16/8:n/1/0/0/16/16:s/1/0/0/16/16,box=8/0/0.8:8/16/15.2:w/1/0/0/16/16:e/1/0/0/16/16 [1.14-]modellist:id=bamboo,state=age:0/leaves:small/stage:1,box=7/0/7:9/16/9:d/0/13/4/15/6:u/0/13/0/15/2:n/0/3/0/5/16:s/0/3/0/5/16:w/0/3/0/5/16:e/0/3/0/5/16,box=0.8/0/8/false:15.2/16/8:n/1/0/0/16/16:s/1/0/0/16/16,box=8/0/0.8/false:8/16/15.2:w/1/0/0/16/16:e/1/0/0/16/16
[1.14-]modellist:id=bamboo,state=age:0/leaves:large/stage:0,box=7/0/7:9/16/9:d/0/13/4/15/6:u/0/13/0/15/2:n/0/0/0/2/16:s/0/0/0/2/16:w/0/0/0/2/16:e/0/0/0/2/16,box=0.8/0/8:15.2/16/8:n/2/0/0/16/16:s/2/0/0/16/16,box=8/0/0.8:8/16/15.2:w/2/0/0/16/16:e/2/0/0/16/16 [1.14-]modellist:id=bamboo,state=age:0/leaves:large/stage:0,box=7/0/7:9/16/9:d/0/13/4/15/6:u/0/13/0/15/2:n/0/0/0/2/16:s/0/0/0/2/16:w/0/0/0/2/16:e/0/0/0/2/16,box=0.8/0/8/false:15.2/16/8:n/2/0/0/16/16:s/2/0/0/16/16,box=8/0/0.8/false:8/16/15.2:w/2/0/0/16/16:e/2/0/0/16/16
[1.14-]modellist:id=bamboo,state=age:0/leaves:large/stage:1,box=7/0/7:9/16/9:d/0/13/4/15/6:u/0/13/0/15/2:n/0/3/0/5/16:s/0/3/0/5/16:w/0/3/0/5/16:e/0/3/0/5/16,box=0.8/0/8:15.2/16/8:n/2/0/0/16/16:s/2/0/0/16/16,box=8/0/0.8:8/16/15.2:w/2/0/0/16/16:e/2/0/0/16/16 [1.14-]modellist:id=bamboo,state=age:0/leaves:large/stage:1,box=7/0/7:9/16/9:d/0/13/4/15/6:u/0/13/0/15/2:n/0/3/0/5/16:s/0/3/0/5/16:w/0/3/0/5/16:e/0/3/0/5/16,box=0.8/0/8/false:15.2/16/8:n/2/0/0/16/16:s/2/0/0/16/16,box=8/0/0.8/false:8/16/15.2:w/2/0/0/16/16:e/2/0/0/16/16
[1.14-]modellist:id=bamboo,state=age:1/leaves:none/stage:0,box=6.5/0/6.5:9.5/16/9.5:d/0/13/4/16/7:u/0/13/0/16/3:n/0/0/0/3/16:s/0/0/0/3/16:w/0/0/0/3/16:e/0/0/0/3/16 [1.14-]modellist:id=bamboo,state=age:1/leaves:none/stage:0,box=6.5/0/6.5:9.5/16/9.5:d/0/13/4/16/7:u/0/13/0/16/3:n/0/0/0/3/16:s/0/0/0/3/16:w/0/0/0/3/16:e/0/0/0/3/16
[1.14-]modellist:id=bamboo,state=age:1/leaves:none/stage:1,box=6.5/0/6.5:9.5/16/9.5:d/0/13/4/16/7:u/0/13/0/16/3:n/0/3/0/6/16:s/0/3/0/6/16:w/0/3/0/6/16:e/0/3/0/6/16 [1.14-]modellist:id=bamboo,state=age:1/leaves:none/stage:1,box=6.5/0/6.5:9.5/16/9.5:d/0/13/4/16/7:u/0/13/0/16/3:n/0/3/0/6/16:s/0/3/0/6/16:w/0/3/0/6/16:e/0/3/0/6/16
[1.14-]modellist:id=bamboo,state=age:1/leaves:small/stage:0,box=6.5/0/6.5:9.5/16/9.5:d/0/13/4/16/7:u/0/13/0/16/3:n/0/0/0/3/16:s/0/0/0/3/16:w/0/0/0/3/16:e/0/0/0/3/16,box=0.8/0/8:15.2/16/8:n/1/0/0/16/16:s/1/0/0/16/16,box=8/0/0.8:8/16/15.2:w/1/0/0/16/16:e/1/0/0/16/16 [1.14-]modellist:id=bamboo,state=age:1/leaves:small/stage:0,box=6.5/0/6.5:9.5/16/9.5:d/0/13/4/16/7:u/0/13/0/16/3:n/0/0/0/3/16:s/0/0/0/3/16:w/0/0/0/3/16:e/0/0/0/3/16,box=0.8/0/8/false:15.2/16/8:n/1/0/0/16/16:s/1/0/0/16/16,box=8/0/0.8/false:8/16/15.2:w/1/0/0/16/16:e/1/0/0/16/16
[1.14-]modellist:id=bamboo,state=age:1/leaves:small/stage:1,box=6.5/0/6.5:9.5/16/9.5:d/0/13/4/16/7:u/0/13/0/16/3:n/0/3/0/6/16:s/0/3/0/6/16:w/0/3/0/6/16:e/0/3/0/6/16,box=0.8/0/8:15.2/16/8:n/1/0/0/16/16:s/1/0/0/16/16,box=8/0/0.8:8/16/15.2:w/1/0/0/16/16:e/1/0/0/16/16 [1.14-]modellist:id=bamboo,state=age:1/leaves:small/stage:1,box=6.5/0/6.5:9.5/16/9.5:d/0/13/4/16/7:u/0/13/0/16/3:n/0/3/0/6/16:s/0/3/0/6/16:w/0/3/0/6/16:e/0/3/0/6/16,box=0.8/0/8/false:15.2/16/8:n/1/0/0/16/16:s/1/0/0/16/16,box=8/0/0.8/false:8/16/15.2:w/1/0/0/16/16:e/1/0/0/16/16
[1.14-]modellist:id=bamboo,state=age:1/leaves:large/stage:0,box=6.5/0/6.5:9.5/16/9.5:d/0/13/4/16/7:u/0/13/0/16/3:n/0/0/0/3/16:s/0/0/0/3/16:w/0/0/0/3/16:e/0/0/0/3/16,box=0.8/0/8:15.2/16/8:n/2/0/0/16/16:s/2/0/0/16/16,box=8/0/0.8:8/16/15.2:w/2/0/0/16/16:e/2/0/0/16/16 [1.14-]modellist:id=bamboo,state=age:1/leaves:large/stage:0,box=6.5/0/6.5:9.5/16/9.5:d/0/13/4/16/7:u/0/13/0/16/3:n/0/0/0/3/16:s/0/0/0/3/16:w/0/0/0/3/16:e/0/0/0/3/16,box=0.8/0/8/false:15.2/16/8:n/2/0/0/16/16:s/2/0/0/16/16,box=8/0/0.8/false:8/16/15.2:w/2/0/0/16/16:e/2/0/0/16/16
[1.14-]modellist:id=bamboo,state=age:1/leaves:large/stage:1,box=6.5/0/6.5:9.5/16/9.5:d/0/13/4/16/7:u/0/13/0/16/3:n/0/3/0/6/16:s/0/3/0/6/16:w/0/3/0/6/16:e/0/3/0/6/16,box=0.8/0/8:15.2/16/8:n/2/0/0/16/16:s/2/0/0/16/16,box=8/0/0.8:8/16/15.2:w/2/0/0/16/16:e/2/0/0/16/16 [1.14-]modellist:id=bamboo,state=age:1/leaves:large/stage:1,box=6.5/0/6.5:9.5/16/9.5:d/0/13/4/16/7:u/0/13/0/16/3:n/0/3/0/6/16:s/0/3/0/6/16:w/0/3/0/6/16:e/0/3/0/6/16,box=0.8/0/8/false:15.2/16/8:n/2/0/0/16/16:s/2/0/0/16/16,box=8/0/0.8/false:8/16/15.2:w/2/0/0/16/16:e/2/0/0/16/16
# Potted Bamboo # Potted Bamboo
[1.14-]patchblock:id=potted_bamboo,patch0=FlowerPotTop,patch1=FlowerPotBottom,patch2=FlowerPotSide,patch3=FlowerPotSide@90,patch4=FlowerPotSide@180,patch5=FlowerPotSide@270,patch6=FlowerPotDirt,patch7=FlowerPotFlower,patch8=FlowerPotFlower@90 [1.14-]patchblock:id=potted_bamboo,patch0=FlowerPotTop,patch1=FlowerPotBottom,patch2=FlowerPotSide,patch3=FlowerPotSide@90,patch4=FlowerPotSide@180,patch5=FlowerPotSide@270,patch6=FlowerPotDirt,patch7=FlowerPotFlower,patch8=FlowerPotFlower@90
@ -1516,7 +1514,7 @@ patchblock:id=bubble_column
[1.14-]patchblock:id=stonecutter,data=3 [1.14-]patchblock:id=stonecutter,data=3
[1.14-]patchrotate:id=stonecutter,data=0,roty=90 [1.14-]patchrotate:id=stonecutter,data=0,roty=90
# Campfire (lit) (unlit log, lit log, fire) # Campfire (lit) (unlit log, lit log, fire)
[1.14-]modellist:id=campfire,data=8,data=9,data=10,data=11,box=1/0/0:5/4/16:n/0/0/4/4/8:e/1/0/1/16/5:s/0/0/4/4/8:w/0/16/0/0/4:u90/0/0/0/16/4:d90/0/0/0/16/4,box=0/3/11:16/7/15:n/1/16/0/0/4:e/0/0/4/4/8:s/1/0/0/16/4:w/0/0/4/4/8:u180/1/0/0/16/4:d/1/0/4/16/8,box=11/0/0:15/4/16:n/0/0/4/4/8:e/0/0/0/16/4:s/0/0/4/4/8:w/1/16/1/0/5:u90/0/0/0/16/4:d90/0/0/0/16/4,box=0/3/1:16/7/5:n/1/0/0/16/4:e/0/0/4/4/8:s/1/16/0/0/4:w/0/0/4/4/8:u180/0/0/0/16/4:d/1/0/4/16/8,box=5/0/0:11/1/16:n/0/0/15/6/16:s/0/10/15/16/16:u90/1/0/8/16/14:d90/0/0/8/16/14,box=0.8/1/8:15.2/17/8/0/45/0:n/2/0/0/16/16:s/2/0/0/16/16,box=8/1/0.8:8/17/15.2/0/45/0:w/2/0/0/16/16:e/2/0/0/16/16 [1.14-]modellist:id=campfire,data=8,data=9,data=10,data=11,box=1/0/0:5/4/16:n/0/0/4/4/8:e/1/0/1/16/5:s/0/0/4/4/8:w/0/16/0/0/4:u90/0/0/0/16/4:d90/0/0/0/16/4,box=0/3/11:16/7/15:n/1/16/0/0/4:e/0/0/4/4/8:s/1/0/0/16/4:w/0/0/4/4/8:u180/1/0/0/16/4:d/1/0/4/16/8,box=11/0/0:15/4/16:n/0/0/4/4/8:e/0/0/0/16/4:s/0/0/4/4/8:w/1/16/1/0/5:u90/0/0/0/16/4:d90/0/0/0/16/4,box=0/3/1:16/7/5:n/1/0/0/16/4:e/0/0/4/4/8:s/1/16/0/0/4:w/0/0/4/4/8:u180/0/0/0/16/4:d/1/0/4/16/8,box=5/0/0:11/1/16:n/0/0/15/6/16:s/0/10/15/16/16:u90/1/0/8/16/14:d90/0/0/8/16/14,box=0.8/1/8/false:15.2/17/8/0/45/0:n/2/0/0/16/16:s/2/0/0/16/16,box=8/1/0.8/false:8/17/15.2/0/45/0:w/2/0/0/16/16:e/2/0/0/16/16
[1.14-]patchblock:id=campfire,data=0,data=1,data=2,data=3 [1.14-]patchblock:id=campfire,data=0,data=1,data=2,data=3
[1.14-]patchrotate:id=campfire,data=8,roty=180 [1.14-]patchrotate:id=campfire,data=8,roty=180
[1.14-]patchblock:id=campfire,data=16,data=17,data=18,data=19 [1.14-]patchblock:id=campfire,data=16,data=17,data=18,data=19
@ -1606,7 +1604,8 @@ patchblock:id=bubble_column
# 1.16 blocks # 1.16 blocks
# Soul Fire # Soul Fire
[1.16-]patchblock:id=soul_fire,patch0=VertX0,patch1=VertX0@90,patch2=VertX0@180,patch3=VertX0@270,patch4=SlopeXUpZTop675,patch5=SlopeXUpZTop675@90,patch6=SlopeXUpZTop675@180,patch4=SlopeXUpZTop675@270 [1.16-]patchblock:id=soul_fire
[1.16-]patchrotate:id=fire,data=0,roty=0
# Soul Torch # Soul Torch
[1.16-]patchblock:id=soul_torch [1.16-]patchblock:id=soul_torch
[1.16-]patchrotate:id=torch,data=0,roty=0 [1.16-]patchrotate:id=torch,data=0,roty=0
@ -1620,7 +1619,7 @@ patchblock:id=bubble_column
[1.16-]patchblock:id=soul_wall_torch,data=2 [1.16-]patchblock:id=soul_wall_torch,data=2
[1.16-]patchrotate:id=wall_torch,data=3,roty=180 [1.16-]patchrotate:id=wall_torch,data=3,roty=180
# Chain # Chain
[1.16-]modellist:id=chain,state=axis:y,box=6.5/0/8:9.5/16/8/0/45/0:n/0/3/0/0/16:s/0/0/0/3/16,box=8/0/6.5:8/16/9.5/0/45/0:w/0/6/0/3/16:e/0/3/0/6/16 [1.16-]modellist:id=chain,state=axis:y,box=6.5/0/8/false:9.5/16/8/0/45/0:n/0/3/0/0/16:s/0/0/0/3/16,box=8/0/6.5/false:8/16/9.5/0/45/0:w/0/6/0/3/16:e/0/3/0/6/16
[1.16-]patchblock:id=chain,state=axis:x [1.16-]patchblock:id=chain,state=axis:x
[1.16-]patchrotate:id=chain,state=axis:y/waterlogged:true,rotx=90,roty=90 [1.16-]patchrotate:id=chain,state=axis:y/waterlogged:true,rotx=90,roty=90
[1.16-]patchblock:id=chain,state=axis:z [1.16-]patchblock:id=chain,state=axis:z

View file

@ -885,7 +885,7 @@ block:id=torch,patch0=0:torch,transparency=TRANSPARENT
# Wall torch # Wall torch
block:id=wall_torch,state=*,patch0=0:torch,transparency=TRANSPARENT block:id=wall_torch,state=*,patch0=0:torch,transparency=TRANSPARENT
# Fire # Fire
block:id=fire,patch0-3=0:fire_0,patch4-7=0:fire_1,transparency=TRANSPARENT block:id=fire,patch0=0:fire_0,transparency=TRANSPARENT
# Monster spawner # Monster spawner
block:id=spawner,allfaces=0:spawner,stdrot=true,transparency=TRANSPARENT block:id=spawner,allfaces=0:spawner,stdrot=true,transparency=TRANSPARENT
# Wooden stairs # Wooden stairs
@ -2407,7 +2407,7 @@ block:id=black_banner,id=black_wall_banner,data=*,patch0=0:oak_planks,patch1=0:b
# Nether gold ore # Nether gold ore
[1.16-]block:id=nether_gold_ore,allfaces=0:nether_gold_ore,stdrot=true [1.16-]block:id=nether_gold_ore,allfaces=0:nether_gold_ore,stdrot=true
# Soul Fire # Soul Fire
[1.16-]block:id=soul_fire,patch0-3=0:soul_fire_0,patch4-7=0:soul_fire_1,transparency=TRANSPARENT [1.16-]block:id=soul_fire,patch0=0:soul_fire_0,transparency=TRANSPARENT
# Soul soil # Soul soil
[1.16-]block:id=soul_soil,allfaces=0:soul_soil,stdrot=true [1.16-]block:id=soul_soil,allfaces=0:soul_soil,stdrot=true
# Basalt # Basalt

View file

@ -35,7 +35,11 @@ public interface ModelBlockModel extends BlockModel {
* @param xrot - degrees of rotation of block around X * @param xrot - degrees of rotation of block around X
* @param yrot - degrees of rotation of block around Y * @param yrot - degrees of rotation of block around Y
* @param zrot - degrees of rotation of block around Z * @param zrot - degrees of rotation of block around Z
* @param shade - shade setting for model
* @return model block to add faces to * @return model block to add faces to
*/ */
public ModelBlock addModelBlock(double[] from, double[] to, double xrot, double yrot, double zrot); public ModelBlock addModelBlock(double[] from, double[] to, double xrot, double yrot, double zrot, boolean shade);
default public ModelBlock addModelBlock(double[] from, double[] to, double xrot, double yrot, double zrot) {
return addModelBlock(from, to, xrot, yrot, zrot, true);
}
} }