Adjust max distance for targeting.

This commit is contained in:
William Burns 2016-02-25 15:04:19 +00:00
parent 7f6517a823
commit a97409b64a
3 changed files with 8 additions and 9 deletions

View File

@ -171,6 +171,7 @@ public class UtilBlock
blockPassSet.add((byte) Material.STAINED_GLASS_PANE.getId());
blockPassSet.add((byte) Material.IRON_TRAPDOOR.getId());
blockPassSet.add((byte) Material.DAYLIGHT_DETECTOR_INVERTED.getId());
blockPassSet.add((byte) Material.BARRIER.getId());
blockPassSet.add((byte) Material.BIRCH_FENCE_GATE.getId());
blockPassSet.add((byte) Material.JUNGLE_FENCE_GATE.getId());

View File

@ -91,9 +91,6 @@ public class Draw extends SoloGame
private boolean _useHolidayWords = false;
private HashSet<String> _usedWords = new HashSet<String>();
// Blocks to be ignored when targeting. (Air, Barrier)
public static final HashSet<Byte> IGNORED_BLOCKS = new HashSet<>(Arrays.asList((byte)0, (byte)166));
public Draw(ArcadeManager manager)
{
super(manager, GameType.Draw,
@ -590,7 +587,7 @@ public class Draw extends SoloGame
continue;
}
Block block = p.getTargetBlock(IGNORED_BLOCKS, 200);
Block block = p.getTargetBlock(UtilBlock.blockPassSet, 400);
if (block == null || !_canvas.contains(block))
continue;
@ -649,7 +646,7 @@ public class Draw extends SoloGame
continue;
}
Block block = player.getTargetBlock(IGNORED_BLOCKS, 200);
Block block = player.getTargetBlock(UtilBlock.blockPassSet, 400);
if (block == null || !_canvas.contains(block))
continue;
@ -763,7 +760,7 @@ public class Draw extends SoloGame
}
// Get the target block that the player clicks on.
Block target = p.getTargetBlock(IGNORED_BLOCKS, 200);
Block target = p.getTargetBlock(UtilBlock.blockPassSet, 400);
if (target == null || !_canvas.contains(target))
{
@ -846,7 +843,7 @@ public class Draw extends SoloGame
if (!_drawers.HasPlayer(player))
return;
Block block = player.getTargetBlock(IGNORED_BLOCKS, 200);
Block block = player.getTargetBlock(UtilBlock.blockPassSet, 400);
List<Block> possibleBlocks = UtilBlock.getInBoundingBox(WorldData.GetDataLocs("GREEN").get(0),
WorldData.GetDataLocs("GREEN").get(1));

View File

@ -4,6 +4,7 @@ package nautilus.game.arcade.game.games.draw.tools;
import java.util.HashMap;
import java.util.HashSet;
import mineplex.core.common.util.UtilBlock;
import mineplex.core.common.util.UtilEvent;
import mineplex.core.common.util.UtilGear;
import mineplex.core.common.util.UtilServer;
@ -39,7 +40,7 @@ public abstract class Tool
{
if (!UtilEvent.isAction(event, ActionType.R))
return;
Block block = event.getPlayer().getTargetBlock(Draw.IGNORED_BLOCKS, 60);
Block block = event.getPlayer().getTargetBlock(UtilBlock.blockPassSet, 400);
if (block == null)
return;
@ -72,7 +73,7 @@ public abstract class Tool
_new = new HashMap<Block, BlockInfo>();
//Calculate New
Block end = _drawer.getTargetBlock(Draw.IGNORED_BLOCKS, 64);
Block end = _drawer.getTargetBlock(UtilBlock.blockPassSet, 400);
if (end != null && Host.getCanvas().contains(end))
{
customDraw(end);