本文整理汇总了Java中mcp.mobius.waila.api.IWailaEntityAccessor类的典型用法代码示例。如果您正苦于以下问题:Java IWailaEntityAccessor类的具体用法?Java IWailaEntityAccessor怎么用?Java IWailaEntityAccessor使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IWailaEntityAccessor类属于mcp.mobius.waila.api包,在下文中一共展示了IWailaEntityAccessor类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: getWailaTail
import mcp.mobius.waila.api.IWailaEntityAccessor; //导入依赖的package包/类
@Override
public List<String> getWailaTail(Entity paramEntity, List<String> strings, IWailaEntityAccessor data, IWailaConfigHandler config) {
if(data.getEntity() instanceof EntityGolemBase) {
AdditionalGolemType type = GadomancyApi.getAdditionalGolemType(((EntityGolemBase) data.getEntity()).getGolemType());
if(type != null && strings.size() > 0) {
String oldMod = strings.get(strings.size() - 1);
ModContainer container = Loader.instance().getIndexedModList().get(type.getModId());
if(container != null) {
String mod = ColorHelper.extractColors(oldMod) + container.getName();
strings.remove(strings.size() - 1);
strings.add(mod);
}
}
}
return strings;
}
开发者ID:makeoo,项目名称:Gadomancy,代码行数:19,代码来源:AdvancedGolemProvider.java
示例2: getWailaBody
import mcp.mobius.waila.api.IWailaEntityAccessor; //导入依赖的package包/类
@Override
public List<String> getWailaBody(Entity entity, List<String> currenttip, IWailaEntityAccessor accessor, IWailaConfigHandler config) {
Entity currentEntity = accessor.getEntity();
Class currentEntityClass = currentEntity.getClass();
if (EntityList.classToStringMapping.containsKey(currentEntityClass)) {
NBTTagCompound n = accessor.getNBTData();
//LogHelper.info(n.toString());
EntityPlayer player = accessor.getPlayer();
ItemStack holdItemReal = player.getHeldItem();
String holdItemNameReal = "";
if (holdItemReal != null) {
holdItemNameReal = Item.itemRegistry.getNameForObject(holdItemReal.getItem());
}
NBTHandler.flag=1;
NBTHandler.id= EntityList.getEntityString(currentEntity);
//currenttip.add(NBTHandler.id);
List<String> tips = NBTHandler.getTipsFromNBT(n, holdItemNameReal);
currenttip.addAll(tips);
}
return currenttip;
}
开发者ID:exzhawk,项目名称:wailanbt,代码行数:22,代码来源:EntityHandler.java
示例3: getWailaBody
import mcp.mobius.waila.api.IWailaEntityAccessor; //导入依赖的package包/类
@Override
public List<String> getWailaBody(Entity entity, List<String> currenttip, IWailaEntityAccessor accessor, IWailaConfigHandler config) {
String name = ENTRY_MAP.get(entity.getClass());
if(name == null) {
name = EntityRegistry.getEntry(entity.getClass()).getName();
ENTRY_MAP.put(entity.getClass(), name);
}
String locKey = "entity." + EnderZoo.MODID + "." + name + ".desc.";
String loc = null;
for (int line = 1; !(loc = EnderZoo.proxy.translate(locKey + line)).equals(locKey + line); line++) {
currenttip.add(loc);
}
return currenttip;
}
开发者ID:SleepyTrousers,项目名称:EnderZoo,代码行数:17,代码来源:WailaCompat.java
示例4: getWailaBody
import mcp.mobius.waila.api.IWailaEntityAccessor; //导入依赖的package包/类
@Override
public List<String> getWailaBody(Entity entity, List<String> currenttip, IWailaEntityAccessor accessor, IWailaConfigHandler config) {
if (!(entity instanceof EntityFrienderman)) {
return currenttip;
}
EntityFrienderman friend = (EntityFrienderman) entity;
NBTTagCompound nbt = friend.getEntityData();
String owner = "";
boolean isTame = friend.isTamed();
currenttip.add(WAILA.toolTipEnclose);
if (isTame) {
UUID ownerUUID = friend.getOwnerId();
if (MCUtils.isSMP(FMLCommonHandler.instance().getMinecraftServerInstance())) {
owner = PlayerUUIDUtils.getPlayerName(ownerUUID);
if (owner == "") {
owner = "404 Error: Name not found!";
}
}
else {
owner = accessor.getPlayer().getName();
}
currenttip.add("Owner: " + owner);
currenttip.add("Mode: " + (friend.isSitting() ? "Idle" : "Following/Defending"));
if (friend.isHoldingChest() && accessor == friend.getOwner()) {
currenttip.add("Sneak+Right-Click to take chest");
}
}
else {
currenttip.add("Right-click with Frienderpearl to tame");
currenttip.add(nbt.getString("OwnerUUID"));
}
currenttip.add(WAILA.toolTipEnclose);
return currenttip;
}
开发者ID:p455w0rd,项目名称:EndermanEvolution,代码行数:36,代码来源:WAILAProviderFrienderman.java
示例5: getWailaBody
import mcp.mobius.waila.api.IWailaEntityAccessor; //导入依赖的package包/类
@Override
public List<String> getWailaBody(Entity entity, List<String> currenttip, IWailaEntityAccessor accessor,
IWailaConfigHandler config)
{
if (entity instanceof EntityMinecartEnergyHandlerTEBase) {
EntityMinecartEnergyHandlerTEBase energyHandlerTEBase = (EntityMinecartEnergyHandlerTEBase) entity;
currenttip.add(String.format("%d / %d RF", energyHandlerTEBase.getEnergyStored(null),
energyHandlerTEBase.getMaxEnergyStored(null)));
}
return currenttip;
}
开发者ID:BrassGoggledCoders,项目名称:MoarCarts,代码行数:13,代码来源:EntityMinecartRFProvider.java
示例6: getWailaBody
import mcp.mobius.waila.api.IWailaEntityAccessor; //导入依赖的package包/类
@Override
public List<String> getWailaBody(Entity entity, List<String> currenttip, IWailaEntityAccessor accessor, IWailaConfigHandler config) {
NBTTagCompound n = accessor.getNBTData();
if (n != null) {
currenttip.addAll(JSHandler.getBody(ConfigHandler.entityPattern, n, EntityList.getEntityString(accessor.getEntity()), accessor.getPlayer()));
}
return currenttip;
}
开发者ID:exzhawk,项目名称:OmniOcular,代码行数:9,代码来源:EntityHandler.java
示例7: getWailaBody
import mcp.mobius.waila.api.IWailaEntityAccessor; //导入依赖的package包/类
public List<String> getWailaBody(Entity entity, List<String> currenttip, IWailaEntityAccessor accessor, IWailaConfigHandler configHandler) {
if (entity.getExtendedProperties(CartLivery.EXT_PROP_NAME) != null) {
CartLivery livery = (CartLivery) entity.getExtendedProperties(CartLivery.EXT_PROP_NAME);
LiveryTextureInfo info = LiveryTextureRegistry.map.get(livery.pattern);
if (configHandler.getConfig("cartlivery.showPattern")) {
if (!livery.pattern.isEmpty()) {
if (info == null) {
currenttip.add(String.format("\u00a7m%s", livery.pattern));
} else {
if (configHandler.getConfig("cartlivery.showResPack")) {
currenttip.add(String.format("%s (%s)", I18n.format("cartlivery." + livery.pattern + ".name"), info.packName));
} else {
currenttip.add(I18n.format("cartlivery." + livery.pattern + ".name"));
}
}
}
}
if (configHandler.getConfig("cartlivery.showColors")) {
if (!livery.pattern.isEmpty()) {
currenttip.add(String.format("%s / %s", ColorUtils.getColorName(livery.baseColor), ColorUtils.getColorName(livery.patternColor)));
} else {
currenttip.add(ColorUtils.getColorName(livery.baseColor));
}
}
}
return currenttip;
}
开发者ID:octarine-noise,项目名称:CartLivery,代码行数:30,代码来源:CartLiveryProvider.java
示例8: getWailaBody
import mcp.mobius.waila.api.IWailaEntityAccessor; //导入依赖的package包/类
@Nonnull
@Override
public List<String> getWailaBody(Entity entity, List<String> currenttip, IWailaEntityAccessor accessor, IWailaConfigHandler config) {
addTipToEntity(currenttip, accessor);
return currenttip;
}
开发者ID:TeamPneumatic,项目名称:pnc-repressurized,代码行数:7,代码来源:WailaEntityHandler.java
示例9: addTipToEntity
import mcp.mobius.waila.api.IWailaEntityAccessor; //导入依赖的package包/类
private static void addTipToEntity(List<String> currenttip, IWailaEntityAccessor accessor) {
if (accessor.getEntity() instanceof IPressurizable) {
float pressure = accessor.getNBTData().getFloat("Pressure");
currenttip.add("Pressure: " + TextFormatting.WHITE + PneumaticCraftUtils.roundNumberTo(pressure, 1) + " bar");
}
}
开发者ID:TeamPneumatic,项目名称:pnc-repressurized,代码行数:7,代码来源:WailaEntityHandler.java
示例10: getWailaOverride
import mcp.mobius.waila.api.IWailaEntityAccessor; //导入依赖的package包/类
@Override
public Entity getWailaOverride(IWailaEntityAccessor accessor, IWailaConfigHandler config) {
return null;
}
开发者ID:p455w0rd,项目名称:EndermanEvolution,代码行数:5,代码来源:WAILAProviderFrienderman.java
示例11: getWailaHead
import mcp.mobius.waila.api.IWailaEntityAccessor; //导入依赖的package包/类
@Override
public List<String> getWailaHead(Entity entity, List<String> currenttip, IWailaEntityAccessor accessor, IWailaConfigHandler config) {
return null;
}
开发者ID:p455w0rd,项目名称:EndermanEvolution,代码行数:5,代码来源:WAILAProviderFrienderman.java
示例12: getWailaTail
import mcp.mobius.waila.api.IWailaEntityAccessor; //导入依赖的package包/类
@Override
public List<String> getWailaTail(Entity entity, List<String> currenttip, IWailaEntityAccessor accessor, IWailaConfigHandler config) {
return null;
}
开发者ID:p455w0rd,项目名称:EndermanEvolution,代码行数:5,代码来源:WAILAProviderFrienderman.java
示例13: getWailaOverride
import mcp.mobius.waila.api.IWailaEntityAccessor; //导入依赖的package包/类
@Override
public Entity getWailaOverride(IWailaEntityAccessor accessor, IWailaConfigHandler config)
{
return null;
}
开发者ID:BrassGoggledCoders,项目名称:MoarCarts,代码行数:6,代码来源:EntityMinecartTEBaseProvider.java
示例14: getWailaHead
import mcp.mobius.waila.api.IWailaEntityAccessor; //导入依赖的package包/类
@Override
public List<String> getWailaHead(Entity entity, List<String> currenttip, IWailaEntityAccessor accessor,
IWailaConfigHandler config)
{
return currenttip;
}
开发者ID:BrassGoggledCoders,项目名称:MoarCarts,代码行数:7,代码来源:EntityMinecartTEBaseProvider.java
示例15: getWailaBody
import mcp.mobius.waila.api.IWailaEntityAccessor; //导入依赖的package包/类
@Override
public List<String> getWailaBody(Entity entity, List<String> currenttip, IWailaEntityAccessor accessor,
IWailaConfigHandler config)
{
return currenttip;
}
开发者ID:BrassGoggledCoders,项目名称:MoarCarts,代码行数:7,代码来源:EntityMinecartTEBaseProvider.java
示例16: getWailaTail
import mcp.mobius.waila.api.IWailaEntityAccessor; //导入依赖的package包/类
@Override
public List<String> getWailaTail(Entity entity, List<String> currenttip, IWailaEntityAccessor accessor,
IWailaConfigHandler config)
{
return currenttip;
}
开发者ID:BrassGoggledCoders,项目名称:MoarCarts,代码行数:7,代码来源:EntityMinecartTEBaseProvider.java
示例17: getWailaOverride
import mcp.mobius.waila.api.IWailaEntityAccessor; //导入依赖的package包/类
@Override
public Entity getWailaOverride(IWailaEntityAccessor accessor, IWailaConfigHandler config) {
return null;
}
开发者ID:Lomeli12,项目名称:WIIEMC,代码行数:5,代码来源:EntityEMCDataProvider.java
示例18: getWailaHead
import mcp.mobius.waila.api.IWailaEntityAccessor; //导入依赖的package包/类
@Override
public List<String> getWailaHead(Entity entity, List<String> tooltip, IWailaEntityAccessor accessor, IWailaConfigHandler config) {
return tooltip;
}
开发者ID:Lomeli12,项目名称:WIIEMC,代码行数:5,代码来源:EntityEMCDataProvider.java
示例19: getWailaTail
import mcp.mobius.waila.api.IWailaEntityAccessor; //导入依赖的package包/类
@Override
public List<String> getWailaTail(Entity entity, List<String> tooltip, IWailaEntityAccessor accessor, IWailaConfigHandler config) {
return tooltip;
}
开发者ID:Lomeli12,项目名称:WIIEMC,代码行数:5,代码来源:EntityEMCDataProvider.java
示例20: getWailaBody
import mcp.mobius.waila.api.IWailaEntityAccessor; //导入依赖的package包/类
@Override
public List<String> getWailaBody(Entity entity, List<String> tooltip, IWailaEntityAccessor accessor, IWailaConfigHandler config) {
if (!ModConfig.ee3Entity)
return tooltip;
EntityPlayer player = accessor.getPlayer();
if (entity != null && player != null) {
EnergyValue entityValue = null;
EnergyValue itemEnergy = null;
ItemStack entityItem = null;
if (entity instanceof EntityPainting)
entityValue = EnergyValueRegistryProxy.getEnergyValue(entityItem = new ItemStack(Items.painting));
else if (entity instanceof EntityItemFrame) {
entityValue = EnergyValueRegistryProxy.getEnergyValue(entityItem = new ItemStack(Items.item_frame));
if (ModConfig.showItemFrameEMC) {
ItemStack stack = ((EntityItemFrame) entity).getDisplayedItem();
if (stack != null && stack.getItem() != null && EnergyValueRegistryProxy.hasEnergyValue(stack))
itemEnergy = EnergyValueRegistryProxy.getEnergyValue(stack);
}
} else if (entity instanceof EntityMinecart) {
if (entity instanceof EntityMinecartChest)
entityValue = EnergyValueRegistryProxy.getEnergyValue(entityItem = new ItemStack(Items.chest_minecart));
else if (entity instanceof EntityMinecartFurnace)
entityValue = EnergyValueRegistryProxy.getEnergyValue(entityItem = new ItemStack(Items.furnace_minecart));
else if (entity instanceof EntityMinecartTNT)
entityValue = EnergyValueRegistryProxy.getEnergyValue(entityItem = new ItemStack(Items.tnt_minecart));
else if (entity instanceof EntityMinecartHopper)
entityValue = EnergyValueRegistryProxy.getEnergyValue(entityItem = new ItemStack(Items.hopper_minecart));
else if (entity instanceof EntityMinecartEmpty)
entityValue = EnergyValueRegistryProxy.getEnergyValue(entityItem = new ItemStack(Items.minecart));
} else if (entity instanceof EntityBoat)
entityValue = EnergyValueRegistryProxy.getEnergyValue(entityItem = new ItemStack(Items.boat));
if (entityItem != null) {
boolean isKnown = WIIEMC.proxy.doesPlayerKnow(entityItem);
boolean canBeLearned = WIIEMC.proxy.canPlayerLearn(entityItem);
if (entityValue != null && entityValue.getValue() > 0f) {
if (ModConfig.showEMC) {
String tip = StatCollector.translateToLocal(ModLang.ENERGY_VALUE_EE3);
String energy = energyValueDecimalFormat.format(entityValue.getValue());
tooltip.add(String.format(tip, energy));
}
if (itemEnergy != null && ModConfig.showItemFrameEMC) {
String itemTip = StatCollector.translateToLocal(ModLang.ITEMFRAME_ITEM_ENERGY_EE3);
String itemValue = energyValueDecimalFormat.format(itemEnergy.getValue());
tooltip.add(String.format(itemTip, itemValue));
}
} else {
if (ModConfig.showNoEMC)
tooltip.add(StatCollector.translateToLocal(ModLang.NO_ENERGY_EE3));
}
if (canBeLearned) {
if (ModConfig.showCanLearn)
tooltip.add(StatCollector.translateToLocal(ModLang.UNKNOWN));
} else {
if (isKnown && ModConfig.showIsLearned)
tooltip.add(StatCollector.translateToLocal(ModLang.IS_KNOWN));
else if (ModConfig.showCantLearn)
tooltip.add(StatCollector.translateToLocal(ModLang.NOT_LEARNABLE));
}
}
}
return tooltip;
}
开发者ID:Lomeli12,项目名称:WIIEMC,代码行数:65,代码来源:EntityEMCDataProvider.java
注:本文中的mcp.mobius.waila.api.IWailaEntityAccessor类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论