renamed GolemCoreBodyguard

This commit is contained in:
makeo committed 2015-11-03 12:56:24 +01:00
1 parent 808932b4f0
commit 00d9bfb21b
3 files changed
+18 -3

No files matched your search

@@ -58,6 +58,13 @@ public abstract class AdditionalGolemCore {
public abstract String getUnlocalizedName();
/**
* @return If you're able to set markers using the golemancers bell
*/
public boolean hasMarkers() {
return true;
}
/**
* @return the item that is used as a core
*/
@@ -26,7 +26,9 @@ import net.minecraft.item.ItemStack;
import net.minecraft.pathfinding.PathNavigate;
import thaumcraft.common.entities.ai.misc.AIOpenDoor;
import thaumcraft.common.entities.golems.EntityGolemBase;
import thaumcraft.common.entities.golems.Marker;
import java.util.ArrayList;
import java.util.Random;
/**
@@ -37,12 +39,13 @@ import java.util.Random;
* <p/>
* Created by makeo @ 31.10.2015 15:35
*/
public class BodyguardCore extends AdditionalGolemCore {
public class BodyguardGolemCore extends AdditionalGolemCore {
@Override
public void setupGolem(EntityGolemBase golem) {
WrappedGolem wrapped = new WrappedGolem(golem);
golem.setHomeArea(0, 300000000, 0, 300000000);
golem.setMarkers(new ArrayList<Marker>());
golem.targetTasks.addTask(1, new EntityAIOwnerHurtByTarget(wrapped));
golem.targetTasks.addTask(2, new EntityAIOwnerHurtTarget(wrapped));
@@ -61,6 +64,11 @@ public class BodyguardCore extends AdditionalGolemCore {
golem.tasks.addTask(8, new EntityAILookIdle(golem));
}
@Override
public boolean hasMarkers() {
return false;
}
private static class WrappedGolem extends EntityTameable {
private EntityGolemBase golem;
@@ -4,7 +4,7 @@ import makeo.gadomancy.api.GadomancyApi;
import makeo.gadomancy.api.golems.AdditionalGolemType;
import makeo.gadomancy.api.golems.cores.AdditionalGolemCore;
import makeo.gadomancy.common.Gadomancy;
import makeo.gadomancy.common.entities.golems.cores.BodyguardCore;
import makeo.gadomancy.common.entities.golems.cores.BodyguardGolemCore;
import makeo.gadomancy.common.entities.golems.cores.BreakGolemCore;
import makeo.gadomancy.common.entities.golems.types.SilverwoodGolemType;
import makeo.gadomancy.common.entities.golems.upgrades.GolemUpgrade;
@@ -36,7 +36,7 @@ public class RegisteredGolemStuff {
typeSilverwood = registerGolemType("SILVERWOOD", new SilverwoodGolemType());
breakCore = registerGolemCore("breakCore", new BreakGolemCore());
bodyguardCore = registerGolemCore("bodyguardCore", new BodyguardCore());
bodyguardCore = registerGolemCore("bodyguardCore", new BodyguardGolemCore());
upgradeRunicShield = registerGolemUpgrade(new GolemUpgradeRunicShield());
}