當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。