本文整理汇总了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);
}
示例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;
}
示例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);
}
}
示例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);
}
示例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);
}
示例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);
}
示例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;
}
示例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);
}
示例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);
}
}
示例11: hasCapability
@Override
public boolean hasCapability(Capability<?> capability, EnumFacing facing)
{
return capability == CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY;
}
示例12: hasCapability
@Override
public boolean hasCapability(Capability<?> capability, @Nullable EnumFacing facing)
{
return capability == CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY;
}
示例13: hasCapability
@Override
public boolean hasCapability(Capability<?> capability, @Nullable EnumFacing facing) {
return capability == CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY || super.hasCapability(capability, facing);
}
示例14: hasCapability
@Override
public boolean hasCapability(Capability<?> capability, EnumFacing facing) {
return capability == CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY || super.hasCapability(capability,facing);
}
示例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);
}