mirror of
https://github.com/GTNewHorizons/waila.git
synced 2026-11-15 09:34:53 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
42170ca050 | ||
|
|
f9868afde1 | ||
|
|
4e79797cd1 | ||
|
|
921b245273 | ||
|
|
2cbaeca169 | ||
|
|
bc344cab41 | ||
|
|
7a2fd4363c | ||
|
|
11d0f86320 | ||
|
|
d83fb8fe76 | ||
|
|
a36013c28c | ||
|
|
1934171e5a | ||
|
|
4b2e873261 | ||
|
|
6319cbd425 | ||
|
|
72ae5eccb3 | ||
|
|
5d1c7d532f |
No files matched your search
@@ -43,7 +43,8 @@ hud.msg.input=Input
|
||||
hud.msg.out=Out
|
||||
hud.msg.in=In
|
||||
hud.msg.power=Energie
|
||||
hud.msg.storage=Gespeichert
|
||||
hud.msg.storage=Speicher
|
||||
hud.msg.stored=Gespeichert
|
||||
hud.msg.any=Jegliches
|
||||
hud.msg.mode=Modus
|
||||
hud.msg.maxpower=Max Energie
|
||||
@@ -89,6 +90,9 @@ hud.msg.comparator=Komparator
|
||||
hud.msg.substractor=Substraktor
|
||||
hud.msg.record=Platte
|
||||
|
||||
hud.msg.offers=Angebote
|
||||
hud.msg.demands=Bedarf
|
||||
|
||||
option.appeng.monitorcontent=Monitorinhalt
|
||||
option.bb.content=Fassinhalt
|
||||
option.bc.tankamount=Flüssigk.-Menge
|
||||
@@ -99,6 +103,8 @@ option.ic2.inputeuother=Max EU-Input [Anderes]
|
||||
option.ic2.inputeu=Max EU-Input
|
||||
option.ic2.outputeu=Max EU-Output
|
||||
option.ic2.storage=Energie gespeichert
|
||||
option.ic2.consump=Zeige Verbrauch
|
||||
option.ic2.tradeomat=Zeige Tauschautomaten-Forderung
|
||||
option.thaumcraft.storedvis=Kondensatorspeicher
|
||||
option.thermalexpansion.energyhandler=Zeige RO-Speicher
|
||||
option.thermalexpansion.energycell=Zeige EZellen IN/OUT
|
||||
@@ -116,7 +122,7 @@ option.vanilla.repeater=Repeater-Verzögerung
|
||||
option.vanilla.comparator=Komparatormodus
|
||||
option.vanilla.redstone=Redstone-Stärke
|
||||
option.vanilla.jukebox=Musikbox-Platte
|
||||
option.etb.displaydata=Zeigel Sockeldaten
|
||||
option.etb.displaydata=Zeige Sockeldaten
|
||||
option.enderio.inout=Zeige Input/Output
|
||||
option.enderio.storage=Zeige gespeicherte MJ
|
||||
option.enderio.owner=Zeige Block-Besitzer
|
||||
@@ -126,3 +132,6 @@ option.bcapi.consump=Zeige maximale Energie
|
||||
option.bcapi.trigger=Zeige Startenergie
|
||||
option.pr.showio=Zeige Gatter IO
|
||||
option.pr.showdata=Zeige Gatterdaten
|
||||
option.extrautilities.fluidamount=Zeige Flüssigk.-Menge
|
||||
option.openblocks.fluidamount=Zeige Flüssigk.-Menge
|
||||
option.railcraft.fluidamount=Zeige Flüssigk.-Menge
|
||||
@@ -132,3 +132,6 @@ option.bcapi.consump=Show maximum power
|
||||
option.bcapi.trigger=Show triggering energy
|
||||
option.pr.showio=Show gates IO
|
||||
option.pr.showdata=Show gates data
|
||||
option.extrautilities.fluidamount=Show fluid amount
|
||||
option.openblocks.fluidamount=Show fluid amount
|
||||
option.railcraft.fluidamount=Show fluid amount
|
||||
@@ -130,4 +130,7 @@ option.bcapi.storage=Afficher MJ stocké
|
||||
option.bcapi.consump=Afficher puissance maximale
|
||||
option.bcapi.trigger=Energie déclanchement
|
||||
option.pr.showio=Afficher plaques IO
|
||||
option.pr.showdata=Afficher plaques data
|
||||
option.pr.showdata=Afficher plaques data
|
||||
option.extrautilities.fluidamount=Afficher niveau fluides
|
||||
option.openblocks.fluidamount=Afficher niveau fluides
|
||||
option.railcraft.fluidamount=Afficher niveau fluides
|
||||
@@ -111,4 +111,7 @@ option.vanilla.leverstate=Hendel status
|
||||
option.vanilla.repeater=Herhaler vertraging
|
||||
option.vanilla.comparator=Vergelijker modus
|
||||
option.vanilla.redstone=Redstone vermogen
|
||||
option.vanilla.jukebox=Jukebox schijf
|
||||
option.vanilla.jukebox=Jukebox schijf
|
||||
option.extrautilities.fluidamount=Toon vloeistofhoeveelheid
|
||||
option.openblocks.fluidamount=Toon vloeistofhoeveelheid
|
||||
option.railcraft.fluidamount=Toon vloeistofhoeveelheid
|
||||
@@ -0,0 +1,131 @@
|
||||
screen.button.waila=Waila
|
||||
screen.button.modules=Модули
|
||||
screen.label.scale=Размер
|
||||
screen.label.dragtuto=Перетащите интерфейс, чтобы изменить позицию.
|
||||
|
||||
screen.button.default=По умолчанию
|
||||
screen.button.cancel=Отмена
|
||||
screen.button.ok=Ок
|
||||
screen.button.yes=Да
|
||||
screen.button.no=Нет
|
||||
screen.button.back=Назад
|
||||
screen.button.hidden=Скрывать
|
||||
screen.button.visible=Показывать
|
||||
screen.button.maintained=При нажатой клавише
|
||||
screen.button.toggled=Вкл./Выкл. гор. клавишей
|
||||
|
||||
choice.showhidewaila=Показать/Скрыть Waila
|
||||
choice.showhideidmeta=Показать ID:Метаданные
|
||||
choice.toggledmaintained=Переключ./Нажатая клав.
|
||||
choice.showliquids=Жидкости
|
||||
screen.button.configureaspect=Настроить индикатор...
|
||||
|
||||
enchant.title.name=Название
|
||||
enchant.title.minlvl=Мин. уровень
|
||||
enchant.title.maxlvl=Макс. уровень
|
||||
enchant.title.weight=Вес
|
||||
enchant.label.enchantability=Зачарование
|
||||
|
||||
waila.keybind.wailaconfig=[Waila] Меню настроек
|
||||
waila.keybind.wailadisplay=[Waila] Показать/Скрыть
|
||||
waila.keybind.liquid=[Waila] Показать жидкости
|
||||
waila.keybind.recipe=[Waila] Показать рецепт
|
||||
waila.keybind.usage=[Waila] Показать применение
|
||||
waila.keybind.testing=[Waila] Тестировать
|
||||
|
||||
client.msg.norecipe=Рецептов не найдено.
|
||||
client.msg.nousage=Применений не найдено.
|
||||
|
||||
hud.msg.none=<Ничего>
|
||||
hud.msg.empty=<Пусто>
|
||||
hud.msg.output=Вывод
|
||||
hud.msg.input=Ввод
|
||||
hud.msg.out=Из
|
||||
hud.msg.in=В
|
||||
hud.msg.power=Энергия
|
||||
hud.msg.storage=Хранилище
|
||||
hud.msg.any=Всё
|
||||
hud.msg.mode=Режим
|
||||
hud.msg.maxpower=Макс. энергия
|
||||
hud.msg.trigger=Триггер
|
||||
hud.msg.maxio=Макс. ввод/вывод
|
||||
|
||||
hud.msg.send=Передача
|
||||
hud.msg.recv=Приём
|
||||
hud.msg.item=Предмет
|
||||
hud.msg.fluid=Жидкость
|
||||
hud.msg.energ=Энергия
|
||||
hud.msg.frequency=Частота
|
||||
|
||||
hud.msg.owner=Владелец
|
||||
hud.msg.public=Публичный
|
||||
hud.msg.restricted=Ограниченный
|
||||
hud.msg.private=Приватный
|
||||
|
||||
hud.msg.white=Белый
|
||||
hud.msg.orange=Оранжевый
|
||||
hud.msg.magenta=Сиреневый
|
||||
hud.msg.lblue=Светло-синий
|
||||
hud.msg.yellow=Жёлтый
|
||||
hud.msg.lime=Светло-зелёный
|
||||
hud.msg.pink=Розовый
|
||||
hud.msg.gray=Серый
|
||||
hud.msg.lgray=Светло-серый
|
||||
hud.msg.cyan=Бирюзовый
|
||||
hud.msg.purple=Фиолетовый
|
||||
hud.msg.blue=Синий
|
||||
hud.msg.brown=Коричневый
|
||||
hud.msg.green=Зелёный
|
||||
hud.msg.red=Красный
|
||||
hud.msg.black=Чёрный
|
||||
|
||||
hud.msg.growth=Рост
|
||||
hud.msg.mature=Вырос
|
||||
hud.msg.off=Выкл.
|
||||
hud.msg.on=Вкл.
|
||||
hud.msg.state=Статус
|
||||
hud.msg.delay=Задержка
|
||||
hud.msg.comparator=Компаратор
|
||||
hud.msg.substractor=Вычитатель
|
||||
hud.msg.record=Пластинка
|
||||
|
||||
option.appeng.monitorcontent=Содержимое монитора
|
||||
option.bb.content=Содержимое бочки
|
||||
option.bc.tankamount=Кол-во жидкости
|
||||
option.bc.tanktype=Тип жидкости
|
||||
option.enderstorage.colors=Цвета
|
||||
option.ic2.inputeumach=Макс. ввод еЭ [Машины]
|
||||
option.ic2.inputeuother=Макс. ввод еЭ [Другое]
|
||||
option.ic2.inputeu=Макс. ввод еЭ
|
||||
option.ic2.outputeu=Макс. вывод еЭ
|
||||
option.ic2.storage=Заряд энергии
|
||||
option.thaumcraft.storedvis=Заряд конденсатора
|
||||
option.thermalexpansion.energyhandler=Показывать заряд заряжателя
|
||||
option.thermalexpansion.energycell=Показывать Ввод/Вывод Р.батареи
|
||||
option.thermalexpansion.fluidtype=Показывать тип жидкости
|
||||
option.thermalexpansion.fluidamount=Показывать кол-во жидкости
|
||||
option.thermalexpansion.tankmode=Режим цистерны
|
||||
option.thermalexpansion.tesssendrecv=Режим тессеракта
|
||||
option.thermalexpansion.tessfreq=Частота тессеракта
|
||||
option.thermalexpansion.owner=Показывать владельца
|
||||
option.thermalexpansion.conditemmode=Показывать режим труб
|
||||
option.vanilla.spawntype=Тип спаунера
|
||||
option.vanilla.growthvalue=Стадия роста
|
||||
option.vanilla.leverstate=Положение рычага
|
||||
option.vanilla.repeater=Задержка повторителя
|
||||
option.vanilla.comparator=Режим компаратора
|
||||
option.vanilla.redstone=Сила красного камня
|
||||
option.vanilla.jukebox=Пластинка в проигрывателе
|
||||
option.etb.displaydata=Показывать инф. о сокетах
|
||||
option.enderio.inout=Показывать ввод/вывод
|
||||
option.enderio.storage=Показывать заряд MJ
|
||||
option.enderio.owner=Показывать владельца блока
|
||||
option.enderio.channel=Показывать канал гиперкуба
|
||||
option.bcapi.storage=Показывать заряд MJ
|
||||
option.bcapi.consump=Показывать макс. энергию
|
||||
option.bcapi.trigger=Показывать энергию активации
|
||||
option.pr.showio=Показывать ввод/вывод схем
|
||||
option.pr.showdata=Показывать инф. о схемах
|
||||
option.extrautilities.fluidamount=Показывать кол-во жидкости
|
||||
option.openblocks.fluidamount=Показывать кол-во жидкости
|
||||
option.railcraft.fluidamount=Показывать кол-во жидкости
|
||||
@@ -0,0 +1,34 @@
|
||||
package mcp.mobius.waila.addons.exu;
|
||||
|
||||
import java.util.logging.Level;
|
||||
|
||||
import mcp.mobius.waila.mod_Waila;
|
||||
import mcp.mobius.waila.addons.ExternalModulesHandler;
|
||||
|
||||
public class ExtraUtilitiesModule {
|
||||
|
||||
public static Class ModExtraUtilities = null;
|
||||
public static Class TileEntityDrum = null;
|
||||
|
||||
public static void register(){
|
||||
|
||||
|
||||
try{
|
||||
Class ModExtraUtilities = Class.forName("extrautils.ExtraUtils");
|
||||
mod_Waila.log.log(Level.INFO, "ExtraUtilities mod found.");
|
||||
} catch (ClassNotFoundException e){
|
||||
mod_Waila.log.log(Level.INFO, "[ExtraUtilities] ExtraUtilities mod not found.");
|
||||
return;
|
||||
}
|
||||
|
||||
try{
|
||||
TileEntityDrum = Class.forName("extrautils.tileentity.TileEntityDrum");
|
||||
} catch (ClassNotFoundException e){
|
||||
mod_Waila.log.log(Level.WARNING, "[ExtraUtilities] Class not found. " + e);
|
||||
return;
|
||||
}
|
||||
|
||||
ExternalModulesHandler.instance().addConfigRemote("ExtraUtilities", "extrautilities.fluidamount");
|
||||
ExternalModulesHandler.instance().registerBodyProvider(new HUDHandlerDrum(), TileEntityDrum);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
package mcp.mobius.waila.addons.exu;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import net.minecraftforge.fluids.FluidTankInfo;
|
||||
import net.minecraftforge.fluids.IFluidHandler;
|
||||
import mcp.mobius.waila.api.IWailaConfigHandler;
|
||||
import mcp.mobius.waila.api.IWailaDataAccessor;
|
||||
import mcp.mobius.waila.api.IWailaDataProvider;
|
||||
|
||||
public class HUDHandlerDrum 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) {
|
||||
|
||||
if (!config.getConfig("extrautilities.fluidamount")) return currenttip;
|
||||
|
||||
int amount = 0;
|
||||
|
||||
NBTTagCompound subtag = accessor.getNBTData().getCompoundTag("tank");
|
||||
if (subtag.hasKey("Amount"))
|
||||
amount = accessor.getNBTInteger(subtag, "Amount");
|
||||
|
||||
IFluidHandler handler = (IFluidHandler)accessor.getTileEntity();
|
||||
if (handler == null) return currenttip;
|
||||
|
||||
FluidTankInfo[] tanks = handler.getTankInfo(ForgeDirection.UNKNOWN);
|
||||
if (tanks.length != 1) return currenttip;
|
||||
|
||||
currenttip.add(String.format("%d / %d mB", amount, tanks[0].capacity));
|
||||
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaTail(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -93,19 +93,19 @@ public class IC2Module {
|
||||
TileEntityTradeOMat = Class.forName("ic2.core.block.personal.TileEntityTradeOMat");
|
||||
|
||||
} catch (ClassNotFoundException e){
|
||||
e.printStackTrace();
|
||||
//e.printStackTrace();
|
||||
mod_Waila.log.log(Level.WARNING, "[IC2] Class not found. " + e);
|
||||
return;
|
||||
} catch (NoSuchMethodException e){
|
||||
e.printStackTrace();
|
||||
//e.printStackTrace();
|
||||
mod_Waila.log.log(Level.WARNING, "[IC2] Method not found." + e);
|
||||
return;
|
||||
} catch (NoSuchFieldException e){
|
||||
e.printStackTrace();
|
||||
//e.printStackTrace();
|
||||
mod_Waila.log.log(Level.WARNING, "[IC2] Field not found." + e);
|
||||
return;
|
||||
} catch (Exception e){
|
||||
e.printStackTrace();
|
||||
//e.printStackTrace();
|
||||
mod_Waila.log.log(Level.WARNING, "[IC2] Unhandled exception." + e);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
package mcp.mobius.waila.addons.openblocks;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import codechicken.lib.lang.LangUtil;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.fluids.FluidTankInfo;
|
||||
import net.minecraftforge.fluids.IFluidHandler;
|
||||
import mcp.mobius.waila.api.IWailaConfigHandler;
|
||||
import mcp.mobius.waila.api.IWailaDataAccessor;
|
||||
import mcp.mobius.waila.api.IWailaDataProvider;
|
||||
|
||||
public class HUDHandlerTank 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) {
|
||||
if (!config.getConfig("openblocks.fluidamount")) return currenttip;
|
||||
|
||||
IFluidHandler handler = (IFluidHandler)accessor.getTileEntity();
|
||||
if (handler == null) return currenttip;
|
||||
|
||||
FluidTankInfo[] tanks = handler.getTankInfo(ForgeDirection.UNKNOWN);
|
||||
if (tanks.length != 1) return currenttip;
|
||||
|
||||
FluidStack fluid = tanks[0].fluid;
|
||||
String name = currenttip.get(0);
|
||||
|
||||
try{
|
||||
name += String.format(" < %s >", fluid.getFluid().getLocalizedName());
|
||||
} catch (NullPointerException f){
|
||||
name += " " + LangUtil.translateG("hud.msg.empty");
|
||||
}
|
||||
|
||||
currenttip.set(0, name);
|
||||
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
if (!config.getConfig("openblocks.fluidamount")) return currenttip;
|
||||
|
||||
IFluidHandler handler = (IFluidHandler)accessor.getTileEntity();
|
||||
if (handler == null) return currenttip;
|
||||
|
||||
FluidTankInfo[] tanks = handler.getTankInfo(ForgeDirection.UNKNOWN);
|
||||
if (tanks.length != 1) return currenttip;
|
||||
|
||||
if(tanks[0].fluid != null)
|
||||
currenttip.add(String.format("%d / %d mB", tanks[0].fluid.amount, tanks[0].capacity));
|
||||
else
|
||||
currenttip.add(String.format("0 / %d mB", tanks[0].capacity));
|
||||
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaTail(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package mcp.mobius.waila.addons.openblocks;
|
||||
|
||||
import java.util.logging.Level;
|
||||
|
||||
import mcp.mobius.waila.mod_Waila;
|
||||
import mcp.mobius.waila.addons.ExternalModulesHandler;
|
||||
|
||||
public class OpenBlocksModule {
|
||||
|
||||
public static Class ModOpenBlocks = null;
|
||||
public static Class TileEntityTank = null;
|
||||
|
||||
public static void register(){
|
||||
try{
|
||||
Class ModOpenBlocks = Class.forName("openblocks.OpenBlocks");
|
||||
mod_Waila.log.log(Level.INFO, "OpenBlocks mod found.");
|
||||
} catch (ClassNotFoundException e){
|
||||
mod_Waila.log.log(Level.INFO, "[OpenBlocks] OpenBlocks mod not found.");
|
||||
return;
|
||||
}
|
||||
|
||||
try{
|
||||
TileEntityTank = Class.forName("openblocks.common.tileentity.TileEntityTank");
|
||||
} catch (ClassNotFoundException e){
|
||||
mod_Waila.log.log(Level.WARNING, "[OpenBlocks] Class not found. " + e);
|
||||
return;
|
||||
}
|
||||
|
||||
ExternalModulesHandler.instance().addConfigRemote("OpenBlocks", "openblocks.fluidamount");
|
||||
ExternalModulesHandler.instance().registerBodyProvider(new HUDHandlerTank(), TileEntityTank);
|
||||
ExternalModulesHandler.instance().registerHeadProvider(new HUDHandlerTank(), TileEntityTank);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
package mcp.mobius.waila.addons.railcraft;
|
||||
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.util.List;
|
||||
|
||||
import codechicken.lib.lang.LangUtil;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.fluids.IFluidTank;
|
||||
import mcp.mobius.waila.WailaExceptionHandler;
|
||||
import mcp.mobius.waila.api.IWailaConfigHandler;
|
||||
import mcp.mobius.waila.api.IWailaDataAccessor;
|
||||
import mcp.mobius.waila.api.IWailaDataProvider;
|
||||
|
||||
public class HUDHandlerTank 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) {
|
||||
if (!config.getConfig("railcraft.fluidamount")) return currenttip;
|
||||
try {
|
||||
IFluidTank tank = (IFluidTank)RailcraftModule.ITankTile_getTank.invoke(RailcraftModule.ITankTile.cast(accessor.getTileEntity()));
|
||||
if (tank == null) return currenttip;
|
||||
|
||||
FluidStack fluid = tank.getFluid();
|
||||
|
||||
String name = currenttip.get(0);
|
||||
|
||||
try{
|
||||
name += String.format(" < %s >", fluid.getFluid().getLocalizedName());
|
||||
} catch (NullPointerException f){
|
||||
name += " " + LangUtil.translateG("hud.msg.empty");
|
||||
}
|
||||
|
||||
currenttip.set(0, name);
|
||||
|
||||
} catch (Exception e){
|
||||
currenttip = WailaExceptionHandler.handleErr(e, accessor.getTileEntity().getClass().getName(), currenttip);
|
||||
}
|
||||
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
if (!config.getConfig("railcraft.fluidamount")) return currenttip;
|
||||
|
||||
try {
|
||||
IFluidTank tank = (IFluidTank)RailcraftModule.ITankTile_getTank.invoke(RailcraftModule.ITankTile.cast(accessor.getTileEntity()));
|
||||
if (tank == null) return currenttip;
|
||||
|
||||
FluidStack fluid = tank.getFluid();
|
||||
if (fluid != null)
|
||||
currenttip.add(String.format("%d / %d mB", fluid.amount, tank.getInfo().capacity));
|
||||
else
|
||||
currenttip.add(String.format("0 / %d mB", tank.getInfo().capacity));
|
||||
|
||||
} catch (Exception e){
|
||||
currenttip = WailaExceptionHandler.handleErr(e, accessor.getTileEntity().getClass().getName(), currenttip);
|
||||
}
|
||||
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaTail(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package mcp.mobius.waila.addons.railcraft;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import mcp.mobius.waila.mod_Waila;
|
||||
import mcp.mobius.waila.addons.ExternalModulesHandler;
|
||||
|
||||
public class RailcraftModule {
|
||||
public static Class TileTankBase = null;
|
||||
public static Class ITankTile = null;
|
||||
public static Method ITankTile_getTank = null;
|
||||
//public static Class StandardTank = null;
|
||||
|
||||
public static void register(){
|
||||
try{
|
||||
Class ModRailcraft = Class.forName("mods.railcraft.common.core.Railcraft");
|
||||
mod_Waila.log.log(Level.INFO, "Railcraft mod found.");
|
||||
} catch (ClassNotFoundException e){
|
||||
mod_Waila.log.log(Level.INFO, "[Railcraft] Railcraft mod not found.");
|
||||
return;
|
||||
}
|
||||
|
||||
try{
|
||||
TileTankBase = Class.forName("mods.railcraft.common.blocks.machine.beta.TileTankBase");
|
||||
ITankTile = Class.forName("mods.railcraft.common.blocks.machine.ITankTile");
|
||||
ITankTile_getTank = ITankTile.getMethod("getTank");
|
||||
//StandardTank = Class.forName("mods.railcraft.common.fluids.tanks.StandardTank");
|
||||
|
||||
} catch (ClassNotFoundException e){
|
||||
mod_Waila.log.log(Level.WARNING, "[Railcraft] Class not found. " + e);
|
||||
return;
|
||||
} catch (NoSuchMethodException e){
|
||||
mod_Waila.log.log(Level.WARNING, "[Railcraft] Method not found." + e);
|
||||
return;
|
||||
}
|
||||
|
||||
ExternalModulesHandler.instance().addConfigRemote("Railcraft", "railcraft.fluidamount");
|
||||
ExternalModulesHandler.instance().registerBodyProvider(new HUDHandlerTank(), TileTankBase);
|
||||
ExternalModulesHandler.instance().registerHeadProvider(new HUDHandlerTank(), TileTankBase);
|
||||
}
|
||||
}
|
||||
@@ -4,6 +4,8 @@ import java.util.List;
|
||||
|
||||
import codechicken.lib.lang.LangUtil;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import mcp.mobius.waila.WailaExceptionHandler;
|
||||
import mcp.mobius.waila.api.IWailaConfigHandler;
|
||||
@@ -25,22 +27,31 @@ public class HUDHandlerConduitFluid implements IWailaDataProvider {
|
||||
@Override
|
||||
public List<String> getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
|
||||
if (config.getConfig("thermalexpansion.fluidtype")){
|
||||
if (!config.getConfig("thermalexpansion.fluidtype")) return currenttip;
|
||||
|
||||
try {
|
||||
FluidStack fluid = (FluidStack)ThermalExpansionModule.TileConduitFluid_getRenderFluid.invoke(accessor.getTileEntity());
|
||||
|
||||
try{
|
||||
currenttip.add(fluid.getFluid().getLocalizedName());
|
||||
} catch (NullPointerException f){
|
||||
currenttip.add(LangUtil.translateG("hud.msg.empty"));
|
||||
}
|
||||
|
||||
} catch (Exception e){
|
||||
currenttip = WailaExceptionHandler.handleErr(e, accessor.getTileEntity().getClass().getName(), currenttip);
|
||||
}
|
||||
boolean found = false;
|
||||
FluidStack fluid = null;
|
||||
|
||||
if (!accessor.getNBTData().hasKey("parts")) return currenttip;
|
||||
NBTTagList parts = accessor.getNBTData().getTagList("parts");
|
||||
for (int i = 0; i < parts.tagCount(); i++){
|
||||
NBTTagCompound subtag = (NBTTagCompound)parts.tagAt(i);
|
||||
String id = subtag.getString("id");
|
||||
|
||||
}
|
||||
if (id.contains("ConduitFluid")){
|
||||
found = true;
|
||||
NBTTagCompound fluidTag = subtag.getCompoundTag("ConnFluid");
|
||||
fluid = FluidStack.loadFluidStackFromNBT(fluidTag);
|
||||
}
|
||||
}
|
||||
|
||||
if (!found) return currenttip;
|
||||
|
||||
if (fluid != null)
|
||||
currenttip.add(fluid.getFluid().getLocalizedName());
|
||||
else
|
||||
currenttip.add(LangUtil.translateG("hud.msg.empty"));
|
||||
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
|
||||
@@ -3,6 +3,8 @@ package mcp.mobius.waila.addons.thermalexpansion;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import mcp.mobius.waila.api.IWailaConfigHandler;
|
||||
import mcp.mobius.waila.api.IWailaDataAccessor;
|
||||
import mcp.mobius.waila.api.IWailaDataProvider;
|
||||
@@ -22,18 +24,35 @@ public class HUDHandlerConduitItem implements IWailaDataProvider {
|
||||
@Override
|
||||
public List<String> getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
|
||||
if (accessor.getNBTData().hasKey("Mode") && accessor.getNBTInteger(accessor.getNBTData(), "Mode") != 0){
|
||||
int mode = accessor.getNBTInteger(accessor.getNBTData(), "Mode");
|
||||
if (!config.getConfig("thermalexpansion.conditemmode")) return currenttip;
|
||||
|
||||
boolean found = false;
|
||||
int mode = -1;
|
||||
|
||||
if (!accessor.getNBTData().hasKey("parts")) return currenttip;
|
||||
NBTTagList parts = accessor.getNBTData().getTagList("parts");
|
||||
for (int i = 0; i < parts.tagCount(); i++){
|
||||
NBTTagCompound subtag = (NBTTagCompound)parts.tagAt(i);
|
||||
String id = subtag.getString("id");
|
||||
|
||||
if (mode == 1)
|
||||
currenttip.add("Mode : \u00a7fDense");
|
||||
else if (mode == 2)
|
||||
currenttip.add("Mode : \u00a7fVacuum");
|
||||
else if (mode == 3)
|
||||
currenttip.add("Mode : \u00a7fRound-Robin");
|
||||
else
|
||||
currenttip.add("Mode : <UNKNOWN>");
|
||||
}
|
||||
if (id.contains("ConduitItem")){
|
||||
mode = accessor.getNBTInteger(subtag, "Mode");
|
||||
found = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!found) return currenttip;
|
||||
|
||||
if (mode == 0){}
|
||||
else if (mode == 1)
|
||||
currenttip.add("Mode : \u00a7fDense");
|
||||
else if (mode == 2)
|
||||
currenttip.add("Mode : \u00a7fVacuum");
|
||||
else if (mode == 3)
|
||||
currenttip.add("Mode : \u00a7fRound-Robin");
|
||||
else
|
||||
currenttip.add("Mode : <UNKNOWN>");
|
||||
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
|
||||
@@ -20,16 +20,18 @@ public class ThermalExpansionModule {
|
||||
public static Method TileTank_getTankCapacity = null;
|
||||
public static Field TileTank_mode = null;
|
||||
|
||||
public static Class TileConduitFluid = null;
|
||||
public static Method TileConduitFluid_getRenderFluid = null;
|
||||
public static Method TileConduitFluid_getRenderFluidLevel = null;
|
||||
//public static Class TileConduitFluid = null;
|
||||
//public static Method TileConduitFluid_getRenderFluid = null;
|
||||
//public static Method TileConduitFluid_getRenderFluidLevel = null;
|
||||
|
||||
public static Class TileConduitItems = null;
|
||||
//public static Class TileConduitItems = null;
|
||||
|
||||
public static Class TileTesseract = null;
|
||||
|
||||
public static Class ISecureTile = null;
|
||||
|
||||
public static Class BlockMultipart = null;
|
||||
|
||||
//public static Field TileTesseract_modItem = null;
|
||||
//public static Field TileTesseract_modFluid = null;
|
||||
//public static Field TileTesseract_modEnergy = null;
|
||||
@@ -59,16 +61,17 @@ public class ThermalExpansionModule {
|
||||
TileTank_getTankCapacity = TileTank.getMethod("getTankCapacity");
|
||||
TileTank_mode = TileTank.getField("mode");
|
||||
|
||||
TileConduitFluid = Class.forName("thermalexpansion.block.conduit.fluid.TileConduitFluid");
|
||||
TileConduitFluid_getRenderFluid = TileConduitFluid.getMethod("getRenderFluid");
|
||||
TileConduitFluid_getRenderFluidLevel = TileConduitFluid.getMethod("getRenderFluidLevel");
|
||||
|
||||
TileConduitItems = Class.forName("thermalexpansion.block.conduit.item.TileConduitItem");
|
||||
//TileConduitFluid = Class.forName("thermalexpansion.block.conduit.fluid.TileConduitFluid");
|
||||
//TileConduitFluid_getRenderFluid = TileConduitFluid.getMethod("getRenderFluid");
|
||||
//TileConduitFluid_getRenderFluidLevel = TileConduitFluid.getMethod("getRenderFluidLevel");
|
||||
//TileConduitItems = Class.forName("thermalexpansion.block.conduit.item.TileConduitItem");
|
||||
|
||||
TileTesseract = Class.forName("thermalexpansion.block.tesseract.TileTesseract");
|
||||
|
||||
ISecureTile = Class.forName("cofh.api.tileentity.ISecureTile");
|
||||
|
||||
BlockMultipart = Class.forName("codechicken.multipart.BlockMultipart");
|
||||
|
||||
//TileTesseract_modItem = TileTesseract.getField("modItem");
|
||||
//TileTesseract_modFluid = TileTesseract.getField("modFluid");
|
||||
//TileTesseract_modEnergy = TileTesseract.getField("modEnergy");
|
||||
@@ -96,7 +99,7 @@ public class ThermalExpansionModule {
|
||||
|
||||
ExternalModulesHandler.instance().addConfigRemote("Thermal Expansion", "thermalexpansion.energyhandler");
|
||||
ExternalModulesHandler.instance().addConfigRemote("Thermal Expansion", "thermalexpansion.energycell");
|
||||
ExternalModulesHandler.instance().addConfig("Thermal Expansion", "thermalexpansion.fluidtype");
|
||||
ExternalModulesHandler.instance().addConfigRemote("Thermal Expansion", "thermalexpansion.fluidtype");
|
||||
ExternalModulesHandler.instance().addConfigRemote("Thermal Expansion", "thermalexpansion.fluidamount");
|
||||
ExternalModulesHandler.instance().addConfigRemote("Thermal Expansion", "thermalexpansion.conditemmode");
|
||||
ExternalModulesHandler.instance().addConfig("Thermal Expansion", "thermalexpansion.tankmode");
|
||||
@@ -105,19 +108,17 @@ public class ThermalExpansionModule {
|
||||
ExternalModulesHandler.instance().addConfigRemote("Thermal Expansion", "thermalexpansion.owner");
|
||||
|
||||
ExternalModulesHandler.instance().registerBodyProvider(new HUDHandlerIEnergyHandler(), IEnergyHandler);
|
||||
//ExternalModulesHandler.instance().registerBodyProvider(new HUDHandlerIEnergyHandler(), TileEnergyCell);
|
||||
ExternalModulesHandler.instance().registerBodyProvider(new HUDHandlerEnergyCell(), TileEnergyCell);
|
||||
ExternalModulesHandler.instance().registerHeadProvider(new HUDHandlerTank(), TileTank);
|
||||
ExternalModulesHandler.instance().registerBodyProvider(new HUDHandlerTank(), TileTank);
|
||||
|
||||
ExternalModulesHandler.instance().registerBodyProvider(new HUDHandlerConduitFluid(), TileConduitFluid);
|
||||
ExternalModulesHandler.instance().registerBodyProvider(new HUDHandlerTesseract(), TileTesseract);
|
||||
|
||||
ExternalModulesHandler.instance().registerBodyProvider(new HUDHandlerConduitItem(), TileConduitItems);
|
||||
|
||||
ExternalModulesHandler.instance().registerBodyProvider(new HUDHandlerISecureTile(), ISecureTile);
|
||||
|
||||
//ExternalModulesHandler.instance().registerBodyProvider(new HUDHandlerConduitBase(), TileConduitBase);
|
||||
|
||||
ExternalModulesHandler.instance().registerBodyProvider(new HUDHandlerConduitFluid(), BlockMultipart);
|
||||
ExternalModulesHandler.instance().registerBodyProvider(new HUDHandlerConduitItem(), BlockMultipart);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ import java.util.List;
|
||||
|
||||
import codechicken.lib.lang.LangUtil;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockSilverfish;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemRecord;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -31,11 +32,29 @@ public class HUDHandlerVanilla implements IWailaDataProvider {
|
||||
static int jukebox = Block.jukebox.blockID;
|
||||
static int cocoa = Block.cocoaPlant.blockID;
|
||||
static int netherwart = Block.netherStalk.blockID;
|
||||
static int silverfish = Block.silverfish.blockID;
|
||||
|
||||
|
||||
@Override
|
||||
public ItemStack getWailaStack(IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
int blockID = accessor.getBlockID();
|
||||
|
||||
if (blockID == silverfish){
|
||||
int metadata = accessor.getMetadata();
|
||||
switch(metadata){
|
||||
case 0:
|
||||
return new ItemStack(Block.stone);
|
||||
case 1:
|
||||
return new ItemStack(Block.cobblestone);
|
||||
case 2:
|
||||
return new ItemStack(Block.stoneBrick);
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -149,23 +168,27 @@ public class HUDHandlerVanilla implements IWailaDataProvider {
|
||||
ExternalModulesHandler.instance().addConfig("VanillaMC", "vanilla.repeater");
|
||||
ExternalModulesHandler.instance().addConfig("VanillaMC", "vanilla.comparator");
|
||||
ExternalModulesHandler.instance().addConfig("VanillaMC", "vanilla.redstone");
|
||||
ExternalModulesHandler.instance().addConfigRemote("VanillaMC", "vanilla.jukebox");
|
||||
ExternalModulesHandler.instance().registerHeadProvider(new HUDHandlerVanilla(), mobSpawnerID);
|
||||
ExternalModulesHandler.instance().registerBodyProvider(new HUDHandlerVanilla(), cropsID);
|
||||
ExternalModulesHandler.instance().registerBodyProvider(new HUDHandlerVanilla(), melonStemID);
|
||||
ExternalModulesHandler.instance().registerBodyProvider(new HUDHandlerVanilla(), pumpkinStemID);
|
||||
ExternalModulesHandler.instance().registerBodyProvider(new HUDHandlerVanilla(), carrotID);
|
||||
ExternalModulesHandler.instance().registerBodyProvider(new HUDHandlerVanilla(), potatoID);
|
||||
ExternalModulesHandler.instance().registerBodyProvider(new HUDHandlerVanilla(), leverID);
|
||||
ExternalModulesHandler.instance().registerBodyProvider(new HUDHandlerVanilla(), repeaterIdle);
|
||||
ExternalModulesHandler.instance().registerBodyProvider(new HUDHandlerVanilla(), repeaterActv);
|
||||
ExternalModulesHandler.instance().registerBodyProvider(new HUDHandlerVanilla(), comparatorIdl);
|
||||
ExternalModulesHandler.instance().registerBodyProvider(new HUDHandlerVanilla(), comparatorAct);
|
||||
ExternalModulesHandler.instance().registerHeadProvider(new HUDHandlerVanilla(), redstone);
|
||||
ExternalModulesHandler.instance().registerBodyProvider(new HUDHandlerVanilla(), redstone);
|
||||
ExternalModulesHandler.instance().registerBodyProvider(new HUDHandlerVanilla(), jukebox);
|
||||
ExternalModulesHandler.instance().registerBodyProvider(new HUDHandlerVanilla(), cocoa);
|
||||
ExternalModulesHandler.instance().registerBodyProvider(new HUDHandlerVanilla(), netherwart);
|
||||
ExternalModulesHandler.instance().addConfigRemote("VanillaMC", "vanilla.jukebox");
|
||||
|
||||
IWailaDataProvider provider = new HUDHandlerVanilla();
|
||||
|
||||
ExternalModulesHandler.instance().registerStackProvider(provider, silverfish);
|
||||
ExternalModulesHandler.instance().registerHeadProvider(provider, mobSpawnerID);
|
||||
ExternalModulesHandler.instance().registerBodyProvider(provider, cropsID);
|
||||
ExternalModulesHandler.instance().registerBodyProvider(provider, melonStemID);
|
||||
ExternalModulesHandler.instance().registerBodyProvider(provider, pumpkinStemID);
|
||||
ExternalModulesHandler.instance().registerBodyProvider(provider, carrotID);
|
||||
ExternalModulesHandler.instance().registerBodyProvider(provider, potatoID);
|
||||
ExternalModulesHandler.instance().registerBodyProvider(provider, leverID);
|
||||
ExternalModulesHandler.instance().registerBodyProvider(provider, repeaterIdle);
|
||||
ExternalModulesHandler.instance().registerBodyProvider(provider, repeaterActv);
|
||||
ExternalModulesHandler.instance().registerBodyProvider(provider, comparatorIdl);
|
||||
ExternalModulesHandler.instance().registerBodyProvider(provider, comparatorAct);
|
||||
ExternalModulesHandler.instance().registerHeadProvider(provider, redstone);
|
||||
ExternalModulesHandler.instance().registerBodyProvider(provider, redstone);
|
||||
ExternalModulesHandler.instance().registerBodyProvider(provider, jukebox);
|
||||
ExternalModulesHandler.instance().registerBodyProvider(provider, cocoa);
|
||||
ExternalModulesHandler.instance().registerBodyProvider(provider, netherwart);
|
||||
|
||||
ExternalModulesHandler.instance().registerDocTextFile("/mcp/mobius/waila/addons/vanillamc/WikiData.csv");
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
|
||||
public interface IWailaDataAccessor {
|
||||
World getWorld();
|
||||
@@ -20,4 +21,5 @@ public interface IWailaDataAccessor {
|
||||
NBTTagCompound getNBTData();
|
||||
int getNBTInteger(NBTTagCompound tag, String keyname);
|
||||
double getPartialFrame();
|
||||
ForgeDirection getSide();
|
||||
}
|
||||
@@ -8,9 +8,12 @@ import mcp.mobius.waila.addons.buildcraft.BCPowerAPIModule;
|
||||
import mcp.mobius.waila.addons.enderio.EnderIOModule;
|
||||
import mcp.mobius.waila.addons.enderstorage.EnderStorageModule;
|
||||
import mcp.mobius.waila.addons.etb.ETBModule;
|
||||
import mcp.mobius.waila.addons.exu.ExtraUtilitiesModule;
|
||||
import mcp.mobius.waila.addons.gravestone.GravestoneModule;
|
||||
import mcp.mobius.waila.addons.ic2.IC2Module;
|
||||
import mcp.mobius.waila.addons.openblocks.OpenBlocksModule;
|
||||
import mcp.mobius.waila.addons.projectred.ProjectRedModule;
|
||||
import mcp.mobius.waila.addons.railcraft.RailcraftModule;
|
||||
import mcp.mobius.waila.addons.thaumcraft.ThaumcraftModule;
|
||||
import mcp.mobius.waila.addons.thermalexpansion.ThermalExpansionModule;
|
||||
import mcp.mobius.waila.addons.twilightforest.TwilightForestModule;
|
||||
@@ -71,10 +74,9 @@ public class ProxyClient extends ProxyServer {
|
||||
//API.addKeyBind(Constants.BIND_TECH, "Display techtree", Keyboard.KEY_RSHIFT);
|
||||
|
||||
ExternalModulesHandler.instance().registerShortDataProvider(new SummaryProviderDefault(), Item.class);
|
||||
|
||||
this.registerMods();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerMods(){
|
||||
|
||||
HUDHandlerVanilla.register();
|
||||
@@ -116,7 +118,16 @@ public class ProxyClient extends ProxyServer {
|
||||
BCPowerAPIModule.register();
|
||||
|
||||
/* ProjectRed API */
|
||||
ProjectRedModule.register();
|
||||
ProjectRedModule.register();
|
||||
|
||||
/* ExtraUtilities */
|
||||
ExtraUtilitiesModule.register();
|
||||
|
||||
/* OpenBlocks */
|
||||
OpenBlocksModule.register();
|
||||
|
||||
/* Railcraft */
|
||||
RailcraftModule.register();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -13,6 +13,7 @@ import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import mcp.mobius.waila.api.IWailaDataAccessor;
|
||||
|
||||
public class DataAccessor implements IWailaDataAccessor {
|
||||
@@ -141,4 +142,24 @@ public class DataAccessor implements IWailaDataAccessor {
|
||||
return this.partialFrame;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ForgeDirection getSide(){
|
||||
int side = this.getPosition().sideHit;
|
||||
switch (side){
|
||||
case 0:
|
||||
return ForgeDirection.DOWN;
|
||||
case 1:
|
||||
return ForgeDirection.UP;
|
||||
case 2:
|
||||
return ForgeDirection.EAST;
|
||||
case 3:
|
||||
return ForgeDirection.WEST;
|
||||
case 4:
|
||||
return ForgeDirection.NORTH;
|
||||
case 5:
|
||||
return ForgeDirection.SOUTH;
|
||||
}
|
||||
return ForgeDirection.UNKNOWN;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -7,6 +7,9 @@ import java.util.Set;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.google.common.eventbus.EventBus;
|
||||
import com.google.common.eventbus.Subscribe;
|
||||
|
||||
import mcp.mobius.waila.addons.ConfigHandler;
|
||||
import mcp.mobius.waila.addons.ExternalModulesHandler;
|
||||
import mcp.mobius.waila.api.IWailaRegistrar;
|
||||
@@ -27,8 +30,11 @@ import codechicken.core.CommonUtils;
|
||||
import codechicken.lib.lang.LangUtil;
|
||||
import cpw.mods.fml.client.registry.KeyBindingRegistry;
|
||||
import cpw.mods.fml.client.registry.KeyBindingRegistry.KeyHandler;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.common.FMLModContainer;
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import cpw.mods.fml.common.Mod;
|
||||
import cpw.mods.fml.common.Mod.EventHandler;
|
||||
import cpw.mods.fml.common.Mod.IMCCallback;
|
||||
import cpw.mods.fml.common.Mod.Init;
|
||||
import cpw.mods.fml.common.Mod.Instance;
|
||||
@@ -39,6 +45,7 @@ import cpw.mods.fml.common.SidedProxy;
|
||||
import cpw.mods.fml.common.event.FMLInitializationEvent;
|
||||
import cpw.mods.fml.common.event.FMLInterModComms;
|
||||
import cpw.mods.fml.common.event.FMLInterModComms.IMCMessage;
|
||||
import cpw.mods.fml.common.event.FMLLoadCompleteEvent;
|
||||
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
|
||||
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
||||
import cpw.mods.fml.common.network.NetworkMod;
|
||||
@@ -46,7 +53,7 @@ import cpw.mods.fml.common.registry.GameData;
|
||||
import cpw.mods.fml.common.registry.ItemData;
|
||||
import cpw.mods.fml.common.registry.LanguageRegistry;
|
||||
|
||||
@Mod(modid="Waila", name="Waila", version="1.4.1")
|
||||
@Mod(modid="Waila", name="Waila", version="1.4.4", dependencies="required-after:NotEnoughItems")
|
||||
@NetworkMod(channels = {"Waila"},clientSideRequired=false, serverSideRequired=false, connectionHandler = WailaConnectionHandler.class,
|
||||
packetHandler = WailaPacketHandler.class, versionBounds="[1.3.0,)")
|
||||
|
||||
@@ -71,8 +78,9 @@ public class mod_Waila {
|
||||
public static int fontcolor;
|
||||
public static float scale;
|
||||
|
||||
@PreInit
|
||||
public void preInit(FMLPreInitializationEvent event) {
|
||||
/* INIT SEQUENCE */
|
||||
@EventHandler
|
||||
public void preInit(FMLPreInitializationEvent event) {
|
||||
config = new Configuration(event.getSuggestedConfigurationFile());
|
||||
|
||||
config.get(Configuration.CATEGORY_GENERAL, Constants.CFG_WAILA_SHOW, true);
|
||||
@@ -100,14 +108,20 @@ public class mod_Waila {
|
||||
MinecraftForge.EVENT_BUS.register(new WailaClientEventHandler());
|
||||
}
|
||||
|
||||
@Init
|
||||
public void load(FMLInitializationEvent event) {
|
||||
proxy.registerHandlers();
|
||||
@EventHandler
|
||||
public void initialize(FMLInitializationEvent event) {
|
||||
try {
|
||||
Field eBus = FMLModContainer.class.getDeclaredField("eventBus");
|
||||
eBus.setAccessible(true);
|
||||
EventBus FMLbus = (EventBus) eBus.get(FMLCommonHandler.instance().findContainerFor(this));
|
||||
FMLbus.register(this);
|
||||
} catch (Throwable t) {}
|
||||
}
|
||||
|
||||
@PostInit
|
||||
public void postInit(FMLPostInitializationEvent event) {
|
||||
ModIdentification.init();
|
||||
@EventHandler
|
||||
public void postInit(FMLPostInitializationEvent event) {
|
||||
proxy.registerHandlers();
|
||||
ModIdentification.init();
|
||||
|
||||
if (ConfigHandler.instance().getConfig(Constants.CFG_WAILA_KEYBIND)){
|
||||
|
||||
@@ -144,6 +158,11 @@ public class mod_Waila {
|
||||
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
public void loadComplete(FMLLoadCompleteEvent event) {
|
||||
proxy.registerMods();
|
||||
}
|
||||
|
||||
@IMCCallback
|
||||
public void processIMC(FMLInterModComms.IMCEvent event)
|
||||
{
|
||||
|
||||
@@ -20,8 +20,6 @@ import java.awt.Point;
|
||||
import mcp.mobius.waila.Constants;
|
||||
import mcp.mobius.waila.mod_Waila;
|
||||
import mcp.mobius.waila.addons.ConfigHandler;
|
||||
import mcp.mobius.waila.addons.ExternalModulesHandler;
|
||||
import mcp.mobius.waila.gui.truetyper.FontHelper;
|
||||
import mcp.mobius.waila.gui.truetyper.TrueTypeFont;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.RenderHelper;
|
||||
@@ -111,7 +109,7 @@ public class OverlayRenderer {
|
||||
|
||||
public static void renderOverlay(ItemStack stack, List<String> textData, Point pos)
|
||||
{
|
||||
TrueTypeFont font = (TrueTypeFont)mod_Waila.instance.proxy.getFont();
|
||||
TrueTypeFont font = (TrueTypeFont)mod_Waila.proxy.getFont();
|
||||
|
||||
GL11.glPushMatrix();
|
||||
|
||||
|
||||
@@ -79,7 +79,7 @@ public class RayTracing {
|
||||
int y = raytracedTarget.blockY;
|
||||
int z = raytracedTarget.blockZ;
|
||||
Block mouseoverBlock = Block.blocksList[world.getBlockId(x, y, z)];
|
||||
|
||||
if (mouseoverBlock == null) return items;
|
||||
|
||||
ArrayList<IHighlightHandler> handlers = new ArrayList<IHighlightHandler>();
|
||||
if(ItemInfo.highlightIdentifiers.get(0) != null)
|
||||
@@ -123,6 +123,9 @@ public class RayTracing {
|
||||
}
|
||||
catch(Exception e){}
|
||||
|
||||
if(items.size() > 0)
|
||||
return items;
|
||||
|
||||
if(mouseoverBlock instanceof IShearable)
|
||||
{
|
||||
IShearable shearable = (IShearable)mouseoverBlock;
|
||||
|
||||
@@ -5,6 +5,7 @@ public class ProxyServer {
|
||||
public ProxyServer() {}
|
||||
|
||||
public void registerHandlers(){}
|
||||
public void registerMods(){}
|
||||
|
||||
public Object getFont(){return null;}
|
||||
}
|
||||
Reference in new issue
Block a user