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


Java CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY属性代码示例

本文整理汇总了Java中net.minecraftforge.fluids.capability.CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY属性的典型用法代码示例。如果您正苦于以下问题:Java CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY属性的具体用法?Java CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY怎么用?Java CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在net.minecraftforge.fluids.capability.CapabilityFluidHandler的用法示例。


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

示例1: hasCapability

@Override
public boolean hasCapability(Capability<?> capability, @Nullable EnumFacing facing) {
    return capability == CapabilityItemHandler.ITEM_HANDLER_CAPABILITY
            || capability == CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY
            || capability == CapabilityEnergy.ENERGY
            || super.hasCapability(capability, facing);
}
 
开发者ID:TeamPneumatic,项目名称:pnc-repressurized,代码行数:7,代码来源:EntityDrone.java

示例2: getCapability

@Override
public <T> T getCapability(Capability<T> capability, EnumFacing facing)
{
    if (capability == CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY)
    {
        return CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY.cast(this);
    }
    return null;
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:9,代码来源:FluidBucketWrapper.java

示例3: getCapability

@Nullable
@Override
public <T> T getCapability(Capability<T> capability, @Nullable EnumFacing facing) {
    if (capability == CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY) {
        return CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY.cast(tank);
    } else {
        return super.getCapability(capability, facing);
    }
}
 
开发者ID:TeamPneumatic,项目名称:pnc-repressurized,代码行数:9,代码来源:TileEntityGasLift.java

示例4: getCapability

@Nullable
@Override
public <T> T getCapability(Capability<T> capability, @Nullable EnumFacing facing) {
    if (capability == CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY) {
        return CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY.cast(fluidHandler);
    }
    return super.getCapability(capability, facing);
}
 
开发者ID:TeamPneumatic,项目名称:pnc-repressurized,代码行数:8,代码来源:TileEntityThermopneumaticProcessingPlant.java

示例5: getCapability

@Override
public <T> T getCapability(Capability<T> capability, @Nullable EnumFacing facing)
{
    if (capability == CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY)
    {
        return CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY.cast(new FluidHandlerWrapper(this, facing));
    }
    return super.getCapability(capability, facing);
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:9,代码来源:TileFluidHandler.java

示例6: getCapability

@Nullable
@Override
public <T> T getCapability(Capability<T> capability, @Nullable EnumFacing facing) {
    if(capability == CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY) {
        return (T) tank;
    }
    if(ModularMachinery.isMekanismLoaded) {
        if(checkMekanismGasCapabilities(capability, facing)) {
            return (T) this;
        }
    }
    return super.getCapability(capability, facing);
}
 
开发者ID:HellFirePvP,项目名称:ModularMachinery,代码行数:13,代码来源:TileFluidTank.java

示例7: getCapability

@SuppressWarnings("unchecked")
@Nullable
@Override
public <T> T getCapability(@Nonnull Capability<T> capability, @Nullable EnumFacing facing) {
    if (capability == CapabilityEnergy.ENERGY) return (T) energyStorage;
    else if (capability == CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY) return (T) fluidTank;
    else if (capability == CapabilityItemHandler.ITEM_HANDLER_CAPABILITY) return (T) itemHandler;
    else return super.getCapability(capability, facing);
}
 
开发者ID:LasmGratel,项目名称:FoodCraft-Reloaded,代码行数:9,代码来源:TileEntityPressureCooker.java

示例8: getCapability

@SuppressWarnings("unchecked")
@Nullable
@Override
public <T> T getCapability(Capability<T> capability, @Nullable EnumFacing facing)
{
    if (capability == CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY)
    {
        if (facing == null || ArrayUtils.contains(supplier.sides, facing))
            return (T) tank;
    }
    return null;
}
 
开发者ID:cubex2,项目名称:customstuff4,代码行数:12,代码来源:TileEntityModuleTank.java

示例9: hasCapability

@Override
public boolean hasCapability(Capability<?> capability, @Nullable EnumFacing facing) {
    if(capability == CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY) {
        return true;
    }
    if(ModularMachinery.isMekanismLoaded) {
        if(checkMekanismGasCapabilitiesPresence(capability, facing)) {
            return true;
        }
    }
    return super.hasCapability(capability, facing);
}
 
开发者ID:HellFirePvP,项目名称:ModularMachinery,代码行数:12,代码来源:TileFluidTank.java

示例10: getCapability

@Override
public <T> T getCapability(Capability<T> capability, EnumFacing facing) {
    if (capability == CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY) {
        return CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY.cast(tank);
    } else if (capability == CapabilityItemHandler.ITEM_HANDLER_CAPABILITY) {
        return CapabilityItemHandler.ITEM_HANDLER_CAPABILITY.cast(inventory);
    } else {
        return super.getCapability(capability, facing);
    }
}
 
开发者ID:primetoxinz,项目名称:Meltery,代码行数:10,代码来源:TileMeltery.java

示例11: hasCapability

@Override
public boolean hasCapability(Capability<?> capability, EnumFacing facing)
{
    return capability == CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY;
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:5,代码来源:FluidBucketWrapper.java

示例12: hasCapability

@Override
public boolean hasCapability(Capability<?> capability, @Nullable EnumFacing facing)
{
    return capability == CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY;
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:5,代码来源:FluidContainerRegistryWrapper.java

示例13: hasCapability

@Override
public boolean hasCapability(Capability<?> capability, @Nullable EnumFacing facing) {
    return capability == CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY || super.hasCapability(capability, facing);
}
 
开发者ID:TeamPneumatic,项目名称:pnc-repressurized,代码行数:4,代码来源:TileEntityGasLift.java

示例14: hasCapability

@Override
public boolean hasCapability(Capability<?> capability, EnumFacing facing) {
    return capability == CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY || super.hasCapability(capability,facing);
}
 
开发者ID:DaedalusGame,项目名称:Soot,代码行数:4,代码来源:TileEntityMixerBottomImproved.java

示例15: hasCapability

@Override
public boolean hasCapability(@Nonnull Capability<?> capability, @Nullable EnumFacing facing) {
    return capability == CapabilityEnergy.ENERGY || capability == CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY || capability == CapabilityItemHandler.ITEM_HANDLER_CAPABILITY || super.hasCapability(capability, facing);
}
 
开发者ID:LasmGratel,项目名称:FoodCraft-Reloaded,代码行数:4,代码来源:TileEntityPressureCooker.java


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