diff options
author | Julien Gouesse <[email protected]> | 2019-08-25 00:01:47 +0200 |
---|---|---|
committer | Julien Gouesse <[email protected]> | 2019-08-25 00:01:47 +0200 |
commit | 546b30c67f163e2e137c33aa36a07c12d967eb37 (patch) | |
tree | eab540c488fd33601d6c333c4c4954a791cead9a /ardor3d-craft/src/main | |
parent | 6a73df69e30d8b10c3a88a3097c12ca878e797b4 (diff) |
Fixes the generation of the Java API documentation and removes some duplicate classes
Diffstat (limited to 'ardor3d-craft/src/main')
13 files changed, 654 insertions, 582 deletions
diff --git a/ardor3d-craft/src/main/java/com/ardorcraft/control/FlyControl.java b/ardor3d-craft/src/main/java/com/ardorcraft/control/FlyControl.java index 237df9f..b643a49 100644 --- a/ardor3d-craft/src/main/java/com/ardorcraft/control/FlyControl.java +++ b/ardor3d-craft/src/main/java/com/ardorcraft/control/FlyControl.java @@ -192,13 +192,15 @@ public class FlyControl { } /** + * @param player + * the player * @param layer - * the logical layer to register with + * the logical layer to register with * @param upAxis - * the up axis of the camera + * the up axis of the camera * @param dragOnly - * if true, mouse input will only rotate the camera if one of the - * mouse buttons (left, center or right) is down. + * if true, mouse input will only rotate the camera if one + * of the mouse buttons (left, center or right) is down. * @return a new FlyControl object */ public static FlyControl setupTriggers(final PlayerBase player, @@ -217,11 +219,12 @@ public class FlyControl { } /** - * Deregister the triggers of the given FlyControl from the given - * LogicalLayer. + * Deregister the triggers of the given FlyControl from the given LogicalLayer. * * @param layer + * the logical layer to deregister * @param control + * the FlyControl */ public static void removeTriggers(final LogicalLayer layer, final FlyControl control) { diff --git a/ardor3d-craft/src/main/java/com/ardorcraft/control/WalkControl.java b/ardor3d-craft/src/main/java/com/ardorcraft/control/WalkControl.java index cc77dbd..e776f13 100644 --- a/ardor3d-craft/src/main/java/com/ardorcraft/control/WalkControl.java +++ b/ardor3d-craft/src/main/java/com/ardorcraft/control/WalkControl.java @@ -195,13 +195,15 @@ public class WalkControl { } /** + * @param player + * the player * @param layer - * the logical layer to register with + * the logical layer to register with * @param upAxis - * the up axis of the camera + * the up axis of the camera * @param dragOnly - * if true, mouse input will only rotate the camera if one of the - * mouse buttons (left, center or right) is down. + * if true, mouse input will only rotate the camera if one + * of the mouse buttons (left, center or right) is down. * @return a new FlyControl object */ public static WalkControl setupTriggers(final PlayerBase player, @@ -220,11 +222,12 @@ public class WalkControl { } /** - * Deregister the triggers of the given FlyControl from the given - * LogicalLayer. + * Deregister the triggers of the given FlyControl from the given LogicalLayer. * * @param layer + * the logical layer * @param control + * the FlyControl */ public static void removeTriggers(final LogicalLayer layer, final WalkControl control) { diff --git a/ardor3d-craft/src/main/java/com/ardorcraft/objects/QuadQuad.java b/ardor3d-craft/src/main/java/com/ardorcraft/objects/QuadQuad.java index ad2f247..7d55214 100644 --- a/ardor3d-craft/src/main/java/com/ardorcraft/objects/QuadQuad.java +++ b/ardor3d-craft/src/main/java/com/ardorcraft/objects/QuadQuad.java @@ -19,7 +19,7 @@ import com.ardor3d.util.geom.BufferUtils; /** * <code>QuadQuad</code> defines a four sided, two dimensional shape. The local height of the <code>QuadQuad</code> - * defines it's size about the y-axis, while the width defines the x-axis. The z-axis will always be 0. + * defines its size about the y-axis, while the width defines the x-axis. The z-axis will always be 0. */ public class QuadQuad extends Mesh { @@ -31,7 +31,7 @@ public class QuadQuad extends Mesh { } /** - * Constructor creates a new <code>Quade</code> object with the provided width and height. + * Constructor creates a new <code>QuadQuad</code> object with the provided width and height. * * @param name * the name of the <code>QuadQuad</code>. @@ -39,6 +39,8 @@ public class QuadQuad extends Mesh { * the width of the <code>QuadQuad</code>. * @param height * the height of the <code>QuadQuad</code>. + * @param mode + * the mode of the <code>QuadQuad</code>. */ public QuadQuad(final String name, final double width, final double height, final int mode) { super(name); @@ -52,6 +54,8 @@ public class QuadQuad extends Mesh { * the new width of the <code>QuadQuad</code>. * @param height * the new height of the <code>QuadQuad</code>. + * @param mode + * the new mode of the <code>QuadQuad</code>. */ public void resize(final double width, final double height, final int mode) { _width = width; @@ -84,6 +88,8 @@ public class QuadQuad extends Mesh { * the width of the <code>QuadQuad</code>. * @param height * the height of the <code>QuadQuad</code>. + * @param mode + * the mode of the <code>QuadQuad</code>. */ private void initialize(final double width, final double height, final int mode) { final int verts = 4; diff --git a/ardor3d-craft/src/main/java/com/ardorcraft/objects/SkyDome.java b/ardor3d-craft/src/main/java/com/ardorcraft/objects/SkyDome.java index 3baca8f..1be3593 100644 --- a/ardor3d-craft/src/main/java/com/ardorcraft/objects/SkyDome.java +++ b/ardor3d-craft/src/main/java/com/ardorcraft/objects/SkyDome.java @@ -165,8 +165,9 @@ public class SkyDome extends Mesh { * Generates the vertices of the dome * * @param outsideView - * If the dome should be viewed from the outside (if not zbuffer is used) + * If the dome should be viewed from the outside (if no zbuffer is used) * @param center + * The center of the dome */ private void setGeometryData(final boolean outsideView, final Vector3 center) { final Vector3 tempVa = Vector3.fetchTempInstance(); diff --git a/ardor3d-craft/src/main/java/com/ardorcraft/objects/Skybox.java b/ardor3d-craft/src/main/java/com/ardorcraft/objects/Skybox.java index 528cef5..7024408 100644 --- a/ardor3d-craft/src/main/java/com/ardorcraft/objects/Skybox.java +++ b/ardor3d-craft/src/main/java/com/ardorcraft/objects/Skybox.java @@ -226,6 +226,7 @@ public class Skybox extends Node { /** * Force all of the textures to load. This prevents pauses later during the application as you pan around the world. + * @param r the renderer */ public void preloadTextures(final Renderer r) { for (int x = 0; x < 6; x++) { diff --git a/ardor3d-craft/src/main/java/com/ardorcraft/pathfinding/ConstrainedAStar.java b/ardor3d-craft/src/main/java/com/ardorcraft/pathfinding/ConstrainedAStar.java index 8cf8584..f85e067 100644 --- a/ardor3d-craft/src/main/java/com/ardorcraft/pathfinding/ConstrainedAStar.java +++ b/ardor3d-craft/src/main/java/com/ardorcraft/pathfinding/ConstrainedAStar.java @@ -23,7 +23,7 @@ import com.ardorcraft.world.BlockProvider; * AStar pathfinding with pluggable cost calculator (since that is game specific). * <p> * Typical usage: - * <p> + * </p> * * <pre> * ConstrainedAStar pathFinder = new ConstrainedAStar(blockWorld, 40); diff --git a/ardor3d-craft/src/main/java/com/ardorcraft/util/BlockUtil.java b/ardor3d-craft/src/main/java/com/ardorcraft/util/BlockUtil.java index 9baf07c..cd97f95 100644 --- a/ardor3d-craft/src/main/java/com/ardorcraft/util/BlockUtil.java +++ b/ardor3d-craft/src/main/java/com/ardorcraft/util/BlockUtil.java @@ -31,467 +31,512 @@ import com.ardorcraft.world.BlockWorld; * Main class to use for setting up properties for all block types. */ public final class BlockUtil { - private static final Logger logger = Logger.getLogger(BlockUtil.class.getName()); - - private final int totalTextureSizeWidth; - private final int totalTextureSizeHeight; - private final int textureSize; - private final float textureReciprocalX; - private final float textureReciprocalY; - private final float offsetWidth; - private final float offsetHeight; - private final int xCount; - private final int yCount; - - private final Map<Integer, EnumMap<BlockSide, Vector2>> blockTextureCoords = new HashMap<>(); - private final BlockType[] types = new BlockType[256]; - private final boolean[] isLocalLightMap = new boolean[256]; - private final GeometryProducer[] geometryProducers = new GeometryProducer[256]; - private final boolean[] isCollidable = new boolean[256]; - private final boolean[] isPickable = new boolean[256]; - private final boolean[] isSemiTransparent = new boolean[256]; - - public BlockUtil(final int textureWidth, final int textureHeight, final int subTextureSize) { - totalTextureSizeWidth = textureWidth; - totalTextureSizeHeight = textureHeight; - textureSize = subTextureSize; - - textureReciprocalX = (float) textureSize / (float) totalTextureSizeWidth; - textureReciprocalY = (float) textureSize / (float) totalTextureSizeHeight; - - xCount = totalTextureSizeWidth / textureSize; - yCount = totalTextureSizeHeight / textureSize; - - offsetWidth = 0.1f / totalTextureSizeWidth; - offsetHeight = 0.1f / totalTextureSizeHeight; - - setupDefaultBlocks(); - } - - private void setupDefaultBlocks() { - final GeometryProducer producer = new BoxProducer(); - for (int x = 0; x < 16; x++) { - for (int y = 0; y < 16; y++) { - final int index = y * 16 + x + 1; - if (index > 255) { - break; - } - setBlockMapping(index, x, y); - setBlockType(index, BlockType.Solid); - setGeometryProducer(index, producer); - setIsCollidable(index, true); - setIsPickable(index, true); - setIsLocalLightSource(index, false); - } - } - - final Mesh vegetationMesh = createVegetationMesh(); - final MeshProducer vegetationMeshProducer = new MeshProducer(vegetationMesh); - vegetationMeshProducer.setTransformTextureCoords(true); - - // setBlockType(BlockWorld.WATER, BlockType.Transparent); - setIsSemiTransparent(BlockWorld.WATER, true); - setIsPickable(BlockWorld.WATER, false); - setIsCollidable(BlockWorld.WATER, false); - - setBlockMapping(1, 1, 0); // stone - setBlockMapping(2, 0, 0, 3, 0, 2, 0); // grass - setBlockMapping(3, 2, 0); // dirt - setBlockMapping(4, 0, 1); // cobblestone - setBlockMapping(5, 4, 0); // wooden plank - - setBlockMapping(6, 15, 0); // sapling - setBlockType(6, BlockType.Transparent); - setGeometryProducer(6, vegetationMeshProducer); - setIsCollidable(6, false); - - setBlockMapping(7, 1, 1); // bedrock - setBlockMapping(8, 13, 12); // water - setBlockMapping(9, 13, 12); // stationary water - setBlockMapping(10, 13, 14); // lava - setBlockMapping(11, 13, 14); // stationary lava - setBlockMapping(12, 2, 1); // sand - setBlockMapping(13, 3, 1); // gravel - setBlockMapping(14, 0, 2); // gold ore - setBlockMapping(15, 1, 2); // iron ore - setBlockMapping(16, 2, 2); // coal ore - setBlockMapping(17, 4, 1); // wood - - setBlockMapping(18, 4, 3); // leaves - setBlockType(18, BlockType.Transparent); - - setBlockMapping(19, 0, 3); // sponge - - setBlockMapping(20, 1, 3); // glass - setBlockType(20, BlockType.Transparent); - - setBlockMapping(21, 0, 10); // lapis ore - setBlockMapping(22, 0, 9); // lapis block - setBlockMapping(23, 14, 3, 13, 2, 14, 3); // dispenser - setBlockMapping(24, 0, 12); // sandstone - - setBlockMapping(37, 13, 0); // dandelion - setBlockType(37, BlockType.Transparent); - setGeometryProducer(37, vegetationMeshProducer); - setIsCollidable(37, false); - setBlockMapping(38, 12, 0); // rose - setBlockType(38, BlockType.Transparent); - setGeometryProducer(38, vegetationMeshProducer); - setIsCollidable(38, false); - setBlockMapping(39, 12, 1); // brown mushroom - setBlockType(39, BlockType.Transparent); - setGeometryProducer(39, vegetationMeshProducer); - setIsCollidable(39, false); - setBlockMapping(40, 13, 1); // red mushroom - setBlockType(40, BlockType.Transparent); - setGeometryProducer(40, vegetationMeshProducer); - setIsCollidable(40, false); - - setBlockMapping(41, 7, 1); // gold block - setBlockMapping(42, 6, 1); // iron block - setBlockMapping(43, 5, 0); // double slabs - setBlockMapping(44, 5, 0); // slabs - setBlockMapping(45, 7, 0); // brick block - setBlockMapping(46, 8, 0); // tnt - setBlockMapping(47, 4, 0, 3, 2, 4, 0, 4, 0, 4, 0, 4, 0); // bookshelf - setBlockMapping(48, 4, 2); // moss stone - setBlockMapping(49, 5, 2); // obsidian - - setBlockMapping(50, 0, 5); // torch - setBlockType(50, BlockType.Transparent); - setGeometryProducer(50, vegetationMeshProducer); - setIsCollidable(50, false); - setIsLocalLightSource(50, true); - - setBlockMapping(51, 0, 5); // fire - setBlockType(51, BlockType.Transparent); - setIsCollidable(51, false); - setIsLocalLightSource(51, true); - - setBlockMapping(52, 1, 4); // monster spawner - setBlockType(52, BlockType.Transparent); - - setBlockMapping(53, 4, 0); // stairs - setBlockMapping(54, 9, 1, 10, 1, 11, 1); // chest - - setBlockMapping(55, 4, 10); // redstone wire - setBlockType(55, BlockType.Transparent); - - setBlockMapping(56, 2, 3); // diamond ore - setBlockMapping(57, 8, 1); // diamond block - setBlockMapping(58, 11, 2, 11, 3, 11, 2); // crafting table - - setBlockMapping(59, 15, 5); // seeds - setBlockType(59, BlockType.Transparent); - - setBlockMapping(60, 7, 5); // farmland - setBlockMapping(61, 12, 2); // furnace - setBlockMapping(62, 13, 3); // burning furnace - setBlockMapping(63, 4, 0); // sign post - - setBlockMapping(64, 1, 5); // door - setBlockType(64, BlockType.Transparent); - setBlockMapping(65, 3, 5); // ladders - setBlockType(65, BlockType.Transparent); - setBlockMapping(66, 0, 8); // rails - setBlockType(66, BlockType.Transparent); - - setBlockMapping(67, 0, 1); // cobblestone stairs - setBlockMapping(68, 4, 0); // wallsign - setBlockMapping(69, 4, 8); // lever - setBlockMapping(70, 6, 0); // stone pressure plate - setBlockMapping(71, 2, 5); // iron door - setBlockMapping(72, 4, 0); // wooden pressure plate - setBlockMapping(73, 3, 3); // redstone ore - setBlockMapping(74, 3, 3); // glowing redstone ore - - setBlockMapping(75, 0, 6); // redstone torch off - setBlockType(75, BlockType.Transparent); - - setBlockMapping(76, 0, 5); // restone torch on - setBlockType(76, BlockType.Transparent); - setIsLocalLightSource(76, true); - - setBlockMapping(77, 0, 1); // stone button - setBlockMapping(78, 2, 4); // snow - setBlockMapping(79, 2, 4); // ice - setBlockMapping(80, 2, 4); // snow block - - setBlockMapping(81, 5, 4, 6, 4, 5, 4); // cactus - setBlockType(81, BlockType.Transparent); - - setBlockMapping(82, 3, 1); // clay block - - setBlockMapping(83, 9, 4); // sugar cane - setBlockType(83, BlockType.Transparent); - - setBlockMapping(84, 11, 4, 10, 4, 10, 4); // jukebox - - setBlockMapping(85, 5, 9); // fence - setBlockType(85, BlockType.Transparent); - - setBlockMapping(86, 6, 6, 7, 7, 6, 7); // pumpkin - setBlockMapping(87, 7, 6); // netherrack - setBlockMapping(88, 8, 6); // soul sand - setBlockMapping(89, 9, 6); // glowstone block - setBlockMapping(90, 1, 12); // portal - setBlockMapping(91, 1, 12); // jack-o-lantern - - setBlockMapping(92, 9, 7, 10, 7, 12, 7); // cake block - setBlockType(92, BlockType.Transparent); - - setBlockMapping(93, 7, 6); // redstone repeater off - setBlockMapping(94, 7, 6); // redstone repeater on - setBlockMapping(95, 9, 1, 11, 1, 10, 1, 10, 1, 10, 1, 9, 1); // locked chest - - // Some grass stuff - for (int i = 0; i < 8; i++) { - setBlockType(100 + i, BlockType.Transparent); - setBlockMapping(100 + i, 8 + i, 5); - setIsCollidable(100 + i, false); - setIsPickable(100 + i, false); - setGeometryProducer(100 + i, vegetationMeshProducer); - } - } - - /** - * Set if this block should emit light - * - * @param blockId - * @param value - */ - public void setIsLocalLightSource(final int blockId, final boolean value) { - isLocalLightMap[blockId] = value; - } - - /** - * Setup texture tiles to use for this block - * - * @param blockId - * @param x - * @param y - */ - public void setBlockMapping(final int blockId, final int x, final int y) { - setBlockMapping(blockId, x, y, x, y, x, y); - } - - /** - * Setup texture tiles to use for this block - * - * @param blockId - * @param xTop - * @param yTop - * @param xSide - * @param ySide - * @param xBottom - * @param yBottom - */ - public void setBlockMapping(final int blockId, final int xTop, final int yTop, final int xSide, final int ySide, - final int xBottom, final int yBottom) { - setBlockMapping(blockId, xTop, yTop, xSide, ySide, xSide, ySide, xSide, ySide, xSide, ySide, xBottom, yBottom); - } - - /** - * Setup texture tiles to use for this block - * - * @param blockId - * @param xTop - * @param yTop - * @param xFront - * @param yFront - * @param xBack - * @param yBack - * @param xLeft - * @param yLeft - * @param xRight - * @param yRight - * @param xBottom - * @param yBottom - */ - public void setBlockMapping(final int blockId, final int xTop, final int yTop, final int xFront, final int yFront, - final int xBack, final int yBack, final int xLeft, final int yLeft, final int xRight, final int yRight, - final int xBottom, final int yBottom) { - setBlockMapping(blockId, BlockSide.Top, xTop, yTop); - setBlockMapping(blockId, BlockSide.Front, xFront, yFront); - setBlockMapping(blockId, BlockSide.Back, xBack, yBack); - setBlockMapping(blockId, BlockSide.Left, xLeft, yLeft); - setBlockMapping(blockId, BlockSide.Right, xRight, yRight); - setBlockMapping(blockId, BlockSide.Bottom, xBottom, yBottom); - } - - /** - * Setup texture tiles to use for this block - * - * @param blockId - * @param side - * @param x - * @param y - */ - public void setBlockMapping(final int blockId, final BlockSide side, final int x, final int y) { - EnumMap<BlockSide, Vector2> coord = blockTextureCoords.get(blockId); - if (coord == null) { - coord = new EnumMap<>(BlockSide.class); - blockTextureCoords.put(blockId, coord); - } - fillCoord(coord, side, (yCount - y - 1) * xCount + x); - } - - /** - * Set if this block is see-through or not (if not, then hidden surface removal can be done) - * - * @param blockId - * @param type - */ - public void setBlockType(final int blockId, final BlockType type) { - types[blockId] = type; - } - - public BlockType getBlockType(final int blockId) { - return types[blockId]; - } - - public boolean isLocalLight(final int block) { - return isLocalLightMap[block]; - } - - private void fillCoord(final EnumMap<BlockSide, Vector2> coord, final BlockSide blockSide, final int pos) { - final double x = pos % xCount * textureReciprocalX; - final double y = pos / yCount * textureReciprocalY; - - coord.put(blockSide, new Vector2(x, y)); - } - - /** - * Get start coordinates for a specific side of a block. - * - * @param blockId - * @param blockSide - * @return - */ - public ReadOnlyVector2 getBlockTextureCoord(final int blockId, final BlockSide blockSide) { - if (!blockTextureCoords.containsKey(blockId)) { - logger.info("No mapping found for blockId: " + blockId); - return Vector2.ZERO; - } - return blockTextureCoords.get(blockId).get(blockSide); - } - - /** - * Get offset to fix the artifact issue of texture bleeding. - * - * @return - */ - public float getOffsetWidth() { - return offsetWidth; - } - - /** - * Get offset to fix the artifact issue of texture bleeding. - * - * @return - */ - public float getOffsetHeight() { - return offsetHeight; - } - - /** - * Get the width of each tile in the texture atlas. - * - * @return - */ - public float getTileWidth() { - return textureReciprocalX; - } - - /** - * Get the height of each tile in the texture atlas. - * - * @return - */ - public float getTileHeight() { - return textureReciprocalY; - } - - /** - * Set the geometry producer to use for this block id. - * - * @param blockId - * @param handler - */ - public void setGeometryProducer(final int blockId, final GeometryProducer handler) { - geometryProducers[blockId] = handler; - } - - public GeometryProducer getGeometryProducer(final int blockId) { - return geometryProducers[blockId]; - } - - /** - * Set if the block should be collidable. - * - * @param blockId - * @param value - */ - public void setIsCollidable(final int blockId, final boolean value) { - isCollidable[blockId] = value; - } - - public boolean getIsCollidable(final int blockId) { - return isCollidable[blockId]; - } - - /** - * Set if the block should be pickable. - * - * @param blockId - * @param value - */ - public void setIsPickable(final int blockId, final boolean value) { - isPickable[blockId] = value; - } - - public boolean getIsPickable(final int blockId) { - return isPickable[blockId]; - } - - /** - * Set if block is semi-transparent like water and should not generate sides when next to itself. - * - * @param blockId - * @param value - */ - public void setIsSemiTransparent(final int blockId, final boolean value) { - isSemiTransparent[blockId] = value; - } - - public boolean getIsSemiTransparent(final int blockId) { - return isSemiTransparent[blockId]; - } - - private Mesh createVegetationMesh() { - final Node combineNode = new Node(); - - final double sizeX = 1; - final double sizeY = 1; - - Quad q = new Quad("quad", sizeX, sizeY); - q.setRotation(new Quaternion().fromAngleAxis(MathUtils.HALF_PI * 0.5, Vector3.UNIT_Y)); - combineNode.attachChild(q); - - q = new Quad("quad", sizeX, sizeY); - q.setRotation(new Quaternion().fromAngleAxis(-MathUtils.HALF_PI * 0.5, Vector3.UNIT_Y)); - combineNode.attachChild(q); - - q = new Quad("quad", sizeX, sizeY); - q.setRotation(new Quaternion().fromAngleAxis(MathUtils.HALF_PI * 1.5, Vector3.UNIT_Y)); - combineNode.attachChild(q); - - q = new Quad("quad", sizeX, sizeY); - q.setRotation(new Quaternion().fromAngleAxis(-MathUtils.HALF_PI * 1.5, Vector3.UNIT_Y)); - combineNode.attachChild(q); - - combineNode.updateWorldTransform(true); - - return MeshCombiner.combine(combineNode); - } + private static final Logger logger = Logger.getLogger(BlockUtil.class.getName()); + + private final int totalTextureSizeWidth; + private final int totalTextureSizeHeight; + private final int textureSize; + private final float textureReciprocalX; + private final float textureReciprocalY; + private final float offsetWidth; + private final float offsetHeight; + private final int xCount; + private final int yCount; + + private final Map<Integer, EnumMap<BlockSide, Vector2>> blockTextureCoords = new HashMap<>(); + private final BlockType[] types = new BlockType[256]; + private final boolean[] isLocalLightMap = new boolean[256]; + private final GeometryProducer[] geometryProducers = new GeometryProducer[256]; + private final boolean[] isCollidable = new boolean[256]; + private final boolean[] isPickable = new boolean[256]; + private final boolean[] isSemiTransparent = new boolean[256]; + + public BlockUtil(final int textureWidth, final int textureHeight, final int subTextureSize) { + totalTextureSizeWidth = textureWidth; + totalTextureSizeHeight = textureHeight; + textureSize = subTextureSize; + + textureReciprocalX = (float) textureSize / (float) totalTextureSizeWidth; + textureReciprocalY = (float) textureSize / (float) totalTextureSizeHeight; + + xCount = totalTextureSizeWidth / textureSize; + yCount = totalTextureSizeHeight / textureSize; + + offsetWidth = 0.1f / totalTextureSizeWidth; + offsetHeight = 0.1f / totalTextureSizeHeight; + + setupDefaultBlocks(); + } + + private void setupDefaultBlocks() { + final GeometryProducer producer = new BoxProducer(); + for (int x = 0; x < 16; x++) { + for (int y = 0; y < 16; y++) { + final int index = y * 16 + x + 1; + if (index > 255) { + break; + } + setBlockMapping(index, x, y); + setBlockType(index, BlockType.Solid); + setGeometryProducer(index, producer); + setIsCollidable(index, true); + setIsPickable(index, true); + setIsLocalLightSource(index, false); + } + } + + final Mesh vegetationMesh = createVegetationMesh(); + final MeshProducer vegetationMeshProducer = new MeshProducer(vegetationMesh); + vegetationMeshProducer.setTransformTextureCoords(true); + + // setBlockType(BlockWorld.WATER, BlockType.Transparent); + setIsSemiTransparent(BlockWorld.WATER, true); + setIsPickable(BlockWorld.WATER, false); + setIsCollidable(BlockWorld.WATER, false); + + setBlockMapping(1, 1, 0); // stone + setBlockMapping(2, 0, 0, 3, 0, 2, 0); // grass + setBlockMapping(3, 2, 0); // dirt + setBlockMapping(4, 0, 1); // cobblestone + setBlockMapping(5, 4, 0); // wooden plank + + setBlockMapping(6, 15, 0); // sapling + setBlockType(6, BlockType.Transparent); + setGeometryProducer(6, vegetationMeshProducer); + setIsCollidable(6, false); + + setBlockMapping(7, 1, 1); // bedrock + setBlockMapping(8, 13, 12); // water + setBlockMapping(9, 13, 12); // stationary water + setBlockMapping(10, 13, 14); // lava + setBlockMapping(11, 13, 14); // stationary lava + setBlockMapping(12, 2, 1); // sand + setBlockMapping(13, 3, 1); // gravel + setBlockMapping(14, 0, 2); // gold ore + setBlockMapping(15, 1, 2); // iron ore + setBlockMapping(16, 2, 2); // coal ore + setBlockMapping(17, 4, 1); // wood + + setBlockMapping(18, 4, 3); // leaves + setBlockType(18, BlockType.Transparent); + + setBlockMapping(19, 0, 3); // sponge + + setBlockMapping(20, 1, 3); // glass + setBlockType(20, BlockType.Transparent); + + setBlockMapping(21, 0, 10); // lapis ore + setBlockMapping(22, 0, 9); // lapis block + setBlockMapping(23, 14, 3, 13, 2, 14, 3); // dispenser + setBlockMapping(24, 0, 12); // sandstone + + setBlockMapping(37, 13, 0); // dandelion + setBlockType(37, BlockType.Transparent); + setGeometryProducer(37, vegetationMeshProducer); + setIsCollidable(37, false); + setBlockMapping(38, 12, 0); // rose + setBlockType(38, BlockType.Transparent); + setGeometryProducer(38, vegetationMeshProducer); + setIsCollidable(38, false); + setBlockMapping(39, 12, 1); // brown mushroom + setBlockType(39, BlockType.Transparent); + setGeometryProducer(39, vegetationMeshProducer); + setIsCollidable(39, false); + setBlockMapping(40, 13, 1); // red mushroom + setBlockType(40, BlockType.Transparent); + setGeometryProducer(40, vegetationMeshProducer); + setIsCollidable(40, false); + + setBlockMapping(41, 7, 1); // gold block + setBlockMapping(42, 6, 1); // iron block + setBlockMapping(43, 5, 0); // double slabs + setBlockMapping(44, 5, 0); // slabs + setBlockMapping(45, 7, 0); // brick block + setBlockMapping(46, 8, 0); // tnt + setBlockMapping(47, 4, 0, 3, 2, 4, 0, 4, 0, 4, 0, 4, 0); // bookshelf + setBlockMapping(48, 4, 2); // moss stone + setBlockMapping(49, 5, 2); // obsidian + + setBlockMapping(50, 0, 5); // torch + setBlockType(50, BlockType.Transparent); + setGeometryProducer(50, vegetationMeshProducer); + setIsCollidable(50, false); + setIsLocalLightSource(50, true); + + setBlockMapping(51, 0, 5); // fire + setBlockType(51, BlockType.Transparent); + setIsCollidable(51, false); + setIsLocalLightSource(51, true); + + setBlockMapping(52, 1, 4); // monster spawner + setBlockType(52, BlockType.Transparent); + + setBlockMapping(53, 4, 0); // stairs + setBlockMapping(54, 9, 1, 10, 1, 11, 1); // chest + + setBlockMapping(55, 4, 10); // redstone wire + setBlockType(55, BlockType.Transparent); + + setBlockMapping(56, 2, 3); // diamond ore + setBlockMapping(57, 8, 1); // diamond block + setBlockMapping(58, 11, 2, 11, 3, 11, 2); // crafting table + + setBlockMapping(59, 15, 5); // seeds + setBlockType(59, BlockType.Transparent); + + setBlockMapping(60, 7, 5); // farmland + setBlockMapping(61, 12, 2); // furnace + setBlockMapping(62, 13, 3); // burning furnace + setBlockMapping(63, 4, 0); // sign post + + setBlockMapping(64, 1, 5); // door + setBlockType(64, BlockType.Transparent); + setBlockMapping(65, 3, 5); // ladders + setBlockType(65, BlockType.Transparent); + setBlockMapping(66, 0, 8); // rails + setBlockType(66, BlockType.Transparent); + + setBlockMapping(67, 0, 1); // cobblestone stairs + setBlockMapping(68, 4, 0); // wallsign + setBlockMapping(69, 4, 8); // lever + setBlockMapping(70, 6, 0); // stone pressure plate + setBlockMapping(71, 2, 5); // iron door + setBlockMapping(72, 4, 0); // wooden pressure plate + setBlockMapping(73, 3, 3); // redstone ore + setBlockMapping(74, 3, 3); // glowing redstone ore + + setBlockMapping(75, 0, 6); // redstone torch off + setBlockType(75, BlockType.Transparent); + + setBlockMapping(76, 0, 5); // restone torch on + setBlockType(76, BlockType.Transparent); + setIsLocalLightSource(76, true); + + setBlockMapping(77, 0, 1); // stone button + setBlockMapping(78, 2, 4); // snow + setBlockMapping(79, 2, 4); // ice + setBlockMapping(80, 2, 4); // snow block + + setBlockMapping(81, 5, 4, 6, 4, 5, 4); // cactus + setBlockType(81, BlockType.Transparent); + + setBlockMapping(82, 3, 1); // clay block + + setBlockMapping(83, 9, 4); // sugar cane + setBlockType(83, BlockType.Transparent); + + setBlockMapping(84, 11, 4, 10, 4, 10, 4); // jukebox + + setBlockMapping(85, 5, 9); // fence + setBlockType(85, BlockType.Transparent); + + setBlockMapping(86, 6, 6, 7, 7, 6, 7); // pumpkin + setBlockMapping(87, 7, 6); // netherrack + setBlockMapping(88, 8, 6); // soul sand + setBlockMapping(89, 9, 6); // glowstone block + setBlockMapping(90, 1, 12); // portal + setBlockMapping(91, 1, 12); // jack-o-lantern + + setBlockMapping(92, 9, 7, 10, 7, 12, 7); // cake block + setBlockType(92, BlockType.Transparent); + + setBlockMapping(93, 7, 6); // redstone repeater off + setBlockMapping(94, 7, 6); // redstone repeater on + setBlockMapping(95, 9, 1, 11, 1, 10, 1, 10, 1, 10, 1, 9, 1); // locked chest + + // Some grass stuff + for (int i = 0; i < 8; i++) { + setBlockType(100 + i, BlockType.Transparent); + setBlockMapping(100 + i, 8 + i, 5); + setIsCollidable(100 + i, false); + setIsPickable(100 + i, false); + setGeometryProducer(100 + i, vegetationMeshProducer); + } + } + + /** + * Set if this block should emit light + * + * @param blockId + * the identifier of the block + * @param value + * the value of the block + */ + public void setIsLocalLightSource(final int blockId, final boolean value) { + isLocalLightMap[blockId] = value; + } + + /** + * Setup texture tiles to use for this block + * + * @param blockId + * the identifier of the block + * @param x + * the x value + * @param y + * the y value + */ + public void setBlockMapping(final int blockId, final int x, final int y) { + setBlockMapping(blockId, x, y, x, y, x, y); + } + + /** + * Setup texture tiles to use for this block + * + * @param blockId + * the identifier of the block + * @param xTop + * the x top value + * @param yTop + * the y top value + * @param xSide + * the x side value + * @param ySide + * the y side value + * @param xBottom + * the x bottom value + * @param yBottom + * the y bottom value + */ + public void setBlockMapping(final int blockId, final int xTop, final int yTop, final int xSide, final int ySide, + final int xBottom, final int yBottom) { + setBlockMapping(blockId, xTop, yTop, xSide, ySide, xSide, ySide, xSide, ySide, xSide, ySide, xBottom, yBottom); + } + + /** + * Setup texture tiles to use for this block + * + * @param blockId + * the identifier of the block + * @param xTop + * the x top value + * @param yTop + * the y top value + * @param xFront + * the x front value + * @param yFront + * the y front value + * @param xBack + * the x back value + * @param yBack + * the y back value + * @param xLeft + * the x left value + * @param yLeft + * the y left value + * @param xRight + * the x right value + * @param yRight + * the y right value + * @param xBottom + * the x bottom value + * @param yBottom + * the y bottom value + */ + public void setBlockMapping(final int blockId, final int xTop, final int yTop, final int xFront, final int yFront, + final int xBack, final int yBack, final int xLeft, final int yLeft, final int xRight, final int yRight, + final int xBottom, final int yBottom) { + setBlockMapping(blockId, BlockSide.Top, xTop, yTop); + setBlockMapping(blockId, BlockSide.Front, xFront, yFront); + setBlockMapping(blockId, BlockSide.Back, xBack, yBack); + setBlockMapping(blockId, BlockSide.Left, xLeft, yLeft); + setBlockMapping(blockId, BlockSide.Right, xRight, yRight); + setBlockMapping(blockId, BlockSide.Bottom, xBottom, yBottom); + } + + /** + * Setup texture tiles to use for this block + * + * @param blockId + * the identifier of the block + * @param side + * the side of the block + * @param x + * the x value + * @param y + * the y value + */ + public void setBlockMapping(final int blockId, final BlockSide side, final int x, final int y) { + EnumMap<BlockSide, Vector2> coord = blockTextureCoords.get(blockId); + if (coord == null) { + coord = new EnumMap<>(BlockSide.class); + blockTextureCoords.put(blockId, coord); + } + fillCoord(coord, side, (yCount - y - 1) * xCount + x); + } + + /** + * Set if this block is see-through or not (if not, then hidden surface removal + * can be done) + * + * @param blockId + * the identifier of the block + * @param type + * the type of the block + */ + public void setBlockType(final int blockId, final BlockType type) { + types[blockId] = type; + } + + public BlockType getBlockType(final int blockId) { + return types[blockId]; + } + + public boolean isLocalLight(final int block) { + return isLocalLightMap[block]; + } + + private void fillCoord(final EnumMap<BlockSide, Vector2> coord, final BlockSide blockSide, final int pos) { + final double x = pos % xCount * textureReciprocalX; + final double y = pos / yCount * textureReciprocalY; + + coord.put(blockSide, new Vector2(x, y)); + } + + /** + * Get start coordinates for a specific side of a block. + * + * @param blockId + * the identifier of the block + * @param blockSide + * the side of the block + * @return the start coordinates for a specific side of a block + */ + public ReadOnlyVector2 getBlockTextureCoord(final int blockId, final BlockSide blockSide) { + if (!blockTextureCoords.containsKey(blockId)) { + logger.info("No mapping found for blockId: " + blockId); + return Vector2.ZERO; + } + return blockTextureCoords.get(blockId).get(blockSide); + } + + /** + * Get offset to fix the artifact issue of texture bleeding. + * + * @return the offset width to fix the artifact issue of texture bleeding + */ + public float getOffsetWidth() { + return offsetWidth; + } + + /** + * Get offset to fix the artifact issue of texture bleeding. + * + * @return the offset height to fix the artifact issue of texture bleeding + */ + public float getOffsetHeight() { + return offsetHeight; + } + + /** + * Get the width of each tile in the texture atlas. + * + * @return the width of each tile in the texture atlas + */ + public float getTileWidth() { + return textureReciprocalX; + } + + /** + * Get the height of each tile in the texture atlas. + * + * @return the height of each tile in the texture atlas + */ + public float getTileHeight() { + return textureReciprocalY; + } + + /** + * Set the geometry producer to use for this block id. + * + * @param blockId + * the identifier of the block + * @param handler + * the geometry producer to use for this identifier of block + */ + public void setGeometryProducer(final int blockId, final GeometryProducer handler) { + geometryProducers[blockId] = handler; + } + + public GeometryProducer getGeometryProducer(final int blockId) { + return geometryProducers[blockId]; + } + + /** + * Set if the block should be collidable. + * + * @param blockId + * the identifier of the block + * @param value + * <code>true</code> if the block should be collidable + * + */ + public void setIsCollidable(final int blockId, final boolean value) { + isCollidable[blockId] = value; + } + + public boolean getIsCollidable(final int blockId) { + return isCollidable[blockId]; + } + + /** + * Set if the block should be pickable. + * + * @param blockId + * the identifier of the block + * @param value + * <code>true</code> if the block should be pickable + */ + public void setIsPickable(final int blockId, final boolean value) { + isPickable[blockId] = value; + } + + public boolean getIsPickable(final int blockId) { + return isPickable[blockId]; + } + + /** + * Set if the block is semi-transparent like water and should not generate sides + * when next to itself. + * + * @param blockId + * the identifier of the block + * @param value + * <code>true</code> if the block is semi-transparent like + * water and should not generate sides when next to itself + */ + public void setIsSemiTransparent(final int blockId, final boolean value) { + isSemiTransparent[blockId] = value; + } + + public boolean getIsSemiTransparent(final int blockId) { + return isSemiTransparent[blockId]; + } + + private Mesh createVegetationMesh() { + final Node combineNode = new Node(); + + final double sizeX = 1; + final double sizeY = 1; + + Quad q = new Quad("quad", sizeX, sizeY); + q.setRotation(new Quaternion().fromAngleAxis(MathUtils.HALF_PI * 0.5, Vector3.UNIT_Y)); + combineNode.attachChild(q); + + q = new Quad("quad", sizeX, sizeY); + q.setRotation(new Quaternion().fromAngleAxis(-MathUtils.HALF_PI * 0.5, Vector3.UNIT_Y)); + combineNode.attachChild(q); + + q = new Quad("quad", sizeX, sizeY); + q.setRotation(new Quaternion().fromAngleAxis(MathUtils.HALF_PI * 1.5, Vector3.UNIT_Y)); + combineNode.attachChild(q); + + q = new Quad("quad", sizeX, sizeY); + q.setRotation(new Quaternion().fromAngleAxis(-MathUtils.HALF_PI * 1.5, Vector3.UNIT_Y)); + combineNode.attachChild(q); + + combineNode.updateWorldTransform(true); + + return MeshCombiner.combine(combineNode); + } } diff --git a/ardor3d-craft/src/main/java/com/ardorcraft/util/DoubleBufferedList.java b/ardor3d-craft/src/main/java/com/ardorcraft/util/DoubleBufferedList.java index 2704807..3f15001 100644 --- a/ardor3d-craft/src/main/java/com/ardorcraft/util/DoubleBufferedList.java +++ b/ardor3d-craft/src/main/java/com/ardorcraft/util/DoubleBufferedList.java @@ -14,43 +14,45 @@ import java.util.List; * Utility class used by the mailbox update system. * * @param <T> + * the type of element */ public final class DoubleBufferedList<T> { - private List<T> frontList = new ArrayList<>(); - private List<T> backList = new ArrayList<>(); + private List<T> frontList = new ArrayList<>(); + private List<T> backList = new ArrayList<>(); - /** - * The add method can be called at any point. - * - * @param t - */ - public void add(final T t) { - if (t != null) { - synchronized (backList) { - backList.add(t); - } - } - } + /** + * The add method can be called at any point. + * + * @param t + * the element to add + */ + public void add(final T t) { + if (t != null) { + synchronized (backList) { + backList.add(t); + } + } + } - /** - * The switchAndGet call and it's returned list has to be accessed sequencially. - * - * @return The list - */ - public List<T> switchAndGet() { - if (backList.isEmpty()) { - return Collections.emptyList(); - } - synchronized (backList) { - final List<T> tmp = backList; - backList = frontList; - frontList = tmp; - backList.clear(); - return frontList; - } - } + /** + * The switchAndGet call and it's returned list has to be accessed sequencially. + * + * @return The list + */ + public List<T> switchAndGet() { + if (backList.isEmpty()) { + return Collections.emptyList(); + } + synchronized (backList) { + final List<T> tmp = backList; + backList = frontList; + frontList = tmp; + backList.clear(); + return frontList; + } + } - public boolean isEmpty() { - return backList.isEmpty(); - } + public boolean isEmpty() { + return backList.isEmpty(); + } } diff --git a/ardor3d-craft/src/main/java/com/ardorcraft/util/DoubleBufferedSet.java b/ardor3d-craft/src/main/java/com/ardorcraft/util/DoubleBufferedSet.java index 64315b9..f62f473 100644 --- a/ardor3d-craft/src/main/java/com/ardorcraft/util/DoubleBufferedSet.java +++ b/ardor3d-craft/src/main/java/com/ardorcraft/util/DoubleBufferedSet.java @@ -14,37 +14,39 @@ import java.util.Set; * Utility class used by the mailbox update system. * * @param <T> + * the type of element */ public class DoubleBufferedSet<T> { - private Set<T> frontSet = new HashSet<>(); - private Set<T> backSet = new HashSet<>(); + private Set<T> frontSet = new HashSet<>(); + private Set<T> backSet = new HashSet<>(); - /** - * The add method can be called at any point. - * - * @param t - */ - public void add(final T t) { - synchronized (backSet) { - backSet.add(t); - } - } + /** + * The add method can be called at any point. + * + * @param t + * the element to add + */ + public void add(final T t) { + synchronized (backSet) { + backSet.add(t); + } + } - /** - * The switchAndGet call and it's returned list has to be accessed sequencially. - * - * @return The Set - */ - public Set<T> switchAndGet() { - if (backSet.isEmpty()) { - return Collections.emptySet(); - } - synchronized (backSet) { - final Set<T> tmp = backSet; - backSet = frontSet; - frontSet = tmp; - backSet.clear(); - return frontSet; - } - } + /** + * The switchAndGet call and it's returned list has to be accessed sequencially. + * + * @return The Set + */ + public Set<T> switchAndGet() { + if (backSet.isEmpty()) { + return Collections.emptySet(); + } + synchronized (backSet) { + final Set<T> tmp = backSet; + backSet = frontSet; + frontSet = tmp; + backSet.clear(); + return frontSet; + } + } } diff --git a/ardor3d-craft/src/main/java/com/ardorcraft/util/SimplexNoise.java b/ardor3d-craft/src/main/java/com/ardorcraft/util/SimplexNoise.java index dbded64..f2dbc0f 100644 --- a/ardor3d-craft/src/main/java/com/ardorcraft/util/SimplexNoise.java +++ b/ardor3d-craft/src/main/java/com/ardorcraft/util/SimplexNoise.java @@ -309,8 +309,8 @@ public class SimplexNoise { * * @param g * 2-vector (grid offset) - * @param x - * @param y + * @param x the x value + * @param y the y value * @return dot product */ private static double dot(final int g[], final double x, final double y) { @@ -322,9 +322,9 @@ public class SimplexNoise { * * @param g * 3-vector (grid offset) - * @param x - * @param y - * @param z + * @param x the x value + * @param y the y value + * @param z the z value * @return dot product */ private static double dot(final int g[], final double x, final double y, final double z) { @@ -336,10 +336,10 @@ public class SimplexNoise { * * @param g * 4-vector (grid offset) - * @param x - * @param y - * @param z - * @param w + * @param x the x value + * @param y the y value + * @param z the z value + * @param w the w value * @return dot product */ private static double dot(final int g[], final double x, final double y, final double z, final double w) { @@ -351,7 +351,7 @@ public class SimplexNoise { * * @param x * value to be floored - * @return + * @return floor */ private static final int fastfloor(final double x) { return x >= 0 ? (int) x : (int) x - 1; diff --git a/ardor3d-craft/src/main/java/com/ardorcraft/voxel/TriangleAABBIntersection.java b/ardor3d-craft/src/main/java/com/ardorcraft/voxel/TriangleAABBIntersection.java index f32e45f..e268004 100644 --- a/ardor3d-craft/src/main/java/com/ardorcraft/voxel/TriangleAABBIntersection.java +++ b/ardor3d-craft/src/main/java/com/ardorcraft/voxel/TriangleAABBIntersection.java @@ -34,6 +34,7 @@ public class TriangleAABBIntersection { * @param extent * - AABB extent of sides * @param triangle + * the triangle to test * @return true if intersecting */ public static final boolean intersect(final double cx, final double cy, final double cz, diff --git a/ardor3d-craft/src/main/java/com/ardorcraft/world/BlockWorld.java b/ardor3d-craft/src/main/java/com/ardorcraft/world/BlockWorld.java index f05e1df..3ba1ea1 100644 --- a/ardor3d-craft/src/main/java/com/ardorcraft/world/BlockWorld.java +++ b/ardor3d-craft/src/main/java/com/ardorcraft/world/BlockWorld.java @@ -188,10 +188,11 @@ public final class BlockWorld implements LightProvider, ChunkModifier { private final int[] tmpIndicesTransparent; /** - * Create a new BlockWorld instance based on the provided settings. - * - * @param settings - */ + * Create a new BlockWorld instance based on the provided settings. + * + * @param settings + * the world settings + */ public BlockWorld(final WorldSettings settings) { Objects.requireNonNull(settings); Objects.requireNonNull(settings.getServerConnection()); @@ -416,10 +417,11 @@ public final class BlockWorld implements LightProvider, ChunkModifier { // private final Matrix4 textureMatrix = new Matrix4(); /** - * Issue world updates based on currently set player position/direction. - * - * @param timer - */ + * Issue world updates based on currently set player position/direction. + * + * @param timer + * the timer + */ public void update(final ReadOnlyTimer timer) { // textureMatrix.setValue(3, 0, timer.getTimeInSeconds() * 0.2); // waterTexture.setTextureMatrix(textureMatrix); @@ -489,11 +491,13 @@ public final class BlockWorld implements LightProvider, ChunkModifier { } /** - * Let the block world know the current player position and direction. - * - * @param location - * @param direction - */ + * Let the block world know the current player position and direction. + * + * @param location + * the location + * @param direction + * the direction + */ public void updatePlayer(final ReadOnlyVector3 location, final ReadOnlyVector3 direction) { serverConnection.updatePlayerPosition(location, direction); @@ -1227,11 +1231,12 @@ public final class BlockWorld implements LightProvider, ChunkModifier { } /** - * Get the exact float used global lighting. - * - * @param lighting - * @return float - */ + * Get the exact float used global lighting. + * + * @param lighting + * the lighting + * @return the exact float used global lighting + */ public float lookupLighting(final int lighting) { final int clampedLight = MathUtils.clamp(lighting, 0, 15); return clampedLight / 15f; @@ -1300,9 +1305,9 @@ public final class BlockWorld implements LightProvider, ChunkModifier { /** * Get block orientation at coordinate x, y, z. * - * @param x - * @param y - * @param z + * @param x the x value + * @param y the y value + * @param z the z value * @return Orientation */ public BlockSide getBlockOrientation(final int x, final int y, final int z) { @@ -1804,10 +1809,11 @@ public final class BlockWorld implements LightProvider, ChunkModifier { } /** - * Set global light value (0-15) for day/night simulation. - * - * @param globalLight - */ + * Set global light value (0-15) for day/night simulation. + * + * @param globalLight + * the global light value (0-15) for day/night simulation + */ public void setGlobalLight(final float globalLight) { this.globalLight = MathUtils.clamp(globalLight, 0f, 1f); updateLighting = true; diff --git a/ardor3d-craft/src/main/java/com/ardorcraft/world/WorldSettings.java b/ardor3d-craft/src/main/java/com/ardorcraft/world/WorldSettings.java index 6f83e4a..8f46592 100644 --- a/ardor3d-craft/src/main/java/com/ardorcraft/world/WorldSettings.java +++ b/ardor3d-craft/src/main/java/com/ardorcraft/world/WorldSettings.java @@ -216,11 +216,13 @@ public class WorldSettings { } /** - * Set if default minecraft texture tinting should be done. This will be turned into something completely - * configurable later on. - * - * @param doDefaultTint - */ + * Set if default minecraft texture tinting should be done. This will be turned + * into something completely configurable later on. + * + * @param doDefaultTint + * <code>true</code> if the default minecraft texture + * tinting should be done + */ public void setDoDefaultTint(final boolean doDefaultTint) { this.doDefaultTint = doDefaultTint; } |