- Add the Codota plugin to your IDE and get smart completions
private void myMethod () {Connection c =
DataSource dataSource;dataSource.getConnection()
String url;DriverManager.getConnection(url)
IdentityDatabaseUtil.getDBConnection()
- Smart code suggestions by Codota
}
protected boolean isValidSlave(World world, BlockPos pos) { if(!world.isBlockLoaded(pos)) { return false; } TileEntity te = world.getTileEntity(pos); // slave-blocks are only allowed if they already belong to this smeltery if(te instanceof MultiServantLogic) { MultiServantLogic slave = (MultiServantLogic) te; if(slave.hasValidMaster()) { if(!tile.getPos().equals(slave.getMasterPosition())) { return false; } } } return true; } }
@Override public void notifyMasterOfChange() { if(this.hasValidMaster()) { IMasterLogic logic = (IMasterLogic) this.world.getTileEntity(this.master); logic.notifyChange(this, this.pos); } }
@Override public boolean verifyMaster(IMasterLogic logic, World world, BlockPos pos) { if(this.hasMaster) { return this.hasValidMaster(); } else { this.overrideMaster(pos); return true; } }