本文整理汇总了Java中net.minecraftforge.fml.common.Optional.Method方法的典型用法代码示例。如果您正苦于以下问题:Java Optional.Method方法的具体用法?Java Optional.Method怎么用?Java Optional.Method使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraftforge.fml.common.Optional
的用法示例。
在下文中一共展示了Optional.Method方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onIGWAction
import net.minecraftforge.fml.common.Optional; //导入方法依赖的package包/类
@Optional.Method(modid = ModIds.IGWMOD)
private void onIGWAction() {
int x = lastMouseX;
int y = lastMouseY;
IProgWidget hoveredWidget = programmerUnit.getHoveredWidget(x, y);
if(hoveredWidget != null) {
WikiRegistry.getWikiHooks().showWikiGui("pneumaticcraft:progwidget/" + CaseFormat.LOWER_CAMEL.to(CaseFormat.LOWER_UNDERSCORE, hoveredWidget.getWidgetString()));
}
for(IProgWidget widget : visibleSpawnWidgets) {
if(widget != draggingWidget && x - guiLeft >= widget.getX() && y - guiTop >= widget.getY() && x - guiLeft <= widget.getX() + widget.getWidth() / 2 && y - guiTop <= widget.getY() + widget.getHeight() / 2) {
WikiRegistry.getWikiHooks().showWikiGui("pneumaticcraft:progwidget/" + CaseFormat.LOWER_CAMEL.to(CaseFormat.LOWER_UNDERSCORE, widget.getWidgetString()));
}
}
}
示例2: checkForInterface
import net.minecraftforge.fml.common.Optional; //导入方法依赖的package包/类
@Optional.Method(modid = ModIds.AE2)
private boolean checkForInterface(){
if(isPlacedOnInterface()) {
TileEntity te = getTileEntity();
if(te instanceof IGridHost) {
if(((IGridHost)te).getGridNode(null) == null) return true;
if(getGridNode(null) == null) return true;
try {
AEApi.instance().grid().createGridConnection(((IGridHost)te).getGridNode(null), getGridNode(null));
} catch(FailedConnectionException e) {
Log.error("Couldn't connect to an ME Interface!");
e.printStackTrace();
}
}
}
return false;
}
示例3: copyPrepareGasRender
import net.minecraftforge.fml.common.Optional; //导入方法依赖的package包/类
@Optional.Method(modid = "mekanism")
public HybridFluidRenderer<T> copyPrepareGasRender(int width, int height, int capacityMb, boolean showCapacity, @Nullable IDrawable overlay) {
HybridFluidRenderer<T> copy = new HybridFluidRenderer<>();
copy.gasRenderer = new GasStackRenderer(capacityMb, showCapacity, width, height, overlay);
copy.fluidStackRenderer = this.fluidStackRenderer;
return copy;
}
示例4: notifyNetworkOfCraftingChange
import net.minecraftforge.fml.common.Optional; //导入方法依赖的package包/类
@Optional.Method(modid = ModIds.AE2)
private void notifyNetworkOfCraftingChange(){
if(gridNode != null) {
IGrid grid = ((IGridNode)gridNode).getGrid();
if(grid != null) grid.postEvent(new MENetworkCraftingPatternChange(this, (IGridNode)gridNode));
}
}
示例5: init
import net.minecraftforge.fml.common.Optional; //导入方法依赖的package包/类
@Optional.Method(modid = "immersiveengineering")
public static void init()
{
if (Loader.isModLoaded("mysticalagriculture"))
{
BelljarHandler.registerBasicItemFertilizer(new ItemStack(ModItems.itemMysticalFertilizer), 2.25f);
}
}
示例6: isPrioritized
import net.minecraftforge.fml.common.Optional; //导入方法依赖的package包/类
@Override
@Optional.Method(modid = ModIds.AE2)
public boolean isPrioritized(IAEItemStack arg0){
return false;
}
示例7: getSlot
import net.minecraftforge.fml.common.Optional; //导入方法依赖的package包/类
@Override
@Optional.Method(modid = ModIds.AE2)
public int getSlot(){
return 0;
}
示例8: securityBreak
import net.minecraftforge.fml.common.Optional; //导入方法依赖的package包/类
@Override
@Optional.Method(modid = ModIds.AE2)
public void securityBreak(){
drop();
}
示例9: readMekGasData
import net.minecraftforge.fml.common.Optional; //导入方法依赖的package包/类
@Optional.Method(modid = "mekanism")
private void readMekGasData(NBTTagCompound compound) {
if(this.tank instanceof HybridGasTank) {
((HybridGasTank) this.tank).readGasFromNBT(compound);
}
}
示例10: updateWatcher
import net.minecraftforge.fml.common.Optional; //导入方法依赖的package包/类
@Override
@Optional.Method(modid = ModIds.AE2)
public void updateWatcher(ICraftingWatcher watcher){
craftingWatcher = watcher;
updateProvidingItems();
}
示例11: writeGasTag
import net.minecraftforge.fml.common.Optional; //导入方法依赖的package包/类
@Optional.Method(modid = "mekanism")
private static void writeGasTag(HybridTank tank, NBTTagCompound compound) {
if(tank instanceof HybridGasTank) {
((HybridGasTank) tank).writeGasToNBT(compound);
}
}
示例12: isBusy
import net.minecraftforge.fml.common.Optional; //导入方法依赖的package包/类
@Override
@Optional.Method(modid = ModIds.AE2)
public boolean isBusy(){
return true;
}
示例13: emitsEnergyTo
import net.minecraftforge.fml.common.Optional; //导入方法依赖的package包/类
@Override
@Optional.Method(modid = "ic2")
public boolean emitsEnergyTo(IEnergyAcceptor receiver, EnumFacing side) {
return true;
}
示例14: getSourceTier
import net.minecraftforge.fml.common.Optional; //导入方法依赖的package包/类
@Override
@Optional.Method(modid = "ic2")
public int getSourceTier() {
return size.energyTier;
}
示例15: preInit
import net.minecraftforge.fml.common.Optional; //导入方法依赖的package包/类
@Optional.Method(modid = "thermalexpansion")
public static void preInit()
{
// ThermalExpansionHelper.addCompressionFuel("liquid_butter", 64000);
}