本文整理汇总了Java中codechicken.nei.api.IStackPositioner类的典型用法代码示例。如果您正苦于以下问题:Java IStackPositioner类的具体用法?Java IStackPositioner怎么用?Java IStackPositioner使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IStackPositioner类属于codechicken.nei.api包,在下文中一共展示了IStackPositioner类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: registerGuiOverlay
import codechicken.nei.api.IStackPositioner; //导入依赖的package包/类
public static void registerGuiOverlay(Class<? extends GuiContainer> classz, String ident, IStackPositioner positioner)
{
positionerMap.put(new OverlayKey(classz, ident), positioner);
if(positioner instanceof OffsetPositioner && !offsets.containsKey(classz))
{
OffsetPositioner p = (OffsetPositioner)positioner;
setGuiOffset(classz, p.offsetx, p.offsety);
}
}
开发者ID:4Space,项目名称:4Space-5,代码行数:10,代码来源:RecipeInfo.java
示例2: getOverlayRenderer
import codechicken.nei.api.IStackPositioner; //导入依赖的package包/类
@Override
public IRecipeOverlayRenderer getOverlayRenderer(GuiContainer gui, int recipe) {
IRecipeOverlayRenderer renderer = super.getOverlayRenderer(gui, recipe);
if (renderer != null)
return renderer;
IStackPositioner positioner = RecipeInfo.getStackPositioner(gui, "crafting2x2");
if (positioner == null)
return null;
return new DefaultOverlayRenderer(getIngredientStacks(recipe), positioner);
}
开发者ID:4Space,项目名称:4Space-5,代码行数:12,代码来源:ShapedRecipeHandler.java
示例3: getOverlayRenderer
import codechicken.nei.api.IStackPositioner; //导入依赖的package包/类
public IRecipeOverlayRenderer getOverlayRenderer(GuiContainer gui, int recipe) {
IStackPositioner positioner = RecipeInfo.getStackPositioner(gui, getOverlayIdentifier());
if (positioner == null) {
return null;
}
return new DefaultOverlayRenderer(getIngredientStacks(recipe), positioner);
}
开发者ID:TheCBProject,项目名称:NotEnoughItems,代码行数:8,代码来源:TemplateRecipeHandler.java
示例4: registerGuiOverlay
import codechicken.nei.api.IStackPositioner; //导入依赖的package包/类
public static void registerGuiOverlay(Class<? extends GuiContainer> classz, String ident, IStackPositioner positioner) {
positionerMap.put(new OverlayKey(classz, ident), positioner);
if (positioner instanceof OffsetPositioner && !offsets.containsKey(classz)) {
OffsetPositioner p = (OffsetPositioner) positioner;
setGuiOffset(classz, p.offsetX, p.offsetY);
}
}
开发者ID:TheCBProject,项目名称:NotEnoughItems,代码行数:8,代码来源:RecipeInfo.java
示例5: getOverlayRenderer
import codechicken.nei.api.IStackPositioner; //导入依赖的package包/类
@Override
public IRecipeOverlayRenderer getOverlayRenderer(GuiContainer gui, int recipe) {
IRecipeOverlayRenderer renderer = super.getOverlayRenderer(gui, recipe);
if (renderer != null) {
return renderer;
}
IStackPositioner positioner = RecipeInfo.getStackPositioner(gui, "crafting2x2");
if (positioner == null) {
return null;
}
return new DefaultOverlayRenderer(getIngredientStacks(recipe), positioner);
}
开发者ID:TheCBProject,项目名称:NotEnoughItems,代码行数:14,代码来源:ShapedRecipeHandler.java
示例6: overlayRecipe
import codechicken.nei.api.IStackPositioner; //导入依赖的package包/类
@Override
public void overlayRecipe(GuiContainer guiContainer, IRecipeHandler recipeHandler, int index, boolean shift) {
List<PositionedStack> ingredients = recipeHandler.getIngredientStacks(index);
if (!shift) {
IStackPositioner positioner = new OffsetPositioner(xOffset, yOffset);
LayoutManager.overlayRenderer = new DefaultOverlayRenderer(ingredients, positioner);
}else {
if (NEIClientUtils.getHeldItem() != null) {
return;
}
GuiContainerManager manager = GuiContainerManager.getManager(guiContainer);
for (Object slot : guiContainer.inventorySlots.inventorySlots) {
if (this.slot.isInstance(slot)) {
Slot slot2 = (Slot) slot;
manager.handleSlotClick(slot2.slotNumber, 0, 1);
}
}
for (PositionedStack stack : ingredients) {
if (stack != null) {
Slot slotTo = findCorrespondingSlot(guiContainer, stack);
if (slotTo != null) {
Slot slotFrom = findStartingSlot(guiContainer, stack);
if (slotFrom != null) {
manager.handleSlotClick(slotFrom.slotNumber, 0, 0);
manager.handleSlotClick(slotTo.slotNumber, 1, 0);
manager.handleSlotClick(slotFrom.slotNumber, 0, 0);
}
}
}
}
}
}
开发者ID:austinv11,项目名称:Thaumic-NEI,代码行数:33,代码来源:OverlayHandler.java
示例7: getOverlayRenderer
import codechicken.nei.api.IStackPositioner; //导入依赖的package包/类
@Override
public IRecipeOverlayRenderer getOverlayRenderer(GuiContainer gui, int recipe) {
IRecipeOverlayRenderer renderer = super.getOverlayRenderer(gui, recipe);
if (renderer != null)
return renderer;
IStackPositioner positioner = RecipeInfo.getStackPositioner(gui, "crafting2x2");
if (positioner == null)
return null;
return new DefaultOverlayRenderer(getIngredientStacks(recipe), positioner);
}
开发者ID:OwnAgePau,项目名称:Soul-Forest,代码行数:12,代码来源:GemmerationTableRecipeHandler.java
示例8: getOverlayRenderer
import codechicken.nei.api.IStackPositioner; //导入依赖的package包/类
public IRecipeOverlayRenderer getOverlayRenderer(GuiContainer gui, int recipe) {
IStackPositioner positioner = RecipeInfo.getStackPositioner(gui, getOverlayIdentifier());
if (positioner == null)
return null;
return new DefaultOverlayRenderer(getIngredientStacks(recipe), positioner);
}
开发者ID:4Space,项目名称:4Space-5,代码行数:7,代码来源:TemplateRecipeHandler.java
示例9: getStackPositioner
import codechicken.nei.api.IStackPositioner; //导入依赖的package包/类
public static IStackPositioner getStackPositioner(GuiContainer gui, String ident)
{
return positionerMap.get(new OverlayKey(gui.getClass(), ident));
}
开发者ID:4Space,项目名称:4Space-5,代码行数:5,代码来源:RecipeInfo.java
示例10: getStackPositioner
import codechicken.nei.api.IStackPositioner; //导入依赖的package包/类
public static IStackPositioner getStackPositioner(GuiContainer gui, String ident) {
return positionerMap.get(new OverlayKey(gui.getClass(), ident));
}
开发者ID:TheCBProject,项目名称:NotEnoughItems,代码行数:4,代码来源:RecipeInfo.java
注:本文中的codechicken.nei.api.IStackPositioner类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论