Some stuff

Api derpage apparently...
Some new drills, and chainsaws. Started working on omnitools, but I got
distracted.
I NEED TEXTURES :(
This commit is contained in:
Tombenpotter committed 2014-09-29 21:24:50 +02:00
1 parent f927d596d5
commit 104ecb66bb
196 files changed
+8231 -8092

No files matched your search

+26 -32
View File
@@ -1,41 +1,35 @@
package baubles.api;
import java.lang.reflect.Method;
import cpw.mods.fml.common.FMLLog;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
import cpw.mods.fml.common.FMLLog;
import java.lang.reflect.Method;
/**
* @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;
}
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;
}
}