Enum follows camelCase rules
This commit is contained in:
@@ -26,9 +26,9 @@ public interface Autotiler{
|
|||||||
* The mode to slice a texture at.
|
* The mode to slice a texture at.
|
||||||
*/
|
*/
|
||||||
enum SliceMode{
|
enum SliceMode{
|
||||||
NO_SLICE,
|
noSlice,
|
||||||
BOTTOM,
|
bottom,
|
||||||
TOP
|
top
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -39,7 +39,7 @@ public interface Autotiler{
|
|||||||
* @return The sliced texture
|
* @return The sliced texture
|
||||||
*/
|
*/
|
||||||
default TextureRegion sliced(TextureRegion input, SliceMode mode){
|
default TextureRegion sliced(TextureRegion input, SliceMode mode){
|
||||||
return mode == SliceMode.NO_SLICE ? input : mode == SliceMode.BOTTOM ? botHalf(input) : topHalf(input);
|
return mode == SliceMode.noSlice ? input : mode == SliceMode.bottom ? botHalf(input) : topHalf(input);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -124,7 +124,7 @@ public class Conveyor extends Block implements Autotiler{
|
|||||||
int dir = rotation - i;
|
int dir = rotation - i;
|
||||||
float rot = i == 0 ? rotation * 90 : (dir)*90;
|
float rot = i == 0 ? rotation * 90 : (dir)*90;
|
||||||
|
|
||||||
Draw.rect(sliced(regions[0][frame], i != 0 ? SliceMode.BOTTOM : SliceMode.TOP), x + Geometry.d4x(dir) * tilesize*0.75f, y + Geometry.d4y(dir) * tilesize*0.75f, rot);
|
Draw.rect(sliced(regions[0][frame], i != 0 ? SliceMode.bottom : SliceMode.top), x + Geometry.d4x(dir) * tilesize*0.75f, y + Geometry.d4y(dir) * tilesize*0.75f, rot);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -88,14 +88,14 @@ public class Conduit extends LiquidBlock implements Autotiler{
|
|||||||
if((blending & (1 << i)) != 0){
|
if((blending & (1 << i)) != 0){
|
||||||
int dir = r - i;
|
int dir = r - i;
|
||||||
float rot = i == 0 ? rotation : (dir)*90;
|
float rot = i == 0 ? rotation : (dir)*90;
|
||||||
drawAt(x + Geometry.d4x(dir) * tilesize*0.75f, y + Geometry.d4y(dir) * tilesize*0.75f, 0, rot, i != 0 ? SliceMode.BOTTOM : SliceMode.TOP);
|
drawAt(x + Geometry.d4x(dir) * tilesize*0.75f, y + Geometry.d4y(dir) * tilesize*0.75f, 0, rot, i != 0 ? SliceMode.bottom : SliceMode.top);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Draw.z(Layer.block);
|
Draw.z(Layer.block);
|
||||||
|
|
||||||
Draw.scl(xscl, yscl);
|
Draw.scl(xscl, yscl);
|
||||||
drawAt(x, y, blendbits, rotation, SliceMode.NO_SLICE);
|
drawAt(x, y, blendbits, rotation, SliceMode.noSlice);
|
||||||
Draw.reset();
|
Draw.reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user