NormalPlus option: faster building while holding RMB.
Wall and floor option: filled or hollow. Slope floor option: raise along long edge or short edge. Cube option: filled, hollow or skeleton. Added icons for normalSpeed, fastSpeed, full, hollow, cubeFull, cubeHollow, cubeSkeleton, shortEdge, longEdge, thickness1, thickness3, thickness5.
@@ -11,7 +11,7 @@ apply plugin: 'net.minecraftforge.gradle.forge'
|
||||
//Only edit below this line, the above code adds and enables the necessary things for Forge to be setup.
|
||||
|
||||
|
||||
version = "1.12.2-2.8"
|
||||
version = "1.12.2-2.9"
|
||||
group = "nl.requios.effortlessbuilding" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
|
||||
archivesBaseName = "effortlessbuilding"
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ public class EffortlessBuilding
|
||||
{
|
||||
public static final String MODID = "effortlessbuilding";
|
||||
public static final String NAME = "Effortless Building";
|
||||
public static final String VERSION = "1.12.2-2.8";
|
||||
public static final String VERSION = "1.12.2-2.9";
|
||||
|
||||
@Mod.Instance(EffortlessBuilding.MODID)
|
||||
public static EffortlessBuilding instance;
|
||||
|
||||
@@ -29,11 +29,11 @@ public class BuildModes {
|
||||
public enum BuildModeEnum {
|
||||
NORMAL("effortlessbuilding.mode.normal", new Normal(), new ActionEnum[]{}),
|
||||
NORMAL_PLUS("effortlessbuilding.mode.normal_plus", new NormalPlus(), new ActionEnum[]{ActionEnum.NORMAL_SPEED, ActionEnum.FAST_SPEED}),
|
||||
LINE("effortlessbuilding.mode.line", new Line(), new ActionEnum[]{ActionEnum.THICKNESS_1, ActionEnum.THICKNESS_3, ActionEnum.THICKNESS_5}),
|
||||
LINE("effortlessbuilding.mode.line", new Line(), new ActionEnum[]{/*ActionEnum.THICKNESS_1, ActionEnum.THICKNESS_3, ActionEnum.THICKNESS_5*/}),
|
||||
WALL("effortlessbuilding.mode.wall", new Wall(), new ActionEnum[]{ActionEnum.FULL, ActionEnum.HOLLOW}),
|
||||
FLOOR("effortlessbuilding.mode.floor", new Floor(), new ActionEnum[]{ActionEnum.FULL, ActionEnum.HOLLOW}),
|
||||
DIAGONAL_LINE("effortlessbuilding.mode.diagonal_line", new DiagonalLine(), new ActionEnum[]{ActionEnum.THICKNESS_1, ActionEnum.THICKNESS_3, ActionEnum.THICKNESS_5}),
|
||||
DIAGONAL_WALL("effortlessbuilding.mode.diagonal_wall", new DiagonalWall(), new ActionEnum[]{ActionEnum.FULL, ActionEnum.HOLLOW}),
|
||||
DIAGONAL_LINE("effortlessbuilding.mode.diagonal_line", new DiagonalLine(), new ActionEnum[]{/*ActionEnum.THICKNESS_1, ActionEnum.THICKNESS_3, ActionEnum.THICKNESS_5*/}),
|
||||
DIAGONAL_WALL("effortlessbuilding.mode.diagonal_wall", new DiagonalWall(), new ActionEnum[]{/*ActionEnum.FULL, ActionEnum.HOLLOW*/}),
|
||||
SLOPE_FLOOR("effortlessbuilding.mode.slope_floor", new SlopeFloor(), new ActionEnum[]{ActionEnum.SHORT_EDGE, ActionEnum.LONG_EDGE}),
|
||||
CUBE("effortlessbuilding.mode.cube", new Cube(), new ActionEnum[]{ActionEnum.CUBE_FULL, ActionEnum.CUBE_HOLLOW, ActionEnum.CUBE_SKELETON});
|
||||
|
||||
|
||||
@@ -98,11 +98,20 @@ public class Cube implements IBuildMode {
|
||||
if (z2 - z1 >= axisLimit) z2 = z1 + axisLimit - 1;
|
||||
if (z1 - z2 >= axisLimit) z2 = z1 - axisLimit + 1;
|
||||
|
||||
for (int l = x1; x1 < x2 ? l <= x2 : l >= x2; l += x1 < x2 ? 1 : -1) {
|
||||
if (ModeOptions.getCubeFill() == ModeOptions.ActionEnum.CUBE_SKELETON) {
|
||||
//Hollow floor
|
||||
Line.addXLineBlocks(list, x1, x2, y, z1);
|
||||
Line.addXLineBlocks(list, x1, x2, y, z2);
|
||||
Line.addZLineBlocks(list, z1, z2, x1, y);
|
||||
Line.addZLineBlocks(list, z1, z2, x2, y);
|
||||
} else {
|
||||
//Filled floor
|
||||
for (int l = x1; x1 < x2 ? l <= x2 : l >= x2; l += x1 < x2 ? 1 : -1) {
|
||||
|
||||
for (int n = z1; z1 < z2 ? n <= z2 : n >= z2; n += z1 < z2 ? 1 : -1) {
|
||||
for (int n = z1; z1 < z2 ? n <= z2 : n >= z2; n += z1 < z2 ? 1 : -1) {
|
||||
|
||||
list.add(new BlockPos(l, y, n));
|
||||
list.add(new BlockPos(l, y, n));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -116,7 +125,6 @@ public class Cube implements IBuildMode {
|
||||
//Add whole cube
|
||||
//Limit amount of blocks you can place per row
|
||||
int axisLimit = ReachHelper.getMaxBlocksPerAxis(player);
|
||||
int limit = ReachHelper.getMaxBlocksPlacedAtOnce(player);
|
||||
|
||||
int x1 = firstPos.getX(), x2 = thirdPos.getX();
|
||||
int y1 = firstPos.getY(), y2 = thirdPos.getY();
|
||||
@@ -130,24 +138,63 @@ public class Cube implements IBuildMode {
|
||||
if (z2 - z1 >= axisLimit) z2 = z1 + axisLimit - 1;
|
||||
if (z1 - z2 >= axisLimit) z2 = z1 - axisLimit + 1;
|
||||
|
||||
for (int l = x1; x1 < x2 ? l <= x2 : l >= x2; l += x1 < x2 ? 1 : -1) {
|
||||
|
||||
for (int n = z1; z1 < z2 ? n <= z2 : n >= z2; n += z1 < z2 ? 1 : -1) {
|
||||
|
||||
//check if whole row fits within limit
|
||||
if (Math.abs(y1 - y2) < limit - list.size()) {
|
||||
|
||||
for (int m = y1; y1 < y2 ? m <= y2 : m >= y2; m += y1 < y2 ? 1 : -1) {
|
||||
list.add(new BlockPos(l, m, n));
|
||||
}
|
||||
}
|
||||
}
|
||||
switch (ModeOptions.getCubeFill()) {
|
||||
case CUBE_FULL:
|
||||
addCubeBlocks(list, x1, x2, y1, y2, z1, z2);
|
||||
break;
|
||||
case CUBE_HOLLOW:
|
||||
addHollowCubeBlocks(list, x1, x2, y1, y2, z1, z2);
|
||||
break;
|
||||
case CUBE_SKELETON:
|
||||
addSkeletonCubeBlocks(list, x1, x2, y1, y2, z1, z2);
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
public static void addCubeBlocks(List<BlockPos> list, int x1, int x2, int y1, int y2, int z1, int z2) {
|
||||
for (int l = x1; x1 < x2 ? l <= x2 : l >= x2; l += x1 < x2 ? 1 : -1) {
|
||||
|
||||
for (int n = z1; z1 < z2 ? n <= z2 : n >= z2; n += z1 < z2 ? 1 : -1) {
|
||||
|
||||
for (int m = y1; y1 < y2 ? m <= y2 : m >= y2; m += y1 < y2 ? 1 : -1) {
|
||||
list.add(new BlockPos(l, m, n));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void addHollowCubeBlocks(List<BlockPos> list, int x1, int x2, int y1, int y2, int z1, int z2) {
|
||||
Wall.addXWallBlocks(list, x1, y1, y2, z1, z2);
|
||||
Wall.addXWallBlocks(list, x2, y1, y2, z1, z2);
|
||||
|
||||
Wall.addZWallBlocks(list, x1, x2, y1, y2, z1);
|
||||
Wall.addZWallBlocks(list, x1, x2, y1, y2, z2);
|
||||
|
||||
Floor.addFloorBlocks(list, x1, x2, y1, z1, z2);
|
||||
Floor.addFloorBlocks(list, x1, x2, y2, z1, z2);
|
||||
}
|
||||
|
||||
public static void addSkeletonCubeBlocks(List<BlockPos> list, int x1, int x2, int y1, int y2, int z1, int z2) {
|
||||
Line.addXLineBlocks(list, x1, x2, y1, z1);
|
||||
Line.addXLineBlocks(list, x1, x2, y1, z2);
|
||||
Line.addXLineBlocks(list, x1, x2, y2, z1);
|
||||
Line.addXLineBlocks(list, x1, x2, y2, z2);
|
||||
|
||||
Line.addYLineBlocks(list, y1, y2, x1, z1);
|
||||
Line.addYLineBlocks(list, y1, y2, x1, z2);
|
||||
Line.addYLineBlocks(list, y1, y2, x2, z1);
|
||||
Line.addYLineBlocks(list, y1, y2, x2, z2);
|
||||
|
||||
Line.addZLineBlocks(list, z1, z2, x1, y1);
|
||||
Line.addZLineBlocks(list, z1, z2, x1, y2);
|
||||
Line.addZLineBlocks(list, z1, z2, x2, y1);
|
||||
Line.addZLineBlocks(list, z1, z2, x2, y2);
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumFacing getSideHit(EntityPlayer player) {
|
||||
return sideHitTable.get(player.getUniqueID());
|
||||
@@ -157,4 +204,5 @@ public class Cube implements IBuildMode {
|
||||
public Vec3d getHitVec(EntityPlayer player) {
|
||||
return hitVecTable.get(player.getUniqueID());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -184,7 +184,7 @@ public class DiagonalLine implements IBuildMode {
|
||||
}
|
||||
|
||||
//Add diagonal line from first to second
|
||||
public static List<BlockPos> getDiagonalLineBlocks(EntityPlayer player, BlockPos firstPos, BlockPos secondPos, int sampleMultiplier) {
|
||||
public static List<BlockPos> getDiagonalLineBlocks(EntityPlayer player, BlockPos firstPos, BlockPos secondPos, float sampleMultiplier) {
|
||||
List<BlockPos> list = new ArrayList<>();
|
||||
|
||||
int axisLimit = ReachHelper.getMaxBlocksPerAxis(player);
|
||||
@@ -204,7 +204,7 @@ public class DiagonalLine implements IBuildMode {
|
||||
Vec3d first = new Vec3d(x1, y1, z1).add(0.5, 0.5, 0.5);
|
||||
Vec3d second = new Vec3d(x2, y2, z2).add(0.5, 0.5, 0.5);
|
||||
|
||||
int iterations = (int) Math.ceil(first.distanceTo(second)) * sampleMultiplier;
|
||||
int iterations = (int) Math.ceil(first.distanceTo(second) * sampleMultiplier);
|
||||
for (double t = 0; t <= 1.0; t += 1.0/iterations) {
|
||||
Vec3d lerp = first.add(second.subtract(first).scale(t));
|
||||
BlockPos candidate = new BlockPos(lerp);
|
||||
|
||||
@@ -145,6 +145,16 @@ public class Floor implements IBuildMode {
|
||||
if (z2 - z1 >= axisLimit) z2 = z1 + axisLimit - 1;
|
||||
if (z1 - z2 >= axisLimit) z2 = z1 - axisLimit + 1;
|
||||
|
||||
if (ModeOptions.getFill() == ModeOptions.ActionEnum.FULL)
|
||||
addFloorBlocks(list, x1, x2, y, z1, z2);
|
||||
else
|
||||
addHollowFloorBlocks(list, x1, x2, y, z1, z2);
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
public static void addFloorBlocks(List<BlockPos> list, int x1, int x2, int y, int z1, int z2) {
|
||||
|
||||
for (int l = x1; x1 < x2 ? l <= x2 : l >= x2; l += x1 < x2 ? 1 : -1) {
|
||||
|
||||
for (int n = z1; z1 < z2 ? n <= z2 : n >= z2; n += z1 < z2 ? 1 : -1) {
|
||||
@@ -152,8 +162,13 @@ public class Floor implements IBuildMode {
|
||||
list.add(new BlockPos(l, y, n));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return list;
|
||||
public static void addHollowFloorBlocks(List<BlockPos> list, int x1, int x2, int y, int z1, int z2) {
|
||||
Line.addXLineBlocks(list, x1, x2, y, z1);
|
||||
Line.addXLineBlocks(list, x1, x2, y, z2);
|
||||
Line.addZLineBlocks(list, z1, z2, x1, y);
|
||||
Line.addZLineBlocks(list, z1, z2, x2, y);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -189,21 +189,43 @@ public class Line implements IBuildMode {
|
||||
int y1 = firstPos.getY(), y2 = secondPos.getY();
|
||||
int z1 = firstPos.getZ(), z2 = secondPos.getZ();
|
||||
|
||||
outerloop:
|
||||
for (int l = x1; x1 < x2 ? l <= x2 : l >= x2; l += x1 < x2 ? 1 : -1) {
|
||||
//limit axis
|
||||
if (x2 - x1 >= axisLimit) x2 = x1 + axisLimit - 1;
|
||||
if (x1 - x2 >= axisLimit) x2 = x1 - axisLimit + 1;
|
||||
if (y2 - y1 >= axisLimit) y2 = y1 + axisLimit - 1;
|
||||
if (y1 - y2 >= axisLimit) y2 = y1 - axisLimit + 1;
|
||||
if (z2 - z1 >= axisLimit) z2 = z1 + axisLimit - 1;
|
||||
if (z1 - z2 >= axisLimit) z2 = z1 - axisLimit + 1;
|
||||
|
||||
for (int n = z1; z1 < z2 ? n <= z2 : n >= z2; n += z1 < z2 ? 1 : -1) {
|
||||
|
||||
for (int m = y1; y1 < y2 ? m <= y2 : m >= y2; m += y1 < y2 ? 1 : -1) {
|
||||
if (list.size() >= axisLimit) break outerloop;
|
||||
list.add(new BlockPos(l, m, n));
|
||||
}
|
||||
}
|
||||
if (x1 != x2) {
|
||||
addXLineBlocks(list, x1, x2, y1, z1);
|
||||
} else if (y1 != y2) {
|
||||
addYLineBlocks(list, y1, y2, x1, z1);
|
||||
} else {
|
||||
addZLineBlocks(list, z1, z2, x1, y1);
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
public static void addXLineBlocks(List<BlockPos> list, int x1, int x2, int y, int z) {
|
||||
for (int x = x1; x1 < x2 ? x <= x2 : x >= x2; x += x1 < x2 ? 1 : -1) {
|
||||
list.add(new BlockPos(x, y, z));
|
||||
}
|
||||
}
|
||||
|
||||
public static void addYLineBlocks(List<BlockPos> list, int y1, int y2, int x, int z) {
|
||||
for (int y = y1; y1 < y2 ? y <= y2 : y >= y2; y += y1 < y2 ? 1 : -1) {
|
||||
list.add(new BlockPos(x, y, z));
|
||||
}
|
||||
}
|
||||
|
||||
public static void addZLineBlocks(List<BlockPos> list, int z1, int z2, int x, int y) {
|
||||
for (int z = z1; z1 < z2 ? z <= z2 : z >= z2; z += z1 < z2 ? 1 : -1) {
|
||||
list.add(new BlockPos(x, y, z));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumFacing getSideHit(EntityPlayer player) {
|
||||
return sideHitTable.get(player.getUniqueID());
|
||||
@@ -213,4 +235,5 @@ public class Line implements IBuildMode {
|
||||
public Vec3d getHitVec(EntityPlayer player) {
|
||||
return hitVecTable.get(player.getUniqueID());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -94,7 +94,7 @@ public class SlopeFloor implements IBuildMode {
|
||||
BlockPos thirdPos = DiagonalLine.findHeight(player, secondPos, skipRaytrace);
|
||||
if (thirdPos == null) return list;
|
||||
|
||||
//Add whole cube
|
||||
//Add slope floor blocks
|
||||
list.addAll(getSlopeFloorBlocks(player, firstPos, secondPos, thirdPos));
|
||||
}
|
||||
|
||||
@@ -113,18 +113,20 @@ public class SlopeFloor implements IBuildMode {
|
||||
int xLength = Math.abs(secondPos.getX() - firstPos.getX());
|
||||
int zLength = Math.abs(secondPos.getZ() - firstPos.getZ());
|
||||
|
||||
//Slope along short edge
|
||||
if (zLength > xLength) onXAxis = false;
|
||||
|
||||
//TODO add option for Slope along long edge
|
||||
//if (zLength > xLength) onXAxis = true;
|
||||
if (ModeOptions.getRaisedEdge() == ModeOptions.ActionEnum.SHORT_EDGE) {
|
||||
//Slope along short edge
|
||||
if (zLength > xLength) onXAxis = false;
|
||||
} else {
|
||||
//Slope along long edge
|
||||
if (zLength <= xLength) onXAxis = false;
|
||||
}
|
||||
|
||||
if (onXAxis) {
|
||||
//Along X goes up
|
||||
|
||||
//Get diagonal line blocks
|
||||
BlockPos linePoint = new BlockPos(secondPos.getX(), thirdPos.getY(), firstPos.getZ());
|
||||
List<BlockPos> diagonalLineBlocks = DiagonalLine.getDiagonalLineBlocks(player, firstPos, linePoint, 1);
|
||||
List<BlockPos> diagonalLineBlocks = DiagonalLine.getDiagonalLineBlocks(player, firstPos, linePoint, 1f);
|
||||
|
||||
//Limit amount of blocks we can place
|
||||
int lowest = Math.min(firstPos.getZ(), secondPos.getZ());
|
||||
@@ -144,7 +146,7 @@ public class SlopeFloor implements IBuildMode {
|
||||
|
||||
//Get diagonal line blocks
|
||||
BlockPos linePoint = new BlockPos(firstPos.getX(), thirdPos.getY(), secondPos.getZ());
|
||||
List<BlockPos> diagonalLineBlocks = DiagonalLine.getDiagonalLineBlocks(player, firstPos, linePoint, 1);
|
||||
List<BlockPos> diagonalLineBlocks = DiagonalLine.getDiagonalLineBlocks(player, firstPos, linePoint, 1f);
|
||||
|
||||
//Limit amount of blocks we can place
|
||||
int lowest = Math.min(firstPos.getX(), secondPos.getX());
|
||||
|
||||
@@ -151,7 +151,6 @@ public class Wall implements IBuildMode {
|
||||
List<BlockPos> list = new ArrayList<>();
|
||||
|
||||
//Limit amount of blocks we can place per row
|
||||
int limit = ReachHelper.getMaxBlocksPlacedAtOnce(player);
|
||||
int axisLimit = ReachHelper.getMaxBlocksPerAxis(player);
|
||||
|
||||
int x1 = firstPos.getX(), x2 = secondPos.getX();
|
||||
@@ -166,23 +165,55 @@ public class Wall implements IBuildMode {
|
||||
if (z2 - z1 >= axisLimit) z2 = z1 + axisLimit - 1;
|
||||
if (z1 - z2 >= axisLimit) z2 = z1 - axisLimit + 1;
|
||||
|
||||
for (int l = x1; x1 < x2 ? l <= x2 : l >= x2; l += x1 < x2 ? 1 : -1) {
|
||||
|
||||
for (int n = z1; z1 < z2 ? n <= z2 : n >= z2; n += z1 < z2 ? 1 : -1) {
|
||||
|
||||
//check if whole row fits within limit
|
||||
if (Math.abs(y1 - y2) < limit - list.size()) {
|
||||
|
||||
for (int m = y1; y1 < y2 ? m <= y2 : m >= y2; m += y1 < y2 ? 1 : -1) {
|
||||
list.add(new BlockPos(l, m, n));
|
||||
}
|
||||
}
|
||||
}
|
||||
if (x1 == x2) {
|
||||
if (ModeOptions.getFill() == ModeOptions.ActionEnum.FULL)
|
||||
addXWallBlocks(list, x1, y1, y2, z1, z2);
|
||||
else
|
||||
addXHollowWallBlocks(list, x1, y1, y2, z1, z2);
|
||||
} else {
|
||||
if (ModeOptions.getFill() == ModeOptions.ActionEnum.FULL)
|
||||
addZWallBlocks(list, x1, x2, y1, y2, z1);
|
||||
else
|
||||
addZHollowWallBlocks(list, x1, x2, y1, y2, z1);
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
public static void addXWallBlocks(List<BlockPos> list, int x, int y1, int y2, int z1, int z2) {
|
||||
|
||||
for (int z = z1; z1 < z2 ? z <= z2 : z >= z2; z += z1 < z2 ? 1 : -1) {
|
||||
|
||||
for (int y = y1; y1 < y2 ? y <= y2 : y >= y2; y += y1 < y2 ? 1 : -1) {
|
||||
list.add(new BlockPos(x, y, z));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void addZWallBlocks(List<BlockPos> list, int x1, int x2, int y1, int y2, int z) {
|
||||
|
||||
for (int x = x1; x1 < x2 ? x <= x2 : x >= x2; x += x1 < x2 ? 1 : -1) {
|
||||
|
||||
for (int y = y1; y1 < y2 ? y <= y2 : y >= y2; y += y1 < y2 ? 1 : -1) {
|
||||
list.add(new BlockPos(x, y, z));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void addXHollowWallBlocks(List<BlockPos> list, int x, int y1, int y2, int z1, int z2) {
|
||||
Line.addZLineBlocks(list, z1, z2, x, y1);
|
||||
Line.addZLineBlocks(list, z1, z2, x, y2);
|
||||
Line.addYLineBlocks(list, y1, y2, x, z1);
|
||||
Line.addYLineBlocks(list, y1, y2, x, z2);
|
||||
}
|
||||
|
||||
public static void addZHollowWallBlocks(List<BlockPos> list, int x1, int x2, int y1, int y2, int z) {
|
||||
Line.addXLineBlocks(list, x1, x2, y1, z);
|
||||
Line.addXLineBlocks(list, x1, x2, y2, z);
|
||||
Line.addYLineBlocks(list, y1, y2, x1, z);
|
||||
Line.addYLineBlocks(list, y1, y2, x2, z);
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumFacing getSideHit(EntityPlayer player) {
|
||||
return sideHitTable.get(player.getUniqueID());
|
||||
|
||||
@@ -166,12 +166,13 @@ public class RadialMenu extends GuiScreen {
|
||||
ModeOptions.ActionEnum[] options = currentBuildMode.options;
|
||||
for (int i = 0; i < options.length; i++) {
|
||||
ModeOptions.ActionEnum action = options[i];
|
||||
buttons.add(new MenuButton(action.name, action, buttonDistance + i * 26, -20, EnumFacing.DOWN));
|
||||
buttons.add(new MenuButton(action.name, action, buttonDistance + i * 26, -13, EnumFacing.DOWN));
|
||||
}
|
||||
|
||||
switchTo = null;
|
||||
doAction = null;
|
||||
|
||||
//Draw buildmode backgrounds
|
||||
if (!modes.isEmpty()) {
|
||||
final int totalModes = Math.max( 3, modes.size() );
|
||||
int currentMode = 0;
|
||||
@@ -236,6 +237,7 @@ public class RadialMenu extends GuiScreen {
|
||||
}
|
||||
}
|
||||
|
||||
//Draw action backgrounds
|
||||
for (final MenuButton btn : buttons) {
|
||||
float r = 0.5f;
|
||||
float g = 0.5f;
|
||||
@@ -283,6 +285,7 @@ public class RadialMenu extends GuiScreen {
|
||||
|
||||
buffer.begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION_TEX_COLOR);
|
||||
|
||||
//Draw buildmode icons
|
||||
for (final MenuRegion menuRegion : modes) {
|
||||
|
||||
final double x = (menuRegion.x1 + menuRegion.x2) * 0.5 * (ringOuterEdge * 0.6 + 0.4 * ringInnerEdge);
|
||||
@@ -309,6 +312,7 @@ public class RadialMenu extends GuiScreen {
|
||||
buffer.pos(middleX + x2, middleY + y1, zLevel).tex(sprite.getInterpolatedU(u2), sprite.getInterpolatedV(v1)).color(f, f, f, a).endVertex();
|
||||
}
|
||||
|
||||
//Draw action icons
|
||||
for (final MenuButton button : buttons) {
|
||||
|
||||
final float f = 1f;
|
||||
@@ -336,36 +340,39 @@ public class RadialMenu extends GuiScreen {
|
||||
|
||||
tessellator.draw();
|
||||
|
||||
|
||||
//Draw strings
|
||||
//fontRenderer.drawStringWithShadow("Actions", (int) (middleX - buttonDistance - 13) - fontRenderer.getStringWidth("Actions") * 0.5f, (int) middleY - 38, 0xffffffff);
|
||||
String title = "";
|
||||
if (currentBuildMode.options.length > 0) {
|
||||
switch (currentBuildMode.options[0]) {
|
||||
case NORMAL_SPEED:
|
||||
case FAST_SPEED:
|
||||
title = "Build Speed";
|
||||
title = I18n.format("effortlessbuilding.action.build_speed");
|
||||
break;
|
||||
case FULL:
|
||||
case HOLLOW:
|
||||
case CUBE_FULL:
|
||||
case CUBE_HOLLOW:
|
||||
case CUBE_SKELETON:
|
||||
title = "Fill";
|
||||
title = I18n.format("effortlessbuilding.action.filling");
|
||||
break;
|
||||
case SHORT_EDGE:
|
||||
case LONG_EDGE:
|
||||
title = "Raised Edge";
|
||||
title = I18n.format("effortlessbuilding.action.raised_edge");
|
||||
break;
|
||||
case THICKNESS_1:
|
||||
case THICKNESS_3:
|
||||
case THICKNESS_5:
|
||||
title = "Line Thickness";
|
||||
title = I18n.format("effortlessbuilding.action.thickness");
|
||||
break;
|
||||
}
|
||||
}
|
||||
fontRenderer.drawStringWithShadow(title, (int) (middleX + buttonDistance - 9), (int) middleY - 44, 0xffffffff);
|
||||
fontRenderer.drawStringWithShadow(title, (int) (middleX + buttonDistance - 9), (int) middleY - 37, 0xeeeeeeff);
|
||||
|
||||
String credits = "Effortless Building";
|
||||
fontRenderer.drawStringWithShadow(credits, width - fontRenderer.getStringWidth(credits) - 4, height - 10, 0x88888888);
|
||||
|
||||
//Draw buildmode text
|
||||
for (final MenuRegion menuRegion : modes) {
|
||||
|
||||
if (menuRegion.highlighted) {
|
||||
@@ -386,6 +393,7 @@ public class RadialMenu extends GuiScreen {
|
||||
}
|
||||
}
|
||||
|
||||
//Draw action text
|
||||
for (final MenuButton button : buttons) {
|
||||
if (button.highlighted) {
|
||||
String text = TextFormatting.AQUA + button.name;
|
||||
|
||||
@@ -249,6 +249,7 @@ public class ClientProxy implements IProxy {
|
||||
}
|
||||
} else if (buildMode == BuildModes.BuildModeEnum.NORMAL_PLUS) {
|
||||
placeCooldown--;
|
||||
if (ModeOptions.getBuildSpeed() == ModeOptions.ActionEnum.FAST_SPEED) placeCooldown = 0;
|
||||
}
|
||||
} else {
|
||||
placeCooldown = 0;
|
||||
|
||||
@@ -25,9 +25,15 @@ effortlessbuilding.action.undo=Undo
|
||||
effortlessbuilding.action.redo=Redo
|
||||
effortlessbuilding.action.replace=Replace
|
||||
effortlessbuilding.action.open_modifier_settings=Open Modifier Settings
|
||||
|
||||
effortlessbuilding.action.build_speed=Build Speed
|
||||
effortlessbuilding.action.filling=Filling
|
||||
effortlessbuilding.action.raised_edge=Raised Edge
|
||||
effortlessbuilding.action.thickness=Line Thickness
|
||||
|
||||
effortlessbuilding.action.normal_speed=Normal
|
||||
effortlessbuilding.action.fast_speed=Fast
|
||||
effortlessbuilding.action.full=Full
|
||||
effortlessbuilding.action.full=Filled
|
||||
effortlessbuilding.action.hollow=Hollow
|
||||
effortlessbuilding.action.skeleton=Skeleton
|
||||
effortlessbuilding.action.short_edge=Short Edge
|
||||
|
||||
|
Before Width: | Height: | Size: 331 B After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 331 B After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 331 B After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 331 B After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 331 B After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 331 B After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 331 B After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 331 B After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 331 B After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 331 B After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 331 B After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 331 B After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.3 KiB |