mirror of
https://github.com/GTNewHorizons/BloodMagic.git
synced 2026-11-27 15:23:06 +00:00
Add waila support (#42)
* Remove pneumaticCraft API * Add WAILA support. * Mix of backport from 1.12 + I'm Looking At Blood mod (MIT)
This commit is contained in:
1 parent
33f1f1bfef
commit
b0c07ebfc6
57 files changed
+738
-2364
No files matched your search
@@ -0,0 +1,54 @@
|
||||
package WayofTime.alchemicalWizardry.compat;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import mcp.mobius.waila.api.IWailaConfigHandler;
|
||||
import mcp.mobius.waila.api.IWailaDataAccessor;
|
||||
import mcp.mobius.waila.api.IWailaDataProvider;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class BloodMagicWailaProvider implements IWailaDataProvider {
|
||||
|
||||
@Override
|
||||
public ItemStack getWailaStack(IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaHead(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor,
|
||||
IWailaConfigHandler config) {
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor,
|
||||
IWailaConfigHandler config) {
|
||||
final TileEntity tile = accessor.getTileEntity();
|
||||
if (tile instanceof IBloodMagicWailaProvider) {
|
||||
((IBloodMagicWailaProvider) tile).getWailaBody(itemStack, currenttip, accessor, config);
|
||||
}
|
||||
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaTail(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor,
|
||||
IWailaConfigHandler config) {
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public NBTTagCompound getNBTData(EntityPlayerMP player, TileEntity tile, NBTTagCompound tag, World world, int x,
|
||||
int y, int z) {
|
||||
if (tile instanceof IBloodMagicWailaProvider) {
|
||||
((IBloodMagicWailaProvider) tile).getWailaNBTData(player, tile, tag, world, x, y, z);
|
||||
}
|
||||
|
||||
return tag;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user