Skip to content
Permalink
Browse files

add placeholders for shulker management

  • Loading branch information...
mcmonkey4eva committed Aug 30, 2017
1 parent c73cdf7 commit e2f5778a1dc709b521e4d886cba6e38134ddecd1
Showing with 28 additions and 0 deletions.
  1. +28 −0 src/main/java/org/mcmonkey/sentinel/SentinelTrait.java
@@ -1767,6 +1767,24 @@ private void updateTargets() {

public boolean chased = false;

public void specialMarkVision() {
if (SentinelPlugin.debugMe) {
SentinelPlugin.instance.getLogger().info("Sentinel: Player, I see you...");
}
if (SentinelTarget.v1_11 && getLivingEntity().getType() == EntityType.SHULKER) {
// TODO: Open Box
}
}

public void specialUnmarkVision() {
if (SentinelPlugin.debugMe) {
SentinelPlugin.instance.getLogger().info("Sentinel: Goodbye, player.");
}
if (SentinelTarget.v1_11 && getLivingEntity().getType() == EntityType.SHULKER) {
// TODO: Close box
}
}

public void runUpdate() {
canEnforce = true;
timeSinceAttack += SentinelPlugin.instance.tickRate;
@@ -1803,6 +1821,9 @@ public void runUpdate() {
SentinelPlugin.instance.getLogger().info("Sentinel: Attack target within range of safe zone: "
+ (near == null ? "Any" : near.distanceSquared(target.getLocation())));
}
if (chasing == null) {
specialMarkVision();
}
chasing = target;
cleverTicks = 0;
tryAttack(target);
@@ -1812,6 +1833,9 @@ public void runUpdate() {
if (SentinelPlugin.debugMe) {
SentinelPlugin.instance.getLogger().info("Sentinel: Actually, that target is bad!");
}
if (chasing != null) {
specialUnmarkVision();
}
target = null;
chasing = null;
cleverTicks = 0;
@@ -1820,6 +1844,7 @@ public void runUpdate() {
else if(chasing != null && chasing.isValid()) {
cleverTicks++;
if (cleverTicks >= SentinelPlugin.instance.getConfig().getInt("random.clever ticks", 10)) {
specialUnmarkVision();
chasing = null;
}
else {
@@ -1830,6 +1855,9 @@ else if(chasing != null && chasing.isValid()) {
}
}
}
else if (chasing != null) {
specialUnmarkVision();
}
if (getGuarding() != null) {
Player player = Bukkit.getPlayer(getGuarding());
if (player != null) {

0 comments on commit e2f5778

Please sign in to comment.
You can’t perform that action at this time.