mirror of
https://github.com/GTNewHorizons/AE2FluidCraft-Rework.git
synced 2026-11-11 15:57:55 +00:00
fix no return
This commit is contained in:
1 parent
7f6933483f
commit
b02ac628e9
1 file changed
+14
-1
+14
-1
@@ -34,7 +34,8 @@ public class DriverDualFluidInterface implements SidedBlock {
|
||||
|
||||
@Override
|
||||
public ManagedEnvironment createEnvironment(World world, int x, int y, int z, ForgeDirection side) {
|
||||
return null;
|
||||
TileEntity te = world.getTileEntity(x, y, z);
|
||||
return new DriverDualFluidInterface.Environment(getInterface(te, side));
|
||||
}
|
||||
|
||||
public static class Environment extends ManagedTileEntityEnvironment<DualityFluidInterface> implements NamedBlock {
|
||||
@@ -110,6 +111,18 @@ public class DriverDualFluidInterface implements SidedBlock {
|
||||
return false;
|
||||
}
|
||||
|
||||
private static DualityFluidInterface getInterface(TileEntity te, ForgeDirection face) {
|
||||
if (te != null) {
|
||||
if (te instanceof TileFluidInterface) {
|
||||
return ((TileFluidInterface) te).getDualityFluid();
|
||||
}
|
||||
if (te instanceof IPartHost && ((IPartHost) te).getPart(face) instanceof PartFluidInterface) {
|
||||
return ((PartFluidInterface) ((IPartHost) te).getPart(face)).getDualityFluid();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static class Provider implements EnvironmentProvider {
|
||||
Provider() {
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user