Reduces visibility of internal fields/methods
Reduces the visibility of all fields to private and create setters/getters when necessary. Exceptions are fields with GuiSync as these need to be public. Reduces the visibility of internal methods to private/protected/default when possible.
This commit is contained in:
@@ -19,31 +19,31 @@
|
||||
package appeng.parts.layers;
|
||||
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import pneumaticCraft.api.tileentity.IAirHandler;
|
||||
import pneumaticCraft.api.tileentity.ISidedPneumaticMachine;
|
||||
|
||||
import appeng.api.parts.IPart;
|
||||
import appeng.api.parts.LayerBase;
|
||||
|
||||
|
||||
public class LayerPressure extends LayerBase implements ISidedPneumaticMachine
|
||||
{
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public IAirHandler getAirHandler( ForgeDirection side )
|
||||
{
|
||||
IPart part = this.getPart( side );
|
||||
if( part instanceof ISidedPneumaticMachine )
|
||||
{
|
||||
return ( (ISidedPneumaticMachine) part ).getAirHandler( side );
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
//import javax.annotation.Nullable;
|
||||
//
|
||||
//import net.minecraftforge.common.util.ForgeDirection;
|
||||
//
|
||||
//import pneumaticCraft.api.tileentity.IAirHandler;
|
||||
//import pneumaticCraft.api.tileentity.ISidedPneumaticMachine;
|
||||
//
|
||||
//import appeng.api.parts.IPart;
|
||||
//import appeng.api.parts.LayerBase;
|
||||
//
|
||||
//
|
||||
//public class LayerPressure extends LayerBase implements ISidedPneumaticMachine
|
||||
//{
|
||||
//
|
||||
// @Nullable
|
||||
// @Override
|
||||
// public IAirHandler getAirHandler( ForgeDirection side )
|
||||
// {
|
||||
// IPart part = this.getPart( side );
|
||||
// if( part instanceof ISidedPneumaticMachine )
|
||||
// {
|
||||
// return ( (ISidedPneumaticMachine) part ).getAirHandler( side );
|
||||
// }
|
||||
//
|
||||
// return null;
|
||||
// }
|
||||
//
|
||||
//}
|
||||
|
||||
Reference in New Issue
Block a user