Fixed the wand charging station texture, moved the baubles API to package it, and using the @API annotation for it. Added the Config GUIs existing in MinecraftForge for EMT! Awesome!

This commit is contained in:
Tombenpotter committed 2014-07-15 15:00:03 +02:00
1 parent bfdc4d5f9c
commit f0ee38df32
44 files changed
+347 -289

No files matched your search

-7
View File
@@ -1,7 +0,0 @@
package baubles.api;
public enum BaubleType {
RING,
AMULET,
BELT
}
-34
View File
@@ -1,34 +0,0 @@
package baubles.api;
import java.lang.reflect.Method;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
import cpw.mods.fml.common.FMLLog;
/**
* @author Azanor
*/
public class BaublesApi {
static Method getBaubles;
/**
* Retrieves the baubles inventory for the supplied player
*/
public static IInventory getBaubles(EntityPlayer player) {
IInventory ot = null;
try {
if(getBaubles == null) {
Class fake = Class.forName("baubles.common.lib.PlayerHandler");
getBaubles = fake.getMethod("getPlayerBaubles", EntityPlayer.class);
}
ot = (IInventory) getBaubles.invoke(null, player);
} catch(Exception ex) {
FMLLog.warning("[Baubles API] Could not invoke baubles.common.lib.PlayerHandler method getPlayerBaubles");
}
return ot;
}
}
-46
View File
@@ -1,46 +0,0 @@
package baubles.api;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.item.ItemStack;
/**
*
* @author Azanor
*
* This interface should be extended by items that can be worn in bauble slots
*
*/
public interface IBauble {
/**
* This method return the type of bauble this is.
* Type is used to determine the slots it can go into.
*/
public BaubleType getBaubleType(ItemStack itemstack);
/**
* This method is called once per tick if the bauble is being worn by a player
*/
public void onWornTick(ItemStack itemstack, EntityLivingBase player);
/**
* This method is called when the bauble is equipped by a player
*/
public void onEquipped(ItemStack itemstack, EntityLivingBase player);
/**
* This method is called when the bauble is unequipped by a player
*/
public void onUnequipped(ItemStack itemstack, EntityLivingBase player);
/**
* can this bauble be placed in a bauble slot
*/
public boolean canEquip(ItemStack itemstack, EntityLivingBase player);
/**
* Can this bauble be removed from a bauble slot
*/
public boolean canUnequip(ItemStack itemstack, EntityLivingBase player);
}
+1 -1
View File
@@ -7,7 +7,7 @@ package ic2.api.energy;
* The old EnergyNet methods missing in IEnergyNet have been migrated to events (load, unload) or
* removed (tiles no longer emit energy actively, the energy net implementation requests it).
*
* See ic2/api/energy/usage.txt for an overall description of the energy net api.
* See ic2/baubles.api/energy/usage.txt for an overall description of the energy net baubles.api.
*/
public final class EnergyNet {
/**
+1 -1
View File
@@ -8,7 +8,7 @@ import net.minecraftforge.common.util.ForgeDirection;
/**
* Interface representing the methods provided by the global EnergyNet class.
*
* See ic2/api/energy/usage.txt for an overall description of the energy net api.
* See ic2/baubles.api/energy/usage.txt for an overall description of the energy net baubles.api.
*/
public interface IEnergyNet {
/**
@@ -9,7 +9,7 @@ import ic2.api.energy.tile.IEnergyTile;
/**
* Base class for energy net events, don't use it directly.
*
* See ic2/api/energy/usage.txt for an overall description of the energy net api.
* See ic2/baubles.api/energy/usage.txt for an overall description of the energy net baubles.api.
*/
public class EnergyTileEvent extends WorldEvent {
public final IEnergyTile energyTile;
@@ -16,7 +16,7 @@ import ic2.api.energy.tile.IEnergyTile;
* your own energy grid implementation if you need to. It's not required if you
* always lookup energy paths on demand.
*
* See ic2/api/energy/usage.txt for an overall description of the energy net api.
* See ic2/baubles.api/energy/usage.txt for an overall description of the energy net baubles.api.
*/
public class EnergyTileLoadEvent extends EnergyTileEvent {
public EnergyTileLoadEvent(IEnergyTile energyTile1) {
@@ -17,7 +17,7 @@ import ic2.api.energy.tile.IEnergyTile;
* your own energy grid implementation if you need to. It's not required if you
* always lookup energy paths on demand.
*
* See ic2/api/energy/usage.txt for an overall description of the energy net api.
* See ic2/baubles.api/energy/usage.txt for an overall description of the energy net baubles.api.
*/
public class EnergyTileUnloadEvent extends EnergyTileEvent {
public EnergyTileUnloadEvent(IEnergyTile energyTile1) {
@@ -10,7 +10,7 @@ import net.minecraftforge.common.util.ForgeDirection;
* @see IEnergySink
* @see IEnergyConductor
*
* See ic2/api/energy/usage.txt for an overall description of the energy net api.
* See ic2/baubles.api/energy/usage.txt for an overall description of the energy net baubles.api.
*/
public interface IEnergyAcceptor extends IEnergyTile {
/**
@@ -4,7 +4,7 @@ package ic2.api.energy.tile;
* Tile entities which conduct energy pulses without buffering (mostly cables) have to implement this
* interface.
*
* See ic2/api/energy/usage.txt for an overall description of the energy net api.
* See ic2/baubles.api/energy/usage.txt for an overall description of the energy net baubles.api.
*/
public interface IEnergyConductor extends IEnergyAcceptor, IEnergyEmitter {
/**
@@ -10,7 +10,7 @@ import net.minecraftforge.common.util.ForgeDirection;
* @see IEnergySource
* @see IEnergyConductor
*
* See ic2/api/energy/usage.txt for an overall description of the energy net api.
* See ic2/baubles.api/energy/usage.txt for an overall description of the energy net baubles.api.
*/
public interface IEnergyEmitter extends IEnergyTile {
/**
@@ -5,7 +5,7 @@ import net.minecraftforge.common.util.ForgeDirection;
/**
* Allows a tile entity (mostly a machine) to receive energy.
*
* See ic2/api/energy/usage.txt for an overall description of the energy net api.
* See ic2/baubles.api/energy/usage.txt for an overall description of the energy net baubles.api.
*/
public interface IEnergySink extends IEnergyAcceptor {
/**
@@ -3,7 +3,7 @@ package ic2.api.energy.tile;
/**
* Allows a tile entity (mostly a generator) to emit energy.
*
* See ic2/api/energy/usage.txt for an overall description of the energy net api.
* See ic2/baubles.api/energy/usage.txt for an overall description of the energy net baubles.api.
*/
public interface IEnergySource extends IEnergyEmitter {
/**
@@ -7,7 +7,7 @@ package ic2.api.energy.tile;
* @see IEnergySource
* @see IEnergyConductor
*
* See ic2/api/energy/usage.txt for an overall description of the energy net api.
* See ic2/baubles.api/energy/usage.txt for an overall description of the energy net baubles.api.
*/
public interface IEnergyTile {
//
@@ -20,7 +20,7 @@ import net.minecraft.tileentity.TileEntity;
* IEnergyEmitter) and mandatory position (x, y, z, World) data.
* If the connectivity data on the sub tile is missing, the meta delegate is queried instead.
*
* See ic2/api/energy/usage.txt for an overall description of the energy net api.
* See ic2/baubles.api/energy/usage.txt for an overall description of the energy net baubles.api.
*/
public interface IMetaDelegate extends IEnergyTile {
/**
+1 -1
View File
@@ -139,6 +139,6 @@ distribution rules or to use energy networks provided by other mods, you can reg
tile events and use the interfaces to handle the energy distribution yourself. It's no longer
required to use conversion blocks.
IC2's EnergyNet itself is built on top of the api events and interfaces, providing their default
IC2's EnergyNet itself is built on top of the baubles.api events and interfaces, providing their default
use case.
+1 -1
View File
@@ -588,7 +588,7 @@ public final class IC2Items {
if (pkg != null) {
String packageName = pkg.getName();
return packageName.substring(0, packageName.length() - ".api.item".length());
return packageName.substring(0, packageName.length() - ".baubles.api.item".length());
}
return "ic2";
@@ -165,7 +165,7 @@ public final class NetworkHelper {
if (pkg != null) {
String packageName = pkg.getName();
return packageName.substring(0, packageName.length() - ".api.network".length());
return packageName.substring(0, packageName.length() - ".baubles.api.network".length());
}
return "ic2";
+1 -1
View File
@@ -26,7 +26,7 @@ public class IC2Reactor {
if (pkg != null) {
String packageName = pkg.getName();
return packageName.substring(0, packageName.length() - ".api.reactor".length());
return packageName.substring(0, packageName.length() - ".baubles.api.reactor".length());
}
return "ic2";