本文整理汇总了Java中exnihilo.registries.helpers.Smashable类的典型用法代码示例。如果您正苦于以下问题:Java Smashable类的具体用法?Java Smashable怎么用?Java Smashable使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Smashable类属于exnihilo.registries.helpers包,在下文中一共展示了Smashable类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: NEIHammerRecipeHandler
import exnihilo.registries.helpers.Smashable; //导入依赖的package包/类
public NEIHammerRecipeHandler() {
outputId = "hammerrecipes";
if (others == null) {
others = new ArrayList<PositionedStack>(ModId.Hammers.length);
for (ModId hammer : ModId.Hammers) {
Item item = hammer.getItem();
if (item != null) {
others.add(new PositionedStack(new ItemStack(item, 1), 43, 34, false));
}
}
}
if (recipes == null) {
recipes = new RewardRecipes();
for (Smashable reward : HammerRegistry.rewards) {
if (reward.sourceID != 0 && reward.id != 0) {
recipes.add(reward);
}
}
}
}
示例2: add
import exnihilo.registries.helpers.Smashable; //导入依赖的package包/类
public void add(Smashable reward) {
RewardRecipe recipe = new RewardRecipe(reward);
Pair<Float, Float> pair = new Pair<Float, Float>(reward.chance, reward.luckMultiplier);
if (recipes.containsKey(recipe)) {
recipes.get(recipe).add(pair);
} else {
List<Pair<Float, Float>> list = new ArrayList<Pair<Float, Float>>();
list.add(pair);
recipes.put(recipe, list);
}
}
示例3: RewardRecipe
import exnihilo.registries.helpers.Smashable; //导入依赖的package包/类
RewardRecipe(Smashable reward) {
input = new ItemStack(reward.sourceID, 1, reward.sourceMeta);
output = new ItemStack(reward.id, 1, reward.meta);
}