Merge pull request #2 from makeoo/dev

Dev
This commit is contained in:
makeoo committed 2015-10-20 19:55:47 +02:00
commit d1b2635df6
7 files changed
+43 -14

No files matched your search

+1 -1
View File
@@ -3,4 +3,4 @@ An adon for Thaumcraft
TODO:
- Add Thaumonomicon text
- Fix unknown bugs
- Fix unknown bugs
@@ -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() {
@@ -30,7 +30,14 @@ public class Gadomancy
private static final String PROXY_CLIENT = "makeo.gadomancy.client.ClientProxy";
private static final String PROXY_SERVER = "makeo.gadomancy.common.CommonProxy";
@Mod.Instance(value = Gadomancy.MODID)
public static Gadomancy instance;
@SidedProxy(clientSide = PROXY_CLIENT, serverSide = PROXY_SERVER)
public static CommonProxy proxy;
private static ModData modData = null;
public static ModData getModData() {
return modData;
}
@@ -47,12 +54,6 @@ public class Gadomancy
}
}
@Mod.Instance(value = Gadomancy.MODID)
public static Gadomancy instance;
@SidedProxy(clientSide = PROXY_CLIENT, serverSide = PROXY_SERVER)
public static CommonProxy proxy;
@Mod.EventHandler
public void onConstruct(FMLConstructionEvent event) {
GadomancyApi.setInstance(new DefaultApiHandler());
@@ -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;