本文整理汇总了Java中com.spacechase0.minecraft.spacecore.util.TranslateUtils.translate方法的典型用法代码示例。如果您正苦于以下问题:Java TranslateUtils.translate方法的具体用法?Java TranslateUtils.translate怎么用?Java TranslateUtils.translate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.spacechase0.minecraft.spacecore.util.TranslateUtils
的用法示例。
在下文中一共展示了TranslateUtils.translate方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: updateTextureButton
import com.spacechase0.minecraft.spacecore.util.TranslateUtils; //导入方法依赖的package包/类
private void updateTextureButton( boolean initial )
{
if ( initial )
{
int tex = pet.getPetType().textures.indexOf( pet.getTexture() );
if ( tex == -1 )
{
tex = 0;
}
currTexIndex = tex;
}
String full = pet.getTexture();
String file = full.substring( full.lastIndexOf( '/' ) + 1 );
String filename = file.substring( 0, file.lastIndexOf( '.' ) );
texButton.displayString = TranslateUtils.translate( TranslateUtils.translate( "pet.texture" ), TranslateUtils.translate( "pet.texture." + pet.getPetType().name + "." + filename ) );
}
示例2: getItemStackDisplayName
import com.spacechase0.minecraft.spacecore.util.TranslateUtils; //导入方法依赖的package包/类
@Override
public String getItemStackDisplayName( ItemStack stack )
{
ItemStack dummy = getDummyFor( stack );
Modifier mod = Modifier.getModifier( stack.getTagCompound().getString( "Modifier" ) );
if ( mod == null )
{
return TranslateUtils.translate( getUnlocalizedName() + ".name", stack.getTagCompound().getString( "Modifier" ) + "?" );
}
return TranslateUtils.translate( getUnlocalizedName() + ".name", mod.getName( dummy ) );
}
示例3: drawScreen
import com.spacechase0.minecraft.spacecore.util.TranslateUtils; //导入方法依赖的package包/类
@Override
public void drawScreen( int mx, int my, float par3 )
{
drawDefaultBackground();
String str = TranslateUtils.translate( "gui.pet.tracking" );
GL11.glPushMatrix();
GL11.glTranslatef( width / 2 - fontRendererObj.getStringWidth( str ), 10, 0 );
GL11.glScalef( 2.f, 2.f, 2.f );
ClientUtils.drawString( str, 0, 0, WHITE );
GL11.glPopMatrix();
if ( data == null )
{
return;
}
Iterator< Entry< UUID, PetData > > it = data.entrySet().iterator();
for ( int i = 0; it.hasNext(); ++i )
{
Entry< UUID, PetData > entry = it.next();
UUID id = entry.getKey();
PetData pet = entry.getValue();
int y = 50 + ( i * 16 );
ClientUtils.drawString( TranslateUtils.translate( pet.name ), 50, y, WHITE );
ClientUtils.drawString( TranslateUtils.translate( "gui.pet.tracking.level", pet.level ), 130, y, WHITE );
ClientUtils.drawString( TranslateUtils.translate( "gui.pet.tracking.dim", pet.dim ), 200, y, WHITE );
ClientUtils.drawString( TranslateUtils.translate( "gui.pet.tracking.pos", pet.pos.x, pet.pos.y, pet.pos.z ), 275, y, WHITE );
}
}
示例4: getName
import com.spacechase0.minecraft.spacecore.util.TranslateUtils; //导入方法依赖的package包/类
@Override
public String getName( ItemStack stack )
{
EquipmentItem item = ( EquipmentItem ) stack.getItem();
if ( ender )
{
return TranslateUtils.translate( "componentequipment:modifier.enderBackpack.name" );
}
else
{
return TranslateUtils.translate( "componentequipment:modifier.chestBackpack.name" ) + " " + TranslateUtils.translate( "enchantment.level." + item.equipment.getModifierLevel( stack, type ) );
}
}
示例5: addInformation
import com.spacechase0.minecraft.spacecore.util.TranslateUtils; //导入方法依赖的package包/类
@Override
public void addInformation( ItemStack stack, EntityPlayer player, List list, boolean par4 )
{
if ( stack.getTagCompound() == null ) return;
NBTTagCompound pet = stack.getTagCompound().getCompoundTag( "Pet" );
if ( player.capabilities.isCreativeMode )
{
list.add( TranslateUtils.translate( "item.domesticEgg.tooltip.creative" ) );
list.add( "" );
}
if ( !pet.hasKey( "Type" ) )
{
list.add( TranslateUtils.translate( "item.domesticEgg.tooltip.holding", "n/a" ) );
return;
}
String type = pet.getString( "Type" );
String typeStr = TranslateUtils.translate( "entity.pet." + type );
list.add( TranslateUtils.translate( "item.domesticEgg.tooltip.holding", typeStr ) );
if ( pet.hasKey( "CustomName" ) )
{
list.add( TranslateUtils.translate( "item.domesticEgg.tooltip.name", pet.getString( "CustomName" ) ) );
}
list.add( TranslateUtils.translate( "item.domesticEgg.tooltip.level", pet.getInteger( "Level" ) ) );
}
示例6: addInformation
import com.spacechase0.minecraft.spacecore.util.TranslateUtils; //导入方法依赖的package包/类
@Override
public void addInformation( ItemStack stack, EntityPlayer player, List list, boolean par4 )
{
if ( stack == null || stack.getTagCompound() == null )
{
return;
}
NBTTagCompound tag = stack.getTagCompound();
String[] parts = equipment.getBaseData( type ).getParts();
for ( int i = 0; i < parts.length; ++i )
{
String part = parts[ i ];
if ( part.equals( "head" ) )
{
part = type + "Head";
}
else if ( part.endsWith( "Left" ) )
{
part = part.substring( 0, part.indexOf( "Left" ) );
}
else if ( part.endsWith( "Right" ) )
{
part = part.substring( 0, part.indexOf( "Right" ) );
}
String matRaw = tag.getString( parts[ i ] );
MaterialData matObj = Material.getData( matRaw );
String title = TranslateUtils.translate( "componentequipment:part." + part );
String mat = TranslateUtils.translate( "componentequipment:material." + matRaw );
list.add( TranslateUtils.translate( "item.equipment.tooltip.part", title, matObj.getFormat() + mat ) );
if ( equipment.getCasing( stack, parts[ i ] ) != null )
{
matRaw = equipment.getCasing( stack, parts[ i ] );
matObj = Material.getData( matRaw );
mat = TranslateUtils.translate( "componentequipment:material." + matRaw );
list.add( " " + TranslateUtils.translate( "item.equipment.tooltip.partCasing", matObj.getFormat() + mat ) );
}
}
list.add( "" );
list.add( TranslateUtils.translate( "item.equipment.tooltip.modifiers" ) );
List< String > mods = equipment.getModifiers( stack );
Iterator< String > it = mods.iterator();
while ( it.hasNext() )
{
String modStr = it.next();
Modifier mod = Modifier.getModifier( modStr );
String name = ( mod != null ) ? mod.getName( stack ) : ( "\"" + modStr + "\"?" );
list.add( " - " + mod.getFormat( stack ) + name );
mod.addInformation( stack, list );
}
list.add( " " + TranslateUtils.translate( "item.equipment.tooltip.remaining", equipment.getModifiersRemaining( stack ) ) );
}
示例7: getName
import com.spacechase0.minecraft.spacecore.util.TranslateUtils; //导入方法依赖的package包/类
@Override
public String getName( ItemStack stack )
{
EquipmentItem item = ( EquipmentItem ) stack.getItem();
return TranslateUtils.translate( "componentequipment:modifier.cheapRepair.name" ) + " " + TranslateUtils.translate( "enchantment.level." + item.equipment.getModifierLevel( stack, type ) );
}
示例8: getName
import com.spacechase0.minecraft.spacecore.util.TranslateUtils; //导入方法依赖的package包/类
@Override
public String getName( ItemStack stack )
{
EquipmentItem item = ( EquipmentItem ) stack.getItem();
return TranslateUtils.translate( "componentequipment:modifier.waterWalk.name" ) + " " + TranslateUtils.translate( "enchantment.level." + item.equipment.getModifierLevel( stack, type ) );
}
示例9: getName
import com.spacechase0.minecraft.spacecore.util.TranslateUtils; //导入方法依赖的package包/类
@Override
public String getName( ItemStack stack )
{
EquipmentItem item = ( EquipmentItem ) stack.getItem();
return TranslateUtils.translate( "componentequipment:modifier.selfRepair.name" ) + " " + TranslateUtils.translate( "enchantment.level." + item.equipment.getModifierLevel( stack, type ) );
}
示例10: getName
import com.spacechase0.minecraft.spacecore.util.TranslateUtils; //导入方法依赖的package包/类
@Override
public String getName( ItemStack stack )
{
return TranslateUtils.translate( "componentequipment:modifier." + type + ".name" );
}
示例11: getName
import com.spacechase0.minecraft.spacecore.util.TranslateUtils; //导入方法依赖的package包/类
@Override
public String getName( ItemStack stack )
{
EquipmentItem item = ( EquipmentItem ) stack.getItem();
return TranslateUtils.translate( "componentequipment:modifier.lifeSteal.name" ) + " " + TranslateUtils.translate( "enchantment.level." + item.equipment.getModifierLevel( stack, type ) );
}
示例12: getName
import com.spacechase0.minecraft.spacecore.util.TranslateUtils; //导入方法依赖的package包/类
@Override
public String getName( ItemStack stack )
{
EquipmentItem item = ( EquipmentItem ) stack.getItem();
return TranslateUtils.translate( "componentequipment:modifier." + type + ".name" ) + " " + TranslateUtils.translate( "enchantment.level." + item.equipment.getModifierLevel( stack, type ) );
}
示例13: getName
import com.spacechase0.minecraft.spacecore.util.TranslateUtils; //导入方法依赖的package包/类
@Override
public String getName( ItemStack stack )
{
return TranslateUtils.translate( "componentequipment:modifier.persistance.name" );
}
示例14: getName
import com.spacechase0.minecraft.spacecore.util.TranslateUtils; //导入方法依赖的package包/类
@Override
public String getName( ItemStack stack )
{
EquipmentItem item = ( EquipmentItem ) stack.getItem();
return TranslateUtils.translate( "componentequipment:modifier.walkSlope.name" );
}
示例15: getName
import com.spacechase0.minecraft.spacecore.util.TranslateUtils; //导入方法依赖的package包/类
@Override
public String getName( ItemStack stack )
{
return TranslateUtils.translate( "componentequipment:modifier.portableJukebox.name" );
}