mirror of
https://github.com/GTNewHorizons/Gadomancy.git
synced 2026-11-20 12:09:51 +00:00
Added some comments to api
and removed setupGolemInventory
This commit is contained in:
1 parent
c1b6b36460
commit
c7330d3124
5 files changed
+35
-7
No files matched your search
@@ -26,6 +26,9 @@ public abstract class ClickBehavior {
|
||||
this(false);
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is called by me to init all variables
|
||||
*/
|
||||
@Deprecated
|
||||
public void init(World world, Block block, int x, int y, int z, int metadata) {
|
||||
this.world = world;
|
||||
@@ -36,6 +39,9 @@ public abstract class ClickBehavior {
|
||||
this.metadata = metadata;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return if this class needs to handle the given block
|
||||
*/
|
||||
public abstract boolean isValidForBlock();
|
||||
|
||||
public boolean hasVisCost() {
|
||||
|
||||
@@ -45,13 +45,13 @@ public abstract class AdditionalGolemType {
|
||||
public abstract void registerIcons(IIconRegister ir);
|
||||
public abstract IIcon getIcon(ItemStack stack, int pass);
|
||||
|
||||
public void setupGolem() {
|
||||
|
||||
}
|
||||
|
||||
public int getRenderPasses() { return 1; }
|
||||
|
||||
public abstract ResourceLocation getEntityTexture();
|
||||
|
||||
/**
|
||||
* @return resource location for the golem inventory slot texture
|
||||
*/
|
||||
public abstract ResourceLocation getInvSlotTexture();
|
||||
|
||||
public EnumGolemType getEnumEntry() {
|
||||
|
||||
@@ -15,20 +15,39 @@ import thaumcraft.common.entities.golems.EntityGolemBase;
|
||||
public abstract class AdditionalGolemCore {
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* Init your AI stuff here
|
||||
* @param golem the golem entity
|
||||
*/
|
||||
public abstract void setupGolem(EntityGolemBase golem);
|
||||
|
||||
public void setupGolemInventory(EntityGolemBase golem) { }
|
||||
|
||||
/**
|
||||
* @return If the golem has a gui
|
||||
*/
|
||||
public abstract boolean hasGui();
|
||||
|
||||
/**
|
||||
* @return the core that is used to define some basic behaviors of the golem e.g. guard core: mob selection
|
||||
*/
|
||||
public byte getBaseCore() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Open custom a gui here
|
||||
* Only called if hasGui is true
|
||||
* @param player player entity
|
||||
* @param golem golem entity
|
||||
* @return false -> open default gui true -> no gui
|
||||
*/
|
||||
public boolean openGui(EntityPlayer player, EntityGolemBase golem) {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param golem
|
||||
* @return the held tool item of a golem e.g. fishing rod
|
||||
*/
|
||||
public ItemStack getToolItem(EntityGolemBase golem) {
|
||||
return null;
|
||||
}
|
||||
@@ -39,6 +58,9 @@ public abstract class AdditionalGolemCore {
|
||||
|
||||
public abstract String getUnlocalizedName();
|
||||
|
||||
/**
|
||||
* @return the item that is used as a core
|
||||
*/
|
||||
public abstract ItemStack getItem();
|
||||
|
||||
public String getName() {
|
||||
|
||||
@@ -128,7 +128,6 @@ public class ExtendedGolemProperties implements IExtendedEntityProperties {
|
||||
golem.targetTasks.taskEntries.clear();
|
||||
|
||||
core.setupGolem(golem);
|
||||
core.setupGolemInventory(golem);
|
||||
|
||||
wrapper.lock();
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package makeo.gadomancy.common.registration;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import makeo.gadomancy.api.ClickBehavior;
|
||||
import makeo.gadomancy.api.GadomancyApi;
|
||||
import makeo.gadomancy.common.blocks.BlockArcaneDropper;
|
||||
import makeo.gadomancy.common.blocks.BlockInfusionClaw;
|
||||
import makeo.gadomancy.common.blocks.BlockRemoteJar;
|
||||
|
||||
Reference in new issue
Block a user