More modsupport updates for improved DynmapBlockScan

This commit is contained in:
Mike Primm 2022-02-09 22:38:09 -06:00
parent 611832fa22
commit 8fbc3e3534
6 changed files with 98 additions and 159 deletions

View file

@ -168,16 +168,6 @@ public interface ModModelDefinition {
* @return block model record
*/
public ModelBlockModel addModelBlockModel(String blockname);
/**
* Add rotated model block model, based on existing model : default assumes all metadata values are matching
* @param blockname - block name
* @param model - existing model to be rotated
* @param xrot - x rotation in degrees (0, 90, 180, 270)
* @param yrot - y rotation in degrees (0, 90, 180, 270)
* @param zrot - z rotation in degrees (0, 90, 180, 270)
* @return block model record
*/
public ModelBlockModel addRotatedModelBlockModel(String blockname, ModelBlockModel model, int xrot, int yrot, int zrot);
/**
* Final call for model definition: publishes definiiton to Dynmap to be used for the mod
* @return true if successful, false if error

View file

@ -39,13 +39,17 @@ public interface ModelBlockModel extends BlockModel {
* @param zrot - degrees of rotation of block around Z
* @param shade - shade setting for model
* @param rotorigin = rotation origin [x, y, z] (if null, [ 8,8,8 ] is assumed
* @param modrotx - model level rotation in degrees (0, 90, 180, 270)
* @param modroty - model level rotation in degrees (0, 90, 180, 270)
* @param modrotz - model level rotation in degrees (0, 90, 180, 270)
* @return model block to add faces to
*/
public ModelBlock addModelBlock(double[] from, double[] to, double xrot, double yrot, double zrot, boolean shade, double[] rotorigin);
public ModelBlock addModelBlock(double[] from, double[] to, double xrot, double yrot, double zrot,
boolean shade, double[] rotorigin, int modrotx, int modroty, int modrotz);
default public ModelBlock addModelBlock(double[] from, double[] to, double xrot, double yrot, double zrot, boolean shade) {
return addModelBlock(from, to, xrot, yrot, zrot, shade, null);
return addModelBlock(from, to, xrot, yrot, zrot, shade, null, 0, 0, 0);
}
default public ModelBlock addModelBlock(double[] from, double[] to, double xrot, double yrot, double zrot) {
return addModelBlock(from, to, xrot, yrot, zrot, true, null);
return addModelBlock(from, to, xrot, yrot, zrot, true, null, 0, 0, 0);
}
}