当前位置: 首页>>代码示例>>Java>>正文


Java Strings类代码示例

本文整理汇总了Java中gminers.kitchensink.Strings的典型用法代码示例。如果您正苦于以下问题:Java Strings类的具体用法?Java Strings怎么用?Java Strings使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Strings类属于gminers.kitchensink包,在下文中一共展示了Strings类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: registerRecipes

import gminers.kitchensink.Strings; //导入依赖的package包/类
public void registerRecipes() {
	for (int i = 0; i < resourceTypes.length; i++) {
		String s = resourceTypes[i];
		String nm = "ingot"+Strings.formatTitleCase(s).replace(" ", "");
		List<ItemStack> li = OreDictionary.getOres(nm);
		if (li == null || li.isEmpty()) {
			nm = "gem"+Strings.formatTitleCase(s).replace(" ", "");
			li = OreDictionary.getOres(nm);
		}
		ItemStack stack = li.get(0).copy();
		stack.stackSize = 9;
		String configName = Strings.formatTitleCase(resourceTypes[i]).replace(" ", "");
		configName = Character.toLowerCase(configName.charAt(0)) + configName.substring(1);
		if (FarragoMod.config.getBoolean("compressedBlocks."+configName+".uncraftable")) {
			GameRegistry.addRecipe(new ShapelessOreRecipe(stack, new ItemStack(this, 1, i)));
		}
		if (FarragoMod.config.getBoolean("compressedBlocks."+configName+".craftable")) {
			GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(this, 1, i), nm, nm, nm, nm, nm, nm, nm, nm, nm));
		}
	}
}
 
开发者ID:unascribed,项目名称:Farrago,代码行数:22,代码来源:BlockResource.java

示例2: createEaserButton

import gminers.kitchensink.Strings; //导入依赖的package包/类
private void createEaserButton(final PaneEaser boxEaser, final String key, final float val) {
	createAndAddButton("Ease to " + Strings.formatTitleCase(key) + " " + val, new Runnable() {
		
		@Override
		public void run() {
			boxEaser.easeFloat(key, val);
		}
	});
}
 
开发者ID:unascribed,项目名称:Glass-Pane,代码行数:10,代码来源:PaneTestEasers.java

示例3: registerOres

import gminers.kitchensink.Strings; //导入依赖的package包/类
public void registerOres() {
	for (int i = 0; i < ingotTypes.length; i++) {
		OreDictionary.registerOre("ingot"+Strings.formatTitleCase(ingotTypes[i]).replace(" ", ""), new ItemStack(this, 1, i));
	}
}
 
开发者ID:unascribed,项目名称:Farrago,代码行数:6,代码来源:ItemIngot.java

示例4: registerOres

import gminers.kitchensink.Strings; //导入依赖的package包/类
public void registerOres() {
	for (int i = 0; i < dustTypes.length; i++) {
		OreDictionary.registerOre("dust"+Strings.formatTitleCase(dustTypes[i]).replace(" ", ""), new ItemStack(this, 1, i));
	}
}
 
开发者ID:unascribed,项目名称:Farrago,代码行数:6,代码来源:ItemDust.java

示例5: registerOres

import gminers.kitchensink.Strings; //导入依赖的package包/类
public void registerOres() {
	for (int i = 0; i < oreTypes.length; i++) {
		OreDictionary.registerOre("ore"+Strings.formatTitleCase(oreTypes[i]).replace(" ", ""), new ItemStack(this, 1, i));
	}
}
 
开发者ID:unascribed,项目名称:Farrago,代码行数:6,代码来源:BlockOre.java

示例6: registerOres

import gminers.kitchensink.Strings; //导入依赖的package包/类
public void registerOres() {
	for (int i = 0; i < resourceTypes.length; i++) {
		OreDictionary.registerOre("block"+Strings.formatTitleCase(resourceTypes[i]).replace(" ", ""), new ItemStack(this, 1, i));
	}
}
 
开发者ID:unascribed,项目名称:Farrago,代码行数:6,代码来源:BlockResource.java

示例7: PaneTestMisc

import gminers.kitchensink.Strings; //导入依赖的package包/类
public PaneTestMisc() {
	setName("Miscellaneous");
	add(PaneButton.createDoneButton());
	add(PaneTestHarness.createGithubButton("PaneTestMisc.java"), PaneTestHarness.createFlipButton());
	
	PaneBlinker blinker = new PaneBlinker();
	setup("Blinker", blinker);
	
	WaveType[] waves = {
			WaveType.SINE,
			WaveType.TRIANGLE,
			WaveType.ABSOLUTE_SINE
	};
	for (WaveType wave : waves) {
		PaneBlinker waveBlinker = new PaneBlinker();
		waveBlinker.setWave(wave);
		setup(Strings.formatTitleCase(wave.name()) + " Wave Blinker", waveBlinker);
	}
	
	PaneBlinker fastBlinker = new PaneBlinker();
	fastBlinker.setSpeed(2);
	setup("Fast Blinker", fastBlinker);
	
	PaneBlinker slowBlinker = new PaneBlinker();
	slowBlinker.setSpeed(10);
	setup("Slow Blinker", slowBlinker);
	
	PaneImage image = new PaneImage(new ResourceLocation("textures/items/iron_ingot.png"));
	image.setX(224);
	image.setY(10);
	image.setWidth(16);
	image.setHeight(16);
	add(image);
	PaneLabel imageLabel = new PaneLabel("Image");
	imageLabel.setX(244);
	imageLabel.setY(14);
	add(imageLabel);
	
	PaneBox box = new PaneBox(0xFFFF5555);
	box.setX(224);
	box.setY(30);
	box.setWidth(16);
	box.setHeight(16);
	add(box);
	PaneLabel boxLabel = new PaneLabel("Box");
	boxLabel.setX(244);
	boxLabel.setY(34);
	add(boxLabel);
	
	PaneGradientBox gradientBox = new PaneGradientBox(0xFF5555FF, 0xFF55FF55);
	gradientBox.setX(224);
	gradientBox.setY(50);
	gradientBox.setWidth(16);
	gradientBox.setHeight(16);
	add(gradientBox);
	PaneLabel gradientBoxLabel = new PaneLabel("Gradient Box");
	gradientBoxLabel.setX(244);
	gradientBoxLabel.setY(54);
	add(gradientBoxLabel);
}
 
开发者ID:unascribed,项目名称:Glass-Pane,代码行数:61,代码来源:PaneTestMisc.java


注:本文中的gminers.kitchensink.Strings类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。