Fix for soul campfire, switch torches to modellist, add origin for

rotate
This commit is contained in:
Mike Primm 2022-01-29 16:54:36 -06:00
parent 64fe6d8b39
commit cd11283685
6 changed files with 130 additions and 61 deletions

View File

@ -31,6 +31,7 @@ import org.dynmap.renderer.RenderPatchFactory.SideVisible;
import org.dynmap.utils.ForgeConfigFile;
import org.dynmap.utils.PatchDefinition;
import org.dynmap.utils.PatchDefinitionFactory;
import org.dynmap.utils.Vector3D;
/**
* Custom block models - used for non-cube blocks to represent the physical volume associated with the block
@ -334,6 +335,7 @@ public class HDBlockModels {
double[] from = new double[3];
double[] to = new double[3];
double xrot = 0, yrot = 0, zrot = 0;
double xrotorig = 8, yrotorig = 8, zrotorig = 8;
ArrayList<ModelBoxSide> sides = new ArrayList<ModelBoxSide>();
};
@ -841,6 +843,7 @@ public class HDBlockModels {
line = line.substring(9);
String[] args = line.split(",");
double xmin = 0.0, xmax = 1.0, ymin = 0.0, ymax = 1.0, zmin = 0.0, zmax = 1.0;
int[] patchlist = boxPatchList;
for(String a : args) {
String[] av = a.split("=");
if(av.length < 2) continue;
@ -880,12 +883,19 @@ public class HDBlockModels {
else if(av[0].equals("zmax")) {
zmax = Double.parseDouble(av[1]);
}
else if(av[0].equals("patches")) {
String[] v = av[1].split("/");
patchlist = new int[6];
for (int vidx = 0; (vidx < v.length) && (vidx < patchlist.length); vidx++) {
patchlist[vidx] = getIntValue(varvals, v[vidx]);
}
}
}
/* If we have everything, build block */
pmodlist.clear();
if (blknames.size() > 0) {
ArrayList<RenderPatch> pd = new ArrayList<RenderPatch>();
CustomRenderer.addBox(pdf, pd, xmin, xmax, ymin, ymax, zmin, zmax, boxPatchList);
CustomRenderer.addBox(pdf, pd, xmin, xmax, ymin, ymax, zmin, zmax, patchlist);
PatchDefinition[] patcharray = new PatchDefinition[pd.size()];
for (int i = 0; i < patcharray.length; i++) {
patcharray[i] = (PatchDefinition) pd.get(i);
@ -1035,7 +1045,7 @@ public class HDBlockModels {
Log.severe("Invalid modellist FROM value (" + prms[0] + " at line " + rdr.getLineNumber());
}
}
if (prms.length > 1) { // Handle to (to-x/y/z or to-x/y/z/rotx/roty/rotz)
if (prms.length > 1) { // Handle to (to-x/y/z or to-x/y/z/rotx/roty/rotz) or to-x/y/z/rotx/roty/rotz/rorigx/rorigy/rorigz
String[] xyz = prms[1].split("/");
if (xyz.length >= 3) {
box.to[0] = Double.parseDouble(xyz[0]);
@ -1046,6 +1056,11 @@ public class HDBlockModels {
box.yrot = Double.parseDouble(xyz[4]);
box.zrot = Double.parseDouble(xyz[5]);
}
if (xyz.length >= 9) { // If 9, third set is rotation origin (xrot/yrot/zrot)
box.xrotorig = Double.parseDouble(xyz[6]);
box.yrotorig = Double.parseDouble(xyz[7]);
box.zrotorig = Double.parseDouble(xyz[8]);
}
}
else {
Log.severe("Invalid modellist TO value (" + prms[1] + " at line " + rdr.getLineNumber());
@ -1110,7 +1125,9 @@ public class HDBlockModels {
if (patch != null) {
// If any rotations, apply them here
if ((bl.xrot != 0) || (bl.yrot != 0) || (bl.zrot != 0)) {
patch = pdf.getPatch(patch, bl.xrot, bl.yrot, bl.zrot, patch.textureindex);
patch = pdf.getPatch(patch, -bl.xrot, -bl.yrot, -bl.zrot,
new Vector3D(bl.xrotorig / 16, bl.yrotorig / 16, bl.zrotorig / 16),
patch.textureindex);
}
pd.add(patch);
}

View File

@ -80,16 +80,30 @@ public class PatchDefinition implements RenderPatch {
* @param textureindex - texture index for new patch (-1 = use same as original patch)
*/
PatchDefinition(PatchDefinition orig, double rotatex, double rotatey, double rotatez, int textureindex) {
this(orig, rotatex, rotatey, rotatez, null, textureindex);
}
/**
* Construct patch, based on rotation of existing patch clockwise by N
* 90 degree steps
* @param orig - original patch to copy and rotate
* @param rotatex - x rotation in degrees
* @param rotatey - y rotation in degrees
* @param rotatez - z rotation in degrees
* @param rotorigin - rotation origin (x, y, z)
* @param textureindex - texture index for new patch (-1 = use same as original patch)
*/
PatchDefinition(PatchDefinition orig, double rotatex, double rotatey, double rotatez, Vector3D rotorigin, int textureindex) {
if (rotorigin == null) rotorigin = offsetCenter;
Vector3D vec = new Vector3D(orig.x0, orig.y0, orig.z0);
rotate(vec, rotatex, rotatey, rotatez); /* Rotate origin */
rotate(vec, rotatex, rotatey, rotatez, rotorigin); /* Rotate origin */
x0 = vec.x; y0 = vec.y; z0 = vec.z;
/* Rotate U */
vec.x = orig.xu; vec.y = orig.yu; vec.z = orig.zu;
rotate(vec, rotatex, rotatey, rotatez); /* Rotate origin */
rotate(vec, rotatex, rotatey, rotatez, rotorigin); /* Rotate origin */
xu = vec.x; yu = vec.y; zu = vec.z;
/* Rotate V */
vec.x = orig.xv; vec.y = orig.yv; vec.z = orig.zv;
rotate(vec, rotatex, rotatey, rotatez); /* Rotate origin */
rotate(vec, rotatex, rotatey, rotatez, rotorigin); /* Rotate origin */
xv = vec.x; yv = vec.y; zv = vec.z;
umin = orig.umin; vmin = orig.vmin;
umax = orig.umax; vmax = orig.vmax;
@ -102,8 +116,10 @@ public class PatchDefinition implements RenderPatch {
update();
}
private void rotate(Vector3D vec, double xcnt, double ycnt, double zcnt) {
vec.subtract(offsetCenter); /* Shoft to center of block */
private void rotate(Vector3D vec, double xcnt, double ycnt, double zcnt, Vector3D origin) {
// If no rotation, skip
if ((xcnt == 0) && (ycnt == 0) && (zcnt == 0)) return;
vec.subtract(origin); /* Shoft to center of block */
/* Do X rotation */
double rot = Math.toRadians(xcnt);
double nval = vec.z * Math.sin(rot) + vec.y * Math.cos(rot);
@ -119,7 +135,7 @@ public class PatchDefinition implements RenderPatch {
nval = vec.y * Math.sin(rot) + vec.x * Math.cos(rot);
vec.y = vec.y * Math.cos(rot) - vec.x * Math.sin(rot);
vec.x = nval;
vec.add(offsetCenter); /* Shoft back to corner */
vec.add(origin); /* Shoft back to corner */
}
public void update(double x0, double y0, double z0, double xu,
double yu, double zu, double xv, double yv, double zv, double umin,
@ -387,8 +403,8 @@ public class PatchDefinition implements RenderPatch {
return;
}
// If rotation, rotate face corners
if (rot == ModelBlockModel.SideRotation.DEG90) {
// 90 degrees CW - origin is now upper left (V), V is now upper right (U+V-O), U is lower left (O)
if (rot == ModelBlockModel.SideRotation.DEG270) {
// 270 degrees CCW - origin is now upper left (V), V is now upper right (U+V-O), U is lower left (O)
Vector3D save = lowleft;
lowleft = lowright;
lowright = upright;
@ -396,7 +412,7 @@ public class PatchDefinition implements RenderPatch {
upleft = save;
}
else if (rot == ModelBlockModel.SideRotation.DEG180) {
// 180 degrees CW - origin is now upper right, U is now upper left (V), V is lower right (U)
// 180 degrees CCW - origin is now upper right, U is now upper left (V), V is lower right (U)
Vector3D save = lowleft;
lowleft = upright;
upright = save;
@ -404,8 +420,8 @@ public class PatchDefinition implements RenderPatch {
lowright = upleft;
upleft = save;
}
else if (rot == ModelBlockModel.SideRotation.DEG270) {
// 270 degrees CW - origin is now lower right (V), U is now upper right (topright), V is lower right (O)
else if (rot == ModelBlockModel.SideRotation.DEG90) {
// 90 degrees CCW - origin is now lower right (V), U is now upper right (topright), V is lower right (O)
Vector3D save = lowright;
lowright = lowleft;
lowleft = upleft;

View File

@ -88,25 +88,35 @@ public class PatchDefinitionFactory implements RenderPatchFactory {
return getPatch((PatchDefinition)patch, xrot, yrot, zrot, textureindex);
}
@Override
public RenderPatch getRotatedPatch(RenderPatch patch, double xrot, double yrot,
double zrot, double rotorigx, double rotorigy, double rotorigz, int textureindex) {
return getPatch((PatchDefinition)patch, xrot, yrot, zrot,
new Vector3D(rotorigx, rotorigy, rotorigz), textureindex);
}
@Override
public RenderPatch getRotatedPatch(RenderPatch patch, int xrot, int yrot,
int zrot, int textureindex) {
return getPatch((PatchDefinition)patch, xrot, yrot, zrot, textureindex);
}
public PatchDefinition getPatch(PatchDefinition patch, double xrot, double yrot,
double zrot, int textureindex) {
PatchDefinition pd = new PatchDefinition(patch, xrot, yrot, zrot, textureindex);
if(pd.validate() == false)
double zrot, Vector3D rotorig, int textureindex) {
PatchDefinition pd = new PatchDefinition((PatchDefinition)patch, xrot, yrot, zrot, rotorig, textureindex);
if (pd.validate() == false)
return null;
synchronized(lock) {
PatchDefinition pd2 = patches.get(pd); /* See if in cache already */
if(pd2 == null) {
if (pd2 == null) {
patches.put(pd, pd);
pd2 = pd;
}
return pd2;
}
}
public PatchDefinition getPatch(PatchDefinition patch, double xrot, double yrot,
double zrot, int textureindex) {
return getPatch(patch, xrot, yrot, zrot, null, textureindex);
}
/**
* Get named patch with given attributes. Name can encode rotation and patch index info
* "name" - simple name

View File

@ -216,28 +216,25 @@ boxblock:id=snow,data=6,ymax=0.875
# Torch
# Redstone torch
patchblock:id=torch,id=redstone_torch,patch0=VertX04375#0,patch1=VertX04375@90#0,patch2=VertX04375@180#0,patch3=VertX04375@270#0,patch4=TorchTop#0
# Torch - pointing south
patchblock:id=wall_torch,data=3,patch0=TorchSide1#0,patch1=TorchSide2#0,patch2=TorchSide3#0,patch3=TorchSide4#0,patch4=TorchTopSlope@270#0
# Torch - pointing north
patchblock:id=wall_torch,data=2,patch0=TorchSide1@180#0,patch1=TorchSide2@180#0,patch2=TorchSide3@180#0,patch3=TorchSide4@180#0,patch4=TorchTopSlope@90#0
# Torch - pointing west
patchblock:id=wall_torch,data=1,patch0=TorchSide1@90#0,patch1=TorchSide2@90#0,patch2=TorchSide3@90#0,patch3=TorchSide4@90#0,patch4=TorchTopSlope#0
# Torch - pointing east
patchblock:id=wall_torch,data=0,patch0=TorchSide1@270#0,patch1=TorchSide2@270#0,patch2=TorchSide3@270#0,patch3=TorchSide4@270#0,patch4=TorchTopSlope@180#0
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
# Wall Torch
modellist:id=wall_torch,data=3,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
patchblock:id=wall_torch,data=0
patchrotate:id=wall_torch,data=3,roty=270
patchblock:id=wall_torch,data=1
patchrotate:id=wall_torch,data=3,roty=90
patchblock:id=wall_torch,data=2
patchrotate:id=wall_torch,data=3,roty=180
# Redstone torch on - pointing south
# Redstone torch off - pointing south
patchblock:id=redstone_wall_torch,data=6,data=7,patch0=TorchSide1#0,patch1=TorchSide2#0,patch2=TorchSide3#0,patch3=TorchSide4#0,patch4=TorchTopSlope@270#0
# Redstone torch on - pointing north
# Redstone torch off - pointing north
patchblock:id=redstone_wall_torch,data=4,data=5,patch0=TorchSide1@180#0,patch1=TorchSide2@180#0,patch2=TorchSide3@180#0,patch3=TorchSide4@180#0,patch4=TorchTopSlope@90#0
# Redstone torch on - pointing west
# Redstone torch off - pointing west
patchblock:id=redstone_wall_torch,data=2,data=3,patch0=TorchSide1@90#0,patch1=TorchSide2@90#0,patch2=TorchSide3@90#0,patch3=TorchSide4@90#0,patch4=TorchTopSlope#0
# Redstone torch on - pointing east
# Redstone torch off - pointing east
patchblock:id=redstone_wall_torch,data=0,data=1,patch0=TorchSide1@270#0,patch1=TorchSide2@270#0,patch2=TorchSide3@270#0,patch3=TorchSide4@270#0,patch4=TorchTopSlope@180#0
# Redstone torch
patchblock:id=redstone_wall_torch,data=0,data=1
patchrotate:id=wall_torch,data=3,roty=270
patchblock:id=redstone_wall_torch,data=2,data=3
patchrotate:id=wall_torch,data=3,roty=90
patchblock:id=redstone_wall_torch,data=4,data=5
patchrotate:id=wall_torch,data=3,roty=180
patchblock:id=redstone_wall_torch,data=6,data=7
patchrotate:id=wall_torch,data=3,roty=0
ignore-updates:id=redstone_wall_torch,id=redstone_torch
@ -1586,32 +1583,39 @@ patchblock:id=bubble_column
# 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
# Soul Torch
[1.16-]patchblock:id=soul_torch,patch0=VertX04375#0,patch1=VertX04375@90#0,patch2=VertX04375@180#0,patch3=VertX04375@270#0,patch4=TorchTop#0
[1.16-]patchblock:id=soul_torch
[1.16-]patchrotate:id=torch,data=0,roty=0
# Soul wall torch
[1.16-]patchblock:id=soul_wall_torch,data=3,patch0=TorchSide1#0,patch1=TorchSide2#0,patch2=TorchSide3#0,patch3=TorchSide4#0,patch4=TorchTopSlope@270#0
[1.16-]patchblock:id=soul_wall_torch,data=2,patch0=TorchSide1@180#0,patch1=TorchSide2@180#0,patch2=TorchSide3@180#0,patch3=TorchSide4@180#0,patch4=TorchTopSlope@90#0
[1.16-]patchblock:id=soul_wall_torch,data=1,patch0=TorchSide1@90#0,patch1=TorchSide2@90#0,patch2=TorchSide3@90#0,patch3=TorchSide4@90#0,patch4=TorchTopSlope#0
[1.16-]patchblock:id=soul_wall_torch,data=0,patch0=TorchSide1@270#0,patch1=TorchSide2@270#0,patch2=TorchSide3@270#0,patch3=TorchSide4@270#0,patch4=TorchTopSlope@180#0
[1.16-]patchblock:id=soul_wall_torch,data=3
[1.16-]patchrotate:id=wall_torch,data=3,roty=0
[1.16-]patchblock:id=soul_wall_torch,data=0
[1.16-]patchrotate:id=wall_torch,data=3,roty=270
[1.16-]patchblock:id=soul_wall_torch,data=1
[1.16-]patchrotate:id=wall_torch,data=3,roty=90
[1.16-]patchblock:id=soul_wall_torch,data=2
[1.16-]patchrotate:id=wall_torch,data=3,roty=180
# Chain
[1.16-]patchblock:id=chain,patch0=VertX1Z0ToX0Z1,patch1=VertX1Z0ToX0Z1@90
# Soul Lantern (hanging, then not hanging)
[1.16-]boxlist:id=soul_lantern,data=0,data=1,box=0.3125:0.6875:0:0.4375:0.3125:0.6875:0/0/1/1/1/1,box=0.375:0.625:0.4375:0.5625:0.375:0.625:-1/2/3/3/3/3,box=0.4:0.6:0.5625:0.6875:0.5:0.5:-1/-1/-1/-1/4/4:45,box=0.5:0.5:0.5625:0.6875:0.4:0.6:-1/-1/5/5/-1/-1:45
[1.16-]boxlist:id=soul_lantern,data=2,data=3,box=0.3125:0.6875:0.0625:0.5:0.3125:0.6875:0/0/1/1/1/1,box=0.375:0.625:0.5:0.625:0.375:0.625:2/2/3/3/3/3,box=0.4:0.6:0.6875:0.9375:0.5:0.5:-1/-1/-1/-1/6/6:45,box=0.5:0.5:0.6875:0.9375:0.4:0.6:-1/-1/6/6/-1/-1:45
# Soul Campfire
[1.16-]boxlist:id=soul_campfire,data=0,data=1,data=2,data=3,box=0.0625:0.3125:0:0.25:0:1:0/0/1/0/0/0,box=0:1:0.1875:0.4375:0.6875:0.9375:0/1/1/1/0/0,box=0.6875:0.9375:0:0.25:0:1:0/0/0/0/1/0,box=0:1:0.1875:0.4375:0.0625:0.3125:0/1/1/1/0/0,box=0.3125:0.6875:0:0.0625:0:1:0/1/0/0/0/0,box=0.49:0.51:0:1:0:1:-1/-1/2/2/2/2,box=0:1:0:1:0.49:0.51:-1/-1/2/2/2/2
[1.16-]boxlist:id=soul_campfire,data=4,data=5,data=6,data=7,box=0.0625:0.3125:0:0.25:0:1:0/0/0/0/0/0,box=0:1:0.1875:0.4375:0.6875:0.9375:0/0/0/0/0/0,box=0.6875:0.9375:0:0.25:0:1:0/0/0/0/0/0,box=0:1:0.1875:0.4375:0.0625:0.3125:0/0/0/0/0/0,box=0.3125:0.6875:0:0.0625:0:1:0/0/0/0/0/0
[1.16-]patchblock:id=soul_campfire,data=8,data=9,data=10,data=11
[1.16-]patchrotate:id=soul_campfire,data=0,roty=180
[1.16-]patchblock:id=soul_campfire,data=12,data=13,data=14,data=15
[1.16-]patchrotate:id=soul_campfire,data=4,roty=180
[1.16-]patchrotate:id=campfire,data=8,roty=0
[1.16-]patchblock:id=soul_campfire,data=0,data=1,data=2,data=3
[1.16-]patchrotate:id=campfire,data=8,roty=180
[1.16-]patchblock:id=soul_campfire,data=16,data=17,data=18,data=19
[1.16-]patchrotate:id=soul_campfire,data=0,roty=270
[1.16-]patchblock:id=soul_campfire,data=20,data=21,data=22,data=23
[1.16-]patchrotate:id=soul_campfire,data=4,roty=270
[1.16-]patchrotate:id=campfire,data=8,roty=270
[1.16-]patchblock:id=soul_campfire,data=24,data=25,data=26,data=27
[1.16-]patchrotate:id=soul_campfire,data=0,roty=90
[1.16-]patchrotate:id=campfire,data=8,roty=90
[1.16-]patchblock:id=soul_campfire,data=12,data=13,data=14,data=15
[1.16-]patchrotate:id=campfire,data=12,roty=0
[1.16-]patchblock:id=soul_campfire,data=4,data=5,data=6,data=7
[1.16-]patchrotate:id=campfire,data=12,roty=180
[1.16-]patchblock:id=soul_campfire,data=20,data=21,data=22,data=23
[1.16-]patchrotate:id=campfire,data=12,roty=270
[1.16-]patchblock:id=soul_campfire,data=28,data=29,data=30,data=31
[1.16-]patchrotate:id=soul_campfire,data=4,roty=90
[1.16-]patchrotate:id=campfire,data=12,roty=90
# Warped Fungus
# Warped Roots
# Nether Sprouts
@ -2315,3 +2319,12 @@ patchblock:id=bubble_column
[1.17-]patchblock:id=%small_dripleaf,data=10,data=11,patch0=patch918,patch1=patch919,patch2=patch920,patch3=patch921
[1.17-]patchblock:id=%small_dripleaf,data=12,data=13,patch0=patch922,patch1=patch923,patch2=patch924,patch3=patch925,patch4=patch926,patch5=patch927,patch6=patch928,patch7=patch929,patch8=patch930,patch9=patch931,patch10=patch932,patch11=patch933,patch12=patch934,patch13=patch935,patch14=patch936,patch15=patch937,patch16=patch938,patch17=patch939,patch18=patch914,patch19=patch915,patch20=patch916,patch21=patch917
[1.17-]patchblock:id=%small_dripleaf,data=14,data=15,patch0=patch918,patch1=patch919,patch2=patch920,patch3=patch921
modellist:id=magenta_glazed_terracotta,data=1,box=0/0/0:16/16/16:d/0:u/0:n90/0:s270/0:w/0:e180/0
patchblock:id=magenta_glazed_terracotta,data=0
patchrotate:id=magenta_glazed_terracotta,data=1,roty=180
patchblock:id=magenta_glazed_terracotta,data=2
patchrotate:id=magenta_glazed_terracotta,data=1,roty=90
patchblock:id=magenta_glazed_terracotta,data=3
patchrotate:id=magenta_glazed_terracotta,data=1,roty=270

View File

@ -880,7 +880,7 @@ block:id=obsidian,allfaces=0:obsidian,stdrot=true
# Torch
block:id=torch,patch0=0:torch,transparency=TRANSPARENT
# Wall torch
block:id=wall_torch,data=0,data=1,data=2,data=3,patch0=0:torch,transparency=TRANSPARENT
block:id=wall_torch,data=*,patch0=0:torch,transparency=TRANSPARENT
# Fire
block:id=fire,patch0-3=0:fire_0,patch4-7=0:fire_1,transparency=TRANSPARENT
# Monster spawner
@ -1786,10 +1786,7 @@ block:id=orange_glazed_terracotta,data=0,stdrot=true,topbottom=0:orange_glazed_t
block:id=orange_glazed_terracotta,data=1,stdrot=true,topbottom=6000:orange_glazed_terracotta,east=0:orange_glazed_terracotta,west=5000:orange_glazed_terracotta,north=4000:orange_glazed_terracotta,south=6000:orange_glazed_terracotta
block:id=orange_glazed_terracotta,data=2,stdrot=true,topbottom=5000:orange_glazed_terracotta,south=0:orange_glazed_terracotta,north=5000:orange_glazed_terracotta,east=4000:orange_glazed_terracotta,west=6000:orange_glazed_terracotta
block:id=orange_glazed_terracotta,data=3,stdrot=true,topbottom=4000:orange_glazed_terracotta,west=0:orange_glazed_terracotta,east=5000:orange_glazed_terracotta,south=4000:orange_glazed_terracotta,north=6000:orange_glazed_terracotta
block:id=magenta_glazed_terracotta,data=0,stdrot=true,topbottom=0:magenta_glazed_terracotta,north=0:magenta_glazed_terracotta,south=5000:magenta_glazed_terracotta,west=4000:magenta_glazed_terracotta,east=6000:magenta_glazed_terracotta
block:id=magenta_glazed_terracotta,data=1,stdrot=true,topbottom=6000:magenta_glazed_terracotta,east=0:magenta_glazed_terracotta,west=5000:magenta_glazed_terracotta,north=4000:magenta_glazed_terracotta,south=6000:magenta_glazed_terracotta
block:id=magenta_glazed_terracotta,data=2,stdrot=true,topbottom=5000:magenta_glazed_terracotta,south=0:magenta_glazed_terracotta,north=5000:magenta_glazed_terracotta,east=4000:magenta_glazed_terracotta,west=6000:magenta_glazed_terracotta
block:id=magenta_glazed_terracotta,data=3,stdrot=true,topbottom=4000:magenta_glazed_terracotta,west=0:magenta_glazed_terracotta,east=5000:magenta_glazed_terracotta,south=4000:magenta_glazed_terracotta,north=6000:magenta_glazed_terracotta
block:id=magenta_glazed_terracotta,data=*,patch0=0:magenta_glazed_terracotta
block:id=light_blue_glazed_terracotta,data=0,stdrot=true,topbottom=0:light_blue_glazed_terracotta,north=0:light_blue_glazed_terracotta,south=5000:light_blue_glazed_terracotta,west=4000:light_blue_glazed_terracotta,east=6000:light_blue_glazed_terracotta
block:id=light_blue_glazed_terracotta,data=1,stdrot=true,topbottom=6000:light_blue_glazed_terracotta,east=0:light_blue_glazed_terracotta,west=5000:light_blue_glazed_terracotta,north=4000:light_blue_glazed_terracotta,south=6000:light_blue_glazed_terracotta
block:id=light_blue_glazed_terracotta,data=2,stdrot=true,topbottom=5000:light_blue_glazed_terracotta,south=0:light_blue_glazed_terracotta,north=5000:light_blue_glazed_terracotta,east=4000:light_blue_glazed_terracotta,west=6000:light_blue_glazed_terracotta
@ -2474,7 +2471,7 @@ block:id=black_banner,id=black_wall_banner,data=*,patch0=0:oak_planks,patch1=0:b
[1.16-]block:id=soul_lantern,patch0=0:soul_lantern,transparency=TRANSPARENT
[1.16-]block:id=soul_lantern,patch0=0:soul_lantern,patch1=1:soul_lantern,patch2=2:soul_lantern,patch3=3:soul_lantern,patch4=4:soul_lantern,patch5=5:soul_lantern,patch6=6:soul_lantern,patch7=7:soul_lantern,transparency=TRANSPARENT
# Soul Campfire
[1.16-]block:id=soul_campfire,patch0=0:campfire_log,patch1=0:soul_campfire_log_lit,patch2=0:soul_campfire_fire,transparency=TRANSPARENT
[1.16-]block:id=soul_campfire,data=*,patch0=0:campfire_log,patch1=0:soul_campfire_log_lit,patch2=0:soul_campfire_fire,transparency=TRANSPARENT
# Warped Stem
[1.16-]block:id=warped_stem,data=1,allsides=0:warped_stem,topbottom=0:warped_stem_top,stdrot=true
[1.16-]block:id=warped_stem,data=0,north=0:warped_stem_top,south=0:warped_stem_top,east=4000:warped_stem,west=4000:warped_stem,top=0:warped_stem,bottom=0:warped_stem

View File

@ -98,6 +98,22 @@ public interface RenderPatchFactory {
* @return patch requested
*/
public RenderPatch getRotatedPatch(RenderPatch patch, double xrot, double yrot, double zrot, int textureidx);
/**
* Get/create patch with given attributes.
*
* Generate from existing patch, after rotating xrot degrees around the X axis then yrot degrees around the Y axis, and then zrot degrees arond Z.
*
* @param patch - original patch
* @param xrot - degrees to rotate around X
* @param yrot - degrees to rotate around Y
* @param zrot - degrees to rotate around Z
* @param rotorigx - origin of rotation x (0-1)
* @param rotorigy - origin of rotation y (0-1)
* @param rotorigz - origin of rotation z (0-1)
* @param textureidx - texture index to be used for rotated patch (-1 means same as original patch)
* @return patch requested
*/
public RenderPatch getRotatedPatch(RenderPatch patch, double xrot, double yrot, double zrot, double rotorigx, double rotorigy, double rotorigz, int textureidx);
/**
* Get/create patch with given attributes.
*