Enum follows camelCase rules

This commit is contained in:
LeoDog896 2020-09-30 09:46:33 -04:00
parent fbb317aa11
commit 2b04ebb14d
3 changed files with 7 additions and 7 deletions

View File

@ -26,9 +26,9 @@ public interface Autotiler{
* The mode to slice a texture at.
*/
enum SliceMode{
NO_SLICE,
BOTTOM,
TOP
noSlice,
bottom,
top
}
/**
@ -39,7 +39,7 @@ public interface Autotiler{
* @return The sliced texture
*/
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);
}
/**

View File

@ -124,7 +124,7 @@ public class Conveyor extends Block implements Autotiler{
int dir = rotation - i;
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);
}
}

View File

@ -88,14 +88,14 @@ public class Conduit extends LiquidBlock implements Autotiler{
if((blending & (1 << i)) != 0){
int dir = r - i;
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.scl(xscl, yscl);
drawAt(x, y, blendbits, rotation, SliceMode.NO_SLICE);
drawAt(x, y, blendbits, rotation, SliceMode.noSlice);
Draw.reset();
}